From 8640e1f19fd28f86c54ec643e00bdd345f8ee846 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 27 Apr 2017 10:23:57 -0400 Subject: [PATCH 01/26] Remove app manifest support Also update pouchdb to 6.2.0 --- app/index.html | 2 +- package.json | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/index.html b/app/index.html index 82b0b24c4e..9e66241c4b 100644 --- a/app/index.html +++ b/app/index.html @@ -1,5 +1,5 @@ - + diff --git a/package.json b/package.json index bf951e23a7..7e125ab010 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,7 @@ "body-parser": "^1.14.2", "broccoli-asset-rev": "^2.4.5", "broccoli-export-text": "0.0.2", - "broccoli-funnel": "^1.0.7", - "broccoli-manifest": "0.0.7", - "broccoli-serviceworker": "0.1.4", + "broccoli-serviceworker": "0.1.6", "crypto": "0.0.3", "csv-parse": "^1.2.0", "devtron": "1.4.0", @@ -98,8 +96,8 @@ "hospitalrun-server-routes": "0.9.11", "loader.js": "^4.0.11", "nano": "6.2.0", - "pouchdb": "6.1.2", - "pouchdb-adapter-memory": "6.1.2", + "pouchdb": "6.2.0", + "pouchdb-adapter-memory": "6.2.0", "pouchdb-list": "^1.1.0", "pouchdb-users": "^1.0.3", "stylelint": "~7.7.1", From ad76252a7fbb9ac329f1644d771685cde371b47a Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 1 May 2017 13:55:19 -0400 Subject: [PATCH 02/26] Make sure login tests wait until db is loaded to finish. --- tests/acceptance/login-test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/acceptance/login-test.js b/tests/acceptance/login-test.js index 91c819a081..139221ac13 100644 --- a/tests/acceptance/login-test.js +++ b/tests/acceptance/login-test.js @@ -84,5 +84,8 @@ function login(assert, spaceAroundUsername) { fillIn('#identification', !spaceAroundUsername ? 'hradmin' : ' hradmin'); fillIn('#password', 'test'); click('button:contains(Sign in)'); + andThen(() => { + waitToAppear('.sidebar-nav-logo'); + }); }); } From c85937a6d8b5e02059b0f3fbd129d69c347446b7 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 1 May 2017 14:18:49 -0400 Subject: [PATCH 03/26] Setup testing to use chrome and service worker --- .travis.yml | 5 +++-- config/environment.js | 6 +++--- testem.js | 2 +- tests/helpers/run-with-pouch-dump.js | 24 +++++++++++++++++++++--- tests/index.html | 13 +++++++++++++ 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index d776f10076..72cc9552f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ addons: - ubuntu-toolchain-r-test packages: - g++-4.8 + - google-chrome-stable cache: directories: @@ -24,9 +25,9 @@ cache: before_install: - npm config set spin false - - npm install -g bower phantomjs-prebuilt + - npm install -g bower - bower --version - - phantomjs --version + - google-chrome --version install: - npm install diff --git a/config/environment.js b/config/environment.js index a1f09b6918..d6103bf8ed 100644 --- a/config/environment.js +++ b/config/environment.js @@ -59,14 +59,14 @@ module.exports = function(environment) { ENV.serviceWorker = { enabled: false, includeRegistration: false - } + }; } else { ENV.serviceWorker = { enabled: true, debug: true, excludePaths: ['manifest.appcache'], swIncludeFiles: [ - 'node_modules/pouchdb/dist/pouchdb.js' + 'vendor/pouchdb-for-sw.js' ] }; if (environment === 'production') { @@ -74,7 +74,7 @@ module.exports = function(environment) { } } if (environment === 'test') { - ENV.serviceWorker.includeRegistration = false; + ENV.serviceWorker.enabled = true; } ENV.emberFullCalendar = { diff --git a/testem.js b/testem.js index 3c30ad02e1..cf056bd1b0 100644 --- a/testem.js +++ b/testem.js @@ -4,7 +4,7 @@ module.exports = { "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ - "PhantomJS" + "Chrome" ], "launch_in_dev": [ "Chrome" diff --git a/tests/helpers/run-with-pouch-dump.js b/tests/helpers/run-with-pouch-dump.js index d35ab93995..9fe217c5dd 100644 --- a/tests/helpers/run-with-pouch-dump.js +++ b/tests/helpers/run-with-pouch-dump.js @@ -6,6 +6,7 @@ import PouchAdapterMemory from 'npm:pouchdb-adapter-memory'; import PouchDBUsers from 'npm:pouchdb-users'; import DatabaseService from 'hospitalrun/services/database'; import ConfigService from 'hospitalrun/services/config'; +import PouchDBWorker from 'npm:worker-pouch/client'; const { set @@ -39,6 +40,7 @@ function destroyDatabases(dbs) { function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) { PouchDB.plugin(PouchAdapterMemory); PouchDB.plugin(PouchDBUsers); + let db = new PouchDB('hospitalrun-test-database', { adapter: 'memory' }); @@ -56,9 +58,25 @@ function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) { let InMemoryDatabaseService = DatabaseService.extend({ createDB() { - return promise.then(function() { - return db; - }); + if (navigator.serviceWorker) { + // Use pouch-worker to run the DB in the service worker + return navigator.serviceWorker.ready.then(() => { + if (navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage) { + PouchDB.adapter('worker', PouchDBWorker); + db = new PouchDB('hospitalrun-test-database', { + adapter: 'worker', + worker: () => navigator.serviceWorker + }); + return db.load(dump).then(() => { + return db; + }); + } else { + return promise.then(() => db); + } + }); + } else { + return promise.then(() => db); + } }, _createUsersDB() { return usersDB.installUsersBehavior().then(() => { diff --git a/tests/index.html b/tests/index.html index 33ad9ff0de..8e63bbb835 100644 --- a/tests/index.html +++ b/tests/index.html @@ -29,5 +29,18 @@ {{content-for "body-footer"}} {{content-for "test-body-footer"}} + From 314c83be6ff53d1655d6825086ec698e1ec2fe50 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 1 May 2017 15:03:57 -0400 Subject: [PATCH 04/26] Fixed error when sys admin and not in stand alone mode --- app/controllers/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/controllers/index.js b/app/controllers/index.js index 338e84cbe0..61dc88a16d 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -15,11 +15,13 @@ export default Ember.Controller.extend(UserSession, { needsUserSetup: alias('config.needsUserSetup'), // on init, look up the list of users and determine if there's a need for a needsUserSetup msg init() { - get(this, 'database.usersDB').allDocs().then((results) => { - if (results.total_rows <= 1) { - set(this, 'config.needsUserSetup', true); - } - }); + if (get(this, 'standAlone')) { + get(this, 'database.usersDB').allDocs().then((results) => { + if (results.total_rows <= 1) { + set(this, 'config.needsUserSetup', true); + } + }); + } }, actions: { newUser() { From 4b0fe254cacc195d5255576aae175a6a5364de7b Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 1 May 2017 15:06:52 -0400 Subject: [PATCH 05/26] Use worker-pouch to access local db via sw Also, make sure search works offline --- app/adapters/application.js | 111 +- app/authenticators/custom.js | 13 +- app/services/config.js | 1 + app/services/database.js | 251 +- app/serviceworkers/pouchdb-sync.js | 441 +- package.json | 3 +- vendor/pouchdb-for-sw-src.js | 7 + vendor/pouchdb-for-sw.js | 33984 +++++++++++++++++++++++++++ 8 files changed, 34585 insertions(+), 226 deletions(-) create mode 100644 vendor/pouchdb-for-sw-src.js create mode 100644 vendor/pouchdb-for-sw.js diff --git a/app/adapters/application.js b/app/adapters/application.js index d4713d7435..0342040ebd 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -16,10 +16,10 @@ const { } = Ember; export default Adapter.extend(CheckForErrors, { - config: Ember.inject.service(), + ajax: Ember.inject.service(), database: Ember.inject.service(), db: reads('database.mainDB'), - standAlone: reads('config.standAlone'), + usePouchFind: reads('database.usePouchFind'), _specialQueries: [ 'containsValue', @@ -29,66 +29,65 @@ export default Adapter.extend(CheckForErrors, { _esDefaultSize: 25, _executeContainsSearch(store, type, query) { - let standAlone = get(this, 'standAlone'); - if (standAlone) { + let usePouchFind = get(this, 'usePouchFind'); + if (usePouchFind) { return this._executePouchDBFind(store, type, query); } - return new Ember.RSVP.Promise((resolve, reject) => { - let typeName = this.getRecordTypeName(type); - let searchUrl = `/search/hrdb/${typeName}/_search`; - if (query.containsValue && query.containsValue.value) { - let queryString = ''; - query.containsValue.keys.forEach((key) => { - if (!Ember.isEmpty(queryString)) { - queryString = `${queryString} OR `; - } - let queryValue = query.containsValue.value; - switch (key.type) { - case 'contains': { - queryValue = `*${queryValue}*`; - break; - } - case 'fuzzy': { - queryValue = `${queryValue}~`; - break; - } + let typeName = this.getRecordTypeName(type); + let searchUrl = `/search/hrdb/${typeName}/_search`; + if (query.containsValue && query.containsValue.value) { + let queryString = ''; + query.containsValue.keys.forEach((key) => { + if (!Ember.isEmpty(queryString)) { + queryString = `${queryString} OR `; + } + let queryValue = query.containsValue.value; + switch (key.type) { + case 'contains': { + queryValue = `*${queryValue}*`; + break; } - queryString = `${queryString}data.${key.name}:${queryValue}`; - }); - let successFn = (results) => { - if (results && results.hits && results.hits.hits) { - let resultDocs = Ember.A(results.hits.hits).map((hit) => { - let mappedResult = hit._source; - mappedResult.id = hit._id; - return mappedResult; - }); - let response = { - rows: resultDocs - }; - this._handleQueryResponse(response, store, type).then(resolve, reject); - } else if (results.rows) { - this._handleQueryResponse(results, store, type).then(resolve, reject); - } else { - reject('Search results are not valid'); + case 'fuzzy': { + queryValue = `${queryValue}~`; + break; } - }; - - if (Ember.isEmpty(query.size)) { - query.size = this.get('_esDefaultSize'); } - - Ember.$.ajax(searchUrl, { - dataType: 'json', - data: { - q: queryString, - size: this.get('_esDefaultSize') - }, - success: successFn - }); - } else { - reject('invalid query'); + queryString = `${queryString}data.${key.name}:${queryValue}`; + }); + let ajax = get(this, 'ajax'); + if (Ember.isEmpty(query.size)) { + query.size = this.get('_esDefaultSize'); } - }); + + return ajax.request(searchUrl, { + dataType: 'json', + data: { + q: queryString, + size: this.get('_esDefaultSize') + } + }).then((results) => { + if (results && results.hits && results.hits.hits) { + let resultDocs = Ember.A(results.hits.hits).map((hit) => { + let mappedResult = hit._source; + mappedResult.id = hit._id; + return mappedResult; + }); + let response = { + rows: resultDocs + }; + return this._handleQueryResponse(response, store, type); + } else if (results.rows) { + return this._handleQueryResponse(results, store, type); + } else { + throw new Error('Search results are not valid'); + } + }).catch(() => { + // Try pouch db find if ajax fails + return this._executePouchDBFind(store, type, query); + }); + } else { + throw new Error('invalid query'); + } }, _executePouchDBFind(store, type, query) { diff --git a/app/authenticators/custom.js b/app/authenticators/custom.js index 66cf99a8b7..141982a3ae 100644 --- a/app/authenticators/custom.js +++ b/app/authenticators/custom.js @@ -115,12 +115,15 @@ export default BaseAuthenticator.extend({ response.name = data.name; response.expires_at = this._absolutizeExpirationTime(600); this._checkUser(response).then((user) => { - this.get('config').setCurrentUser(user.name); + let config = get(this, 'config'); let database = this.get('database'); - database.setup({}).then(() => { - resolve(user); - }, reject); - }, reject); + config.setCurrentUser(user.name); + config.loadConfig().then((configs) => { + database.setup(configs).then(() => { + resolve(user); + }); + }); + }).catch(reject); }, function(xhr) { reject(xhr.responseJSON || xhr.responseText); }); diff --git a/app/services/config.js b/app/services/config.js index 025c1221d1..f6cc09e9b9 100644 --- a/app/services/config.js +++ b/app/services/config.js @@ -64,6 +64,7 @@ export default Ember.Service.extend({ 'config_consumer_key', 'config_consumer_secret', 'config_disable_offline_sync', + 'config_external_search', 'config_oauth_token', 'config_token_secret', 'config_use_google_auth' diff --git a/app/services/database.js b/app/services/database.js index be435e4c4c..c3b2b2f14a 100644 --- a/app/services/database.js +++ b/app/services/database.js @@ -4,6 +4,7 @@ import createPouchViews from 'hospitalrun/utils/pouch-views'; import List from 'npm:pouchdb-list'; import PouchAdapterMemory from 'npm:pouchdb-adapter-memory'; import PouchDBUsers from 'npm:pouchdb-users'; +import PouchDBWorker from 'npm:worker-pouch/client'; import UnauthorizedError from 'hospitalrun/utils/unauthorized-error'; const { @@ -21,35 +22,24 @@ const { export default Service.extend({ mainDB: null, // Server DB oauthHeaders: null, - setMainDB: false, requireLogin: true, + setMainDB: false, + usePouchFind: false, usersDB: null, // local users database for standAlone mode config: inject.service(), standAlone: alias('config.standAlone'), - createDB(configs, pouchOptions) { + createDB(configs) { let standAlone = get(this, 'standAlone'); + if (standAlone || !configs.config_external_search) { + set(this, 'usePouchFind', true); + } if (standAlone) { - return this._createLocalDB('localMainDB', pouchOptions).then((localDb) => { - buildPouchFindIndexes(localDb); - return localDb; - }); + let localDb = this._createLocalDB(); + return RSVP.resolve(localDb); } - return new RSVP.Promise((resolve, reject) => { - let url = `${document.location.protocol}//${document.location.host}/db/main`; - - this._createRemoteDB(url, pouchOptions) - .catch((err) => { - if ((err.status && err.status === 401) || configs.config_disable_offline_sync === true) { - reject(err); - } else { - return this._createLocalDB('localMainDB', pouchOptions); - } - }).then((db) => resolve(db)) - .catch((err) => reject(err)); - - }, 'initialize application db'); + return this._createMainDB(configs); }, getDBInfo() { @@ -67,7 +57,7 @@ export default Service.extend({ resolve(doc); } }); - }); + }, `getDocFromMainDB ${docId}`); }, /** @@ -149,7 +139,7 @@ export default Service.extend({ reject(err); }); }, reject); - }); + }, 'loadDBFromDump'); }, queryMainDB(queryParams, mapReduce) { @@ -174,46 +164,219 @@ export default Service.extend({ } }); } - }); + }, 'queryMainDB'); }, setup(configs) { PouchDB.plugin(List); - PouchDB.plugin(PouchDBUsers); - let pouchOptions = this._getOptions(configs); - return this.createDB(configs, pouchOptions).then((db) => { + return this.createDB(configs).then((db) => { set(this, 'mainDB', db); set(this, 'setMainDB', true); if (get(this, 'standAlone')) { + PouchDB.plugin(PouchDBUsers); return this._createUsersDB(); + } else { + this.setupSubscription(configs); } }); }, - _createRemoteDB(remoteUrl, pouchOptions) { - return new RSVP.Promise(function(resolve, reject) { - let remoteDB = new PouchDB(remoteUrl, pouchOptions); - // remote db lazy created, check if db created correctly - remoteDB.info().then(()=> { - createPouchViews(remoteDB); - resolve(remoteDB); - }).catch((err) => { - console.log('error with remote db:', JSON.stringify(err, null, 2)); - reject(err); + setupSubscription(configs) { + if (!configs.config_disable_offline_sync && navigator.serviceWorker) { + let config = get(this, 'config'); + let localDB = this._createLocalDB(); + return config.getConfigValue('push_subscription').then((pushSub) => { + if (isEmpty(pushSub)) { + return localDB.id().then((dbId) => { + let dbInfo = { + id: dbId, + remote_seq: 0 + }; + return this._getPermissionAndSubscribe(dbInfo); + }).then(() => { + return this._requestSync(); + }).then((result) => { + console.log('Sync result:', result); + }).catch((err) => { + console.log('Error setting up subscription', err); + }); + } }); - }); + } }, - _createLocalDB(localDBName, pouchOptions) { - return new RSVP.Promise(function(resolve, reject) { - let localDB = new PouchDB(localDBName, pouchOptions); - localDB.info().then(() => { - createPouchViews(localDB); - resolve(localDB); - }).catch((err) => reject(err)); + _askPermission() { + console.log('In askPermission'); + return new RSVP.Promise((resolve, reject) => { + let permissionResult = Notification.requestPermission((result) => { + resolve(result); + }); + + if (permissionResult) { + permissionResult.then(resolve, reject); + } + }) + .then((permissionResult) => { + if (permissionResult !== 'granted') { + throw new Error('We weren\'t granted permission.'); + } + return permissionResult; + }, 'Ask for notification permisson'); + }, + + _createLocalDB(pouchOptions) { + let localDB = new PouchDB('localMainDB', pouchOptions); + createPouchViews(localDB); + buildPouchFindIndexes(localDB); + return localDB; + }, + + _createMainDB(configs) { + if (!configs.config_disable_offline_sync && navigator.serviceWorker) { + // Use pouch-worker to run the DB in the service worker + return navigator.serviceWorker.ready.then(() => { + if (navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage) { + PouchDB.adapter('worker', PouchDBWorker); + let localDB = this._createLocalDB({ + adapter: 'worker', + worker: () => navigator.serviceWorker + }); + return localDB; + } else { + return this._createRemoteDB(configs); + } + }); + } else { + return this._createRemoteDB(configs); + } + }, + + _createRemoteDB(configs) { + let remoteUrl = `${document.location.protocol}//${document.location.host}/db/main`; + let pouchOptions = this._getOptions(configs); + let remoteDB = new PouchDB(remoteUrl, pouchOptions); + return remoteDB.info().then(()=> { + createPouchViews(remoteDB); + }).catch((err) => { + console.log('error with remote db:', JSON.stringify(err, null, 2)); + throw err; }); }, + _getNotificationPermissionState() { + if (navigator.permissions) { + return navigator.permissions.query({ name: 'notifications' }) + .then((result) => { + return result.state; + }); + } + return RSVP.resolve(Notification.permission); + }, + + _getPermissionAndSubscribe(dbInfo) { + return new RSVP.Promise((resolve, reject) => { + navigator.serviceWorker.ready.then((registration) => { + return this._getNotificationPermissionState().then((permission) => { + if (permission !== 'granted') { + console.log('We do not have permission, so go ahead and ask for it'); + return this._askPermission().then((result) => { + console.log('Result of ask permission was:', result); + return this._subscribeUserToPush(registration, dbInfo).then(resolve, reject); + }); + } else { + console.log('We have permission, so go subscribe user to push'); + return this._subscribeUserToPush(registration, dbInfo).then(resolve, reject).catch((error) => { + console.log('Subscribe error', error); + }); + } + }); + }); + }, 'Get notification permission and subscribe to push'); + }, + + _urlBase64ToUint8Array(base64String) { + let padding = '='.repeat((4 - base64String.length % 4) % 4); + let base64 = (base64String + padding) + .replace(/\-/g, '+') + .replace(/_/g, '/'); + + let rawData = window.atob(base64); + let outputArray = new Uint8Array(rawData.length); + + for (let i = 0; i < rawData.length; ++i) { + outputArray[i] = rawData.charCodeAt(i); + } + return outputArray; + }, + + _sendSubscriptionToServer(subscription, dbInfo) { + return new RSVP.Promise((resolve, reject) => { + return fetch('/save-subscription/', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + dbInfo, + subscription + }) + }).then((response) => { + if (!response.ok) { + throw new Error('Bad status code from server.'); + } + return response.json(); + }).then((responseData) => { + if (responseData.ok !== true) { + throw new Error('There was a bad response from server.', JSON.stringify(responseData, null, 2)); + } + resolve(responseData); + }).catch(reject); + }, 'Send push subscription to server'); + }, + + _subscribeUserToPush(registration, dbInfo) { + let config = get(this, 'config'); + return config.getConfigValue('push_public_key').then((serverKey) => { + if (!serverKey) { + return; + } + let subscribeOptions = { + userVisibleOnly: true, + applicationServerKey: this._urlBase64ToUint8Array(serverKey) + }; + return new RSVP.Promise((resolve, reject) => { + return registration.pushManager.subscribe(subscribeOptions) + .then((pushSubscription) => { + let subInfo = JSON.stringify(pushSubscription); + subInfo = JSON.parse(subInfo); + console.log('Received PushSubscription: ', JSON.stringify(pushSubscription)); + return this._sendSubscriptionToServer(subInfo, dbInfo); + }).then((savedSubscription) => { + console.log('Savedsubscription: ', JSON.stringify(savedSubscription)); + let configDB = config.getConfigDB(); + return configDB.put({ + _id: 'config_push_subscription', + value: savedSubscription.id + }).then(resolve, reject); + }).catch(reject); + }); + }, 'Subscribe user to push service.'); + }, + + _requestSync() { + return new RSVP.Promise((resolve, reject) => { + let messageChannel = new MessageChannel(); + messageChannel.port1.onmessage = function(event) { + if (event.data.error) { + reject(event.data.error); + } else { + resolve(event.data); + } + }; + navigator.serviceWorker.controller.postMessage('remotesync', [messageChannel.port2]); + }, 'Request offline sync'); + }, + _createUsersDB() { let usersDB = new PouchDB('_users'); return usersDB.installUsersBehavior().then(() => { diff --git a/app/serviceworkers/pouchdb-sync.js b/app/serviceworkers/pouchdb-sync.js index 6cc9c0c452..273a3625b0 100644 --- a/app/serviceworkers/pouchdb-sync.js +++ b/app/serviceworkers/pouchdb-sync.js @@ -1,50 +1,308 @@ - +let allChanges = {}; let configs = false; let syncingRemote = false; let configDB = new PouchDB('config'); let localMainDB = new PouchDB('localMainDB'); +let lastServerSeq; + +function PouchError(opts) { + Error.call(opts.reason); + this.status = opts.status; + this.name = opts.error; + this.message = opts.reason; + this.error = true; +} + +function createError(err) { + let status = err.status || 500; + + // last argument is optional + if (err.name && err.message) { + if (err.name === 'Error' || err.name === 'TypeError') { + if (err.message.indexOf('Bad special document member') !== -1) { + err.name = 'doc_validation'; + // add more clauses here if the error name is too general + } else { + err.name = 'bad_request'; + } + } + err = { + error: err.name, + name: err.name, + reason: err.message, + message: err.message, + status + }; + } + return err; +} -toolbox.router.get('/db/main/', function(request, values, options) { - logDebug('request for main info:', request.url); - return couchDBResponse(request, values, options, function() { - return localMainDB.info(); +function safeEval(str) { + logDebug('safeEvaling', str); + let target = {}; + /* jshint evil: true */ + eval(`target.target = (${str});`); + logDebug('returning', target.target); + return target.target; +} + +function decodeArgs(args) { + let funcArgs = ['filter', 'map', 'reduce']; + args.forEach(function(arg) { + if (typeof arg === 'object' && arg !== null && !Array.isArray(arg)) { + funcArgs.forEach(function(funcArg) { + if (!(funcArg in arg) || arg[funcArg] === null) { + delete arg[funcArg]; + } else if (arg[funcArg].type === 'func' && arg[funcArg].func) { + arg[funcArg] = safeEval(arg[funcArg].func); + } + }); + } }); -}); + return args; +} + +function postMessage(msg, event) { + event.ports[0].postMessage(msg); +} -toolbox.router.get('/db/main/_all_docs', function(request, values, options) { - logDebug('request for all docs:', request.url); - return couchDBResponse(request, values, options, function(request) { - let options = getDBOptions(request.url); - logDebug('allDocs PouchDB:', options); - return localMainDB.allDocs(options); +function sendError(clientId, messageId, data, event) { + logDebug(' -> sendError', clientId, messageId, data); + postMessage({ + type: 'error', + id: clientId, + messageId, + content: createError(data) + }, event); +} + +function sendSuccess(clientId, messageId, data, event) { + logDebug(' -> sendSuccess', clientId, messageId); + postMessage({ + type: 'success', + id: clientId, + messageId, + content: data + }, event); +} + +function sendUpdate(clientId, messageId, data, event) { + logDebug(' -> sendUpdate', clientId, messageId); + postMessage({ + type: 'update', + id: clientId, + messageId, + content: data + }, event); +} + +function getCurrentDB(clientId) { + switch (clientId) { + case 'localMainDB': { + return Promise.resolve(localMainDB); + } + case 'hospitalrun-test-database': { + return Promise.resolve(new PouchDB('hospitalrun-test-database', { + adapter: 'memory' + })); + } + default: { + return getRemoteDB(); + } + } +} + +function dbMethod(clientId, methodName, messageId, args, event) { + let dbAdapter; + return getCurrentDB(clientId).then((db) => { + if (!db) { + return sendError(clientId, messageId, { error: 'db not found' }, event); + } + dbAdapter = db.adapter; + logDebug(`Returning ${methodName} execution:`, db[methodName]); + return db[methodName](...args); + }).then(function(res) { + sendSuccess(clientId, messageId, res, event); + }).catch(function(err) { + if (dbAdapter === 'http') { + // If the failure was on http, retry with local db. + return dbMethod('localMainDB', methodName, messageId, args, event); + } else { + sendError(clientId, messageId, err, event); + } }); -}); -toolbox.router.get('/db/main/_design/:design_doc/_view/:view', function(request, values, options) { - logDebug('request for view:', request.url); - return couchDBResponse(request, values, options, function(request) { - let options = getDBOptions(request.url); - let mapReduce = `${values.design_doc}/${values.view}`; - logDebug('queryPouchDB:', mapReduce, options); - return localMainDB.query(mapReduce, options); +} + +function changes(clientId, messageId, args, event) { + let [opts] = args; + if (opts && typeof opts === 'object') { + // just send all the docs anyway because we need to emit change events + // TODO: be smarter about emitting changes without building up an array + opts.returnDocs = true; + opts.return_docs = true; + } + dbMethod(clientId, 'changes', messageId, args, event); +} + +function createDatabase(clientId, messageId, args, event) { + return sendSuccess(clientId, messageId, { ok: true, exists: true }, event); +} + +function getAttachment(clientId, messageId, args, event) { + return getCurrentDB(clientId).then((db) => { + if (!db) { + return sendError(clientId, messageId, { error: 'db not found' }, event); + } + let [docId, attId, opts] = args; + if (typeof opts !== 'object') { + opts = {}; + } + return db.get(docId, opts).then(function(doc) { + if (!doc._attachments || !doc._attachments[attId]) { + throw new PouchError({ + status: 404, + error: 'not_found', + reason: 'missing' + }); + } + return db.getAttachment(...args).then(function(buff) { + sendSuccess(clientId, messageId, buff, event); + }); + }); + }).catch(function(err) { + sendError(clientId, messageId, err, event); }); -}); +} -toolbox.router.post('/db/main/_bulk_docs', function(request, values, options) { - logDebug('request for bulk docs:', request.url); - let pouchRequest = request.clone(); - return couchDBResponse(request, values, options, function() { - logDebug('couch failed, trying pouch request:', request.url); - return pouchRequest.json().then(function(jsonRequest) { - logDebug('got bulk docs, jsonRequest is:', jsonRequest); - return localMainDB.bulkDocs(jsonRequest); - }).catch(function(err) { - logDebug('err getting json: ', err); +function destroy(clientId, messageId, args, event) { + if (clientId === 'hospitalrun-test-database') { + getCurrentDB(clientId).then((db) => { + logDebug(`Destroying ${clientId} database`); + if (!db) { + return sendError(clientId, messageId, { error: 'db not found' }, event); + } + Promise.resolve().then(() => { + return db.destroy(...args); + }).then((res) => { + sendSuccess(clientId, messageId, res, event); + }).catch((err) => { + sendError(clientId, messageId, err, event); + }); + }); + } else { + return sendError(clientId, messageId, { error: 'permission denied' }, event); + } +} + +function liveChanges(clientId, messageId, args, event) { + getCurrentDB(clientId).then((db) => { + if (!db) { + return sendError(clientId, messageId, { error: 'db not found' }, event); + } + let changes = db.changes(args[0]); + allChanges[messageId] = changes; + changes.on('change', function(change) { + sendUpdate(clientId, messageId, change, event); + }).on('complete', function(change) { + changes.removeAllListeners(); + delete allChanges[messageId]; + sendSuccess(clientId, messageId, change, event); + }).on('error', function(change) { + changes.removeAllListeners(); + delete allChanges[messageId]; + sendError(clientId, messageId, change, event); }); }); +} + +function cancelChanges(messageId) { + let changes = allChanges[messageId]; + if (changes) { + changes.cancel(); + } +} + +function onReceiveMessage(clientId, type, messageId, args, event) { + logDebug('onReceiveMessage', type, clientId, messageId, args, event); + switch (type) { + case 'createDatabase': + return createDatabase(clientId, messageId, args, event); + case 'id': + sendSuccess(clientId, messageId, clientId, event); + return; + case 'info': + case 'put': + case 'allDocs': + case 'bulkDocs': + case 'post': + case 'get': + case 'remove': + case 'revsDiff': + case 'compact': + case 'viewCleanup': + case 'removeAttachment': + case 'putAttachment': + case 'query': + return dbMethod(clientId, type, messageId, args, event); + case 'changes': + return changes(clientId, messageId, args, event); + case 'getAttachment': + return getAttachment(clientId, messageId, args, event); + case 'liveChanges': + return liveChanges(clientId, messageId, args, event); + case 'cancelChanges': + return cancelChanges(messageId); + case 'destroy': + return destroy(clientId, messageId, args, event); + default: + return sendError(clientId, messageId, { error: `unknown API method: ${type}` }, event); + } +} + +function handleMessage(message, clientId, event) { + let { type, messageId } = message; + let args = decodeArgs(message.args); + onReceiveMessage(clientId, type, messageId, args, event); +} + +self.addEventListener('push', function(event) { + if (event.data) { + let pushData = event.data.json(); + if (pushData.type === 'couchDBChange') { + logDebug(`Got couchDBChange pushed, attempting to sync to: ${pushData.seq}`); + event.waitUntil( + remoteSync(pushData.seq).then((resp) => { + logDebug(`Response from sync ${JSON.stringify(resp, null, 2)}`); + }) + ); + } else { + logDebug('Unknown push event has data and here it is: ', pushData); + } + } }); -function setupRemoteSync() { - if (!syncingRemote && configs.config_disable_offline_sync !== true) { +self.addEventListener('message', function(event) { + logDebug('got message', event); + if (event.data === 'remotesync') { + remoteSync(); + return; + } + if (!event.data || !event.data.id || !event.data.args + || !event.data.type || !event.data.messageId) { + // assume this is not a message from worker-pouch + // (e.g. the user is using the custom API instead) + return; + } + let clientId = event.data.id; + if (event.data.type === 'close') { + logDebug('closing worker', clientId); + } else { + handleMessage(event.data, clientId, event); + } +}); + +function getRemoteDB() { + return setupConfigs().then(() => { let pouchOptions = { ajax: { headers: {}, @@ -59,27 +317,38 @@ function setupRemoteSync() { pouchOptions.ajax.headers['x-oauth-token'] = configs.config_oauth_token; } let remoteURL = `${self.location.protocol}//${self.location.host}/db/main`; - let remoteDB = new PouchDB(remoteURL, pouchOptions); - syncingRemote = localMainDB.sync(remoteDB, { - live: true, - retry: true - }).on('change', function(info) { - logDebug('local sync change', info); - }).on('paused', function() { - logDebug('local sync paused'); - // replication paused (e.g. user went offline) - }).on('active', function() { - logDebug('local sync active'); - // replicate resumed (e.g. user went back online) - }).on('denied', function(info) { - logDebug('local sync denied:', info); - // a document failed to replicate, e.g. due to permissions - }).on('complete', function(info) { - logDebug('local sync complete:', info); - // handle complete - }).on('error', function(err) { + return new PouchDB(remoteURL, pouchOptions); + }); +} + +function remoteSync(remoteSequence) { + lastServerSeq = remoteSequence; + if (!syncingRemote && configs.config_disable_offline_sync !== true) { + logDebug(`Synching local db to remoteSequence: ${remoteSequence}`); + syncingRemote = true; + return getRemoteDB().then((remoteDB) => { + return localMainDB.sync(remoteDB, { + retry: true + }).then((info) => { + syncingRemote = false; + logDebug('local sync complete:', info); + // handle complete + if (info.pull.last_seq < lastServerSeq) { + return remoteSync(lastServerSeq); + } else { + return true; + } + }); + }).catch('error', (err) => { + syncingRemote = false; logDebug('local sync error:', err); + return false; }); + } else { + if (syncingRemote) { + logDebug(`Skipping sync to: ${remoteSequence} because sync is in process`); + } + return Promise.resolve(false); } } @@ -100,71 +369,3 @@ function setupConfigs() { } }); } - -function couchDBResponse(request, values, options, pouchDBFn) { - setupConfigs().then(setupRemoteSync).catch(function(err) { - logDebug('Error setting up remote sync', JSON.stringify(err, null, 2)); - }); - logDebug('Looking for couchdb response for:', request.url); - return new Promise(function(resolve, reject) { - let startTime = performance.now(); - toolbox.networkOnly(request, values, options).then(function(response) { - if (response) { - let elapsedTime = performance.now() - startTime; - resolve(response); - logPerformance(elapsedTime, request.url); - } else { - logDebug('Network first returned no response, get data from local pouch db.'); - runPouchFn(pouchDBFn, request, resolve, reject); - } - }).catch(function(err) { - logDebug('Network first returned err, get data from local pouch db:', err); - runPouchFn(pouchDBFn, request, resolve, reject); - }); - }); -} - -function convertPouchToResponse(pouchResponse) { - return new Response(JSON.stringify(pouchResponse), { - status: 200, - statusText: 'OK' - }); -} - -function getDBOptions(url) { - let returnParams = {}; - if (url.indexOf('?') > 0) { - let urlParams = url.split('?'); - let params = decodeURIComponent(urlParams[1]).split('&'); - for (let i = 0; i < params.length; i++) { - let paramParts = params[i].split('='); - returnParams[paramParts[0]] = JSON.parse(paramParts[1]); - } - } - return returnParams; -} - -function logPerformance(elapsedTime, requestUrl) { - if (configs.config_log_metrics && configs.current_user) { - let now = Date.now(); - let timingId = `timing_${configs.current_user.toLowerCase()}_${now}`; - localMainDB.put({ - _id: timingId, - elapsed: elapsedTime, - url: requestUrl - }); - } -} - -function runPouchFn(pouchDBFn, request, resolve, reject) { - if (configs.disable_offline_sync) { - reject('Offline access has been disabled.'); - } else { - pouchDBFn(request).then(function(response) { - resolve(convertPouchToResponse(response)); - }).catch(function(err) { - logDebug('POUCH error is:', err); - reject(err); - }); - } -} diff --git a/package.json b/package.json index 7e125ab010..ad63f1d0ac 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,8 @@ "stylelint-declaration-use-variable": "1.6.0", "stylelint-scss": "1.4.1", "tosource-polyfill": "^0.3.1", - "uuid": "^3.0.0" + "uuid": "^3.0.0", + "worker-pouch": "git+https://github.com/jkleinsc/worker-pouch.git" }, "dependencies": { "electron-compile": "^6.3.0", diff --git a/vendor/pouchdb-for-sw-src.js b/vendor/pouchdb-for-sw-src.js new file mode 100644 index 0000000000..2367ec50cd --- /dev/null +++ b/vendor/pouchdb-for-sw-src.js @@ -0,0 +1,7 @@ +self.PouchDB = require('pouchdb-core') + .plugin(require('pouchdb-adapter-idb')) + .plugin(require('pouchdb-adapter-http')) + .plugin(require('pouchdb-mapreduce')) + .plugin(require('pouchdb-replication')) + .plugin(require('pouchdb-adapter-memory')) + .plugin(require('pouchdb-find')) diff --git a/vendor/pouchdb-for-sw.js b/vendor/pouchdb-for-sw.js new file mode 100644 index 0000000000..fa6630214a --- /dev/null +++ b/vendor/pouchdb-for-sw.js @@ -0,0 +1,33984 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom + +}).call(this,require("buffer").Buffer) +},{"buffer":162,"is-array-buffer-x":22}],3:[function(require,module,exports){ +(function (global){ +'use strict'; + +var buffer = require('buffer'); +var Buffer = buffer.Buffer; +var SlowBuffer = buffer.SlowBuffer; +var MAX_LEN = buffer.kMaxLength || 2147483647; +exports.alloc = function alloc(size, fill, encoding) { + if (typeof Buffer.alloc === 'function') { + return Buffer.alloc(size, fill, encoding); + } + if (typeof encoding === 'number') { + throw new TypeError('encoding must not be number'); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + var enc = encoding; + var _fill = fill; + if (_fill === undefined) { + enc = undefined; + _fill = 0; + } + var buf = new Buffer(size); + if (typeof _fill === 'string') { + var fillBuf = new Buffer(_fill, enc); + var flen = fillBuf.length; + var i = -1; + while (++i < size) { + buf[i] = fillBuf[i % flen]; + } + } else { + buf.fill(_fill); + } + return buf; +} +exports.allocUnsafe = function allocUnsafe(size) { + if (typeof Buffer.allocUnsafe === 'function') { + return Buffer.allocUnsafe(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + return new Buffer(size); +} +exports.from = function from(value, encodingOrOffset, length) { + if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { + return Buffer.from(value, encodingOrOffset, length); + } + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + if (typeof value === 'string') { + return new Buffer(value, encodingOrOffset); + } + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + var offset = encodingOrOffset; + if (arguments.length === 1) { + return new Buffer(value); + } + if (typeof offset === 'undefined') { + offset = 0; + } + var len = length; + if (typeof len === 'undefined') { + len = value.byteLength - offset; + } + if (offset >= value.byteLength) { + throw new RangeError('\'offset\' is out of bounds'); + } + if (len > value.byteLength - offset) { + throw new RangeError('\'length\' is out of bounds'); + } + return new Buffer(value.slice(offset, offset + len)); + } + if (Buffer.isBuffer(value)) { + var out = new Buffer(value.length); + value.copy(out, 0, 0, value.length); + return out; + } + if (value) { + if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { + return new Buffer(value); + } + if (value.type === 'Buffer' && Array.isArray(value.data)) { + return new Buffer(value.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); +} +exports.allocUnsafeSlow = function allocUnsafeSlow(size) { + if (typeof Buffer.allocUnsafeSlow === 'function') { + return Buffer.allocUnsafeSlow(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size >= MAX_LEN) { + throw new RangeError('size is too large'); + } + return new SlowBuffer(size); +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"buffer":162}],4:[function(require,module,exports){ +(function (Buffer){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +}).call(this,{"isBuffer":require("../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js")}) +},{"../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js":167}],5:[function(require,module,exports){ +(function (process){ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} + +}).call(this,require('_process')) +},{"./debug":6,"_process":170}],6:[function(require,module,exports){ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} + +},{"ms":55}],7:[function(require,module,exports){ +var util = require('util') + , AbstractIterator = require('abstract-leveldown').AbstractIterator + + +function DeferredIterator (options) { + AbstractIterator.call(this, options) + + this._options = options + this._iterator = null + this._operations = [] +} + +util.inherits(DeferredIterator, AbstractIterator) + +DeferredIterator.prototype.setDb = function (db) { + var it = this._iterator = db.iterator(this._options) + this._operations.forEach(function (op) { + it[op.method].apply(it, op.args) + }) +} + +DeferredIterator.prototype._operation = function (method, args) { + if (this._iterator) + return this._iterator[method].apply(this._iterator, args) + this._operations.push({ method: method, args: args }) +} + +'next end'.split(' ').forEach(function (m) { + DeferredIterator.prototype['_' + m] = function () { + this._operation(m, arguments) + } +}) + +module.exports = DeferredIterator; + +},{"abstract-leveldown":12,"util":188}],8:[function(require,module,exports){ +(function (Buffer,process){ +var util = require('util') + , AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN + , DeferredIterator = require('./deferred-iterator') + +function DeferredLevelDOWN (location) { + AbstractLevelDOWN.call(this, typeof location == 'string' ? location : '') // optional location, who cares? + this._db = undefined + this._operations = [] + this._iterators = [] +} + +util.inherits(DeferredLevelDOWN, AbstractLevelDOWN) + +// called by LevelUP when we have a real DB to take its place +DeferredLevelDOWN.prototype.setDb = function (db) { + this._db = db + this._operations.forEach(function (op) { + db[op.method].apply(db, op.args) + }) + this._iterators.forEach(function (it) { + it.setDb(db) + }) +} + +DeferredLevelDOWN.prototype._open = function (options, callback) { + return process.nextTick(callback) +} + +// queue a new deferred operation +DeferredLevelDOWN.prototype._operation = function (method, args) { + if (this._db) + return this._db[method].apply(this._db, args) + this._operations.push({ method: method, args: args }) +} + +// deferrables +'put get del batch approximateSize'.split(' ').forEach(function (m) { + DeferredLevelDOWN.prototype['_' + m] = function () { + this._operation(m, arguments) + } +}) + +DeferredLevelDOWN.prototype._isBuffer = function (obj) { + return Buffer.isBuffer(obj) +} + +DeferredLevelDOWN.prototype._iterator = function (options) { + if (this._db) + return this._db.iterator.apply(this._db, arguments) + var it = new DeferredIterator(options) + this._iterators.push(it) + return it +} + +module.exports = DeferredLevelDOWN +module.exports.DeferredIterator = DeferredIterator + +}).call(this,{"isBuffer":require("../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js")},require('_process')) +},{"../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js":167,"./deferred-iterator":7,"_process":170,"abstract-leveldown":12,"util":188}],9:[function(require,module,exports){ +(function (process){ +/* Copyright (c) 2013 Rod Vagg, MIT License */ + +function AbstractChainedBatch (db) { + this._db = db + this._operations = [] + this._written = false +} + +AbstractChainedBatch.prototype._checkWritten = function () { + if (this._written) + throw new Error('write() already called on this batch') +} + +AbstractChainedBatch.prototype.put = function (key, value) { + this._checkWritten() + + var err = this._db._checkKey(key, 'key', this._db._isBuffer) + if (err) + throw err + + if (!this._db._isBuffer(key)) key = String(key) + if (!this._db._isBuffer(value)) value = String(value) + + if (typeof this._put == 'function' ) + this._put(key, value) + else + this._operations.push({ type: 'put', key: key, value: value }) + + return this +} + +AbstractChainedBatch.prototype.del = function (key) { + this._checkWritten() + + var err = this._db._checkKey(key, 'key', this._db._isBuffer) + if (err) throw err + + if (!this._db._isBuffer(key)) key = String(key) + + if (typeof this._del == 'function' ) + this._del(key) + else + this._operations.push({ type: 'del', key: key }) + + return this +} + +AbstractChainedBatch.prototype.clear = function () { + this._checkWritten() + + this._operations = [] + + if (typeof this._clear == 'function' ) + this._clear() + + return this +} + +AbstractChainedBatch.prototype.write = function (options, callback) { + this._checkWritten() + + if (typeof options == 'function') + callback = options + if (typeof callback != 'function') + throw new Error('write() requires a callback argument') + if (typeof options != 'object') + options = {} + + this._written = true + + if (typeof this._write == 'function' ) + return this._write(callback) + + if (typeof this._db._batch == 'function') + return this._db._batch(this._operations, options, callback) + + process.nextTick(callback) +} + +module.exports = AbstractChainedBatch +}).call(this,require('_process')) +},{"_process":170}],10:[function(require,module,exports){ +(function (process){ +/* Copyright (c) 2013 Rod Vagg, MIT License */ + +function AbstractIterator (db) { + this.db = db + this._ended = false + this._nexting = false +} + +AbstractIterator.prototype.next = function (callback) { + var self = this + + if (typeof callback != 'function') + throw new Error('next() requires a callback argument') + + if (self._ended) + return callback(new Error('cannot call next() after end()')) + if (self._nexting) + return callback(new Error('cannot call next() before previous next() has completed')) + + self._nexting = true + if (typeof self._next == 'function') { + return self._next(function () { + self._nexting = false + callback.apply(null, arguments) + }) + } + + process.nextTick(function () { + self._nexting = false + callback() + }) +} + +AbstractIterator.prototype.end = function (callback) { + if (typeof callback != 'function') + throw new Error('end() requires a callback argument') + + if (this._ended) + return callback(new Error('end() already called on iterator')) + + this._ended = true + + if (typeof this._end == 'function') + return this._end(callback) + + process.nextTick(callback) +} + +module.exports = AbstractIterator + +}).call(this,require('_process')) +},{"_process":170}],11:[function(require,module,exports){ +(function (Buffer,process){ +/* Copyright (c) 2013 Rod Vagg, MIT License */ + +var xtend = require('xtend') + , AbstractIterator = require('./abstract-iterator') + , AbstractChainedBatch = require('./abstract-chained-batch') + +function AbstractLevelDOWN (location) { + if (!arguments.length || location === undefined) + throw new Error('constructor requires at least a location argument') + + if (typeof location != 'string') + throw new Error('constructor requires a location string argument') + + this.location = location + this.status = 'new' +} + +AbstractLevelDOWN.prototype.open = function (options, callback) { + var self = this + , oldStatus = this.status + + if (typeof options == 'function') + callback = options + + if (typeof callback != 'function') + throw new Error('open() requires a callback argument') + + if (typeof options != 'object') + options = {} + + options.createIfMissing = options.createIfMissing != false + options.errorIfExists = !!options.errorIfExists + + if (typeof this._open == 'function') { + this.status = 'opening' + this._open(options, function (err) { + if (err) { + self.status = oldStatus + return callback(err) + } + self.status = 'open' + callback() + }) + } else { + this.status = 'open' + process.nextTick(callback) + } +} + +AbstractLevelDOWN.prototype.close = function (callback) { + var self = this + , oldStatus = this.status + + if (typeof callback != 'function') + throw new Error('close() requires a callback argument') + + if (typeof this._close == 'function') { + this.status = 'closing' + this._close(function (err) { + if (err) { + self.status = oldStatus + return callback(err) + } + self.status = 'closed' + callback() + }) + } else { + this.status = 'closed' + process.nextTick(callback) + } +} + +AbstractLevelDOWN.prototype.get = function (key, options, callback) { + var err + + if (typeof options == 'function') + callback = options + + if (typeof callback != 'function') + throw new Error('get() requires a callback argument') + + if (err = this._checkKey(key, 'key', this._isBuffer)) + return callback(err) + + if (!this._isBuffer(key)) + key = String(key) + + if (typeof options != 'object') + options = {} + + options.asBuffer = options.asBuffer != false + + if (typeof this._get == 'function') + return this._get(key, options, callback) + + process.nextTick(function () { callback(new Error('NotFound')) }) +} + +AbstractLevelDOWN.prototype.put = function (key, value, options, callback) { + var err + + if (typeof options == 'function') + callback = options + + if (typeof callback != 'function') + throw new Error('put() requires a callback argument') + + if (err = this._checkKey(key, 'key', this._isBuffer)) + return callback(err) + + if (!this._isBuffer(key)) + key = String(key) + + // coerce value to string in node, don't touch it in browser + // (indexeddb can store any JS type) + if (value != null && !this._isBuffer(value) && !process.browser) + value = String(value) + + if (typeof options != 'object') + options = {} + + if (typeof this._put == 'function') + return this._put(key, value, options, callback) + + process.nextTick(callback) +} + +AbstractLevelDOWN.prototype.del = function (key, options, callback) { + var err + + if (typeof options == 'function') + callback = options + + if (typeof callback != 'function') + throw new Error('del() requires a callback argument') + + if (err = this._checkKey(key, 'key', this._isBuffer)) + return callback(err) + + if (!this._isBuffer(key)) + key = String(key) + + if (typeof options != 'object') + options = {} + + if (typeof this._del == 'function') + return this._del(key, options, callback) + + process.nextTick(callback) +} + +AbstractLevelDOWN.prototype.batch = function (array, options, callback) { + if (!arguments.length) + return this._chainedBatch() + + if (typeof options == 'function') + callback = options + + if (typeof array == 'function') + callback = array + + if (typeof callback != 'function') + throw new Error('batch(array) requires a callback argument') + + if (!Array.isArray(array)) + return callback(new Error('batch(array) requires an array argument')) + + if (!options || typeof options != 'object') + options = {} + + var i = 0 + , l = array.length + , e + , err + + for (; i < l; i++) { + e = array[i] + if (typeof e != 'object') + continue + + if (err = this._checkKey(e.type, 'type', this._isBuffer)) + return callback(err) + + if (err = this._checkKey(e.key, 'key', this._isBuffer)) + return callback(err) + } + + if (typeof this._batch == 'function') + return this._batch(array, options, callback) + + process.nextTick(callback) +} + +//TODO: remove from here, not a necessary primitive +AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) { + if ( start == null + || end == null + || typeof start == 'function' + || typeof end == 'function') { + throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments') + } + + if (typeof callback != 'function') + throw new Error('approximateSize() requires a callback argument') + + if (!this._isBuffer(start)) + start = String(start) + + if (!this._isBuffer(end)) + end = String(end) + + if (typeof this._approximateSize == 'function') + return this._approximateSize(start, end, callback) + + process.nextTick(function () { + callback(null, 0) + }) +} + +AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) { + var self = this + + options = xtend(options) + + ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) { + if (options[o] && self._isBuffer(options[o]) && options[o].length === 0) + delete options[o] + }) + + options.reverse = !!options.reverse + options.keys = options.keys != false + options.values = options.values != false + options.limit = 'limit' in options ? options.limit : -1 + options.keyAsBuffer = options.keyAsBuffer != false + options.valueAsBuffer = options.valueAsBuffer != false + + return options +} + +AbstractLevelDOWN.prototype.iterator = function (options) { + if (typeof options != 'object') + options = {} + + options = this._setupIteratorOptions(options) + + if (typeof this._iterator == 'function') + return this._iterator(options) + + return new AbstractIterator(this) +} + +AbstractLevelDOWN.prototype._chainedBatch = function () { + return new AbstractChainedBatch(this) +} + +AbstractLevelDOWN.prototype._isBuffer = function (obj) { + return Buffer.isBuffer(obj) +} + +AbstractLevelDOWN.prototype._checkKey = function (obj, type) { + + if (obj === null || obj === undefined) + return new Error(type + ' cannot be `null` or `undefined`') + + if (this._isBuffer(obj)) { + if (obj.length === 0) + return new Error(type + ' cannot be an empty Buffer') + } else if (String(obj) === '') + return new Error(type + ' cannot be an empty String') +} + +module.exports = AbstractLevelDOWN + +}).call(this,{"isBuffer":require("../../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js")},require('_process')) +},{"../../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js":167,"./abstract-chained-batch":9,"./abstract-iterator":10,"_process":170,"xtend":157}],12:[function(require,module,exports){ +exports.AbstractLevelDOWN = require('./abstract-leveldown') +exports.AbstractIterator = require('./abstract-iterator') +exports.AbstractChainedBatch = require('./abstract-chained-batch') +exports.isLevelDOWN = require('./is-leveldown') + +},{"./abstract-chained-batch":9,"./abstract-iterator":10,"./abstract-leveldown":11,"./is-leveldown":13}],13:[function(require,module,exports){ +var AbstractLevelDOWN = require('./abstract-leveldown') + +function isLevelDOWN (db) { + if (!db || typeof db !== 'object') + return false + return Object.keys(AbstractLevelDOWN.prototype).filter(function (name) { + // TODO remove approximateSize check when method is gone + return name[0] != '_' && name != 'approximateSize' + }).every(function (name) { + return typeof db[name] == 'function' + }) +} + +module.exports = isLevelDOWN + +},{"./abstract-leveldown":11}],14:[function(require,module,exports){ +/** + * Copyright (c) 2013 Petka Antonov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions:

+ * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +"use strict"; +function Deque(capacity) { + this._capacity = getCapacity(capacity); + this._length = 0; + this._front = 0; + if (isArray(capacity)) { + var len = capacity.length; + for (var i = 0; i < len; ++i) { + this[i] = capacity[i]; + } + this._length = len; + } +} + +Deque.prototype.toArray = function Deque$toArray() { + var len = this._length; + var ret = new Array(len); + var front = this._front; + var capacity = this._capacity; + for (var j = 0; j < len; ++j) { + ret[j] = this[(front + j) & (capacity - 1)]; + } + return ret; +}; + +Deque.prototype.push = function Deque$push(item) { + var argsLength = arguments.length; + var length = this._length; + if (argsLength > 1) { + var capacity = this._capacity; + if (length + argsLength > capacity) { + for (var i = 0; i < argsLength; ++i) { + this._checkCapacity(length + 1); + var j = (this._front + length) & (this._capacity - 1); + this[j] = arguments[i]; + length++; + this._length = length; + } + return length; + } + else { + var j = this._front; + for (var i = 0; i < argsLength; ++i) { + this[(j + length) & (capacity - 1)] = arguments[i]; + j++; + } + this._length = length + argsLength; + return length + argsLength; + } + + } + + if (argsLength === 0) return length; + + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = item; + this._length = length + 1; + return length + 1; +}; + +Deque.prototype.pop = function Deque$pop() { + var length = this._length; + if (length === 0) { + return void 0; + } + var i = (this._front + length - 1) & (this._capacity - 1); + var ret = this[i]; + this[i] = void 0; + this._length = length - 1; + return ret; +}; + +Deque.prototype.shift = function Deque$shift() { + var length = this._length; + if (length === 0) { + return void 0; + } + var front = this._front; + var ret = this[front]; + this[front] = void 0; + this._front = (front + 1) & (this._capacity - 1); + this._length = length - 1; + return ret; +}; + +Deque.prototype.unshift = function Deque$unshift(item) { + var length = this._length; + var argsLength = arguments.length; + + + if (argsLength > 1) { + var capacity = this._capacity; + if (length + argsLength > capacity) { + for (var i = argsLength - 1; i >= 0; i--) { + this._checkCapacity(length + 1); + var capacity = this._capacity; + var j = (((( this._front - 1 ) & + ( capacity - 1) ) ^ capacity ) - capacity ); + this[j] = arguments[i]; + length++; + this._length = length; + this._front = j; + } + return length; + } + else { + var front = this._front; + for (var i = argsLength - 1; i >= 0; i--) { + var j = (((( front - 1 ) & + ( capacity - 1) ) ^ capacity ) - capacity ); + this[j] = arguments[i]; + front = j; + } + this._front = front; + this._length = length + argsLength; + return length + argsLength; + } + } + + if (argsLength === 0) return length; + + this._checkCapacity(length + 1); + var capacity = this._capacity; + var i = (((( this._front - 1 ) & + ( capacity - 1) ) ^ capacity ) - capacity ); + this[i] = item; + this._length = length + 1; + this._front = i; + return length + 1; +}; + +Deque.prototype.peekBack = function Deque$peekBack() { + var length = this._length; + if (length === 0) { + return void 0; + } + var index = (this._front + length - 1) & (this._capacity - 1); + return this[index]; +}; + +Deque.prototype.peekFront = function Deque$peekFront() { + if (this._length === 0) { + return void 0; + } + return this[this._front]; +}; + +Deque.prototype.get = function Deque$get(index) { + var i = index; + if ((i !== (i | 0))) { + return void 0; + } + var len = this._length; + if (i < 0) { + i = i + len; + } + if (i < 0 || i >= len) { + return void 0; + } + return this[(this._front + i) & (this._capacity - 1)]; +}; + +Deque.prototype.isEmpty = function Deque$isEmpty() { + return this._length === 0; +}; + +Deque.prototype.clear = function Deque$clear() { + var len = this._length; + var front = this._front; + var capacity = this._capacity; + for (var j = 0; j < len; ++j) { + this[(front + j) & (capacity - 1)] = void 0; + } + this._length = 0; + this._front = 0; +}; + +Deque.prototype.toString = function Deque$toString() { + return this.toArray().toString(); +}; + +Deque.prototype.valueOf = Deque.prototype.toString; +Deque.prototype.removeFront = Deque.prototype.shift; +Deque.prototype.removeBack = Deque.prototype.pop; +Deque.prototype.insertFront = Deque.prototype.unshift; +Deque.prototype.insertBack = Deque.prototype.push; +Deque.prototype.enqueue = Deque.prototype.push; +Deque.prototype.dequeue = Deque.prototype.shift; +Deque.prototype.toJSON = Deque.prototype.toArray; + +Object.defineProperty(Deque.prototype, "length", { + get: function() { + return this._length; + }, + set: function() { + throw new RangeError(""); + } +}); + +Deque.prototype._checkCapacity = function Deque$_checkCapacity(size) { + if (this._capacity < size) { + this._resizeTo(getCapacity(this._capacity * 1.5 + 16)); + } +}; + +Deque.prototype._resizeTo = function Deque$_resizeTo(capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + if (front + length > oldCapacity) { + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); + } +}; + + +var isArray = Array.isArray; + +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function pow2AtLeast(n) { + n = n >>> 0; + n = n - 1; + n = n | (n >> 1); + n = n | (n >> 2); + n = n | (n >> 4); + n = n | (n >> 8); + n = n | (n >> 16); + return n + 1; +} + +function getCapacity(capacity) { + if (typeof capacity !== "number") { + if (isArray(capacity)) { + capacity = capacity.length; + } + else { + return 16; + } + } + return pow2AtLeast( + Math.min( + Math.max(16, capacity), 1073741824) + ); +} + +module.exports = Deque; + +},{}],15:[function(require,module,exports){ +var prr = require('prr') + +function init (type, message, cause) { + prr(this, { + type : type + , name : type + // can be passed just a 'cause' + , cause : typeof message != 'string' ? message : cause + , message : !!message && typeof message != 'string' ? message.message : message + + }, 'ewr') +} + +// generic prototype, not intended to be actually used - helpful for `instanceof` +function CustomError (message, cause) { + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, arguments.callee) + init.call(this, 'CustomError', message, cause) +} + +CustomError.prototype = new Error() + +function createError (errno, type, proto) { + var err = function (message, cause) { + init.call(this, type, message, cause) + //TODO: the specificity here is stupid, errno should be available everywhere + if (type == 'FilesystemError') { + this.code = this.cause.code + this.path = this.cause.path + this.errno = this.cause.errno + this.message = + (errno.errno[this.cause.errno] + ? errno.errno[this.cause.errno].description + : this.cause.message) + + (this.cause.path ? ' [' + this.cause.path + ']' : '') + } + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, arguments.callee) + } + err.prototype = !!proto ? new proto() : new CustomError() + return err +} + +module.exports = function (errno) { + var ce = function (type, proto) { + return createError(errno, type, proto) + } + return { + CustomError : CustomError + , FilesystemError : ce('FilesystemError') + , createError : ce + } +} + +},{"prr":135}],16:[function(require,module,exports){ +var all = module.exports.all = [ + { + errno: -2, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: -1, + code: 'UNKNOWN', + description: 'unknown error' + }, + { + errno: 0, + code: 'OK', + description: 'success' + }, + { + errno: 1, + code: 'EOF', + description: 'end of file' + }, + { + errno: 2, + code: 'EADDRINFO', + description: 'getaddrinfo error' + }, + { + errno: 3, + code: 'EACCES', + description: 'permission denied' + }, + { + errno: 4, + code: 'EAGAIN', + description: 'resource temporarily unavailable' + }, + { + errno: 5, + code: 'EADDRINUSE', + description: 'address already in use' + }, + { + errno: 6, + code: 'EADDRNOTAVAIL', + description: 'address not available' + }, + { + errno: 7, + code: 'EAFNOSUPPORT', + description: 'address family not supported' + }, + { + errno: 8, + code: 'EALREADY', + description: 'connection already in progress' + }, + { + errno: 9, + code: 'EBADF', + description: 'bad file descriptor' + }, + { + errno: 10, + code: 'EBUSY', + description: 'resource busy or locked' + }, + { + errno: 11, + code: 'ECONNABORTED', + description: 'software caused connection abort' + }, + { + errno: 12, + code: 'ECONNREFUSED', + description: 'connection refused' + }, + { + errno: 13, + code: 'ECONNRESET', + description: 'connection reset by peer' + }, + { + errno: 14, + code: 'EDESTADDRREQ', + description: 'destination address required' + }, + { + errno: 15, + code: 'EFAULT', + description: 'bad address in system call argument' + }, + { + errno: 16, + code: 'EHOSTUNREACH', + description: 'host is unreachable' + }, + { + errno: 17, + code: 'EINTR', + description: 'interrupted system call' + }, + { + errno: 18, + code: 'EINVAL', + description: 'invalid argument' + }, + { + errno: 19, + code: 'EISCONN', + description: 'socket is already connected' + }, + { + errno: 20, + code: 'EMFILE', + description: 'too many open files' + }, + { + errno: 21, + code: 'EMSGSIZE', + description: 'message too long' + }, + { + errno: 22, + code: 'ENETDOWN', + description: 'network is down' + }, + { + errno: 23, + code: 'ENETUNREACH', + description: 'network is unreachable' + }, + { + errno: 24, + code: 'ENFILE', + description: 'file table overflow' + }, + { + errno: 25, + code: 'ENOBUFS', + description: 'no buffer space available' + }, + { + errno: 26, + code: 'ENOMEM', + description: 'not enough memory' + }, + { + errno: 27, + code: 'ENOTDIR', + description: 'not a directory' + }, + { + errno: 28, + code: 'EISDIR', + description: 'illegal operation on a directory' + }, + { + errno: 29, + code: 'ENONET', + description: 'machine is not on the network' + }, + { + errno: 31, + code: 'ENOTCONN', + description: 'socket is not connected' + }, + { + errno: 32, + code: 'ENOTSOCK', + description: 'socket operation on non-socket' + }, + { + errno: 33, + code: 'ENOTSUP', + description: 'operation not supported on socket' + }, + { + errno: 34, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: 35, + code: 'ENOSYS', + description: 'function not implemented' + }, + { + errno: 36, + code: 'EPIPE', + description: 'broken pipe' + }, + { + errno: 37, + code: 'EPROTO', + description: 'protocol error' + }, + { + errno: 38, + code: 'EPROTONOSUPPORT', + description: 'protocol not supported' + }, + { + errno: 39, + code: 'EPROTOTYPE', + description: 'protocol wrong type for socket' + }, + { + errno: 40, + code: 'ETIMEDOUT', + description: 'connection timed out' + }, + { + errno: 41, + code: 'ECHARSET', + description: 'invalid Unicode character' + }, + { + errno: 42, + code: 'EAIFAMNOSUPPORT', + description: 'address family for hostname not supported' + }, + { + errno: 44, + code: 'EAISERVICE', + description: 'servname not supported for ai_socktype' + }, + { + errno: 45, + code: 'EAISOCKTYPE', + description: 'ai_socktype not supported' + }, + { + errno: 46, + code: 'ESHUTDOWN', + description: 'cannot send after transport endpoint shutdown' + }, + { + errno: 47, + code: 'EEXIST', + description: 'file already exists' + }, + { + errno: 48, + code: 'ESRCH', + description: 'no such process' + }, + { + errno: 49, + code: 'ENAMETOOLONG', + description: 'name too long' + }, + { + errno: 50, + code: 'EPERM', + description: 'operation not permitted' + }, + { + errno: 51, + code: 'ELOOP', + description: 'too many symbolic links encountered' + }, + { + errno: 52, + code: 'EXDEV', + description: 'cross-device link not permitted' + }, + { + errno: 53, + code: 'ENOTEMPTY', + description: 'directory not empty' + }, + { + errno: 54, + code: 'ENOSPC', + description: 'no space left on device' + }, + { + errno: 55, + code: 'EIO', + description: 'i/o error' + }, + { + errno: 56, + code: 'EROFS', + description: 'read-only file system' + }, + { + errno: 57, + code: 'ENODEV', + description: 'no such device' + }, + { + errno: 58, + code: 'ESPIPE', + description: 'invalid seek' + }, + { + errno: 59, + code: 'ECANCELED', + description: 'operation canceled' + } +] + +module.exports.errno = {} +module.exports.code = {} + +all.forEach(function (error) { + module.exports.errno[error.errno] = error + module.exports.code[error.code] = error +}) + +module.exports.custom = require('./custom')(module.exports) +module.exports.create = module.exports.custom.createError + +},{"./custom":15}],17:[function(require,module,exports){ +"use strict" + +module.exports = createRBTree + +var RED = 0 +var BLACK = 1 + +function RBNode(color, key, value, left, right, count) { + this._color = color + this.key = key + this.value = value + this.left = left + this.right = right + this._count = count +} + +function cloneNode(node) { + return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count) +} + +function repaint(color, node) { + return new RBNode(color, node.key, node.value, node.left, node.right, node._count) +} + +function recount(node) { + node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0) +} + +function RedBlackTree(compare, root) { + this._compare = compare + this.root = root +} + +var proto = RedBlackTree.prototype + +Object.defineProperty(proto, "keys", { + get: function() { + var result = [] + this.forEach(function(k,v) { + result.push(k) + }) + return result + } +}) + +Object.defineProperty(proto, "values", { + get: function() { + var result = [] + this.forEach(function(k,v) { + result.push(v) + }) + return result + } +}) + +//Returns the number of nodes in the tree +Object.defineProperty(proto, "length", { + get: function() { + if(this.root) { + return this.root._count + } + return 0 + } +}) + +//Insert a new item into the tree +proto.insert = function(key, value) { + var cmp = this._compare + //Find point to insert new node at + var n = this.root + var n_stack = [] + var d_stack = [] + while(n) { + var d = cmp(key, n.key) + n_stack.push(n) + d_stack.push(d) + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + //Rebuild path to leaf node + n_stack.push(new RBNode(RED, key, value, null, null, 1)) + for(var s=n_stack.length-2; s>=0; --s) { + var n = n_stack[s] + if(d_stack[s] <= 0) { + n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1) + } else { + n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1) + } + } + //Rebalance tree using rotations + //console.log("start insert", key, d_stack) + for(var s=n_stack.length-1; s>1; --s) { + var p = n_stack[s-1] + var n = n_stack[s] + if(p._color === BLACK || n._color === BLACK) { + break + } + var pp = n_stack[s-2] + if(pp.left === p) { + if(p.left === n) { + var y = pp.right + if(y && y._color === RED) { + //console.log("LLr") + p._color = BLACK + pp.right = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("LLb") + pp._color = RED + pp.left = p.right + p._color = BLACK + p.right = pp + n_stack[s-2] = p + n_stack[s-1] = n + recount(pp) + recount(p) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.left === pp) { + ppp.left = p + } else { + ppp.right = p + } + } + break + } + } else { + var y = pp.right + if(y && y._color === RED) { + //console.log("LRr") + p._color = BLACK + pp.right = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("LRb") + p.right = n.left + pp._color = RED + pp.left = n.right + n._color = BLACK + n.left = p + n.right = pp + n_stack[s-2] = n + n_stack[s-1] = p + recount(pp) + recount(p) + recount(n) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.left === pp) { + ppp.left = n + } else { + ppp.right = n + } + } + break + } + } + } else { + if(p.right === n) { + var y = pp.left + if(y && y._color === RED) { + //console.log("RRr", y.key) + p._color = BLACK + pp.left = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("RRb") + pp._color = RED + pp.right = p.left + p._color = BLACK + p.left = pp + n_stack[s-2] = p + n_stack[s-1] = n + recount(pp) + recount(p) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.right === pp) { + ppp.right = p + } else { + ppp.left = p + } + } + break + } + } else { + var y = pp.left + if(y && y._color === RED) { + //console.log("RLr") + p._color = BLACK + pp.left = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("RLb") + p.left = n.right + pp._color = RED + pp.right = n.left + n._color = BLACK + n.right = p + n.left = pp + n_stack[s-2] = n + n_stack[s-1] = p + recount(pp) + recount(p) + recount(n) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.right === pp) { + ppp.right = n + } else { + ppp.left = n + } + } + break + } + } + } + } + //Return new tree + n_stack[0]._color = BLACK + return new RedBlackTree(cmp, n_stack[0]) +} + + +//Visit all nodes inorder +function doVisitFull(visit, node) { + if(node.left) { + var v = doVisitFull(visit, node.left) + if(v) { return v } + } + var v = visit(node.key, node.value) + if(v) { return v } + if(node.right) { + return doVisitFull(visit, node.right) + } +} + +//Visit half nodes in order +function doVisitHalf(lo, compare, visit, node) { + var l = compare(lo, node.key) + if(l <= 0) { + if(node.left) { + var v = doVisitHalf(lo, compare, visit, node.left) + if(v) { return v } + } + var v = visit(node.key, node.value) + if(v) { return v } + } + if(node.right) { + return doVisitHalf(lo, compare, visit, node.right) + } +} + +//Visit all nodes within a range +function doVisit(lo, hi, compare, visit, node) { + var l = compare(lo, node.key) + var h = compare(hi, node.key) + var v + if(l <= 0) { + if(node.left) { + v = doVisit(lo, hi, compare, visit, node.left) + if(v) { return v } + } + if(h > 0) { + v = visit(node.key, node.value) + if(v) { return v } + } + } + if(h > 0 && node.right) { + return doVisit(lo, hi, compare, visit, node.right) + } +} + + +proto.forEach = function rbTreeForEach(visit, lo, hi) { + if(!this.root) { + return + } + switch(arguments.length) { + case 1: + return doVisitFull(visit, this.root) + break + + case 2: + return doVisitHalf(lo, this._compare, visit, this.root) + break + + case 3: + if(this._compare(lo, hi) >= 0) { + return + } + return doVisit(lo, hi, this._compare, visit, this.root) + break + } +} + +//First item in list +Object.defineProperty(proto, "begin", { + get: function() { + var stack = [] + var n = this.root + while(n) { + stack.push(n) + n = n.left + } + return new RedBlackTreeIterator(this, stack) + } +}) + +//Last item in list +Object.defineProperty(proto, "end", { + get: function() { + var stack = [] + var n = this.root + while(n) { + stack.push(n) + n = n.right + } + return new RedBlackTreeIterator(this, stack) + } +}) + +//Find the ith item in the tree +proto.at = function(idx) { + if(idx < 0) { + return new RedBlackTreeIterator(this, []) + } + var n = this.root + var stack = [] + while(true) { + stack.push(n) + if(n.left) { + if(idx < n.left._count) { + n = n.left + continue + } + idx -= n.left._count + } + if(!idx) { + return new RedBlackTreeIterator(this, stack) + } + idx -= 1 + if(n.right) { + if(idx >= n.right._count) { + break + } + n = n.right + } else { + break + } + } + return new RedBlackTreeIterator(this, []) +} + +proto.ge = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d <= 0) { + last_ptr = stack.length + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.gt = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d < 0) { + last_ptr = stack.length + } + if(d < 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.lt = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d > 0) { + last_ptr = stack.length + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.le = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d >= 0) { + last_ptr = stack.length + } + if(d < 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +//Finds the item with key if it exists +proto.find = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d === 0) { + return new RedBlackTreeIterator(this, stack) + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + return new RedBlackTreeIterator(this, []) +} + +//Removes item with key from tree +proto.remove = function(key) { + var iter = this.find(key) + if(iter) { + return iter.remove() + } + return this +} + +//Returns the item at `key` +proto.get = function(key) { + var cmp = this._compare + var n = this.root + while(n) { + var d = cmp(key, n.key) + if(d === 0) { + return n.value + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + return +} + +//Iterator for red black tree +function RedBlackTreeIterator(tree, stack) { + this.tree = tree + this._stack = stack +} + +var iproto = RedBlackTreeIterator.prototype + +//Test if iterator is valid +Object.defineProperty(iproto, "valid", { + get: function() { + return this._stack.length > 0 + } +}) + +//Node of the iterator +Object.defineProperty(iproto, "node", { + get: function() { + if(this._stack.length > 0) { + return this._stack[this._stack.length-1] + } + return null + }, + enumerable: true +}) + +//Makes a copy of an iterator +iproto.clone = function() { + return new RedBlackTreeIterator(this.tree, this._stack.slice()) +} + +//Swaps two nodes +function swapNode(n, v) { + n.key = v.key + n.value = v.value + n.left = v.left + n.right = v.right + n._color = v._color + n._count = v._count +} + +//Fix up a double black node in a tree +function fixDoubleBlack(stack) { + var n, p, s, z + for(var i=stack.length-1; i>=0; --i) { + n = stack[i] + if(i === 0) { + n._color = BLACK + return + } + //console.log("visit node:", n.key, i, stack[i].key, stack[i-1].key) + p = stack[i-1] + if(p.left === n) { + //console.log("left child") + s = p.right + if(s.right && s.right._color === RED) { + //console.log("case 1: right sibling child red") + s = p.right = cloneNode(s) + z = s.right = cloneNode(s.right) + p.right = s.left + s.left = p + s.right = z + s._color = p._color + n._color = BLACK + p._color = BLACK + z._color = BLACK + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = s + } else { + pp.right = s + } + } + stack[i-1] = s + return + } else if(s.left && s.left._color === RED) { + //console.log("case 1: left sibling child red") + s = p.right = cloneNode(s) + z = s.left = cloneNode(s.left) + p.right = z.left + s.left = z.right + z.left = p + z.right = s + z._color = p._color + p._color = BLACK + s._color = BLACK + n._color = BLACK + recount(p) + recount(s) + recount(z) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = z + } else { + pp.right = z + } + } + stack[i-1] = z + return + } + if(s._color === BLACK) { + if(p._color === RED) { + //console.log("case 2: black sibling, red parent", p.right.value) + p._color = BLACK + p.right = repaint(RED, s) + return + } else { + //console.log("case 2: black sibling, black parent", p.right.value) + p.right = repaint(RED, s) + continue + } + } else { + //console.log("case 3: red sibling") + s = cloneNode(s) + p.right = s.left + s.left = p + s._color = p._color + p._color = RED + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = s + } else { + pp.right = s + } + } + stack[i-1] = s + stack[i] = p + if(i+1 < stack.length) { + stack[i+1] = n + } else { + stack.push(n) + } + i = i+2 + } + } else { + //console.log("right child") + s = p.left + if(s.left && s.left._color === RED) { + //console.log("case 1: left sibling child red", p.value, p._color) + s = p.left = cloneNode(s) + z = s.left = cloneNode(s.left) + p.left = s.right + s.right = p + s.left = z + s._color = p._color + n._color = BLACK + p._color = BLACK + z._color = BLACK + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = s + } else { + pp.left = s + } + } + stack[i-1] = s + return + } else if(s.right && s.right._color === RED) { + //console.log("case 1: right sibling child red") + s = p.left = cloneNode(s) + z = s.right = cloneNode(s.right) + p.left = z.right + s.right = z.left + z.right = p + z.left = s + z._color = p._color + p._color = BLACK + s._color = BLACK + n._color = BLACK + recount(p) + recount(s) + recount(z) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = z + } else { + pp.left = z + } + } + stack[i-1] = z + return + } + if(s._color === BLACK) { + if(p._color === RED) { + //console.log("case 2: black sibling, red parent") + p._color = BLACK + p.left = repaint(RED, s) + return + } else { + //console.log("case 2: black sibling, black parent") + p.left = repaint(RED, s) + continue + } + } else { + //console.log("case 3: red sibling") + s = cloneNode(s) + p.left = s.right + s.right = p + s._color = p._color + p._color = RED + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = s + } else { + pp.left = s + } + } + stack[i-1] = s + stack[i] = p + if(i+1 < stack.length) { + stack[i+1] = n + } else { + stack.push(n) + } + i = i+2 + } + } + } +} + +//Removes item at iterator from tree +iproto.remove = function() { + var stack = this._stack + if(stack.length === 0) { + return this.tree + } + //First copy path to node + var cstack = new Array(stack.length) + var n = stack[stack.length-1] + cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count) + for(var i=stack.length-2; i>=0; --i) { + var n = stack[i] + if(n.left === stack[i+1]) { + cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count) + } else { + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + } + + //Get node + n = cstack[cstack.length-1] + //console.log("start remove: ", n.value) + + //If not leaf, then swap with previous node + if(n.left && n.right) { + //console.log("moving to leaf") + + //First walk to previous leaf + var split = cstack.length + n = n.left + while(n.right) { + cstack.push(n) + n = n.right + } + //Copy path to leaf + var v = cstack[split-1] + cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count)) + cstack[split-1].key = n.key + cstack[split-1].value = n.value + + //Fix up stack + for(var i=cstack.length-2; i>=split; --i) { + n = cstack[i] + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + cstack[split-1].left = cstack[split] + } + //console.log("stack=", cstack.map(function(v) { return v.value })) + + //Remove leaf node + n = cstack[cstack.length-1] + if(n._color === RED) { + //Easy case: removing red leaf + //console.log("RED leaf") + var p = cstack[cstack.length-2] + if(p.left === n) { + p.left = null + } else if(p.right === n) { + p.right = null + } + cstack.pop() + for(var i=0; i 0) { + return this._stack[this._stack.length-1].key + } + return + }, + enumerable: true +}) + +//Returns value +Object.defineProperty(iproto, "value", { + get: function() { + if(this._stack.length > 0) { + return this._stack[this._stack.length-1].value + } + return + }, + enumerable: true +}) + + +//Returns the position of this iterator in the sorted list +Object.defineProperty(iproto, "index", { + get: function() { + var idx = 0 + var stack = this._stack + if(stack.length === 0) { + var r = this.tree.root + if(r) { + return r._count + } + return 0 + } else if(stack[stack.length-1].left) { + idx = stack[stack.length-1].left._count + } + for(var s=stack.length-2; s>=0; --s) { + if(stack[s+1] === stack[s].right) { + ++idx + if(stack[s].left) { + idx += stack[s].left._count + } + } + } + return idx + }, + enumerable: true +}) + +//Advances iterator to next element in list +iproto.next = function() { + var stack = this._stack + if(stack.length === 0) { + return + } + var n = stack[stack.length-1] + if(n.right) { + n = n.right + while(n) { + stack.push(n) + n = n.left + } + } else { + stack.pop() + while(stack.length > 0 && stack[stack.length-1].right === n) { + n = stack[stack.length-1] + stack.pop() + } + } +} + +//Checks if iterator is at end of tree +Object.defineProperty(iproto, "hasNext", { + get: function() { + var stack = this._stack + if(stack.length === 0) { + return false + } + if(stack[stack.length-1].right) { + return true + } + for(var s=stack.length-1; s>0; --s) { + if(stack[s-1].left === stack[s]) { + return true + } + } + return false + } +}) + +//Update value +iproto.update = function(value) { + var stack = this._stack + if(stack.length === 0) { + throw new Error("Can't update empty node!") + } + var cstack = new Array(stack.length) + var n = stack[stack.length-1] + cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count) + for(var i=stack.length-2; i>=0; --i) { + n = stack[i] + if(n.left === stack[i+1]) { + cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count) + } else { + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + } + return new RedBlackTree(this.tree._compare, cstack[0]) +} + +//Moves iterator backward one element +iproto.prev = function() { + var stack = this._stack + if(stack.length === 0) { + return + } + var n = stack[stack.length-1] + if(n.left) { + n = n.left + while(n) { + stack.push(n) + n = n.right + } + } else { + stack.pop() + while(stack.length > 0 && stack[stack.length-1].left === n) { + n = stack[stack.length-1] + stack.pop() + } + } +} + +//Checks if iterator is at start of tree +Object.defineProperty(iproto, "hasPrev", { + get: function() { + var stack = this._stack + if(stack.length === 0) { + return false + } + if(stack[stack.length-1].left) { + return true + } + for(var s=stack.length-1; s>0; --s) { + if(stack[s-1].right === stack[s]) { + return true + } + } + return false + } +}) + +//Default comparison function +function defaultCompare(a, b) { + if(a < b) { + return -1 + } + if(a > b) { + return 1 + } + return 0 +} + +//Build a tree +function createRBTree(compare) { + return new RedBlackTree(compare || defaultCompare, null) +} +},{}],18:[function(require,module,exports){ +/** + * @file + * + * Travis status + * + * + * Dependency status + * + * + * devDependency status + * + * + * npm version + * + * + * Tests if `Symbol` exists and creates the correct type. + * + * Requires ES3 or above. + * + * @version 1.2.0 + * @author Xotic750 + * @copyright Xotic750 + * @license {@link MIT} + * @module has-symbol-support-x + */ + +/* eslint strict: 1, symbol-description: 1 */ + +/* global module */ + +;(function () { // eslint-disable-line no-extra-semi + + 'use strict'; + + /** + * Indicates if `Symbol`exists and creates the correct type. + * `true`, if it exists and creates the correct type, otherwise `false`. + * + * @type boolean + */ + module.exports = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; +}()); + +},{}],19:[function(require,module,exports){ +/** + * @file + * + * Travis status + * + * + * Dependency status + * + * + * devDependency status + * + * + * npm version + * + * + * Tests if ES6 @@toStringTag is supported. + * + * Requires ES3 or above. + * + * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag} + * + * @version 1.2.0 + * @author Xotic750 + * @copyright Xotic750 + * @license {@link MIT} + * @module has-to-string-tag-x + */ + +/* eslint strict: 1 */ + +/* global module */ + +;(function () { // eslint-disable-line no-extra-semi + + 'use strict'; + + /** + * Indicates if `Symbol.toStringTag`exists and is the correct type. + * `true`, if it exists and is the correct type, otherwise `false`. + * + * @type boolean + */ + module.exports = require('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol'; +}()); + +},{"has-symbol-support-x":18}],20:[function(require,module,exports){ +(function (global){ +'use strict'; +var Mutation = global.MutationObserver || global.WebKitMutationObserver; + +var scheduleDrain; + +{ + if (Mutation) { + var called = 0; + var observer = new Mutation(nextTick); + var element = global.document.createTextNode(''); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function () { + element.data = (called = ++called % 2); + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { + var channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function () { + channel.port2.postMessage(0); + }; + } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { + scheduleDrain = function () { + + // Create a From 351468f593eb8f198e558943477c69b2e52d2f05 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 11 May 2017 17:02:07 -0400 Subject: [PATCH 15/26] Try chrome headless --- testem.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testem.js b/testem.js index cf056bd1b0..3a2d2da586 100644 --- a/testem.js +++ b/testem.js @@ -8,5 +8,8 @@ module.exports = { ], "launch_in_dev": [ "Chrome" - ] + ], + browser_args: { + 'Chrome': [ '--headless', '--disable-gpu', '--remote-debugging-port=9222' ], + }, }; From 211f88f9ada7006e026e2e8101e072dd3f5a1027 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 11 May 2017 17:19:44 -0400 Subject: [PATCH 16/26] Try using yarn and chrome beta --- .travis.yml | 5 +- yarn.lock | 1614 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 946 insertions(+), 673 deletions(-) diff --git a/.travis.yml b/.travis.yml index 72cc9552f6..fd33b7044e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ addons: - ubuntu-toolchain-r-test packages: - g++-4.8 - - google-chrome-stable + - google-chrome-beta cache: directories: @@ -26,11 +26,12 @@ cache: before_install: - npm config set spin false - npm install -g bower + - npm install -g yarn - bower --version - google-chrome --version install: - - npm install + - yarn - bower install - export DISPLAY=':99.0' - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & diff --git a/yarn.lock b/yarn.lock index 1c43e2dbbd..8146103f50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,7 +1,5 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 - - "@paulcbetts/mime-db@~1.22.0": version "1.22.4" resolved "https://registry.yarnpkg.com/@paulcbetts/mime-db/-/mime-db-1.22.4.tgz#b8ff8e78087a40992990f702f8d9c65499be2ef1" @@ -28,33 +26,19 @@ vue-template-compiler "^2.0.0-alpha.8" vue-template-es2015-compiler "^1.4.2" -JSONStream@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-0.8.4.tgz#91657dfe6ff857483066132b4618b62e8f4887bd" - dependencies: - jsonparse "0.0.5" - through ">=2.2.7 <3" - -JSONStream@^1.0.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - abab@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" -abbrev@1, abbrev@^1.0.7: +abbrev@^1.0.7, abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" -abbrev@1.0.x, abbrev@~1.0.9: +abbrev@~1.0.9, abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" -abstract-leveldown@2.4.1, abstract-leveldown@~2.4.0: +abstract-leveldown@~2.4.0, abstract-leveldown@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.4.1.tgz#b3bfedb884eb693a12775f0c55e9f0a420ccee64" dependencies: @@ -66,7 +50,7 @@ abstract-leveldown@~2.6.1: dependencies: xtend "~4.0.0" -accepts@1.3.3, accepts@~1.3.3: +accepts@~1.3.3, accepts@1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" dependencies: @@ -109,7 +93,7 @@ acorn@^5.0.1: version "5.0.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" -after@0.8.1, after@~0.8.1: +after@~0.8.1, after@0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627" @@ -393,7 +377,7 @@ asar@^0.13.0: mksnapshot "^0.3.0" tmp "0.0.28" -asn1.js@^4.0.0: +asn1.js@^4.0.0, asn1.js@^4.8.1: version "4.9.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" dependencies: @@ -401,17 +385,13 @@ asn1.js@^4.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -asn1@0.1.11: - version "0.1.11" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7" - 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" +asn1@0.1.11: + version "0.1.11" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7" assert-plus@^0.1.5: version "0.1.5" @@ -421,6 +401,10 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +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@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" @@ -464,7 +448,7 @@ async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" -async@1.x, async@^1.4.0, async@^1.4.2, async@^1.5.2, async@~1.5: +async@^1.4.0, async@^1.4.2, async@^1.5.2, async@~1.5, async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -780,6 +764,12 @@ babel-plugin-dead-code-elimination@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz#5f7c451274dcd7cccdbfbb3e0b85dd28121f0f65" +babel-plugin-debug-macros@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.1.7.tgz#69f5a3dc7d72f781354f18c611a3b007bb223511" + dependencies: + semver "^5.3.0" + babel-plugin-eval@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz#a2faed25ce6be69ade4bfec263f70169195950da" @@ -1291,13 +1281,6 @@ babel-register@^6.16.3, babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.9.5" - babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" @@ -1305,6 +1288,13 @@ babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-runtime@6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.9.5" + babel-template@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" @@ -1386,18 +1376,22 @@ base64-arraybuffer@0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" -base64-js@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.1.2.tgz#d6400cac1c4c660976d90d07a04351d89395f5e8" - base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" +base64-js@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.1.2.tgz#d6400cac1c4c660976d90d07a04351d89395f5e8" + base64id@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-0.1.0.tgz#02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f" +base64url@^2.0.0, base64url@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" + basic-auth@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884" @@ -1455,6 +1449,13 @@ blank-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/blank-object/-/blank-object-1.0.2.tgz#f990793fbe9a8c8dd013fb3219420bec81d5f4b9" +blob-util@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-1.2.1.tgz#cda95814d2359802611a6110fe0bc88aa2dcaa2f" + dependencies: + blob "0.0.4" + native-or-lie "1.0.0" + blob@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" @@ -1738,24 +1739,7 @@ broccoli-funnel-reducer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/broccoli-funnel-reducer/-/broccoli-funnel-reducer-1.0.0.tgz#11365b2a785aec9b17972a36df87eef24c5cc0ea" -broccoli-funnel@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.0.1.tgz#12cb76e342343592a3b18ae7840c0db3bd16d8af" - dependencies: - array-equal "^1.0.0" - blank-object "^1.0.1" - broccoli-plugin "^1.0.0" - debug "^2.2.0" - fast-ordered-set "^1.0.0" - fs-tree-diff "^0.3.0" - minimatch "^2.0.1" - mkdirp "^0.5.0" - path-posix "^1.0.0" - rimraf "^2.4.3" - symlink-or-copy "^1.0.0" - walk-sync "^0.2.6" - -broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.6, broccoli-funnel@^1.0.7, broccoli-funnel@^1.1.0: +broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.6, broccoli-funnel@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.1.0.tgz#dfb91a37c902456456de4a40a1881948d65b27d9" dependencies: @@ -1774,43 +1758,43 @@ broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.6, broccoli symlink-or-copy "^1.0.0" walk-sync "^0.3.1" -broccoli-funnel@~0.2.3: - version "0.2.15" - resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-0.2.15.tgz#4d0c128bef746e02f91038415aac4adbfaae222d" +broccoli-funnel@~1.0.1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.0.9.tgz#1b2673be66dd8a8771214e3f3aeb7325012e4580" dependencies: array-equal "^1.0.0" blank-object "^1.0.1" broccoli-plugin "^1.0.0" debug "^2.2.0" + exists-sync "0.0.4" fast-ordered-set "^1.0.0" - fs-tree-diff "^0.3.0" - minimatch "^2.0.1" + fs-tree-diff "^0.5.3" + heimdalljs "^0.2.0" + minimatch "^3.0.0" mkdirp "^0.5.0" path-posix "^1.0.0" rimraf "^2.4.3" symlink-or-copy "^1.0.0" - walk-sync "^0.2.6" + walk-sync "^0.3.1" -broccoli-funnel@~1.0.1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.0.9.tgz#1b2673be66dd8a8771214e3f3aeb7325012e4580" +broccoli-funnel@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.0.1.tgz#12cb76e342343592a3b18ae7840c0db3bd16d8af" dependencies: array-equal "^1.0.0" blank-object "^1.0.1" broccoli-plugin "^1.0.0" debug "^2.2.0" - exists-sync "0.0.4" fast-ordered-set "^1.0.0" - fs-tree-diff "^0.5.3" - heimdalljs "^0.2.0" - minimatch "^3.0.0" + fs-tree-diff "^0.3.0" + minimatch "^2.0.1" mkdirp "^0.5.0" path-posix "^1.0.0" rimraf "^2.4.3" symlink-or-copy "^1.0.0" - walk-sync "^0.3.1" + walk-sync "^0.2.6" -broccoli-kitchen-sink-helpers@^0.2.0, broccoli-kitchen-sink-helpers@^0.2.5, broccoli-kitchen-sink-helpers@^0.2.6, broccoli-kitchen-sink-helpers@~0.2.0, broccoli-kitchen-sink-helpers@~0.2.2: +broccoli-kitchen-sink-helpers@^0.2.5, broccoli-kitchen-sink-helpers@^0.2.6, broccoli-kitchen-sink-helpers@~0.2.0: version "0.2.9" resolved "https://registry.yarnpkg.com/broccoli-kitchen-sink-helpers/-/broccoli-kitchen-sink-helpers-0.2.9.tgz#a5e0986ed8d76fb5984b68c3f0450d3a96e36ecc" dependencies: @@ -1835,15 +1819,6 @@ broccoli-lint-eslint@^3.1.0: json-stable-stringify "^1.0.1" md5-hex "^2.0.0" -broccoli-manifest@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/broccoli-manifest/-/broccoli-manifest-0.0.7.tgz#51885ea6ad284ddf9826ca19ce92997be34f88bd" - dependencies: - broccoli-funnel "~0.2.3" - broccoli-kitchen-sink-helpers "~0.2.2" - broccoli-merge-trees "~0.1.4" - broccoli-writer "~0.1.1" - broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.4.tgz#a001519bb5067f06589d91afa2942445a2d0fdb5" @@ -1877,15 +1852,6 @@ broccoli-merge-trees@^2.0.0: broccoli-plugin "^1.3.0" merge-trees "^1.0.1" -broccoli-merge-trees@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-0.1.4.tgz#10adeee5e2b24027770a0fc36aaa4c4a17643a6b" - dependencies: - broccoli-kitchen-sink-helpers "^0.2.0" - broccoli-writer "^0.1.1" - promise-map-series "^0.2.0" - walk-sync "^0.1.2" - broccoli-middleware@^0.18.1: version "0.18.1" resolved "https://registry.yarnpkg.com/broccoli-middleware/-/broccoli-middleware-0.18.1.tgz#bf525581c2deb652c425942b18580f76d3748122" @@ -1915,23 +1881,23 @@ broccoli-persistent-filter@^1.0.1, broccoli-persistent-filter@^1.0.3, broccoli-p symlink-or-copy "^1.0.1" walk-sync "^0.3.1" -broccoli-plugin@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.1.0.tgz#73e2cfa05f8ea1e3fc1420c40c3d9e7dc724bf02" +broccoli-plugin@^1.0.0, broccoli-plugin@^1.1.0, broccoli-plugin@^1.2.0, broccoli-plugin@^1.2.1, broccoli-plugin@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.3.0.tgz#bee704a8e42da08cb58e513aaa436efb7f0ef1ee" dependencies: promise-map-series "^0.2.1" quick-temp "^0.1.3" rimraf "^2.3.4" - symlink-or-copy "^1.0.1" + symlink-or-copy "^1.1.8" -broccoli-plugin@^1.0.0, broccoli-plugin@^1.1.0, broccoli-plugin@^1.2.0, broccoli-plugin@^1.2.1, broccoli-plugin@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.3.0.tgz#bee704a8e42da08cb58e513aaa436efb7f0ef1ee" +broccoli-plugin@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/broccoli-plugin/-/broccoli-plugin-1.1.0.tgz#73e2cfa05f8ea1e3fc1420c40c3d9e7dc724bf02" dependencies: promise-map-series "^0.2.1" quick-temp "^0.1.3" rimraf "^2.3.4" - symlink-or-copy "^1.1.8" + symlink-or-copy "^1.0.1" broccoli-sass-source-maps@^2.0.0: version "2.0.0" @@ -1944,9 +1910,9 @@ broccoli-sass-source-maps@^2.0.0: object-assign "^2.0.0" rsvp "^3.0.6" -broccoli-serviceworker@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/broccoli-serviceworker/-/broccoli-serviceworker-0.1.4.tgz#baff1f71a8670b9014aea6bf7d4c842de3fe9b72" +broccoli-serviceworker@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/broccoli-serviceworker/-/broccoli-serviceworker-0.1.6.tgz#112ff8a4d12ce02dfb9b81bfa21df7825f34632c" dependencies: broccoli-funnel "~1.0.1" broccoli-kitchen-sink-helpers "~0.3.1" @@ -1954,7 +1920,7 @@ broccoli-serviceworker@0.1.4: broccoli-writer "~0.1.1" rsvp "^3.1.0" stringifile "^0.1.1" - sw-toolbox "^3.4.0" + sw-toolbox "3.4.0" broccoli-slow-trees@^3.0.1: version "3.0.1" @@ -2051,9 +2017,9 @@ browser-pack@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531" dependencies: - JSONStream "^1.0.3" combine-source-map "~0.7.1" defined "^1.0.0" + JSONStream "^1.0.3" through2 "^2.0.0" umd "^3.0.0" @@ -2122,7 +2088,6 @@ browserify@^13.0.0: version "13.3.0" resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" dependencies: - JSONStream "^1.0.3" assert "^1.4.0" browser-pack "^6.0.1" browser-resolve "^1.11.0" @@ -2144,6 +2109,7 @@ browserify@^13.0.0: https-browserify "~0.0.0" inherits "~2.0.1" insert-module-globals "^7.0.0" + JSONStream "^1.0.3" labeled-stream-splicer "^2.0.0" module-deps "^4.0.8" os-browserify "~0.1.1" @@ -2191,6 +2157,10 @@ buffer-crc32@~0.2.1: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + buffer-from@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.1.tgz#57b18b1da0a19ec06f33837a5275a242351bd75e" @@ -2205,7 +2175,7 @@ buffer-xor@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" -buffer@4.9.1, buffer@^4.1.0: +buffer@^4.1.0, buffer@4.9.1: version "4.9.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" dependencies: @@ -2225,14 +2195,14 @@ builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" -builtins@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-0.0.7.tgz#355219cd6cf18dbe7c01cc7fd2dce765cfdc549a" - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" +builtins@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-0.0.7.tgz#355219cd6cf18dbe7c01cc7fd2dce765cfdc549a" + bytes@1: version "1.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" @@ -2477,6 +2447,12 @@ cli-spinners@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.0.0.tgz#ef987ed3d48391ac3dab9180b406a742180d6e6a" +cli-table@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + dependencies: + colors "1.0.3" + cli-table2@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97" @@ -2486,12 +2462,6 @@ cli-table2@^0.2.0: optionalDependencies: colors "^1.1.2" -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" - cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" @@ -2629,10 +2599,6 @@ colormin@^1.0.5: css-color-names "0.0.4" has "^1.0.1" -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - colors@^1.1.2, colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -2641,6 +2607,10 @@ colors@~0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + columnify@~1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -2669,13 +2639,7 @@ combined-stream@~0.0.4, combined-stream@~0.0.5: dependencies: delayed-stream "0.0.5" -commander@2.8.x, commander@~2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" - dependencies: - graceful-readlink ">= 1.0.0" - -commander@2.9.0, commander@^2.5.0, commander@^2.6.0, commander@^2.8.1, commander@^2.9.0: +commander@^2.5.0, commander@^2.6.0, commander@^2.8.1, commander@^2.9.0, commander@2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -2689,6 +2653,12 @@ commander@~2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" +commander@~2.8.1, commander@2.8.x: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + commoner@^0.10.1, commoner@~0.10.3: version "0.10.8" resolved "https://registry.yarnpkg.com/commoner/-/commoner-0.10.8.tgz#34fc3672cd24393e8bb47e70caa0293811f4f2c5" @@ -2752,17 +2722,17 @@ 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.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" +concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@^1.5.2, concat-stream@~1.5.0, concat-stream@~1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" dependencies: inherits "~2.0.1" readable-stream "~2.0.0" typedarray "~0.0.5" -concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@^1.5.2, concat-stream@~1.5.0, concat-stream@~1.5.1: - version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" +concat-stream@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" dependencies: inherits "~2.0.1" readable-stream "~2.0.0" @@ -2959,6 +2929,10 @@ cp-file@^3.1.0: pinkie-promise "^2.0.0" readable-stream "^2.1.4" +crc@3.4.4: + version "3.4.4" + resolved "https://registry.yarnpkg.com/crc/-/crc-3.4.4.tgz#9da1e980e3bd44fc5c93bf5ab3da3378d85e466b" + crc32-stream@~0.3.1: version "0.3.4" resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-0.3.4.tgz#73bc25b45fac1db6632231a7bfce8927e9f06552" @@ -2966,10 +2940,6 @@ crc32-stream@~0.3.1: buffer-crc32 "~0.2.1" readable-stream "~1.0.24" -crc@3.4.4: - version "3.4.4" - resolved "https://registry.yarnpkg.com/crc/-/crc-3.4.4.tgz#9da1e980e3bd44fc5c93bf5ab3da3378d85e466b" - create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" @@ -3027,10 +2997,6 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" -crypto-browserify@1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-1.0.9.tgz#cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0" - crypto-browserify@^3.0.0: version "3.11.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" @@ -3046,6 +3012,10 @@ crypto-browserify@^3.0.0: public-encrypt "^4.0.0" randombytes "^2.0.0" +crypto-browserify@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-1.0.9.tgz#cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0" + crypto@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0" @@ -3166,7 +3136,7 @@ csso@~2.3.1: clap "^1.0.9" source-map "^0.5.3" -cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": +"cssom@>= 0.3.0 < 0.4.0", cssom@0.3.x: version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" @@ -3214,22 +3184,28 @@ de-indent@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" -debug@*, debug@2, debug@2.6.3, debug@^2.1.3, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3: +debug@*, debug@^2.1.3, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3, debug@2, debug@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" dependencies: ms "0.7.2" -debug@0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" +debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.4.5, debug@^2.5.1, debug@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" + dependencies: + ms "0.7.2" -debug@2.2.0, debug@~2.2.0: +debug@~2.2.0, 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" +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + debug@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" @@ -3242,12 +3218,6 @@ debug@2.6.0: dependencies: ms "0.7.2" -debug@2.6.1, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.4.5, debug@^2.5.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" - dependencies: - ms "0.7.2" - debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -3330,19 +3300,19 @@ del@^2.0.2: pinkie-promise "^2.0.0" rimraf "^2.2.8" -delayed-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-0.0.5.tgz#d4b1f43a93e8296dfe02694f4680bc37a313c73f" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" +delayed-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-0.0.5.tgz#d4b1f43a93e8296dfe02694f4680bc37a313c73f" + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@1.1.0, depd@~1.1.0: +depd@~1.1.0, depd@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" @@ -3486,7 +3456,7 @@ doiuse@^2.3.0, doiuse@^2.4.1: through2 "^0.6.3" yargs "^3.5.4" -dom-serializer@0, dom-serializer@~0.1.0: +dom-serializer@~0.1.0, dom-serializer@0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" dependencies: @@ -3497,7 +3467,7 @@ domain-browser@~1.1.0: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" -domelementtype@1, domelementtype@^1.3.0: +domelementtype@^1.3.0, domelementtype@1: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" @@ -3505,13 +3475,13 @@ domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" -domhandler@2.3, domhandler@^2.3.0: +domhandler@^2.3.0, domhandler@2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" dependencies: domelementtype "1" -domutils@1.5, domutils@1.5.1, domutils@^1.5.1: +domutils@^1.5.1, domutils@1.5, domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" dependencies: @@ -3536,11 +3506,9 @@ ds-store@^0.1.5: macos-alias "~0.2.5" tn1150 "^0.1.0" -duplexer2@0.0.2, duplexer2@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" - dependencies: - readable-stream "~1.1.9" +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" duplexer2@^0.1.2, duplexer2@^0.1.4, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" @@ -3548,9 +3516,11 @@ duplexer2@^0.1.2, duplexer2@^0.1.4, duplexer2@~0.1.0, duplexer2@~0.1.2: dependencies: readable-stream "^2.0.2" -duplexer@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" +duplexer2@~0.0.2, duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" duplexify@^3.2.0: version "3.5.0" @@ -3574,6 +3544,13 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" +ecdsa-sig-formatter@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" + dependencies: + base64url "^2.0.0" + safe-buffer "^5.0.1" + editions@^1.1.1, editions@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.3.tgz#0907101bdda20fac3cbe334c27cbd0688dc99a5b" @@ -3828,7 +3805,7 @@ electron-prebuilt-compile@1.6.2: electron-compilers "*" yargs "^6.6.0" -electron-protocol-serve@1.3.0, electron-protocol-serve@^1.3.0: +electron-protocol-serve@^1.3.0, electron-protocol-serve@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/electron-protocol-serve/-/electron-protocol-serve-1.3.0.tgz#ebcc0afc785fa4f71bc1f17f1336681b13a707a2" dependencies: @@ -3907,11 +3884,11 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -ember-ajax@2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/ember-ajax/-/ember-ajax-2.5.4.tgz#bee6c3945c5e6a792272438742d48513bdf3cd86" +ember-ajax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ember-ajax/-/ember-ajax-3.0.0.tgz#8f21e9da0c1d433cf879aa855fce464d517e9ab5" dependencies: - ember-cli-babel "^5.1.5" + ember-cli-babel "^6.0.0" ember-browserify@^1.1.12: version "1.1.13" @@ -3954,16 +3931,6 @@ ember-cli-app-version@^2.0.0: ember-cli-htmlbars "^1.0.0" git-repo-version "0.4.1" -ember-cli-babel@5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.1.6.tgz#d3e4fe59d96589adf7db1d99ff4f6b9dfa9dc132" - dependencies: - broccoli-babel-transpiler "^5.4.5" - broccoli-funnel "^1.0.0" - clone "^1.0.2" - ember-cli-version-checker "^1.0.2" - resolve "^1.1.2" - ember-cli-babel@^5.0.0, ember-cli-babel@^5.1.10, ember-cli-babel@^5.1.3, ember-cli-babel@^5.1.5, ember-cli-babel@^5.1.6, ember-cli-babel@^5.1.7, ember-cli-babel@^5.2.1, ember-cli-babel@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.2.4.tgz#5ce4f46b08ed6f6d21e878619fb689719d6e8e13" @@ -3974,6 +3941,21 @@ ember-cli-babel@^5.0.0, ember-cli-babel@^5.1.10, ember-cli-babel@^5.1.3, ember-c ember-cli-version-checker "^1.0.2" resolve "^1.1.2" +ember-cli-babel@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.1.0.tgz#d9c83a7d0c67cc8a3ccb9bd082971c3593e54fad" + dependencies: + amd-name-resolver "0.0.6" + babel-plugin-debug-macros "^0.1.6" + babel-plugin-transform-es2015-modules-amd "^6.24.0" + babel-polyfill "^6.16.0" + babel-preset-env "^1.2.0" + broccoli-babel-transpiler "^6.0.0" + broccoli-funnel "^1.0.0" + broccoli-source "^1.1.0" + clone "^2.0.0" + ember-cli-version-checker "^1.2.0" + ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.5: version "6.0.0-beta.9" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.0.0-beta.9.tgz#b597d52f12d4429cd5716b55f749ebf6144b7b16" @@ -3988,6 +3970,16 @@ ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.5: clone "^2.0.0" ember-cli-version-checker "^1.2.0" +ember-cli-babel@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.1.6.tgz#d3e4fe59d96589adf7db1d99ff4f6b9dfa9dc132" + dependencies: + broccoli-babel-transpiler "^5.4.5" + broccoli-funnel "^1.0.0" + clone "^1.0.2" + ember-cli-version-checker "^1.0.2" + resolve "^1.1.2" + ember-cli-broccoli-sane-watcher@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/ember-cli-broccoli-sane-watcher/-/ember-cli-broccoli-sane-watcher-2.0.4.tgz#f43f42f75b7509c212fb926cd9aea86ae19264c6" @@ -4063,22 +4055,22 @@ ember-cli-htmlbars-inline-precompile@^0.3.3: ember-cli-htmlbars "^1.0.0" hash-for-dep "^1.0.2" -ember-cli-htmlbars@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-1.0.8.tgz#99710a83b31584100ccd7f2175beca4ec0e93210" +ember-cli-htmlbars@^1.0.0, ember-cli-htmlbars@^1.0.10, ember-cli-htmlbars@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-1.2.0.tgz#327e1a5dda1c85c6fcf8be888f7894b32c3f393b" dependencies: broccoli-persistent-filter "^1.0.3" ember-cli-version-checker "^1.0.2" + hash-for-dep "^1.0.2" json-stable-stringify "^1.0.0" strip-bom "^2.0.0" -ember-cli-htmlbars@^1.0.0, ember-cli-htmlbars@^1.0.10, ember-cli-htmlbars@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-1.2.0.tgz#327e1a5dda1c85c6fcf8be888f7894b32c3f393b" +ember-cli-htmlbars@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/ember-cli-htmlbars/-/ember-cli-htmlbars-1.0.8.tgz#99710a83b31584100ccd7f2175beca4ec0e93210" dependencies: broccoli-persistent-filter "^1.0.3" ember-cli-version-checker "^1.0.2" - hash-for-dep "^1.0.2" json-stable-stringify "^1.0.0" strip-bom "^2.0.0" @@ -4130,24 +4122,24 @@ ember-cli-moment-shim@3.0.1: moment "^2.13.0" moment-timezone "^0.5.0" -ember-cli-node-assets@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.2.2.tgz#d2d55626e7cc6619f882d7fe55751f9266022708" +ember-cli-node-assets@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.1.6.tgz#6488a2949048c801ad6d9e33753c7bce32fc1146" dependencies: broccoli-funnel "^1.0.1" broccoli-merge-trees "^1.1.1" - broccoli-source "^1.1.0" + broccoli-unwatched-tree "^0.1.1" debug "^2.2.0" lodash "^4.5.1" resolve "^1.1.7" -ember-cli-node-assets@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.1.6.tgz#6488a2949048c801ad6d9e33753c7bce32fc1146" +ember-cli-node-assets@0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.2.2.tgz#d2d55626e7cc6619f882d7fe55751f9266022708" dependencies: broccoli-funnel "^1.0.1" broccoli-merge-trees "^1.1.1" - broccoli-unwatched-tree "^0.1.1" + broccoli-source "^1.1.0" debug "^2.2.0" lodash "^4.5.1" resolve "^1.1.7" @@ -4388,9 +4380,9 @@ ember-cookies@^0.0.13: ember-cli-babel "^5.1.7" ember-getowner-polyfill "^1.2.2" -ember-data@^2.10.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-2.12.1.tgz#c06d47b14ff4956e6579b04960f62060b8ce7a70" +ember-data@2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-2.10.0.tgz#9d6e23ba21ab242afc03a2ac77e8071bc51a5c62" dependencies: amd-name-resolver "0.0.5" babel-plugin-feature-flags "^0.2.1" @@ -4422,9 +4414,9 @@ ember-debug-handlers-polyfill@^1.0.2: dependencies: ember-cli-babel "^5.0.0" -ember-electron@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ember-electron/-/ember-electron-2.1.1.tgz#6185995a99892883b34a5ff299014bc0a3111092" +ember-electron@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ember-electron/-/ember-electron-2.1.0.tgz#5d4394fb96951d5beb60153d907a0e44a730c92b" dependencies: broccoli-file-creator "^1.1.1" broccoli-funnel "^1.0.1" @@ -4500,7 +4492,7 @@ ember-inflector@^1.9.4: dependencies: ember-cli-babel "^5.1.7" -ember-inspector@2.0.4, ember-inspector@^2.0.4: +ember-inspector@^2.0.4, ember-inspector@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/ember-inspector/-/ember-inspector-2.0.4.tgz#77da971a7cec6a3eeca750a4a2e9a18a9510a86c" dependencies: @@ -4699,18 +4691,18 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -end-of-stream@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" - dependencies: - once "~1.3.0" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" dependencies: once "^1.4.0" +end-of-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" + dependencies: + once "~1.3.0" + end-stream@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/end-stream/-/end-stream-0.1.0.tgz#32003f3f438a2b0143168137f8fa6e9866c81ed5" @@ -4760,14 +4752,14 @@ ensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.0.2.tgz#a65b3e42d0b71cfc585eb774f9943c8d9b91b0c2" -entities@1.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" - entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + errno@^0.1.1, errno@~0.1.1: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" @@ -4823,7 +4815,7 @@ es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@2: version "2.0.1" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: @@ -4866,7 +4858,7 @@ es6-set@~0.1.5: es6-symbol "3.1.1" event-emitter "~0.3.5" -es6-symbol@3.1.1, es6-symbol@^3.0.2, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: +es6-symbol@^3.0.2, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1, es6-symbol@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: @@ -4890,7 +4882,7 @@ escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^ version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@1.8.x, escodegen@^1.6.1: +escodegen@^1.6.1, escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: @@ -4979,7 +4971,7 @@ esprima-fb@~15001.1001.0-dev-harmony-fb: version "15001.1001.0-dev-harmony-fb" resolved "https://registry.yarnpkg.com/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz#43beb57ec26e8cf237d3dd8b33e42533577f2659" -esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: +esprima@^2.6.0, esprima@^2.7.1, esprima@2.7.x: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -5169,14 +5161,14 @@ express@^4.10.7, express@^4.12.3, express@^4.14.0, express@^4.8.5: utils-merge "1.0.0" vary "~1.1.0" -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" - extend@^1.2.1, extend@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extend/-/extend-1.3.0.tgz#d1516fb0ff5624d2ebf9123ea1dac5a1994004f8" +extend@^3.0.0, extend@~3.0.0, extend@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + external-editor@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-1.1.1.tgz#12d7b0db850f7ff7e7081baf4005700060c4600b" @@ -5493,19 +5485,18 @@ fs-exists-sync@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" -fs-extra@0.26.7, fs-extra@^0.26.0, fs-extra@^0.26.7: - version "0.26.7" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" +fs-extra@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.24.0.tgz#d4e4342a96675cb7846633a6099249332b539952" 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-extra@0.30.0, fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" +fs-extra@^0.26.0, fs-extra@^0.26.7, fs-extra@0.26.7: + version "0.26.7" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" @@ -5513,12 +5504,13 @@ fs-extra@0.30.0, fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.24.0.tgz#d4e4342a96675cb7846633a6099249332b539952" +fs-extra@^0.30.0, 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" @@ -5822,28 +5814,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -"glob@3 || 4 || 5 || 6 || 7", glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@~7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.0.x, glob@~7.0.6: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^5.0.10, glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -5864,6 +5834,17 @@ glob@^6.0.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.0, glob@^7.0.3, glob@^7.0.4, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@~7.1.1, "glob@3 || 4 || 5 || 6 || 7", glob@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@~3.2.6: version "3.2.11" resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" @@ -5871,6 +5852,17 @@ glob@~3.2.6: inherits "2" minimatch "0.3" +glob@~7.0.6, glob@7.0.x: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-modules@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" @@ -6019,7 +6011,7 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" -har-validator@~4.2.1: +har-validator@~4.2.0, har-validator@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" dependencies: @@ -6194,9 +6186,9 @@ homedir-polyfill@^1.0.0: dependencies: parse-passwd "^1.0.0" -hospitalrun-dblisteners@0.9.6: - version "0.9.6" - resolved "https://registry.yarnpkg.com/hospitalrun-dblisteners/-/hospitalrun-dblisteners-0.9.6.tgz#34addc22ba8e449c8779a9dd7f1488e502894973" +hospitalrun-dblisteners@1.0.0-beta: + version "1.0.0-beta" + resolved "https://registry.yarnpkg.com/hospitalrun-dblisteners/-/hospitalrun-dblisteners-1.0.0-beta.tgz#6e1a5b8ef47ce18d4cb9072d79aa3f30b119bb61" dependencies: follow "^0.12.1" glob "^7.0.0" @@ -6204,10 +6196,11 @@ hospitalrun-dblisteners@0.9.6: nano "^6.2.0" snyk "^1.13.2" uuid "^3.0.1" + web-push "^3.2.2" -hospitalrun-server-routes@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/hospitalrun-server-routes/-/hospitalrun-server-routes-0.9.11.tgz#431d86445d2a6aa38944bd90e77f2a124bf37758" +hospitalrun-server-routes@1.0.0-beta: + version "1.0.0-beta" + resolved "https://registry.yarnpkg.com/hospitalrun-server-routes/-/hospitalrun-server-routes-1.0.0-beta.tgz#3d510c413b1d0e79f243cfd0545931238e5feff5" dependencies: body-parser "^1.15.0" express "^4.14.0" @@ -6263,6 +6256,12 @@ htmlparser2@~3.8.1: entities "1.0" readable-stream "1.1" +http_ece@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/http_ece/-/http_ece-0.5.2.tgz#5654d7ec9d996b749ce00a276e18d54b6d8f905f" + dependencies: + urlsafe-base64 "~1.0.0" + http-errors@~1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" @@ -6318,7 +6317,7 @@ hyperquest@~1.2.0: duplexer2 "~0.0.2" through2 "~0.6.3" -iconv-lite@0.4.15, iconv-lite@^0.4.5, iconv-lite@~0.4.13: +iconv-lite@^0.4.5, iconv-lite@~0.4.13, iconv-lite@0.4.15: version "0.4.15" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" @@ -6338,14 +6337,14 @@ image-size@^0.5.0, image-size@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.1.tgz#28eea8548a4b1443480ddddc1e083ae54652439f" -immediate@3.0.6, immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - immediate@^3.0.0, immediate@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" +immediate@~3.0.5, immediate@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + imul@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" @@ -6391,7 +6390,7 @@ inflight@^1.0.4, inflight@~1.0.5: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@2, inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -6399,7 +6398,7 @@ inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" -ini@1.x.x, ini@^1.3.4, ini@~1.3.0, ini@~1.3.4: +ini@^1.3.4, ini@~1.3.0, ini@~1.3.4, ini@1.x.x: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" @@ -6439,24 +6438,6 @@ inline-source-map@~0.6.0: dependencies: source-map "~0.5.3" -inquirer@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-1.0.3.tgz#ebe3a0948571bcc46ccccbe2f9bcec251e984bd0" - dependencies: - ansi-escapes "^1.1.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - mute-stream "0.0.6" - pinkie-promise "^2.0.0" - run-async "^2.2.0" - rx "^4.1.0" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - inquirer@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" @@ -6531,14 +6512,32 @@ inquirer@^2.0.0: strip-ansi "^3.0.0" through "^2.3.6" +inquirer@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-1.0.3.tgz#ebe3a0948571bcc46ccccbe2f9bcec251e984bd0" + dependencies: + ansi-escapes "^1.1.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + mute-stream "0.0.6" + pinkie-promise "^2.0.0" + run-async "^2.2.0" + rx "^4.1.0" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + insert-module-globals@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3" dependencies: - JSONStream "^1.0.3" combine-source-map "~0.7.1" concat-stream "~1.5.1" is-buffer "^1.1.0" + JSONStream "^1.0.3" lexical-scope "^1.2.0" process "~0.11.0" through2 "^2.0.0" @@ -6810,14 +6809,14 @@ is-windows@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" -isarray@0.0.1, 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, isarray@~1.0.0: +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isarray@~0.0.1, isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + isbinaryfile@^3.0.0, isbinaryfile@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" @@ -6899,6 +6898,10 @@ js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" +js-extend@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/js-extend/-/js-extend-1.0.1.tgz#50551ab1ac71d4bb302e4040ebbe59033ba2b1f7" + js-reporters@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/js-reporters/-/js-reporters-1.2.0.tgz#7cf2cb698196684790350d0c4ca07f4aed9ec17e" @@ -6907,15 +6910,15 @@ js-string-escape@^1.0.0, js-string-escape@^1.0.1, js-string-escape@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" -js-tokens@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-1.0.1.tgz#cc435a5c8b94ad15acb7983140fc80182c89aeae" - js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@3.x, js-yaml@^3.2.5, js-yaml@^3.2.7, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.5.3, js-yaml@^3.6.1: +js-tokens@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-1.0.1.tgz#cc435a5c8b94ad15acb7983140fc80182c89aeae" + +js-yaml@^3.2.5, js-yaml@^3.2.7, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.5.3, js-yaml@^3.6.1, js-yaml@3.x: version "3.8.3" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.3.tgz#33a05ec481c850c8875929166fe1beb61c728766" dependencies: @@ -6953,10 +6956,6 @@ jsdom@^7.0.2: whatwg-url-compat "~0.6.5" xml-name-validator ">= 2.0.1 < 3.0.0" -jsesc@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.3.0.tgz#1bf5ee63b4539fe2e26d0c1e99c240b97a457972" - jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -6965,6 +6964,10 @@ jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" +jsesc@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.3.0.tgz#1bf5ee63b4539fe2e26d0c1e99c240b97a457972" + json-parse-helpfulerror@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz#13f14ce02eed4e981297b64eb9e3b932e2dd13dc" @@ -7031,18 +7034,32 @@ jsonist@~1.3.0: json-stringify-safe "~5.0.0" xtend "~4.0.0" -jsonparse@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-0.0.5.tgz#330542ad3f0a654665b778f3eb2d9a9fa507ac64" - jsonparse@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.0.tgz#85fc245b1d9259acc6941960b905adf64e7de0e8" +jsonparse@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-0.0.5.tgz#330542ad3f0a654665b778f3eb2d9a9fa507ac64" + jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" +JSONStream@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-0.8.4.tgz#91657dfe6ff857483066132b4618b62e8f4887bd" + dependencies: + jsonparse "0.0.5" + through ">=2.2.7 <3" + +JSONStream@^1.0.3: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + jsprim@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" @@ -7069,6 +7086,23 @@ jstransformer@0.0.2: is-promise "^2.0.0" promise "^6.0.1" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + +jws@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + kind-of@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" @@ -7149,14 +7183,14 @@ less@^2.7.1: request "^2.72.0" source-map "^0.5.3" -level-codec@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.0.tgz#c755b68d0d44ffa0b1cba044b8f81a55a14ad39b" - level-codec@~6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-6.1.0.tgz#f5df0a99582f76dac43855151ab6f4e4d0d60045" +level-codec@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.0.tgz#c755b68d0d44ffa0b1cba044b8f81a55a14ad39b" + level-errors@^1.0.3, level-errors@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.4.tgz#3585e623974c737a93755492a43c0267cda4425f" @@ -7200,13 +7234,25 @@ levelup@1.3.3: semver "~5.1.0" xtend "~4.0.0" -leven@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/leven/-/leven-1.0.2.tgz#9144b6eebca5f1d0680169f1a6770dcea60b75c3" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" +levelup@1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.5.tgz#fa80a972b74011f2537c8b65678bd8b5188e4e66" + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~6.1.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.1.0" + xtend "~4.0.0" + +leven@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/leven/-/leven-1.0.2.tgz#9144b6eebca5f1d0680169f1a6770dcea60b75c3" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -7217,16 +7263,13 @@ lexical-scope@^1.2.0: dependencies: astw "^2.0.0" -lie@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.0.4.tgz#bc7ae1ebe7f1c8de39afdcd4f789076b47b0f634" +lie@*, lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" dependencies: - es3ify "^0.2.2" immediate "~3.0.5" - inline-process-browser "^1.0.0" - unreachable-branch-transform "^0.3.0" -lie@3.1.0, lie@^3.0.1, lie@^3.1.0: +lie@^3.0.1, lie@^3.1.0, lie@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.0.tgz#65e0139eaef9ae791a1f5c8c53692c8d3b4718f4" dependencies: @@ -7238,6 +7281,15 @@ lie@~2.7.4: dependencies: immediate "^3.0.0" +lie@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.0.4.tgz#bc7ae1ebe7f1c8de39afdcd4f789076b47b0f634" + dependencies: + es3ify "^0.2.2" + immediate "~3.0.5" + inline-process-browser "^1.0.0" + unreachable-branch-transform "^0.3.0" + linkify-it@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f" @@ -7615,10 +7667,6 @@ lowercase-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" - lru-cache@^4.0.0, lru-cache@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" @@ -7626,14 +7674,18 @@ lru-cache@^4.0.0, lru-cache@^4.0.1: pseudomap "^1.0.1" yallist "^2.0.0" -ltgt@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.2.tgz#e7472324fee690afc0d5ecf900403ce5788a311d" +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" -ltgt@~2.1.3: +ltgt@~2.1.3, ltgt@2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" +ltgt@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.2.tgz#e7472324fee690afc0d5ecf900403ce5788a311d" + macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" @@ -7668,16 +7720,6 @@ markdown-it-terminal@0.0.4: lodash.merge "^3.3.2" markdown-it "^4.4.0" -markdown-it@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.0.0.tgz#e66255497a0e409e816fbc67807975f4f26f6f82" - dependencies: - argparse "^1.0.7" - entities "~1.1.1" - linkify-it "^2.0.0" - mdurl "^1.0.1" - uc.micro "^1.0.3" - markdown-it@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-4.4.0.tgz#3df373dbea587a9a7fef3e56311b68908f75c414" @@ -7688,6 +7730,16 @@ markdown-it@^4.4.0: mdurl "~1.0.0" uc.micro "^1.0.0" +markdown-it@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.0.0.tgz#e66255497a0e409e816fbc67807975f4f26f6f82" + dependencies: + argparse "^1.0.7" + entities "~1.1.1" + linkify-it "^2.0.0" + mdurl "^1.0.1" + uc.micro "^1.0.3" + matcher-collection@^1.0.0, matcher-collection@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/matcher-collection/-/matcher-collection-1.0.4.tgz#2f66ae0869996f29e43d0b62c83dd1d43e581755" @@ -7825,7 +7877,7 @@ mime-types@~2.0.1, mime-types@~2.0.3: dependencies: mime-db "~1.12.0" -mime@1.3.4, mime@^1.2.11: +mime@^1.2.11, mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" @@ -7845,32 +7897,36 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@0.3: - version "0.3.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" +minimatch@^2.0.1, minimatch@^2.0.3: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: - lru-cache "2" - sigmund "~1.0.0" + brace-expansion "^1.0.0" -"minimatch@2 || 3", minimatch@3, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.2: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@~3.0.2, "minimatch@2 || 3", minimatch@3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" +minimatch@0.3: + version "0.3.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + minimatch@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.2.tgz#0f398a7300ea441e9c348c83d98ab8c9dbf9c40a" dependencies: brace-expansion "^1.0.0" -minimatch@^2.0.1, minimatch@^2.0.3: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - dependencies: - brace-expansion "^1.0.0" +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.2, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@0.0.8, minimist@~0.0.1: +minimist@~0.0.1, minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -7878,25 +7934,21 @@ minimist@1.1.x: version "1.1.3" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.2, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -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.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1, mkdirp@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" -mkdirp@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" +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" mkpath@^0.1.0: version "0.1.0" @@ -7924,7 +7976,6 @@ module-deps@^4.0.8: version "4.1.1" resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" dependencies: - JSONStream "^1.0.3" browser-resolve "^1.7.0" cached-path-relative "^1.0.0" concat-stream "~1.5.0" @@ -7932,6 +7983,7 @@ module-deps@^4.0.8: detective "^4.0.0" duplexer2 "^0.1.2" inherits "^2.0.1" + JSONStream "^1.0.3" parents "^1.0.0" readable-stream "^2.0.2" resolve "^1.1.3" @@ -7952,7 +8004,7 @@ moment-timezone@^0.5.0: dependencies: moment ">= 2.9.0" -"moment@>= 2.6.0", "moment@>= 2.9.0", moment@^2.13.0, moment@^2.9.0: +moment@^2.13.0, moment@^2.9.0, "moment@>= 2.6.0", "moment@>= 2.9.0": version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" @@ -8005,6 +8057,10 @@ mustache@^2.2.1: version "2.3.0" resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.0.tgz#4028f7778b17708a489930a6e52ac3bca0da41d0" +mute-stream@~0.0.4, mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -8013,10 +8069,6 @@ mute-stream@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" -mute-stream@0.0.7, mute-stream@~0.0.4: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - mz@^2.3.1, mz@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce" @@ -8029,7 +8081,7 @@ nan@^2.3.0, nan@^2.3.2, nan@^2.4.0, nan@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" -nano@6.2.0, nano@^6.2.0: +nano@^6.2.0, nano@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/nano/-/nano-6.2.0.tgz#314aa08f41e7da388bd2132b9f97ecbc67e057a0" dependencies: @@ -8039,6 +8091,12 @@ nano@6.2.0, nano@^6.2.0: request "^2.53.0" underscore "^1.7.0" +native-or-lie@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/native-or-lie/-/native-or-lie-1.0.0.tgz#14f8783f4b26257780be75142fa145375c50d980" + dependencies: + lie "*" + native-promise-only@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" @@ -8218,7 +8276,7 @@ noop-logger@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" -"nopt@2 || 3", nopt@3.x, nopt@^3.0.1, nopt@^3.0.3, nopt@~3.0.6: +nopt@^3.0.1, nopt@^3.0.3, nopt@~3.0.6, "nopt@2 || 3", nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -8320,7 +8378,7 @@ npm-user-validate@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-0.1.5.tgz#52465d50c2d20294a57125b996baedbf56c5004b" -npm@3.10.8, npm@^3: +npm@^3, npm@3.10.8: version "3.10.8" resolved "https://registry.yarnpkg.com/npm/-/npm-3.10.8.tgz#8f76ff8c6da04b61dd371d554ce40a0b8916c15e" dependencies: @@ -8403,7 +8461,7 @@ npmi@^2.0.1: npm "^3" semver "^4.1.0" -"npmlog@0 || 1 || 2", "npmlog@0 || 1 || 2 || 3", npmlog@^2.0.0, npmlog@^2.0.3, "npmlog@~2.0.0 || ~3.1.0": +npmlog@^2.0.0, npmlog@^2.0.3, "npmlog@~2.0.0 || ~3.1.0", "npmlog@0 || 1 || 2", "npmlog@0 || 1 || 2 || 3": version "2.0.4" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-2.0.4.tgz#98b52530f2514ca90d09ec5b22c8846722375692" dependencies: @@ -8411,7 +8469,7 @@ npmi@^2.0.1: are-we-there-yet "~1.1.2" gauge "~1.2.5" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@~4.0.0: +npmlog@^4.0.0, npmlog@^4.0.2, npmlog@~4.0.0, "npmlog@0 || 1 || 2 || 3 || 4": version "4.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" dependencies: @@ -8462,10 +8520,6 @@ oauth@0.9.x: version "0.9.15" resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" -object-assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" - object-assign@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" @@ -8478,6 +8532,10 @@ 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" +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" @@ -8511,7 +8569,7 @@ on-headers@^1.0.1, on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0, once@~1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0, once@~1.4.0, once@1.x: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -8636,7 +8694,7 @@ os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -osenv@0, osenv@^0.1.0, osenv@^0.1.3, osenv@^0.1.4, osenv@~0.1.3: +osenv@^0.1.0, osenv@^0.1.3, osenv@^0.1.4, osenv@~0.1.3, osenv@0: version "0.1.4" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" dependencies: @@ -8760,6 +8818,13 @@ parseurl@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" +passport-google-oauth@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/passport-google-oauth/-/passport-google-oauth-1.0.0.tgz#65f50633192ad0627a18b08960077109d84eb76d" + dependencies: + passport-google-oauth1 "1.x.x" + passport-google-oauth20 "1.x.x" + passport-google-oauth1@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-google-oauth1/-/passport-google-oauth1-1.0.0.tgz#af74a803df51ec646f66a44d82282be6f108e0cc" @@ -8772,13 +8837,6 @@ passport-google-oauth20@1.x.x: dependencies: passport-oauth2 "1.x.x" -passport-google-oauth@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/passport-google-oauth/-/passport-google-oauth-1.0.0.tgz#65f50633192ad0627a18b08960077109d84eb76d" - dependencies: - passport-google-oauth1 "1.x.x" - passport-google-oauth20 "1.x.x" - passport-oauth1@1.x.x: version "1.1.0" resolved "https://registry.yarnpkg.com/passport-oauth1/-/passport-oauth1-1.1.0.tgz#a7de988a211f9cf4687377130ea74df32730c918" @@ -8855,16 +8913,16 @@ path-posix@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/path-posix/-/path-posix-1.0.0.tgz#06b26113f56beab042545a23bfa88003ccac260f" -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - path-to-regexp@^1.0.1, path-to-regexp@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" dependencies: isarray "0.0.1" +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -8883,7 +8941,7 @@ pause@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" -pbkdf2@^3.0.3: +pbkdf2@^3.0.3, pbkdf2@3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" dependencies: @@ -9199,48 +9257,99 @@ postcss@^5.0.0, postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0. source-map "^0.5.6" supports-color "^3.2.3" -pouchdb-adapter-leveldb-core@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-6.1.2.tgz#86e30f02ba00dfcad1fd74a5f8614deaa0911008" +pouchdb-abstract-mapreduce@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-6.2.0.tgz#55858d1799c89290185df56b71c843a481abcbae" + dependencies: + pouchdb-binary-utils "6.2.0" + pouchdb-collate "6.2.0" + pouchdb-collections "6.2.0" + pouchdb-mapreduce-utils "6.2.0" + pouchdb-md5 "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-adapter-http@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-http/-/pouchdb-adapter-http-6.2.0.tgz#63c816d2608904bdfb200b6a3d5a51d8b1e92eb4" + dependencies: + argsarray "0.0.1" + pouchdb-ajax "6.2.0" + pouchdb-binary-utils "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-adapter-idb@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-idb/-/pouchdb-adapter-idb-6.2.0.tgz#288e46e45d0d6c0133c5759d0c419a96996362ea" + dependencies: + pouchdb-adapter-utils "6.2.0" + pouchdb-binary-utils "6.2.0" + pouchdb-collections "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-json "6.2.0" + pouchdb-merge "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-adapter-leveldb-core@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-6.2.0.tgz#9f04bd422a80d5618125ff6154fe0475ced142e5" dependencies: argsarray "0.0.1" buffer-from "0.1.1" double-ended-queue "2.1.0-0" - levelup "1.3.3" - pouchdb-adapter-utils "6.1.2" - pouchdb-binary-utils "6.1.2" - pouchdb-collections "6.1.2" - pouchdb-errors "6.1.2" - pouchdb-json "6.1.2" - pouchdb-md5 "6.1.2" - pouchdb-merge "6.1.2" - pouchdb-promise "6.1.2" - pouchdb-utils "6.1.2" - sublevel-pouchdb "6.1.2" - through2 "2.0.1" - -pouchdb-adapter-memory@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-memory/-/pouchdb-adapter-memory-6.1.2.tgz#0a53b6cb9d85e3f60ab0c1c36de246c345ce41d9" + levelup "1.3.5" + pouchdb-adapter-utils "6.2.0" + pouchdb-binary-utils "6.2.0" + pouchdb-collections "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-json "6.2.0" + pouchdb-md5 "6.2.0" + pouchdb-merge "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + sublevel-pouchdb "6.2.0" + through2 "2.0.3" + +pouchdb-adapter-memory@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-memory/-/pouchdb-adapter-memory-6.2.0.tgz#1bede8fc13d5668ec18c04e89fef3292b01565c0" dependencies: memdown "1.2.4" - pouchdb-adapter-leveldb-core "6.1.2" - pouchdb-utils "6.1.2" + pouchdb-adapter-leveldb-core "6.2.0" + pouchdb-utils "6.2.0" -pouchdb-adapter-utils@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-6.1.2.tgz#6353686ef270a943fd9ec0d541b06812138516d6" +pouchdb-adapter-utils@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-adapter-utils/-/pouchdb-adapter-utils-6.2.0.tgz#39891ea922e883879e89c216bab69820823fef58" dependencies: - pouchdb-binary-utils "6.1.2" - pouchdb-collections "6.1.2" - pouchdb-errors "6.1.2" - pouchdb-md5 "6.1.2" - pouchdb-merge "6.1.2" - pouchdb-utils "6.1.2" + pouchdb-binary-utils "6.2.0" + pouchdb-collections "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-md5 "6.2.0" + pouchdb-merge "6.2.0" + pouchdb-utils "6.2.0" -pouchdb-binary-utils@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-6.1.2.tgz#0246d463e237015fb1524670d7d26614628e8fdb" +pouchdb-ajax@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-ajax/-/pouchdb-ajax-6.2.0.tgz#62a133f8b95ce8aa856b8169d4d6e60142631e63" + dependencies: + buffer-from "0.1.1" + pouchdb-binary-utils "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + request "2.80.0" + +pouchdb-binary-util@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pouchdb-binary-util/-/pouchdb-binary-util-1.0.1.tgz#34c9ccf25e3ff6ddeb2abed99a2cf8526826f9cb" + +pouchdb-binary-utils@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-binary-utils/-/pouchdb-binary-utils-6.2.0.tgz#dc4154c01b92fb9ad87fdf695394a91b5d9429bf" dependencies: buffer-from "0.1.1" @@ -9250,17 +9359,57 @@ pouchdb-bulkdocs-wrapper@^1.0.2: dependencies: pouchdb-promise "^0.0.0" +pouchdb-changes-filter@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-changes-filter/-/pouchdb-changes-filter-6.2.0.tgz#62649554cef2c9e7e846c452eb0d35ce0811a5e8" + dependencies: + pouchdb-errors "6.2.0" + pouchdb-selector-core "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-checkpointer@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-checkpointer/-/pouchdb-checkpointer-6.2.0.tgz#c0d73cfd27dddf64f7f6a43042739fe55089d589" + dependencies: + pouchdb-collate "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + pouchdb-collate@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pouchdb-collate/-/pouchdb-collate-1.2.0.tgz#cae3b830fca124b7f97d23046e4faa311ec3828c" -pouchdb-collections@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-6.1.2.tgz#070161cdf485d87ddd29d977e4e8392dabf9313d" +pouchdb-collate@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-collate/-/pouchdb-collate-6.2.0.tgz#9ee5e578de004581c148754f7decdc0b70495ffc" -pouchdb-errors@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-6.1.2.tgz#1a85aaf8c8a7214148b271e8f1a06b450a7e5e62" +pouchdb-collections@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-6.2.0.tgz#f532601870cbd329ba0c6005bcdd301126825be2" + +pouchdb-core@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-core/-/pouchdb-core-6.2.0.tgz#f310cf51794cb49363fb398a14ff66838cf6f511" + dependencies: + argsarray "0.0.1" + inherits "2.0.3" + pouchdb-changes-filter "6.2.0" + pouchdb-collections "6.2.0" + pouchdb-debug "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-merge "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-debug@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-debug/-/pouchdb-debug-6.2.0.tgz#d5617a5fcbb3881fecb45e22550dee750a8de5c3" + dependencies: + debug "2.6.1" + +pouchdb-errors@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-errors/-/pouchdb-errors-6.2.0.tgz#5ccbefaf2b92e918d5d90b5a5b779376464b5907" dependencies: inherits "2.0.3" @@ -9282,9 +9431,17 @@ pouchdb-find@^0.10.2, pouchdb-find@^0.10.3: pouchdb-upsert "~2.0.1" spark-md5 "2.0.2" -pouchdb-json@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-6.1.2.tgz#a27deb5d5c6ff52d7a008a75f8f8556b2c17768c" +pouchdb-generate-replication-id@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-generate-replication-id/-/pouchdb-generate-replication-id-6.2.0.tgz#e18b4ccbbaf4b74b48b0abced0ba089c15285c9c" + dependencies: + pouchdb-collate "6.2.0" + pouchdb-md5 "6.2.0" + pouchdb-promise "6.2.0" + +pouchdb-json@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-json/-/pouchdb-json-6.2.0.tgz#3c3242571b67fb637d71226fdb677fc3450cd92d" dependencies: vuvuzela "1.0.3" @@ -9300,45 +9457,73 @@ pouchdb-list@^1.1.0: pouchdb-req-http-query "^1.0.0" promise-nodify "^1.0.0" -pouchdb-md5@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-6.1.2.tgz#27ab60957326dcc5b1e9dd56ba3f72eb2b53240d" +pouchdb-mapreduce-utils@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-6.2.0.tgz#fe6c15eff1a6fe48d68f973c7a79ef492652ca2f" + dependencies: + argsarray "0.0.1" + inherits "2.0.3" + pouchdb-collections "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-mapreduce@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-mapreduce/-/pouchdb-mapreduce-6.2.0.tgz#b2297d9a3eb92a974b74c67f844f96829f994b38" dependencies: - pouchdb-binary-utils "6.1.2" + pouchdb-abstract-mapreduce "6.2.0" + pouchdb-mapreduce-utils "6.2.0" + pouchdb-utils "6.2.0" + +pouchdb-md5@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-md5/-/pouchdb-md5-6.2.0.tgz#7581fc4e932c57c78ee48d25a7d0014bff008e4d" + dependencies: + pouchdb-binary-utils "6.2.0" spark-md5 "3.0.0" -pouchdb-merge@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-6.1.2.tgz#406c2a95b84bdb16fe973ab4b7d8f26153cc42aa" +pouchdb-merge@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-merge/-/pouchdb-merge-6.2.0.tgz#65ca6d94aed6f9b3b51fed9318d33a302a99ee2f" pouchdb-plugin-error@^1.0.0, pouchdb-plugin-error@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pouchdb-plugin-error/-/pouchdb-plugin-error-1.0.1.tgz#c72f06014124a9fa9038fc8eda27c58b348805ca" -pouchdb-promise@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-5.4.0.tgz#e277ac6bda1ac8504597abb5c43a7c3a9e56866f" +pouchdb-promise@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-0.0.0.tgz#3c014e627766d945be3f270e079a7db4d2d19827" dependencies: - lie "3.0.4" + bluebird "~1.2.4" + lie "~2.7.4" -pouchdb-promise@5.4.5, pouchdb-promise@^5.4.3: +pouchdb-promise@^5.4.3, pouchdb-promise@5.4.5: version "5.4.5" resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-5.4.5.tgz#5c2a69759141eb73be1e172e522fd84da2e0752e" dependencies: lie "3.0.4" -pouchdb-promise@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-6.1.2.tgz#e89f021e513e47ded37195f45b080dd52c4ee6a7" +pouchdb-promise@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-5.4.0.tgz#e277ac6bda1ac8504597abb5c43a7c3a9e56866f" dependencies: - lie "3.1.0" + lie "3.0.4" -pouchdb-promise@^0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-0.0.0.tgz#3c014e627766d945be3f270e079a7db4d2d19827" +pouchdb-promise@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-promise/-/pouchdb-promise-6.2.0.tgz#1e4fcec0aa0678df583e6a7b4b996ba010a608fe" dependencies: - bluebird "~1.2.4" - lie "~2.7.4" + lie "3.1.1" + +pouchdb-replication@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-replication/-/pouchdb-replication-6.2.0.tgz#debd7e162557e499c43c25cfd7a1a05ea34bd0df" + dependencies: + inherits "2.0.3" + pouchdb-checkpointer "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-generate-replication-id "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-utils "6.2.0" pouchdb-req-http-query@^1.0.0: version "1.0.3" @@ -9350,6 +9535,13 @@ pouchdb-req-http-query@^1.0.0: pouchdb-promise "^0.0.0" xmlhttprequest-cookie "^0.9.2" +pouchdb-selector-core@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-selector-core/-/pouchdb-selector-core-6.2.0.tgz#ab753c17182bc394e6a6b1de275331161f85e325" + dependencies: + pouchdb-collate "6.2.0" + pouchdb-utils "6.2.0" + pouchdb-upsert@~2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/pouchdb-upsert/-/pouchdb-upsert-2.0.2.tgz#c746cc9945e52d8c78e42f63ade0666777996712" @@ -9365,18 +9557,17 @@ pouchdb-users@^1.0.3: pouchdb-wrappers "^1.3.6" secure-random "^1.1.1" -pouchdb-utils@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-6.1.2.tgz#3cdde6d1d37a396f291849d289a37980673522d9" +pouchdb-utils@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb-utils/-/pouchdb-utils-6.2.0.tgz#cd8d4207a34e478b49af201ff0c51ea733244061" dependencies: argsarray "0.0.1" clone-buffer "1.0.0" - debug "2.6.0" immediate "3.0.6" inherits "2.0.3" - pouchdb-collections "6.1.2" - pouchdb-errors "6.1.2" - pouchdb-promise "6.1.2" + pouchdb-collections "6.2.0" + pouchdb-errors "6.2.0" + pouchdb-promise "6.2.0" pouchdb-wrappers@^1.3.6: version "1.3.6" @@ -9384,7 +9575,7 @@ pouchdb-wrappers@^1.3.6: dependencies: promise-nodify "^1.0.1" -pouchdb@6.1.2, pouchdb@^6.1.2: +pouchdb@^6.1.2: version "6.1.2" resolved "https://registry.yarnpkg.com/pouchdb/-/pouchdb-6.1.2.tgz#5ceb310f705f0a7fd23d25fe1a365f36b30ac28b" dependencies: @@ -9408,6 +9599,29 @@ pouchdb@6.1.2, pouchdb@^6.1.2: through2 "2.0.1" vuvuzela "1.0.3" +pouchdb@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/pouchdb/-/pouchdb-6.2.0.tgz#5c8521b46cfc83644ca7fc61a7b240d2ce17dc0d" + dependencies: + argsarray "0.0.1" + buffer-from "0.1.1" + clone-buffer "1.0.0" + debug "2.6.1" + double-ended-queue "2.1.0-0" + immediate "3.0.6" + inherits "2.0.3" + level-codec "7.0.0" + level-write-stream "1.0.0" + leveldown "1.5.0" + levelup "1.3.5" + lie "3.1.1" + ltgt "2.1.3" + readable-stream "1.0.33" + request "2.80.0" + spark-md5 "3.0.0" + through2 "2.0.3" + vuvuzela "1.0.3" + prebuild@^4.1.1: version "4.5.0" resolved "https://registry.yarnpkg.com/prebuild/-/prebuild-4.5.0.tgz#2aaa0df2063bff814a803bd4dc94ff9b64e5df00" @@ -9500,18 +9714,18 @@ promise-nodify@^1.0.0, promise-nodify@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/promise-nodify/-/promise-nodify-1.0.2.tgz#0d0fb143c33400b0061b47e581257557047d4c5a" -"promise@>=3.2 <8", promise@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" - dependencies: - asap "~2.0.3" - promise@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-6.1.0.tgz#2ce729f6b94b45c26891ad0602c5c90e04c6eef6" dependencies: asap "~1.0.0" +promise@^7.1.1, "promise@>=3.2 <8": + version "7.1.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + dependencies: + asap "~2.0.3" + promise@~2.0: version "2.0.0" resolved "https://registry.yarnpkg.com/promise/-/promise-2.0.0.tgz#46648aa9d605af5d2e70c3024bf59436da02b80e" @@ -9564,19 +9778,19 @@ pump@^1.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@6.4.0, qs@^6.2.0, qs@~6.4.0: +qs@^6.2.0, qs@~6.4.0, qs@6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -9607,14 +9821,6 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -quick-temp@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/quick-temp/-/quick-temp-0.1.6.tgz#a6242a15cba9f9cdbd341287b5c569e318eec307" - dependencies: - mktemp "~0.4.0" - rimraf "~2.2.6" - underscore.string "~2.3.3" - quick-temp@^0.1.0, quick-temp@^0.1.2, quick-temp@^0.1.3, quick-temp@^0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/quick-temp/-/quick-temp-0.1.8.tgz#bab02a242ab8fb0dd758a3c9776b32f9a5d94408" @@ -9623,6 +9829,14 @@ quick-temp@^0.1.0, quick-temp@^0.1.2, quick-temp@^0.1.3, quick-temp@^0.1.5: rimraf "^2.5.4" underscore.string "~3.3.4" +quick-temp@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/quick-temp/-/quick-temp-0.1.6.tgz#a6242a15cba9f9cdbd341287b5c569e318eec307" + dependencies: + mktemp "~0.4.0" + rimraf "~2.2.6" + underscore.string "~2.3.3" + qunit-notifications@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/qunit-notifications/-/qunit-notifications-0.1.1.tgz#3001afc6a6a77dfbd962ccbcddde12dec5286c09" @@ -9734,7 +9948,7 @@ read-only-stream@^2.0.0: dependencies: readable-stream "^2.0.2" -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@~2.0.4: +read-package-json@^2.0.0, read-package-json@~2.0.4, "read-package-json@1 || 2": version "2.0.5" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.5.tgz#f93a64e641529df68a08c64de46389e8a3f88845" dependencies: @@ -9784,25 +9998,22 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -read@1, read@~1.0.1, read@~1.0.7: +read@~1.0.1, read@~1.0.7, read@1: version "1.0.7" resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2, readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6: - version "2.2.9" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" +readable-stream@^1.0.27-1, readable-stream@^1.1.8, readable-stream@~1.1.9, readable-stream@1.1: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" dependencies: - buffer-shims "~1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~1.0.0" - util-deprecate "~1.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" -readable-stream@1.0.33, "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@^1.0.33, readable-stream@~1.0.2, readable-stream@~1.0.24, readable-stream@~1.0.26: +readable-stream@^1.0.33, "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.2, readable-stream@~1.0.24, readable-stream@~1.0.26, readable-stream@1.0.33: version "1.0.33" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.33.tgz#3a360dd66c1b1d7fd4705389860eda1d0f61126c" dependencies: @@ -9811,14 +10022,17 @@ readable-stream@1.0.33, "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@^ isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@1.1, readable-stream@^1.0.27-1, readable-stream@^1.1.8, readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" +readable-stream@^2, readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6, "readable-stream@1 || 2": + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: + buffer-shims "~1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" readable-stream@~0.0.2: version "0.0.4" @@ -9880,7 +10094,7 @@ realize-package-specifier@~3.0.3: dezalgo "^1.0.1" npm-package-arg "^4.1.1" -recast@0.10.33, recast@^0.10.1, recast@^0.10.10: +recast@^0.10.1, recast@^0.10.10, recast@0.10.33: version "0.10.33" resolved "https://registry.yarnpkg.com/recast/-/recast-0.10.33.tgz#942808f7aa016f1fa7142c461d7e5704aaa8d697" dependencies: @@ -10037,54 +10251,27 @@ repeat-string@^1.5.2, repeat-string@^1.5.4: repeating@^1.1.0, repeating@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeating/-/repeating-1.1.3.tgz#3d4114218877537494f97f77f9785fab810fa4ac" - dependencies: - is-finite "^1.0.0" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -request@2, request@^2.45.0, request@^2.53.0, request@^2.55.0, request@^2.72.0, request@^2.74.0, request@^2.79.0, request@^2.81.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" + dependencies: + is-finite "^1.0.0" -request@2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.45.0, request@^2.53.0, request@^2.55.0, request@^2.72.0, request@^2.74.0, request@^2.79.0, request@^2.81.0, request@2: + 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.11.0" + 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 "~2.0.6" + har-validator "~4.2.1" hawk "~3.1.3" http-signature "~1.1.0" is-typedarray "~1.0.0" @@ -10092,10 +10279,12 @@ request@2.79.0: json-stringify-safe "~5.0.1" mime-types "~2.1.7" oauth-sign "~0.8.1" - qs "~6.3.0" + 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.4.1" + tunnel-agent "^0.6.0" uuid "^3.0.0" request@~2.55.0: @@ -10147,6 +10336,57 @@ request@~2.74.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" +request@2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + 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" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +request@2.80.0: + version "2.80.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.80.0.tgz#8cc162d76d79381cdefdd3505d76b80b60589bd0" + 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.0" + 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.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -10201,16 +10441,16 @@ resolve-package@^1.0.1: dependencies: get-installed-path "^2.0.3" -resolve@1.1.7, resolve@1.1.x, resolve@~1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - resolve@^1.1.2, resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" dependencies: path-parse "^1.0.5" +resolve@~1.1.7, resolve@1.1.7, resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -10241,7 +10481,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.3.2, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.0, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@^2.2.8, rimraf@^2.3.2, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2.5.0, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@2: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -10336,7 +10576,7 @@ safefs@^4.0.0: editions "^1.1.1" graceful-fs "^4.1.4" -samsam@1.x, samsam@^1.1.3: +samsam@^1.1.3, samsam@1.x: version "1.2.1" resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.2.1.tgz#edd39093a3184370cb859243b2bdf255e7d8ea67" @@ -10377,6 +10617,10 @@ sass.js@^0.10.1: version "0.10.4" resolved "https://registry.yarnpkg.com/sass.js/-/sass.js-0.10.4.tgz#c07e0b675f2fac831a06f405f219b913a4b70d66" +sax@^1.1.4, sax@>=0.6.0, sax@~1.2.1, sax@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + sax@0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/sax/-/sax-0.4.2.tgz#39f3b601733d6bec97105b242a2a40fd6978ac3c" @@ -10385,10 +10629,6 @@ sax@0.5.x: version "0.5.8" resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" -sax@1.2.1, sax@>=0.6.0, sax@^1.1.4, sax@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - scope-eval@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/scope-eval/-/scope-eval-0.0.3.tgz#166f2ccd1f3754429dec511805501f9d6923b5ec" @@ -10403,7 +10643,7 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.1.1, semver@^5.3.0, semver@~5.3.0: +"semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.1.1, semver@^5.3.0, semver@~5.3.0, "semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5": version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -10600,7 +10840,7 @@ snyk-config@1.0.1: nconf "^0.7.2" path-is-absolute "^1.0.0" -snyk-module@1.8.1, snyk-module@^1.6.0, snyk-module@^1.8.1: +snyk-module@^1.6.0, snyk-module@^1.8.1, snyk-module@1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/snyk-module/-/snyk-module-1.8.1.tgz#31d5080fb1c0dfd6fa8567dd34a523fd02bf1fca" dependencies: @@ -10646,7 +10886,7 @@ snyk-resolve-deps@1.7.0: snyk-try-require "^1.1.1" then-fs "^2.0.0" -snyk-resolve@1.0.0, snyk-resolve@^1.0.0: +snyk-resolve@^1.0.0, snyk-resolve@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/snyk-resolve/-/snyk-resolve-1.0.0.tgz#bbe9196d37f57c39251e6be75ccdd5b2097e99a2" dependencies: @@ -10732,7 +10972,7 @@ socket.io-parser@2.3.1: isarray "0.0.1" json3 "3.3.2" -socket.io@1.6.0, socket.io@^1.4.8: +socket.io@^1.4.8, socket.io@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.6.0.tgz#3e40d932637e6bd923981b25caf7c53e83b6e2e1" dependencies: @@ -10780,13 +11020,7 @@ source-map-url@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" -source-map@0.1.32, source-map@0.1.x, source-map@~0.1.7: - version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" - dependencies: - amdefine ">=0.0.4" - -source-map@0.4.x, source-map@^0.4.2, source-map@^0.4.4: +source-map@^0.4.2, source-map@^0.4.4, source-map@0.4.x: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: @@ -10796,6 +11030,12 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.0, sour version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@~0.1.7, source-map@0.1.32, source-map@0.1.x: + version "0.1.32" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" + dependencies: + amdefine ">=0.0.4" + source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -10917,13 +11157,6 @@ stream-buffers@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" -stream-combiner2@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" - dependencies: - duplexer2 "~0.1.0" - readable-stream "^2.0.2" - stream-combiner@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858" @@ -10931,6 +11164,13 @@ stream-combiner@^0.2.1: duplexer "~0.1.1" through "~2.3.4" +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + stream-consume@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" @@ -10964,6 +11204,16 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" +string_decoder@~0.10.0, string_decoder@~0.10.x, string_decoder@0.10: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" + dependencies: + buffer-shims "~1.0.0" + string-length@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -10997,16 +11247,6 @@ string.prototype.trim@~1.1.2: es-abstract "^1.5.0" function-bind "^1.0.2" -string_decoder@0.10, string_decoder@~0.10.0, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" - dependencies: - buffer-shims "~1.0.0" - stringifile@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/stringifile/-/stringifile-0.1.1.tgz#85bc66cdcfeacb5938bc07b425c142a16287455e" @@ -11201,7 +11441,7 @@ stylus-lookup@^1.0.1: debug "~2.2.0" is-relative-path "~1.0.0" -stylus@0.54.5, stylus@^0.54.5: +stylus@^0.54.5, stylus@0.54.5: version "0.54.5" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" dependencies: @@ -11218,13 +11458,13 @@ subarg@^1.0.0: dependencies: minimist "^1.1.0" -sublevel-pouchdb@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/sublevel-pouchdb/-/sublevel-pouchdb-6.1.2.tgz#2ff50ad8753b1705d3e812d8bc28fb5b11e3b49c" +sublevel-pouchdb@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/sublevel-pouchdb/-/sublevel-pouchdb-6.2.0.tgz#6501ced7d5a51e1e33e5e61ccf8362241ba0b588" dependencies: inherits "2.0.3" level-codec "7.0.0" - ltgt "2.1.2" + ltgt "2.1.3" readable-stream "1.0.33" sudo-prompt@^6.2.1: @@ -11292,9 +11532,9 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" -sw-toolbox@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/sw-toolbox/-/sw-toolbox-3.6.0.tgz#26df1d1c70348658e4dea2884319149b7b3183b5" +sw-toolbox@3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/sw-toolbox/-/sw-toolbox-3.4.0.tgz#a16efecf4a79ed32191cf1923525f2ee89bc76dc" dependencies: path-to-regexp "^1.0.1" serviceworker-cache-polyfill "^4.0.0" @@ -11441,7 +11681,7 @@ tar@^2.0.0, tar@^2.2.1, tar@~2.2.1: fstream "^1.0.2" inherits "2" -temp@0.8.3, temp@^0.8.3: +temp@^0.8.3, temp@0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" dependencies: @@ -11519,12 +11759,9 @@ 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" - dependencies: - readable-stream "~2.0.0" - xtend "~4.0.0" +through@^2.3.6, "through@>=2.2.7 <3", through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" through2@^0.6.1, through2@^0.6.2, through2@^0.6.3, through2@^0.6.5, through2@~0.6.1, through2@~0.6.3: version "0.6.5" @@ -11533,7 +11770,7 @@ through2@^0.6.1, through2@^0.6.2, through2@^0.6.3, through2@^0.6.5, through2@~0. readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through2@^2.0.0: +through2@^2.0.0, through2@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: @@ -11547,9 +11784,12 @@ through2@~0.2.3: readable-stream "~1.1.9" xtend "~2.1.1" -"through@>=2.2.7 <3", through@^2.3.6, through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" +through2@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" + dependencies: + readable-stream "~2.0.0" + xtend "~4.0.0" timed-out@^2.0.0: version "2.0.0" @@ -11576,13 +11816,7 @@ tiny-lr@^1.0.3: object-assign "^4.1.0" qs "^6.2.0" -tmp@0.0.28: - version "0.0.28" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.28.tgz#172735b7f614ea7af39664fa84cf0de4e515d120" - dependencies: - os-tmpdir "~1.0.1" - -tmp@0.0.29, tmp@^0.0.29: +tmp@^0.0.29, tmp@0.0.29: version "0.0.29" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" dependencies: @@ -11594,6 +11828,12 @@ tmp@^0.0.31: dependencies: os-tmpdir "~1.0.1" +tmp@0.0.28: + version "0.0.28" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.28.tgz#172735b7f614ea7af39664fa84cf0de4e515d120" + dependencies: + os-tmpdir "~1.0.1" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -11633,7 +11873,7 @@ touch@0.0.3: dependencies: nopt "~1.0.10" -tough-cookie@>=0.12.0, tough-cookie@^2.2.0, tough-cookie@~2.3.0: +tough-cookie@^2.2.0, tough-cookie@>=0.12.0, tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: @@ -11775,7 +12015,7 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" -uid-number@0.0.6, uid-number@^0.0.6: +uid-number@^0.0.6, uid-number@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" @@ -11816,7 +12056,7 @@ underscore.string@~3.3.4: sprintf-js "^1.0.3" util-deprecate "^1.0.2" -underscore@>=1.8.3, underscore@^1.7.0: +underscore@^1.7.0, underscore@>=1.8.3: version "1.8.3" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" @@ -11850,7 +12090,7 @@ unorm@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.4.1.tgz#364200d5f13646ca8bcd44490271335614792300" -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0, unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -11905,20 +12145,24 @@ url-template@~2.0.6: version "2.0.8" resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" -url@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" +url@^0.11.0, url@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" dependencies: punycode "1.3.2" querystring "0.2.0" -url@^0.11.0, url@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" +url@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" dependencies: punycode "1.3.2" querystring "0.2.0" +urlsafe-base64@^1.0.0, urlsafe-base64@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/urlsafe-base64/-/urlsafe-base64-1.0.0.tgz#23f89069a6c62f46cf3a1d3b00169cefb90be0c6" + user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" @@ -11948,7 +12192,7 @@ util-extend@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" -util@0.10.3, util@~0.10.1: +util@~0.10.1, util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -11958,14 +12202,14 @@ utils-merge@1.0.0, utils-merge@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" -uuid@3.0.1, uuid@^3.0.0, uuid@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" +uuid@^3.0.0, uuid@^3.0.1, uuid@3.0.1: + 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" @@ -12032,14 +12276,7 @@ vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" -walk-sync@0.3.1, walk-sync@^0.3.0, walk-sync@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.3.1.tgz#558a16aeac8c0db59c028b73c66f397684ece465" - dependencies: - ensure-posix-path "^1.0.0" - matcher-collection "^1.0.0" - -walk-sync@^0.1.2, walk-sync@^0.1.3: +walk-sync@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.1.3.tgz#8a07261a00bda6cfb1be25e9f100fad57546f583" @@ -12050,6 +12287,13 @@ walk-sync@^0.2.5, walk-sync@^0.2.6, walk-sync@^0.2.7: ensure-posix-path "^1.0.0" matcher-collection "^1.0.0" +walk-sync@^0.3.0, walk-sync@^0.3.1, walk-sync@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.3.1.tgz#558a16aeac8c0db59c028b73c66f397684ece465" + dependencies: + ensure-posix-path "^1.0.0" + matcher-collection "^1.0.0" + walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" @@ -12066,6 +12310,16 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" +web-push@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/web-push/-/web-push-3.2.2.tgz#d2f7c5590a3037cb50e4442b5117edd6475768a5" + dependencies: + asn1.js "^4.8.1" + http_ece "^0.5.2" + jws "^3.1.3" + minimist "^1.2.0" + urlsafe-base64 "^1.0.0" + webidl-conversions@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" @@ -12098,7 +12352,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@1, which@^1.1.1, which@^1.2.12, which@^1.2.8, which@^1.2.9, which@~1.2.11: +which@^1.1.1, which@^1.2.12, which@^1.2.8, which@^1.2.9, which@~1.2.11, which@1: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: @@ -12122,10 +12376,6 @@ win-release@^1.0.0: dependencies: semver "^5.0.1" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - window-size@^0.1.1, window-size@^0.1.2, window-size@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" @@ -12134,6 +12384,10 @@ window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + with@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/with/-/with-4.0.3.tgz#eefd154e9e79d2c8d3417b647a8f14d9fecce14e" @@ -12145,14 +12399,31 @@ word-wrap@^1.1.0, word-wrap@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.1.tgz#248f459b465d179a17bc407c854d3151d07e45d8" -wordwrap@0.0.2, wordwrap@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +wordwrap@~0.0.2, wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +"worker-pouch@git+https://github.com/jkleinsc/worker-pouch.git": + version "2.0.0" + resolved "git+https://github.com/jkleinsc/worker-pouch.git#25c2d522e815f9ea8f75b0027ba1c7699616911d" + dependencies: + argsarray "0.0.1" + blob-util "^1.1.1" + debug "^2.1.3" + inherits "^2.0.1" + js-extend "^1.0.1" + pouchdb-adapter-http "6.2.0" + pouchdb-adapter-idb "6.2.0" + pouchdb-binary-util "^1.0.0" + pouchdb-core "6.2.0" + pouchdb-mapreduce "6.2.0" + pouchdb-promise "6.2.0" + pouchdb-replication "6.2.0" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -12160,7 +12431,7 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrappy@1, wrappy@~1.0.2: +wrappy@~1.0.2, wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -12234,21 +12505,21 @@ xml2js@0.4.17: sax ">=0.6.0" xmlbuilder "^4.1.0" -xmlbuilder@0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-0.4.2.tgz#1776d65f3fdbad470a08d8604cdeb1c4e540ff83" - -xmlbuilder@4.2.1, xmlbuilder@^4.1.0: +xmlbuilder@^4.1.0, xmlbuilder@4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" dependencies: lodash "^4.0.0" +xmlbuilder@0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-0.4.2.tgz#1776d65f3fdbad470a08d8604cdeb1c4e540ff83" + xmlbuilder@8.2.2: version "8.2.2" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773" -xmldom@0.1.x, xmldom@^0.1.19: +xmldom@^0.1.19, xmldom@0.1.x: version "0.1.27" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" @@ -12266,7 +12537,7 @@ xmlhttprequest@>=1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, "xtend@>=4.0.0 <4.1.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" @@ -12310,24 +12581,6 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs@7.0.2, yargs@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" - yargs@^1.2.6: version "1.3.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-1.3.3.tgz#054de8b61f22eefdb7207059eaef9d6b83fb931a" @@ -12381,6 +12634,24 @@ yargs@^6.0.0, yargs@^6.5.0, yargs@^6.6.0: y18n "^3.2.1" yargs-parser "^4.2.0" +yargs@^7.0.2, yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" @@ -12439,3 +12710,4 @@ zip-stream@~0.4.0: compress-commons "~0.1.0" lodash "~2.4.1" readable-stream "~1.0.26" + From 4fbc8686516019e037730e79a3495aed3a457d9a Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 12 May 2017 10:09:40 -0400 Subject: [PATCH 17/26] Fix issues logging in with Electron --- app/authenticators/custom.js | 32 +++++++++++++++++++--------- app/services/database.js | 8 +++---- tests/helpers/run-with-pouch-dump.js | 13 +++++++++-- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/app/authenticators/custom.js b/app/authenticators/custom.js index 851ca3aff0..f2793a67be 100644 --- a/app/authenticators/custom.js +++ b/app/authenticators/custom.js @@ -9,6 +9,7 @@ const { alias }, get, + isEmpty, RSVP } = Ember; @@ -143,6 +144,27 @@ export default BaseAuthenticator.extend(MapOauthParams, OAuthHeaders, { _authenticateStandAlone(credentials) { let usersDB = get(this, 'usersDB'); + if (isEmpty(usersDB)) { + let database = get(this, 'database'); + return database.createUsersDB().then((createdDB) => { + return this._finishStandAloneAuth.bind(credentials, createdDB); + }); + } else { + return this._finishStandAloneAuth(credentials, usersDB); + } + }, + + // Based on https://github.com/hoodiehq/hoodie-account-server-api/blob/master/lib/utils/validate-password.js + _checkPassword(password, salt, iterations, derivedKey, callback) { + crypto.pbkdf2(password, salt, iterations, 20, 'sha1', function(error, derivedKeyCheck) { + if (error) { + return callback(error); + } + callback(null, derivedKeyCheck.toString('hex') === derivedKey); + }); + }, + + _finishStandAloneAuth(credentials, usersDB) { return new RSVP.Promise((resolve, reject) => { usersDB.get(`org.couchdb.user:${credentials.identification}`).then((user) => { let { salt, iterations, derived_key } = user; @@ -161,16 +183,6 @@ export default BaseAuthenticator.extend(MapOauthParams, OAuthHeaders, { }); }, - // Based on https://github.com/hoodiehq/hoodie-account-server-api/blob/master/lib/utils/validate-password.js - _checkPassword(password, salt, iterations, derivedKey, callback) { - crypto.pbkdf2(password, salt, iterations, 20, 'sha1', function(error, derivedKeyCheck) { - if (error) { - return callback(error); - } - callback(null, derivedKeyCheck.toString('hex') === derivedKey); - }); - }, - _getPrimaryRole(user) { let primaryRole = ''; if (user.roles) { diff --git a/app/services/database.js b/app/services/database.js index 00fa2c9d7c..1ef46e9b88 100644 --- a/app/services/database.js +++ b/app/services/database.js @@ -179,10 +179,7 @@ export default Service.extend(OAuthHeaders, PouchFindIndexes, { return this.createDB(configs).then((db) => { set(this, 'mainDB', db); set(this, 'setMainDB', true); - if (get(this, 'standAlone')) { - PouchDB.plugin(PouchDBUsers); - return this._createUsersDB(); - } else { + if (!get(this, 'standAlone')) { this.setupSubscription(configs); } }); @@ -377,7 +374,8 @@ export default Service.extend(OAuthHeaders, PouchFindIndexes, { }, 'Request offline sync'); }, - _createUsersDB() { + createUsersDB() { + PouchDB.plugin(PouchDBUsers); let usersDB = new PouchDB('_users'); return usersDB.installUsersBehavior().then(() => { set(this, 'usersDB', usersDB); diff --git a/tests/helpers/run-with-pouch-dump.js b/tests/helpers/run-with-pouch-dump.js index 9fe217c5dd..661b8661c1 100644 --- a/tests/helpers/run-with-pouch-dump.js +++ b/tests/helpers/run-with-pouch-dump.js @@ -9,6 +9,7 @@ import ConfigService from 'hospitalrun/services/config'; import PouchDBWorker from 'npm:worker-pouch/client'; const { + get, set } = Ember; @@ -57,8 +58,16 @@ function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) { let promise = db.load(dump); let InMemoryDatabaseService = DatabaseService.extend({ - createDB() { - if (navigator.serviceWorker) { + + createDB(configs) { + let standAlone = get(this, 'standAlone'); + if (standAlone || !configs.config_external_search) { + set(this, 'usePouchFind', true); + } + if (standAlone) { + return promise.then(() => db); + } + if (!window.ELECTRON && navigator.serviceWorker) { // Use pouch-worker to run the DB in the service worker return navigator.serviceWorker.ready.then(() => { if (navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage) { From 4495f07f04c64eed1adbff38d82e84f9c0df80dd Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 12 May 2017 10:10:26 -0400 Subject: [PATCH 18/26] Try using chrome beta headless --- .travis.yml | 2 +- testem.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd33b7044e..e0c30f71f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_install: - npm install -g bower - npm install -g yarn - bower --version - - google-chrome --version + - google-chrome-beta --version install: - yarn diff --git a/testem.js b/testem.js index 3a2d2da586..01eacc2b0c 100644 --- a/testem.js +++ b/testem.js @@ -1,10 +1,15 @@ /*jshint node:true*/ module.exports = { + "launchers": { + "Chrome Beta": { + "command": "google-chrome-beta" + } + }, "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ - "Chrome" + "Chrome Beta" ], "launch_in_dev": [ "Chrome" From 6005a9ee801c62da0e930b9fd430b37375881eaf Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 12 May 2017 10:10:44 -0400 Subject: [PATCH 19/26] pbkdf2 shouldn't need to be specified directly --- package.json | 1 - yarn.lock | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 5d03b2ee03..d3c2b1a28e 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "pouchdb-adapter-memory": "6.2.0", "pouchdb-list": "^1.1.0", "pouchdb-users": "^1.0.3", - "pbkdf2": "3.0.9", "stylelint": "~7.7.1", "stylelint-config-concentric": "1.0.7", "stylelint-declaration-use-variable": "1.6.0", diff --git a/yarn.lock b/yarn.lock index 8146103f50..7638213264 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8941,7 +8941,7 @@ pause@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" -pbkdf2@^3.0.3, pbkdf2@3.0.9: +pbkdf2@^3.0.3: version "3.0.9" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" dependencies: From 4e182b592190f0ee097280187d814fcb5e128a80 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Fri, 12 May 2017 15:27:52 -0400 Subject: [PATCH 20/26] Removed unneeded code --- app/index.html | 12 ------------ tests/index.html | 1 - 2 files changed, 13 deletions(-) diff --git a/app/index.html b/app/index.html index 9e66241c4b..6267af957e 100644 --- a/app/index.html +++ b/app/index.html @@ -29,18 +29,6 @@

Loading

- {{content-for "body"}} diff --git a/tests/index.html b/tests/index.html index 0c1f372e20..e873a91285 100644 --- a/tests/index.html +++ b/tests/index.html @@ -31,7 +31,6 @@ {{content-for "test-body-footer"}}