diff --git a/services/track-changes/.eslintrc b/services/track-changes/.eslintrc index 321353f971..a97661b15f 100644 --- a/services/track-changes/.eslintrc +++ b/services/track-changes/.eslintrc @@ -3,9 +3,9 @@ // https://github.com/sharelatex/sharelatex-dev-environment { "extends": [ + "eslint:recommended", "standard", - "prettier", - "prettier/standard" + "prettier" ], "parserOptions": { "ecmaVersion": 2018 @@ -20,6 +20,19 @@ "mocha": true }, "rules": { + // TODO(das7pad): remove overrides after fixing all the violations manually (https://github.com/overleaf/issues/issues/3882#issuecomment-878999671) + // START of temporary overrides + "array-callback-return": "off", + "no-dupe-else-if": "off", + "no-var": "off", + "no-empty": "off", + "node/handle-callback-err": "off", + "no-loss-of-precision": "off", + "node/no-callback-literal": "off", + "node/no-path-concat": "off", + "prefer-regex-literals": "off", + // END of temporary overrides + // Swap the no-unused-expressions rule with a more chai-friendly one "no-unused-expressions": 0, "chai-friendly/no-unused-expressions": "error", diff --git a/services/track-changes/.github/dependabot.yml b/services/track-changes/.github/dependabot.yml index e2c64a3351..c856753655 100644 --- a/services/track-changes/.github/dependabot.yml +++ b/services/track-changes/.github/dependabot.yml @@ -20,4 +20,4 @@ updates: # future if we reorganise teams labels: - "dependencies" - - "Team-Magma" + - "type:maintenance" diff --git a/services/track-changes/.nvmrc b/services/track-changes/.nvmrc index e68b860383..5a80a7e912 100644 --- a/services/track-changes/.nvmrc +++ b/services/track-changes/.nvmrc @@ -1 +1 @@ -12.21.0 +12.22.3 diff --git a/services/track-changes/.prettierrc b/services/track-changes/.prettierrc index 24f9ec526f..c92c3526e7 100644 --- a/services/track-changes/.prettierrc +++ b/services/track-changes/.prettierrc @@ -2,6 +2,10 @@ # Instead run bin/update_build_scripts from # https://github.com/sharelatex/sharelatex-dev-environment { + "arrowParens": "avoid", "semi": false, - "singleQuote": true + "singleQuote": true, + "trailingComma": "es5", + "tabWidth": 2, + "useTabs": false } diff --git a/services/track-changes/Dockerfile b/services/track-changes/Dockerfile index 4f417a2a4b..6b286376dc 100644 --- a/services/track-changes/Dockerfile +++ b/services/track-changes/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/sharelatex/sharelatex-dev-environment -FROM node:12.21.0 as base +FROM node:12.22.3 as base WORKDIR /app diff --git a/services/track-changes/app.js b/services/track-changes/app.js index 9dd8f9440b..a009431de0 100644 --- a/services/track-changes/app.js +++ b/services/track-changes/app.js @@ -7,7 +7,7 @@ */ const Metrics = require('@overleaf/metrics') Metrics.initialize('track-changes') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const TrackChangesLogger = logger.initialize('track-changes').logger @@ -16,7 +16,7 @@ if ((Settings.sentry != null ? Settings.sentry.dsn : undefined) != null) { } // log updates as truncated strings -const truncateFn = (updates) => +const truncateFn = updates => JSON.parse( JSON.stringify(updates, function (key, value) { let len @@ -35,7 +35,7 @@ TrackChangesLogger.addSerializers({ rawUpdate: truncateFn, rawUpdates: truncateFn, newUpdates: truncateFn, - lastUpdate: truncateFn + lastUpdate: truncateFn, }) const Path = require('path') @@ -91,7 +91,7 @@ app.post('/pack', function (req, res, next) { [ req.query.limit || 1000, req.query.delay || 1000, - req.query.timeout || 30 * 60 * 1000 + req.query.timeout || 30 * 60 * 1000, ] ) packWorker.on('exit', function (code, signal) { @@ -120,12 +120,12 @@ app.use(function (error, req, res, next) { const port = __guard__( Settings.internal != null ? Settings.internal.trackchanges : undefined, - (x) => x.port + x => x.port ) || 3015 const host = __guard__( Settings.internal != null ? Settings.internal.trackchanges : undefined, - (x1) => x1.host + x1 => x1.host ) || 'localhost' if (!module.parent) { @@ -146,7 +146,7 @@ if (!module.parent) { } }) }) - .catch((err) => { + .catch(err => { logger.fatal({ err }, 'Cannot connect to mongo. Exiting.') process.exit(1) }) diff --git a/services/track-changes/app/js/DiffGenerator.js b/services/track-changes/app/js/DiffGenerator.js index ebc6a9fcb1..0d8ef0be94 100644 --- a/services/track-changes/app/js/DiffGenerator.js +++ b/services/track-changes/app/js/DiffGenerator.js @@ -162,13 +162,11 @@ module.exports = DiffGenerator = { if (op.i != null) { newDiff.push({ i: op.i, - meta + meta, }) } else if (op.d != null) { - ;({ - consumedDiff, - remainingDiff - } = DiffGenerator._consumeDiffAffectedByDeleteOp(remainingDiff, op, meta)) + ;({ consumedDiff, remainingDiff } = + DiffGenerator._consumeDiffAffectedByDeleteOp(remainingDiff, op, meta)) newDiff.push(...Array.from(consumedDiff || [])) } @@ -211,7 +209,7 @@ module.exports = DiffGenerator = { return { consumedDiff, - remainingDiff + remainingDiff, } }, @@ -220,18 +218,15 @@ module.exports = DiffGenerator = { let remainingOp = deleteOp while (remainingOp && remainingDiff.length > 0) { let newPart - ;({ - newPart, - remainingDiff, - remainingOp - } = DiffGenerator._consumeDeletedPart(remainingDiff, remainingOp, meta)) + ;({ newPart, remainingDiff, remainingOp } = + DiffGenerator._consumeDeletedPart(remainingDiff, remainingOp, meta)) if (newPart != null) { consumedDiff.push(newPart) } } return { consumedDiff, - remainingDiff + remainingDiff, } }, @@ -262,7 +257,7 @@ module.exports = DiffGenerator = { if (part.u != null) { newPart = { d: op.d, - meta + meta, } } else if (part.i != null) { newPart = null @@ -282,7 +277,7 @@ module.exports = DiffGenerator = { if (part.u != null) { newPart = { d: op.d, - meta + meta, } } else if (part.i != null) { newPart = null @@ -303,7 +298,7 @@ module.exports = DiffGenerator = { if (part.u) { newPart = { d: part.u, - meta + meta, } } else if (part.i != null) { newPart = null @@ -311,14 +306,14 @@ module.exports = DiffGenerator = { remainingOp = { p: op.p, - d: op.d.slice(DiffGenerator._getLengthOfDiffPart(part)) + d: op.d.slice(DiffGenerator._getLengthOfDiffPart(part)), } } return { newPart, remainingDiff, - remainingOp + remainingOp, } }, @@ -341,5 +336,5 @@ module.exports = DiffGenerator = { _getContentOfPart(part) { return part.u || part.d || part.i || '' - } + }, } diff --git a/services/track-changes/app/js/DiffManager.js b/services/track-changes/app/js/DiffManager.js index a33ed07c2d..7c8a9d4ceb 100644 --- a/services/track-changes/app/js/DiffManager.js +++ b/services/track-changes/app/js/DiffManager.js @@ -24,30 +24,30 @@ module.exports = DiffManager = { if (callback == null) { callback = function (error, content, version, updates) {} } - return DocumentUpdaterManager.getDocument(project_id, doc_id, function ( - error, - content, - version - ) { - if (error != null) { - return callback(error) - } - if (fromVersion == null) { - // If we haven't been given a version, just return lastest doc and no updates - return callback(null, content, version, []) - } - return UpdatesManager.getDocUpdatesWithUserInfo( - project_id, - doc_id, - { from: fromVersion }, - function (error, updates) { - if (error != null) { - return callback(error) - } - return callback(null, content, version, updates) + return DocumentUpdaterManager.getDocument( + project_id, + doc_id, + function (error, content, version) { + if (error != null) { + return callback(error) } - ) - }) + if (fromVersion == null) { + // If we haven't been given a version, just return lastest doc and no updates + return callback(null, content, version, []) + } + return UpdatesManager.getDocUpdatesWithUserInfo( + project_id, + doc_id, + { from: fromVersion }, + function (error, updates) { + if (error != null) { + return callback(error) + } + return callback(null, content, version, updates) + } + ) + } + ) }, getDiff(project_id, doc_id, fromVersion, toVersion, callback) { @@ -167,7 +167,7 @@ module.exports = DiffManager = { { docVersion: version, lastUpdateVersion: lastUpdate != null ? lastUpdate.v : undefined, - updateCount: updates.length + updateCount: updates.length, }, 'rewinding updates' ) @@ -184,5 +184,5 @@ module.exports = DiffManager = { return callback(null, startingContent, tryUpdates) } ) - } + }, } diff --git a/services/track-changes/app/js/DocumentUpdaterManager.js b/services/track-changes/app/js/DocumentUpdaterManager.js index 29247b1664..01cdf9e07c 100644 --- a/services/track-changes/app/js/DocumentUpdaterManager.js +++ b/services/track-changes/app/js/DocumentUpdaterManager.js @@ -14,7 +14,7 @@ let DocumentUpdaterManager const request = require('request') const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') module.exports = DocumentUpdaterManager = { getDocument(project_id, doc_id, callback) { @@ -65,8 +65,8 @@ module.exports = DocumentUpdaterManager = { lines: content.split('\n'), source: 'restore', user_id, - undoing: true - } + undoing: true, + }, }, function (error, res, body) { if (error != null) { @@ -86,5 +86,5 @@ module.exports = DocumentUpdaterManager = { } } ) - } + }, } diff --git a/services/track-changes/app/js/HealthChecker.js b/services/track-changes/app/js/HealthChecker.js index afc7ff7fc8..978f586f6e 100644 --- a/services/track-changes/app/js/HealthChecker.js +++ b/services/track-changes/app/js/HealthChecker.js @@ -1,6 +1,5 @@ /* eslint-disable camelcase, - standard/no-callback-literal, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. @@ -13,7 +12,7 @@ const { ObjectId } = require('./mongodb') const request = require('request') const async = require('async') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const { port } = settings.internal.trackchanges const logger = require('logger-sharelatex') const LockManager = require('./LockManager') @@ -24,7 +23,7 @@ module.exports = { const url = `http://localhost:${port}/project/${project_id}` logger.log({ project_id }, 'running health check') const jobs = [ - (cb) => + cb => request.get( { url: `http://localhost:${port}/check_lock`, timeout: 3000 }, function (err, res, body) { @@ -41,44 +40,42 @@ module.exports = { } } ), - (cb) => - request.post({ url: `${url}/flush`, timeout: 10000 }, function ( - err, - res, - body - ) { - if (err != null) { - logger.err({ err, project_id }, 'error flushing for health check') - return cb(err) - } else if ((res != null ? res.statusCode : undefined) !== 204) { - return cb(`status code not 204, it's ${res.statusCode}`) - } else { - return cb() + cb => + request.post( + { url: `${url}/flush`, timeout: 10000 }, + function (err, res, body) { + if (err != null) { + logger.err({ err, project_id }, 'error flushing for health check') + return cb(err) + } else if ((res != null ? res.statusCode : undefined) !== 204) { + return cb(`status code not 204, it's ${res.statusCode}`) + } else { + return cb() + } } - }), - (cb) => - request.get({ url: `${url}/updates`, timeout: 10000 }, function ( - err, - res, - body - ) { - if (err != null) { - logger.err( - { err, project_id }, - 'error getting updates for health check' - ) - return cb(err) - } else if ((res != null ? res.statusCode : undefined) !== 200) { - return cb(`status code not 200, it's ${res.statusCode}`) - } else { - return cb() + ), + cb => + request.get( + { url: `${url}/updates`, timeout: 10000 }, + function (err, res, body) { + if (err != null) { + logger.err( + { err, project_id }, + 'error getting updates for health check' + ) + return cb(err) + } else if ((res != null ? res.statusCode : undefined) !== 200) { + return cb(`status code not 200, it's ${res.statusCode}`) + } else { + return cb() + } } - }) + ), ] return async.series(jobs, callback) }, checkLock(callback) { return LockManager.healthCheck(callback) - } + }, } diff --git a/services/track-changes/app/js/HttpController.js b/services/track-changes/app/js/HttpController.js index c5db48210a..8f665682eb 100644 --- a/services/track-changes/app/js/HttpController.js +++ b/services/track-changes/app/js/HttpController.js @@ -160,15 +160,18 @@ module.exports = HttpController = { } logger.log({ project_id, doc_id, from, to }, 'getting diff') - return DiffManager.getDiff(project_id, doc_id, from, to, function ( - error, - diff - ) { - if (error != null) { - return next(error) + return DiffManager.getDiff( + project_id, + doc_id, + from, + to, + function (error, diff) { + if (error != null) { + return next(error) + } + return res.json({ diff }) } - return res.json({ diff }) - }) + ) }, getUpdates(req, res, next) { @@ -194,7 +197,7 @@ module.exports = HttpController = { } return res.json({ updates, - nextBeforeTimestamp + nextBeforeTimestamp, }) } ) @@ -207,60 +210,59 @@ module.exports = HttpController = { // Flush updates per pack onto the wire. const { project_id } = req.params logger.log({ project_id }, 'exporting project history') - UpdatesManager.exportProject(project_id, function ( - err, - { updates, userIds }, - confirmWrite - ) { - const abortStreaming = req.aborted || res.finished || res.destroyed - if (abortStreaming) { - // Tell the producer to stop emitting data - if (confirmWrite) confirmWrite(new Error('stop')) - return - } - const hasStartedStreamingResponse = res.headersSent - if (err) { - logger.error({ project_id, err }, 'export failed') - if (!hasStartedStreamingResponse) { - // Generate a nice 500 - return next(err) - } else { - // Stop streaming - return res.destroy() + UpdatesManager.exportProject( + project_id, + function (err, { updates, userIds }, confirmWrite) { + const abortStreaming = req.aborted || res.finished || res.destroyed + if (abortStreaming) { + // Tell the producer to stop emitting data + if (confirmWrite) confirmWrite(new Error('stop')) + return + } + const hasStartedStreamingResponse = res.headersSent + if (err) { + logger.error({ project_id, err }, 'export failed') + if (!hasStartedStreamingResponse) { + // Generate a nice 500 + return next(err) + } else { + // Stop streaming + return res.destroy() + } + } + // Compose the response incrementally + const isFirstWrite = !hasStartedStreamingResponse + const isLastWrite = updates.length === 0 + if (isFirstWrite) { + // The first write will emit the 200 status, headers and start of the + // response payload (open array) + res.setHeader('Content-Type', 'application/json') + res.setHeader('Trailer', 'X-User-Ids') + res.writeHead(200) + res.write('[') + } + if (!isFirstWrite && !isLastWrite) { + // Starting from the 2nd non-empty write, emit a continuing comma. + // write 1: [updates1 + // write 2: ,updates2 + // write 3: ,updates3 + // write N: ] + res.write(',') + } + + // Every write will emit a blob onto the response stream: + // '[update1,update2,...]' + // ^^^^^^^^^^^^^^^^^^^ + res.write(JSON.stringify(updates).slice(1, -1), confirmWrite) + + if (isLastWrite) { + // The last write will have no updates and will finish the response + // payload (close array) and emit the userIds as trailer. + res.addTrailers({ 'X-User-Ids': JSON.stringify(userIds) }) + res.end(']') } } - // Compose the response incrementally - const isFirstWrite = !hasStartedStreamingResponse - const isLastWrite = updates.length === 0 - if (isFirstWrite) { - // The first write will emit the 200 status, headers and start of the - // response payload (open array) - res.setHeader('Content-Type', 'application/json') - res.setHeader('Trailer', 'X-User-Ids') - res.writeHead(200) - res.write('[') - } - if (!isFirstWrite && !isLastWrite) { - // Starting from the 2nd non-empty write, emit a continuing comma. - // write 1: [updates1 - // write 2: ,updates2 - // write 3: ,updates3 - // write N: ] - res.write(',') - } - - // Every write will emit a blob onto the response stream: - // '[update1,update2,...]' - // ^^^^^^^^^^^^^^^^^^^ - res.write(JSON.stringify(updates).slice(1, -1), confirmWrite) - - if (isLastWrite) { - // The last write will have no updates and will finish the response - // payload (close array) and emit the userIds as trailer. - res.addTrailers({ 'X-User-Ids': JSON.stringify(userIds) }) - res.end(']') - } - }) + ) }, restore(req, res, next) { @@ -334,5 +336,5 @@ module.exports = HttpController = { return res.sendStatus(200) } }) - } + }, } diff --git a/services/track-changes/app/js/LockManager.js b/services/track-changes/app/js/LockManager.js index 6b94a89233..8be04dbaae 100644 --- a/services/track-changes/app/js/LockManager.js +++ b/services/track-changes/app/js/LockManager.js @@ -10,7 +10,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let LockManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(Settings.redis.lock) const os = require('os') @@ -43,19 +43,23 @@ module.exports = LockManager = { callback = function (err, gotLock) {} } const lockValue = LockManager.randomLock() - return rclient.set(key, lockValue, 'EX', this.LOCK_TTL, 'NX', function ( - err, - gotLock - ) { - if (err != null) { - return callback(err) + return rclient.set( + key, + lockValue, + 'EX', + this.LOCK_TTL, + 'NX', + function (err, gotLock) { + if (err != null) { + return callback(err) + } + if (gotLock === 'OK') { + return callback(err, true, lockValue) + } else { + return callback(err, false) + } } - if (gotLock === 'OK') { - return callback(err, true, lockValue) - } else { - return callback(err, false) - } - }) + ) }, getLock(key, callback) { @@ -102,23 +106,26 @@ module.exports = LockManager = { }, releaseLock(key, lockValue, callback) { - return rclient.eval(LockManager.unlockScript, 1, key, lockValue, function ( - err, - result - ) { - if (err != null) { - return callback(err) + return rclient.eval( + LockManager.unlockScript, + 1, + key, + lockValue, + function (err, result) { + if (err != null) { + return callback(err) + } + if (result != null && result !== 1) { + // successful unlock should release exactly one key + logger.error( + { key, lockValue, redis_err: err, redis_result: result }, + 'unlocking error' + ) + return callback(new Error('tried to release timed out lock')) + } + return callback(err, result) } - if (result != null && result !== 1) { - // successful unlock should release exactly one key - logger.error( - { key, lockValue, redis_err: err, redis_result: result }, - 'unlocking error' - ) - return callback(new Error('tried to release timed out lock')) - } - return callback(err, result) - }) + ) }, runWithLock(key, runner, callback) { @@ -129,7 +136,7 @@ module.exports = LockManager = { if (error != null) { return callback(error) } - return runner((error1) => + return runner(error1 => LockManager.releaseLock(key, lockValue, function (error2) { error = error1 || error2 if (error != null) { @@ -142,7 +149,7 @@ module.exports = LockManager = { }, healthCheck(callback) { - const action = (releaseLock) => releaseLock() + const action = releaseLock => releaseLock() return LockManager.runWithLock( `HistoryLock:HealthCheck:host=${HOST}:pid=${PID}:random=${RND}`, action, @@ -153,5 +160,5 @@ module.exports = LockManager = { close(callback) { rclient.quit() return rclient.once('end', callback) - } + }, } diff --git a/services/track-changes/app/js/MongoAWS.js b/services/track-changes/app/js/MongoAWS.js index c0f88e98e3..f9e69b12c2 100644 --- a/services/track-changes/app/js/MongoAWS.js +++ b/services/track-changes/app/js/MongoAWS.js @@ -14,7 +14,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let MongoAWS -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const AWS = require('aws-sdk') const S3S = require('s3-streams') @@ -31,12 +31,12 @@ const createStream = function (streamConstructor, project_id, doc_id, pack_id) { accessKeyId: settings.trackchanges.s3.key, secretAccessKey: settings.trackchanges.s3.secret, endpoint: settings.trackchanges.s3.endpoint, - s3ForcePathStyle: settings.trackchanges.s3.pathStyle + s3ForcePathStyle: settings.trackchanges.s3.pathStyle, } return streamConstructor(new AWS.S3(AWS_CONFIG), { Bucket: settings.trackchanges.stores.doc_history, - Key: project_id + '/changes-' + doc_id + '/pack-' + pack_id + Key: project_id + '/changes-' + doc_id + '/pack-' + pack_id, }) } @@ -52,7 +52,7 @@ module.exports = MongoAWS = { const query = { _id: ObjectId(pack_id), - doc_id: ObjectId(doc_id) + doc_id: ObjectId(doc_id), } if (project_id == null) { @@ -92,14 +92,14 @@ module.exports = MongoAWS = { doc_id, pack_id, origSize: uncompressedData.length, - newSize: buf.length + newSize: buf.length, }, 'compressed pack' ) if (err != null) { return callback(err) } - upload.on('error', (err) => callback(err)) + upload.on('error', err => callback(err)) upload.on('finish', function () { Metrics.inc('archive-pack') logger.log({ project_id, doc_id, pack_id }, 'upload to s3 completed') @@ -135,8 +135,8 @@ module.exports = MongoAWS = { const download = createStream(S3S.ReadStream, project_id, doc_id, pack_id) const inputStream = download - .on('open', (obj) => 1) - .on('error', (err) => callback(err)) + .on('open', obj => 1) + .on('error', err => callback(err)) const gunzip = zlib.createGunzip() gunzip.setEncoding('utf8') @@ -150,7 +150,7 @@ module.exports = MongoAWS = { const outputStream = inputStream.pipe(gunzip) const parts = [] - outputStream.on('error', (err) => callback(err)) + outputStream.on('error', err => callback(err)) outputStream.on('end', function () { let object logger.log({ project_id, doc_id, pack_id }, 'download from s3 completed') @@ -169,29 +169,31 @@ module.exports = MongoAWS = { } return callback(null, object) }) - return outputStream.on('data', (data) => parts.push(data)) + return outputStream.on('data', data => parts.push(data)) }, unArchivePack(project_id, doc_id, pack_id, callback) { if (callback == null) { callback = function (error) {} } - return MongoAWS.readArchivedPack(project_id, doc_id, pack_id, function ( - err, - object - ) { - if (err != null) { - return callback(err) + return MongoAWS.readArchivedPack( + project_id, + doc_id, + pack_id, + function (err, object) { + if (err != null) { + return callback(err) + } + Metrics.inc('unarchive-pack') + // allow the object to expire, we can always retrieve it again + object.expiresAt = new Date(Date.now() + 7 * DAYS) + logger.log({ project_id, doc_id, pack_id }, 'inserting object from s3') + return db.docHistory.insertOne(object, (err, confirmation) => { + if (err) return callback(err) + object._id = confirmation.insertedId + callback(null, object) + }) } - Metrics.inc('unarchive-pack') - // allow the object to expire, we can always retrieve it again - object.expiresAt = new Date(Date.now() + 7 * DAYS) - logger.log({ project_id, doc_id, pack_id }, 'inserting object from s3') - return db.docHistory.insertOne(object, (err, confirmation) => { - if (err) return callback(err) - object._id = confirmation.insertedId - callback(null, object) - }) - }) - } + ) + }, } diff --git a/services/track-changes/app/js/MongoManager.js b/services/track-changes/app/js/MongoManager.js index bfcdcf1ddb..6dfdd46ce3 100644 --- a/services/track-changes/app/js/MongoManager.js +++ b/services/track-changes/app/js/MongoManager.js @@ -50,50 +50,53 @@ module.exports = MongoManager = { if (callback == null) { callback = function (error, update, version) {} } - return MongoManager.getLastCompressedUpdate(doc_id, function ( - error, - update - ) { - if (error != null) { - return callback(error) - } - if (update != null) { - if (update.broken) { - // marked as broken so we will force a new op - return callback(null, null) - } else if (update.pack != null) { - if (update.finalised) { - // no more ops can be appended - return callback( - null, - null, - update.pack[0] != null ? update.pack[0].v : undefined - ) + return MongoManager.getLastCompressedUpdate( + doc_id, + function (error, update) { + if (error != null) { + return callback(error) + } + if (update != null) { + if (update.broken) { + // marked as broken so we will force a new op + return callback(null, null) + } else if (update.pack != null) { + if (update.finalised) { + // no more ops can be appended + return callback( + null, + null, + update.pack[0] != null ? update.pack[0].v : undefined + ) + } else { + return callback( + null, + update, + update.pack[0] != null ? update.pack[0].v : undefined + ) + } } else { - return callback( - null, - update, - update.pack[0] != null ? update.pack[0].v : undefined - ) + return callback(null, update, update.v) } } else { - return callback(null, update, update.v) + return PackManager.getLastPackFromIndex( + doc_id, + function (error, pack) { + if (error != null) { + return callback(error) + } + if ( + (pack != null ? pack.inS3 : undefined) != null && + (pack != null ? pack.v_end : undefined) != null + ) { + return callback(null, null, pack.v_end) + } + return callback(null, null) + } + ) } - } else { - return PackManager.getLastPackFromIndex(doc_id, function (error, pack) { - if (error != null) { - return callback(error) - } - if ( - (pack != null ? pack.inS3 : undefined) != null && - (pack != null ? pack.v_end : undefined) != null - ) { - return callback(null, null, pack.v_end) - } - return callback(null, null) - }) } - }) + ) }, backportProjectId(project_id, doc_id, callback) { @@ -103,10 +106,10 @@ module.exports = MongoManager = { return db.docHistory.updateMany( { doc_id: ObjectId(doc_id.toString()), - project_id: { $exists: false } + project_id: { $exists: false }, }, { - $set: { project_id: ObjectId(project_id.toString()) } + $set: { project_id: ObjectId(project_id.toString()) }, }, callback ) @@ -118,7 +121,7 @@ module.exports = MongoManager = { } return db.projectHistoryMetaData.findOne( { - project_id: ObjectId(project_id.toString()) + project_id: ObjectId(project_id.toString()), }, callback ) @@ -130,13 +133,13 @@ module.exports = MongoManager = { } return db.projectHistoryMetaData.updateOne( { - project_id: ObjectId(project_id) + project_id: ObjectId(project_id), }, { - $set: metadata + $set: metadata, }, { - upsert: true + upsert: true, }, callback ) @@ -151,11 +154,11 @@ module.exports = MongoManager = { { project_id: ObjectId(project_id), temporary: true, - expiresAt: { $exists: true } + expiresAt: { $exists: true }, }, { $set: { temporary: false }, - $unset: { expiresAt: '' } + $unset: { expiresAt: '' }, }, callback ) @@ -191,12 +194,9 @@ module.exports = MongoManager = { { project_id: 1 }, { background: true } ) - } + }, } -;[ - 'getLastCompressedUpdate', - 'getProjectMetaData', - 'setProjectMetaData' -].map((method) => - metrics.timeAsyncMethod(MongoManager, method, 'mongo.MongoManager', logger) +;['getLastCompressedUpdate', 'getProjectMetaData', 'setProjectMetaData'].map( + method => + metrics.timeAsyncMethod(MongoManager, method, 'mongo.MongoManager', logger) ) diff --git a/services/track-changes/app/js/PackManager.js b/services/track-changes/app/js/PackManager.js index 10938fede6..f8efb77f11 100644 --- a/services/track-changes/app/js/PackManager.js +++ b/services/track-changes/app/js/PackManager.js @@ -24,7 +24,7 @@ const LockManager = require('./LockManager') const MongoAWS = require('./MongoAWS') const Metrics = require('@overleaf/metrics') const ProjectIterator = require('./ProjectIterator') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const keys = Settings.redis.lock.key_schema // Sharejs operations are stored in a 'pack' object @@ -206,11 +206,11 @@ module.exports = PackManager = { sz, meta: { start_ts: first.meta.start_ts, - end_ts: last.meta.end_ts + end_ts: last.meta.end_ts, }, v: first.v, v_end: last.v, - temporary + temporary, } if (temporary) { newPack.expiresAt = new Date(Date.now() + 7 * DAYS) @@ -252,20 +252,20 @@ module.exports = PackManager = { _id: lastUpdate._id, project_id: ObjectId(project_id.toString()), doc_id: ObjectId(doc_id.toString()), - pack: { $exists: true } + pack: { $exists: true }, } const update = { $push: { - pack: { $each: newUpdates } + pack: { $each: newUpdates }, }, $inc: { n: n, - sz: sz + sz: sz, }, $set: { 'meta.end_ts': last.meta.end_ts, - v_end: last.v - } + v_end: last.v, + }, } if (lastUpdate.expiresAt && temporary) { update.$set.expiresAt = new Date(Date.now() + 7 * DAYS) @@ -396,7 +396,7 @@ module.exports = PackManager = { } return result1 })() - const loadedPackIds = Array.from(loadedPacks).map((pack) => + const loadedPackIds = Array.from(loadedPacks).map(pack => pack._id.toString() ) const packIdsToFetch = _.difference(allPackIds, loadedPackIds) @@ -494,7 +494,7 @@ module.exports = PackManager = { return db.docHistory.updateOne( { _id: pack._id }, { $set: { expiresAt: new Date(Date.now() + 7 * DAYS) } }, - (err) => callback(err, pack) + err => callback(err, pack) ) } else { return callback(null, pack) @@ -552,60 +552,62 @@ module.exports = PackManager = { }, initialiseIndex(project_id, doc_id, callback) { - return PackManager.findCompletedPacks(project_id, doc_id, function ( - err, - packs - ) { - // console.log 'err', err, 'packs', packs, packs?.length - if (err != null) { - return callback(err) + return PackManager.findCompletedPacks( + project_id, + doc_id, + function (err, packs) { + // console.log 'err', err, 'packs', packs, packs?.length + if (err != null) { + return callback(err) + } + if (packs == null) { + return callback() + } + return PackManager.insertPacksIntoIndexWithLock( + project_id, + doc_id, + packs, + callback + ) } - if (packs == null) { - return callback() - } - return PackManager.insertPacksIntoIndexWithLock( - project_id, - doc_id, - packs, - callback - ) - }) + ) }, updateIndex(project_id, doc_id, callback) { // find all packs prior to current pack - return PackManager.findUnindexedPacks(project_id, doc_id, function ( - err, - newPacks - ) { - if (err != null) { - return callback(err) - } - if (newPacks == null || newPacks.length === 0) { - return callback() - } - return PackManager.insertPacksIntoIndexWithLock( - project_id, - doc_id, - newPacks, - function (err) { - if (err != null) { - return callback(err) - } - logger.log( - { project_id, doc_id, newPacks }, - 'added new packs to index' - ) + return PackManager.findUnindexedPacks( + project_id, + doc_id, + function (err, newPacks) { + if (err != null) { + return callback(err) + } + if (newPacks == null || newPacks.length === 0) { return callback() } - ) - }) + return PackManager.insertPacksIntoIndexWithLock( + project_id, + doc_id, + newPacks, + function (err) { + if (err != null) { + return callback(err) + } + logger.log( + { project_id, doc_id, newPacks }, + 'added new packs to index' + ) + return callback() + } + ) + } + ) }, findCompletedPacks(project_id, doc_id, callback) { const query = { doc_id: ObjectId(doc_id.toString()), - expiresAt: { $exists: false } + expiresAt: { $exists: false }, } return db.docHistory .find(query, { projection: { pack: false } }) @@ -631,7 +633,7 @@ module.exports = PackManager = { findPacks(project_id, doc_id, callback) { const query = { doc_id: ObjectId(doc_id.toString()), - expiresAt: { $exists: false } + expiresAt: { $exists: false }, } return db.docHistory .find(query, { projection: { pack: false } }) @@ -655,61 +657,63 @@ module.exports = PackManager = { if (err != null) { return callback(err) } - return PackManager.findCompletedPacks(project_id, doc_id, function ( - err, - historyPacks - ) { - let pack - if (err != null) { - return callback(err) - } - if (historyPacks == null) { - return callback() - } - // select only the new packs not already in the index - let newPacks = (() => { - const result = [] - for (pack of Array.from(historyPacks)) { - if ( - (indexResult != null ? indexResult[pack._id] : undefined) == null - ) { - result.push(pack) - } + return PackManager.findCompletedPacks( + project_id, + doc_id, + function (err, historyPacks) { + let pack + if (err != null) { + return callback(err) } - return result - })() - newPacks = (() => { - const result1 = [] - for (pack of Array.from(newPacks)) { - result1.push( - _.omit( - pack, - 'doc_id', - 'project_id', - 'n', - 'sz', - 'last_checked', - 'finalised' + if (historyPacks == null) { + return callback() + } + // select only the new packs not already in the index + let newPacks = (() => { + const result = [] + for (pack of Array.from(historyPacks)) { + if ( + (indexResult != null ? indexResult[pack._id] : undefined) == + null + ) { + result.push(pack) + } + } + return result + })() + newPacks = (() => { + const result1 = [] + for (pack of Array.from(newPacks)) { + result1.push( + _.omit( + pack, + 'doc_id', + 'project_id', + 'n', + 'sz', + 'last_checked', + 'finalised' + ) ) + } + return result1 + })() + if (newPacks.length) { + logger.log( + { project_id, doc_id, n: newPacks.length }, + 'found new packs' ) } - return result1 - })() - if (newPacks.length) { - logger.log( - { project_id, doc_id, n: newPacks.length }, - 'found new packs' - ) + return callback(null, newPacks) } - return callback(null, newPacks) - }) + ) }) }, insertPacksIntoIndexWithLock(project_id, doc_id, newPacks, callback) { return LockManager.runWithLock( keys.historyIndexLock({ doc_id }), - (releaseLock) => + releaseLock => PackManager._insertPacksIntoIndex( project_id, doc_id, @@ -726,11 +730,11 @@ module.exports = PackManager = { { $setOnInsert: { project_id: ObjectId(project_id.toString()) }, $push: { - packs: { $each: newPacks, $sort: { v: 1 } } - } + packs: { $each: newPacks, $sort: { v: 1 } }, + }, }, { - upsert: true + upsert: true, }, callback ) @@ -759,36 +763,36 @@ module.exports = PackManager = { } return async.series( [ - (cb) => + cb => PackManager.checkArchiveNotInProgress( project_id, doc_id, pack_id, cb ), - (cb) => + cb => PackManager.markPackAsArchiveInProgress( project_id, doc_id, pack_id, cb ), - (cb) => - MongoAWS.archivePack(project_id, doc_id, pack_id, (err) => + cb => + MongoAWS.archivePack(project_id, doc_id, pack_id, err => clearFlagOnError(err, cb) ), - (cb) => - PackManager.checkArchivedPack(project_id, doc_id, pack_id, (err) => + cb => + PackManager.checkArchivedPack(project_id, doc_id, pack_id, err => clearFlagOnError(err, cb) ), - (cb) => PackManager.markPackAsArchived(project_id, doc_id, pack_id, cb), - (cb) => + cb => PackManager.markPackAsArchived(project_id, doc_id, pack_id, cb), + cb => PackManager.setTTLOnArchivedPack( project_id, doc_id, pack_id, callback - ) + ), ], callback ) @@ -802,40 +806,42 @@ module.exports = PackManager = { if (pack == null) { return callback(new Error('pack not found')) } - return MongoAWS.readArchivedPack(project_id, doc_id, pack_id, function ( - err, - result - ) { - delete result.last_checked - delete pack.last_checked - // need to compare ids as ObjectIds with .equals() - for (const key of ['_id', 'project_id', 'doc_id']) { - if (result[key].equals(pack[key])) { - result[key] = pack[key] + return MongoAWS.readArchivedPack( + project_id, + doc_id, + pack_id, + function (err, result) { + delete result.last_checked + delete pack.last_checked + // need to compare ids as ObjectIds with .equals() + for (const key of ['_id', 'project_id', 'doc_id']) { + if (result[key].equals(pack[key])) { + result[key] = pack[key] + } + } + for (let i = 0; i < result.pack.length; i++) { + const op = result.pack[i] + if (op._id != null && op._id.equals(pack.pack[i]._id)) { + op._id = pack.pack[i]._id + } + } + if (_.isEqual(pack, result)) { + return callback() + } else { + logger.err( + { + pack, + result, + jsondiff: JSON.stringify(pack) === JSON.stringify(result), + }, + 'difference when comparing packs' + ) + return callback( + new Error('pack retrieved from s3 does not match pack in mongo') + ) } } - for (let i = 0; i < result.pack.length; i++) { - const op = result.pack[i] - if (op._id != null && op._id.equals(pack.pack[i]._id)) { - op._id = pack.pack[i]._id - } - } - if (_.isEqual(pack, result)) { - return callback() - } else { - logger.err( - { - pack, - result, - jsondiff: JSON.stringify(pack) === JSON.stringify(result) - }, - 'difference when comparing packs' - ) - return callback( - new Error('pack retrieved from s3 does not match pack in mongo') - ) - } - }) + ) }) }, // Extra methods to test archive/unarchive for a doc_id @@ -870,15 +876,18 @@ module.exports = PackManager = { // Processing old packs via worker processOldPack(project_id, doc_id, pack_id, callback) { - const markAsChecked = (err) => - PackManager.markPackAsChecked(project_id, doc_id, pack_id, function ( - err2 - ) { - if (err2 != null) { - return callback(err2) + const markAsChecked = err => + PackManager.markPackAsChecked( + project_id, + doc_id, + pack_id, + function (err2) { + if (err2 != null) { + return callback(err2) + } + return callback(err) } - return callback(err) - }) + ) logger.log({ project_id, doc_id }, 'processing old packs') return db.docHistory.findOne({ _id: pack_id }, function (err, pack) { if (err != null) { @@ -899,42 +908,47 @@ module.exports = PackManager = { if (err != null) { return markAsChecked(err) } - return PackManager.updateIndexIfNeeded(project_id, doc_id, function ( - err - ) { - if (err != null) { - return markAsChecked(err) - } - return PackManager.findUnarchivedPacks( - project_id, - doc_id, - function (err, unarchivedPacks) { - if (err != null) { - return markAsChecked(err) - } - if ( - !(unarchivedPacks != null - ? unarchivedPacks.length - : undefined) - ) { - logger.log({ project_id, doc_id }, 'no packs need archiving') - return markAsChecked() - } - return async.eachSeries( - unarchivedPacks, - (pack, cb) => - PackManager.archivePack(project_id, doc_id, pack._id, cb), - function (err) { - if (err != null) { - return markAsChecked(err) - } - logger.log({ project_id, doc_id }, 'done processing') + return PackManager.updateIndexIfNeeded( + project_id, + doc_id, + function (err) { + if (err != null) { + return markAsChecked(err) + } + return PackManager.findUnarchivedPacks( + project_id, + doc_id, + function (err, unarchivedPacks) { + if (err != null) { + return markAsChecked(err) + } + if ( + !(unarchivedPacks != null + ? unarchivedPacks.length + : undefined) + ) { + logger.log( + { project_id, doc_id }, + 'no packs need archiving' + ) return markAsChecked() } - ) - } - ) - }) + return async.eachSeries( + unarchivedPacks, + (pack, cb) => + PackManager.archivePack(project_id, doc_id, pack._id, cb), + function (err) { + if (err != null) { + return markAsChecked(err) + } + logger.log({ project_id, doc_id }, 'done processing') + return markAsChecked() + } + ) + } + ) + } + ) } ) }) @@ -974,7 +988,7 @@ module.exports = PackManager = { markPackAsFinalisedWithLock(project_id, doc_id, pack_id, callback) { return LockManager.runWithLock( keys.historyLock({ doc_id }), - (releaseLock) => + releaseLock => PackManager._markPackAsFinalised( project_id, doc_id, @@ -1050,24 +1064,25 @@ module.exports = PackManager = { { project_id, doc_id, pack_id }, 'checking if archive in progress' ) - return PackManager.getPackFromIndex(doc_id, pack_id, function ( - err, - result - ) { - if (err != null) { - return callback(err) + return PackManager.getPackFromIndex( + doc_id, + pack_id, + function (err, result) { + if (err != null) { + return callback(err) + } + if (result == null) { + return callback(new Error('pack not found in index')) + } + if (result.inS3) { + return callback(new Error('pack archiving already done')) + } else if (result.inS3 != null) { + return callback(new Error('pack archiving already in progress')) + } else { + return callback() + } } - if (result == null) { - return callback(new Error('pack not found in index')) - } - if (result.inS3) { - return callback(new Error('pack archiving already done')) - } else if (result.inS3 != null) { - return callback(new Error('pack archiving already in progress')) - } else { - return callback() - } - }) + ) }, markPackAsArchiveInProgress(project_id, doc_id, pack_id, callback) { @@ -1078,7 +1093,7 @@ module.exports = PackManager = { return db.docHistoryIndex.findOneAndUpdate( { _id: ObjectId(doc_id.toString()), - packs: { $elemMatch: { _id: pack_id, inS3: { $exists: false } } } + packs: { $elemMatch: { _id: pack_id, inS3: { $exists: false } } }, }, { $set: { 'packs.$.inS3': false } }, { projection: { 'packs.$': 1 } }, @@ -1106,7 +1121,7 @@ module.exports = PackManager = { return db.docHistoryIndex.updateOne( { _id: ObjectId(doc_id.toString()), - packs: { $elemMatch: { _id: pack_id, inS3: false } } + packs: { $elemMatch: { _id: pack_id, inS3: false } }, }, { $unset: { 'packs.$.inS3': true } }, callback @@ -1118,7 +1133,7 @@ module.exports = PackManager = { return db.docHistoryIndex.findOneAndUpdate( { _id: ObjectId(doc_id.toString()), - packs: { $elemMatch: { _id: pack_id, inS3: false } } + packs: { $elemMatch: { _id: pack_id, inS3: false } }, }, { $set: { 'packs.$.inS3': true } }, { projection: { 'packs.$': 1 } }, @@ -1147,7 +1162,7 @@ module.exports = PackManager = { return callback() } ) - } + }, } // _getOneDayInFutureWithRandomDelay: -> diff --git a/services/track-changes/app/js/PackWorker.js b/services/track-changes/app/js/PackWorker.js index dc15ee8f21..38e99101de 100644 --- a/services/track-changes/app/js/PackWorker.js +++ b/services/track-changes/app/js/PackWorker.js @@ -16,7 +16,7 @@ let LIMIT, pending let project_id, doc_id const { callbackify } = require('util') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const async = require('async') const _ = require('underscore') const { db, ObjectId, waitForDb, closeDb } = require('./mongodb') @@ -53,8 +53,8 @@ if (!source.match(/^[0-9]+$/)) { } return result1 })() - pending = _.filter(result, (row) => - __guard__(row != null ? row.doc_id : undefined, (x) => + pending = _.filter(result, row => + __guard__(row != null ? row.doc_id : undefined, x => x.match(/^[a-f0-9]{24}$/) ) ) @@ -101,9 +101,9 @@ const finish = function () { }) } -process.on('exit', (code) => logger.log({ code }, 'pack archive worker exited')) +process.on('exit', code => logger.log({ code }, 'pack archive worker exited')) -const processUpdates = (pending) => +const processUpdates = pending => async.eachSeries( pending, function (result, callback) { @@ -170,7 +170,7 @@ waitForDb() processFromOneWeekAgo() } }) - .catch((err) => { + .catch(err => { logger.fatal({ err }, 'cannot connect to mongo, exiting') process.exit(1) }) @@ -184,12 +184,12 @@ function processFromOneWeekAgo() { project_id: { $exists: true }, v_end: { $exists: true }, _id: { $lt: ObjectIdFromDate(oneWeekAgo) }, - last_checked: { $lt: oneWeekAgo } + last_checked: { $lt: oneWeekAgo }, }, { projection: { _id: 1, doc_id: 1, project_id: 1 } } ) .sort({ - last_checked: 1 + last_checked: 1, }) .limit(LIMIT) .toArray(function (err, results) { @@ -198,7 +198,7 @@ function processFromOneWeekAgo() { finish() return } - pending = _.uniq(results, false, (result) => result.doc_id.toString()) + pending = _.uniq(results, false, result => result.doc_id.toString()) TOTAL = pending.length logger.log(`found ${TOTAL} documents to archive`) return processUpdates(pending) diff --git a/services/track-changes/app/js/ProjectIterator.js b/services/track-changes/app/js/ProjectIterator.js index 43ddbc7b2f..2b9da401b3 100644 --- a/services/track-changes/app/js/ProjectIterator.js +++ b/services/track-changes/app/js/ProjectIterator.js @@ -14,96 +14,100 @@ let ProjectIterator const Heap = require('heap') -module.exports = ProjectIterator = ProjectIterator = class ProjectIterator { - constructor(packs, before, getPackByIdFn) { - this.before = before - this.getPackByIdFn = getPackByIdFn - const byEndTs = (a, b) => - b.meta.end_ts - a.meta.end_ts || a.fromIndex - b.fromIndex - this.packs = packs.slice().sort(byEndTs) - this.queue = new Heap(byEndTs) - } +module.exports = + ProjectIterator = + ProjectIterator = + class ProjectIterator { + constructor(packs, before, getPackByIdFn) { + this.before = before + this.getPackByIdFn = getPackByIdFn + const byEndTs = (a, b) => + b.meta.end_ts - a.meta.end_ts || a.fromIndex - b.fromIndex + this.packs = packs.slice().sort(byEndTs) + this.queue = new Heap(byEndTs) + } - next(callback) { - // what's up next - // console.log ">>> top item", iterator.packs[0] - const iterator = this - const { before } = this - const { queue } = iterator - const opsToReturn = [] - let nextPack = iterator.packs[0] - let lowWaterMark = - (nextPack != null ? nextPack.meta.end_ts : undefined) || 0 - let nextItem = queue.peek() + next(callback) { + // what's up next + // console.log ">>> top item", iterator.packs[0] + const iterator = this + const { before } = this + const { queue } = iterator + const opsToReturn = [] + let nextPack = iterator.packs[0] + let lowWaterMark = + (nextPack != null ? nextPack.meta.end_ts : undefined) || 0 + let nextItem = queue.peek() - // console.log "queue empty?", queue.empty() - // console.log "nextItem", nextItem - // console.log "nextItem.meta.end_ts", nextItem?.meta.end_ts - // console.log "lowWaterMark", lowWaterMark + // console.log "queue empty?", queue.empty() + // console.log "nextItem", nextItem + // console.log "nextItem.meta.end_ts", nextItem?.meta.end_ts + // console.log "lowWaterMark", lowWaterMark - while ( - before != null && - (nextPack != null ? nextPack.meta.start_ts : undefined) > before - ) { - // discard pack that is outside range - iterator.packs.shift() - nextPack = iterator.packs[0] - lowWaterMark = (nextPack != null ? nextPack.meta.end_ts : undefined) || 0 - } - - if ( - (queue.empty() || - (nextItem != null ? nextItem.meta.end_ts : undefined) <= - lowWaterMark) && - nextPack != null - ) { - // retrieve the next pack and populate the queue - return this.getPackByIdFn( - nextPack.project_id, - nextPack.doc_id, - nextPack._id, - function (err, pack) { - if (err != null) { - return callback(err) - } - iterator.packs.shift() // have now retrieved this pack, remove it - // console.log "got pack", pack - for (const op of Array.from(pack.pack)) { - // console.log "adding op", op - if (before == null || op.meta.end_ts < before) { - op.doc_id = nextPack.doc_id - op.project_id = nextPack.project_id - queue.push(op) - } - } - // now try again - return iterator.next(callback) + while ( + before != null && + (nextPack != null ? nextPack.meta.start_ts : undefined) > before + ) { + // discard pack that is outside range + iterator.packs.shift() + nextPack = iterator.packs[0] + lowWaterMark = + (nextPack != null ? nextPack.meta.end_ts : undefined) || 0 } - ) + + if ( + (queue.empty() || + (nextItem != null ? nextItem.meta.end_ts : undefined) <= + lowWaterMark) && + nextPack != null + ) { + // retrieve the next pack and populate the queue + return this.getPackByIdFn( + nextPack.project_id, + nextPack.doc_id, + nextPack._id, + function (err, pack) { + if (err != null) { + return callback(err) + } + iterator.packs.shift() // have now retrieved this pack, remove it + // console.log "got pack", pack + for (const op of Array.from(pack.pack)) { + // console.log "adding op", op + if (before == null || op.meta.end_ts < before) { + op.doc_id = nextPack.doc_id + op.project_id = nextPack.project_id + queue.push(op) + } + } + // now try again + return iterator.next(callback) + } + ) + } + + // console.log "nextItem", nextItem, "lowWaterMark", lowWaterMark + while ( + nextItem != null && + (nextItem != null ? nextItem.meta.end_ts : undefined) > lowWaterMark + ) { + opsToReturn.push(nextItem) + queue.pop() + nextItem = queue.peek() + } + + // console.log "queue empty?", queue.empty() + // console.log "nextPack", nextPack? + + if (queue.empty() && nextPack == null) { + // got everything + iterator._done = true + } + + return callback(null, opsToReturn) + } + + done() { + return this._done + } } - - // console.log "nextItem", nextItem, "lowWaterMark", lowWaterMark - while ( - nextItem != null && - (nextItem != null ? nextItem.meta.end_ts : undefined) > lowWaterMark - ) { - opsToReturn.push(nextItem) - queue.pop() - nextItem = queue.peek() - } - - // console.log "queue empty?", queue.empty() - // console.log "nextPack", nextPack? - - if (queue.empty() && nextPack == null) { - // got everything - iterator._done = true - } - - return callback(null, opsToReturn) - } - - done() { - return this._done - } -} diff --git a/services/track-changes/app/js/RedisManager.js b/services/track-changes/app/js/RedisManager.js index b995a60128..4998c4757f 100644 --- a/services/track-changes/app/js/RedisManager.js +++ b/services/track-changes/app/js/RedisManager.js @@ -13,7 +13,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let RedisManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(Settings.redis.history) const Keys = Settings.redis.history.key_schema @@ -34,7 +34,7 @@ module.exports = RedisManager = { callback = function (error, rawUpdates) {} } try { - rawUpdates = Array.from(jsonUpdates || []).map((update) => + rawUpdates = Array.from(jsonUpdates || []).map(update => JSON.parse(update) ) } catch (e) { @@ -93,26 +93,30 @@ module.exports = RedisManager = { let cursor = 0 // redis iterator const keySet = {} // use hash to avoid duplicate results // scan over all keys looking for pattern - var doIteration = (cb) => - node.scan(cursor, 'MATCH', pattern, 'COUNT', 1000, function ( - error, - reply - ) { - let keys - if (error != null) { - return callback(error) + var doIteration = cb => + node.scan( + cursor, + 'MATCH', + pattern, + 'COUNT', + 1000, + function (error, reply) { + let keys + if (error != null) { + return callback(error) + } + ;[cursor, keys] = Array.from(reply) + for (const key of Array.from(keys)) { + keySet[key] = true + } + if (cursor === '0') { + // note redis returns string result not numeric + return callback(null, Object.keys(keySet)) + } else { + return doIteration() + } } - ;[cursor, keys] = Array.from(reply) - for (const key of Array.from(keys)) { - keySet[key] = true - } - if (cursor === '0') { - // note redis returns string result not numeric - return callback(null, Object.keys(keySet)) - } else { - return doIteration() - } - }) + ) return doIteration() }, @@ -162,5 +166,5 @@ module.exports = RedisManager = { return callback(error, doc_ids) } ) - } + }, } diff --git a/services/track-changes/app/js/RestoreManager.js b/services/track-changes/app/js/RestoreManager.js index 6a1af1af44..84ddaf5236 100644 --- a/services/track-changes/app/js/RestoreManager.js +++ b/services/track-changes/app/js/RestoreManager.js @@ -44,5 +44,5 @@ module.exports = RestoreManager = { ) } ) - } + }, } diff --git a/services/track-changes/app/js/UpdateCompressor.js b/services/track-changes/app/js/UpdateCompressor.js index 019ad32760..8e447f95c0 100644 --- a/services/track-changes/app/js/UpdateCompressor.js +++ b/services/track-changes/app/js/UpdateCompressor.js @@ -42,16 +42,16 @@ module.exports = UpdateCompressor = { const splitUpdates = [] for (const update of Array.from(updates)) { // Reject any non-insert or delete ops, i.e. comments - const ops = update.op.filter((o) => o.i != null || o.d != null) + const ops = update.op.filter(o => o.i != null || o.d != null) if (ops.length === 0) { splitUpdates.push({ op: UpdateCompressor.NOOP, meta: { start_ts: update.meta.start_ts || update.meta.ts, end_ts: update.meta.end_ts || update.meta.ts, - user_id: update.meta.user_id + user_id: update.meta.user_id, }, - v: update.v + v: update.v, }) } else { for (const op of Array.from(ops)) { @@ -60,9 +60,9 @@ module.exports = UpdateCompressor = { meta: { start_ts: update.meta.start_ts || update.meta.ts, end_ts: update.meta.end_ts || update.meta.ts, - user_id: update.meta.user_id + user_id: update.meta.user_id, }, - v: update.v + v: update.v, }) } } @@ -82,7 +82,7 @@ module.exports = UpdateCompressor = { const nextUpdate = { op: [], meta: update.meta, - v: update.v + v: update.v, } if (update.op !== UpdateCompressor.NOOP) { nextUpdate.op.push(update.op) @@ -97,7 +97,7 @@ module.exports = UpdateCompressor = { if ( __guard__( lastPreviousUpdate != null ? lastPreviousUpdate.op : undefined, - (x) => x.length + x => x.length ) > 1 ) { // if the last previous update was an array op, don't compress onto it. @@ -144,18 +144,18 @@ module.exports = UpdateCompressor = { meta: { user_id: firstUpdate.meta.user_id || null, start_ts: firstUpdate.meta.start_ts || firstUpdate.meta.ts, - end_ts: firstUpdate.meta.end_ts || firstUpdate.meta.ts + end_ts: firstUpdate.meta.end_ts || firstUpdate.meta.ts, }, - v: firstUpdate.v + v: firstUpdate.v, } secondUpdate = { op: secondUpdate.op, meta: { user_id: secondUpdate.meta.user_id || null, start_ts: secondUpdate.meta.start_ts || secondUpdate.meta.ts, - end_ts: secondUpdate.meta.end_ts || secondUpdate.meta.ts + end_ts: secondUpdate.meta.end_ts || secondUpdate.meta.ts, }, - v: secondUpdate.v + v: secondUpdate.v, } if (firstUpdate.meta.user_id !== secondUpdate.meta.user_id) { @@ -192,14 +192,14 @@ module.exports = UpdateCompressor = { meta: { start_ts: firstUpdate.meta.start_ts, end_ts: secondUpdate.meta.end_ts, - user_id: firstUpdate.meta.user_id + user_id: firstUpdate.meta.user_id, }, op: { p: firstOp.p, - i: strInject(firstOp.i, secondOp.p - firstOp.p, secondOp.i) + i: strInject(firstOp.i, secondOp.p - firstOp.p, secondOp.i), }, - v: secondUpdate.v - } + v: secondUpdate.v, + }, ] // Two deletes } else if ( @@ -214,14 +214,14 @@ module.exports = UpdateCompressor = { meta: { start_ts: firstUpdate.meta.start_ts, end_ts: secondUpdate.meta.end_ts, - user_id: firstUpdate.meta.user_id + user_id: firstUpdate.meta.user_id, }, op: { p: secondOp.p, - d: strInject(secondOp.d, firstOp.p - secondOp.p, firstOp.d) + d: strInject(secondOp.d, firstOp.p - secondOp.p, firstOp.d), }, - v: secondUpdate.v - } + v: secondUpdate.v, + }, ] // An insert and then a delete } else if ( @@ -240,14 +240,14 @@ module.exports = UpdateCompressor = { meta: { start_ts: firstUpdate.meta.start_ts, end_ts: secondUpdate.meta.end_ts, - user_id: firstUpdate.meta.user_id + user_id: firstUpdate.meta.user_id, }, op: { p: firstOp.p, - i: insert + i: insert, }, - v: secondUpdate.v - } + v: secondUpdate.v, + }, ] } else { // This will only happen if the delete extends outside the insert @@ -269,14 +269,14 @@ module.exports = UpdateCompressor = { meta: { start_ts: firstUpdate.meta.start_ts, end_ts: secondUpdate.meta.end_ts, - user_id: firstUpdate.meta.user_id + user_id: firstUpdate.meta.user_id, }, op: { p: firstOp.p, - i: '' + i: '', }, - v: secondUpdate.v - } + v: secondUpdate.v, + }, ] } else { return diff_ops.map(function (op) { @@ -285,10 +285,10 @@ module.exports = UpdateCompressor = { meta: { start_ts: firstUpdate.meta.start_ts, end_ts: secondUpdate.meta.end_ts, - user_id: firstUpdate.meta.user_id + user_id: firstUpdate.meta.user_id, }, op, - v: secondUpdate.v + v: secondUpdate.v, } }) } @@ -315,13 +315,13 @@ module.exports = UpdateCompressor = { if (type === this.ADDED) { ops.push({ i: content, - p: position + p: position, }) position += content.length } else if (type === this.REMOVED) { ops.push({ d: content, - p: position + p: position, }) } else if (type === this.UNCHANGED) { position += content.length @@ -330,7 +330,7 @@ module.exports = UpdateCompressor = { } } return ops - } + }, } function __guard__(value, transform) { diff --git a/services/track-changes/app/js/UpdateTrimmer.js b/services/track-changes/app/js/UpdateTrimmer.js index 5fabe1cb9e..b37bf545f2 100644 --- a/services/track-changes/app/js/UpdateTrimmer.js +++ b/services/track-changes/app/js/UpdateTrimmer.js @@ -22,54 +22,55 @@ module.exports = UpdateTrimmer = { if (callback == null) { callback = function (error, shouldTrim) {} } - return MongoManager.getProjectMetaData(project_id, function ( - error, - metadata - ) { - if (error != null) { - return callback(error) - } - if (metadata != null ? metadata.preserveHistory : undefined) { - return callback(null, false) - } else { - return WebApiManager.getProjectDetails(project_id, function ( - error, - details - ) { - if (error != null) { - return callback(error) - } - logger.log({ project_id, details }, 'got details') - if ( - __guard__( - details != null ? details.features : undefined, - (x) => x.versioning - ) - ) { - return MongoManager.setProjectMetaData( - project_id, - { preserveHistory: true }, - function (error) { - if (error != null) { - return callback(error) - } - return MongoManager.upgradeHistory(project_id, function ( - error - ) { - if (error != null) { - return callback(error) - } - return callback(null, false) - }) + return MongoManager.getProjectMetaData( + project_id, + function (error, metadata) { + if (error != null) { + return callback(error) + } + if (metadata != null ? metadata.preserveHistory : undefined) { + return callback(null, false) + } else { + return WebApiManager.getProjectDetails( + project_id, + function (error, details) { + if (error != null) { + return callback(error) } - ) - } else { - return callback(null, true) - } - }) + logger.log({ project_id, details }, 'got details') + if ( + __guard__( + details != null ? details.features : undefined, + x => x.versioning + ) + ) { + return MongoManager.setProjectMetaData( + project_id, + { preserveHistory: true }, + function (error) { + if (error != null) { + return callback(error) + } + return MongoManager.upgradeHistory( + project_id, + function (error) { + if (error != null) { + return callback(error) + } + return callback(null, false) + } + ) + } + ) + } else { + return callback(null, true) + } + } + ) + } } - }) - } + ) + }, } function __guard__(value, transform) { diff --git a/services/track-changes/app/js/UpdatesManager.js b/services/track-changes/app/js/UpdatesManager.js index 7890208788..26c1104569 100644 --- a/services/track-changes/app/js/UpdatesManager.js +++ b/services/track-changes/app/js/UpdatesManager.js @@ -25,7 +25,7 @@ const UpdateTrimmer = require('./UpdateTrimmer') const logger = require('logger-sharelatex') const async = require('async') const _ = require('underscore') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const keys = Settings.redis.lock.key_schema module.exports = UpdatesManager = { @@ -50,7 +50,7 @@ module.exports = UpdatesManager = { const op = rawUpdates[i] if (i > 0) { const thisVersion = op != null ? op.v : undefined - const prevVersion = __guard__(rawUpdates[i - 1], (x) => x.v) + const prevVersion = __guard__(rawUpdates[i - 1], x => x.v) if (!(prevVersion < thisVersion)) { logger.error( { @@ -59,7 +59,7 @@ module.exports = UpdatesManager = { rawUpdates, temporary, thisVersion, - prevVersion + prevVersion, }, 'op versions out of order' ) @@ -69,138 +69,137 @@ module.exports = UpdatesManager = { // FIXME: we no longer need the lastCompressedUpdate, so change functions not to need it // CORRECTION: we do use it to log the time in case of error - return MongoManager.peekLastCompressedUpdate(doc_id, function ( - error, - lastCompressedUpdate, - lastVersion - ) { - // lastCompressedUpdate is the most recent update in Mongo, and - // lastVersion is its sharejs version number. - // - // The peekLastCompressedUpdate method may pass the update back - // as 'null' (for example if the previous compressed update has - // been archived). In this case it can still pass back the - // lastVersion from the update to allow us to check consistency. - let op - if (error != null) { - return callback(error) - } - - // Ensure that raw updates start where lastVersion left off - if (lastVersion != null) { - const discardedUpdates = [] - rawUpdates = rawUpdates.slice(0) - while (rawUpdates[0] != null && rawUpdates[0].v <= lastVersion) { - discardedUpdates.push(rawUpdates.shift()) - } - if (discardedUpdates.length) { - logger.error( - { project_id, doc_id, discardedUpdates, temporary, lastVersion }, - 'discarded updates already present' - ) + return MongoManager.peekLastCompressedUpdate( + doc_id, + function (error, lastCompressedUpdate, lastVersion) { + // lastCompressedUpdate is the most recent update in Mongo, and + // lastVersion is its sharejs version number. + // + // The peekLastCompressedUpdate method may pass the update back + // as 'null' (for example if the previous compressed update has + // been archived). In this case it can still pass back the + // lastVersion from the update to allow us to check consistency. + let op + if (error != null) { + return callback(error) } - if (rawUpdates[0] != null && rawUpdates[0].v !== lastVersion + 1) { - const ts = __guard__( - lastCompressedUpdate != null - ? lastCompressedUpdate.meta - : undefined, - (x1) => x1.end_ts - ) - const last_timestamp = ts != null ? new Date(ts) : 'unknown time' - error = new Error( - `Tried to apply raw op at version ${rawUpdates[0].v} to last compressed update with version ${lastVersion} from ${last_timestamp}` - ) - logger.error( - { - err: error, - doc_id, - project_id, - prev_end_ts: ts, - temporary, - lastCompressedUpdate - }, - 'inconsistent doc versions' - ) - if ( - (Settings.trackchanges != null - ? Settings.trackchanges.continueOnError - : undefined) && - rawUpdates[0].v > lastVersion + 1 - ) { - // we have lost some ops - continue to write into the database, we can't recover at this point - lastCompressedUpdate = null - } else { - return callback(error) + // Ensure that raw updates start where lastVersion left off + if (lastVersion != null) { + const discardedUpdates = [] + rawUpdates = rawUpdates.slice(0) + while (rawUpdates[0] != null && rawUpdates[0].v <= lastVersion) { + discardedUpdates.push(rawUpdates.shift()) } - } - } - - if (rawUpdates.length === 0) { - return callback() - } - - // some old large ops in redis need to be rejected, they predate - // the size limit that now prevents them going through the system - const REJECT_LARGE_OP_SIZE = 4 * 1024 * 1024 - for (var rawUpdate of Array.from(rawUpdates)) { - const opSizes = (() => { - const result = [] - for (op of Array.from( - (rawUpdate != null ? rawUpdate.op : undefined) || [] - )) { - result.push( - (op.i != null ? op.i.length : undefined) || - (op.d != null ? op.d.length : undefined) + if (discardedUpdates.length) { + logger.error( + { project_id, doc_id, discardedUpdates, temporary, lastVersion }, + 'discarded updates already present' ) } - return result - })() - const size = _.max(opSizes) - if (size > REJECT_LARGE_OP_SIZE) { - error = new Error( - `dropped op exceeding maximum allowed size of ${REJECT_LARGE_OP_SIZE}` - ) - logger.error( - { err: error, doc_id, project_id, size, rawUpdate }, - 'dropped op - too big' - ) - rawUpdate.op = [] - } - } - const compressedUpdates = UpdateCompressor.compressRawUpdates( - null, - rawUpdates - ) - return PackManager.insertCompressedUpdates( - project_id, - doc_id, - lastCompressedUpdate, - compressedUpdates, - temporary, - function (error, result) { - if (error != null) { - return callback(error) - } - if (result != null) { - logger.log( + if (rawUpdates[0] != null && rawUpdates[0].v !== lastVersion + 1) { + const ts = __guard__( + lastCompressedUpdate != null + ? lastCompressedUpdate.meta + : undefined, + x1 => x1.end_ts + ) + const last_timestamp = ts != null ? new Date(ts) : 'unknown time' + error = new Error( + `Tried to apply raw op at version ${rawUpdates[0].v} to last compressed update with version ${lastVersion} from ${last_timestamp}` + ) + logger.error( { - project_id, + err: error, doc_id, - orig_v: - lastCompressedUpdate != null - ? lastCompressedUpdate.v - : undefined, - new_v: result.v + project_id, + prev_end_ts: ts, + temporary, + lastCompressedUpdate, }, - 'inserted updates into pack' + 'inconsistent doc versions' ) + if ( + (Settings.trackchanges != null + ? Settings.trackchanges.continueOnError + : undefined) && + rawUpdates[0].v > lastVersion + 1 + ) { + // we have lost some ops - continue to write into the database, we can't recover at this point + lastCompressedUpdate = null + } else { + return callback(error) + } } + } + + if (rawUpdates.length === 0) { return callback() } - ) - }) + + // some old large ops in redis need to be rejected, they predate + // the size limit that now prevents them going through the system + const REJECT_LARGE_OP_SIZE = 4 * 1024 * 1024 + for (var rawUpdate of Array.from(rawUpdates)) { + const opSizes = (() => { + const result = [] + for (op of Array.from( + (rawUpdate != null ? rawUpdate.op : undefined) || [] + )) { + result.push( + (op.i != null ? op.i.length : undefined) || + (op.d != null ? op.d.length : undefined) + ) + } + return result + })() + const size = _.max(opSizes) + if (size > REJECT_LARGE_OP_SIZE) { + error = new Error( + `dropped op exceeding maximum allowed size of ${REJECT_LARGE_OP_SIZE}` + ) + logger.error( + { err: error, doc_id, project_id, size, rawUpdate }, + 'dropped op - too big' + ) + rawUpdate.op = [] + } + } + + const compressedUpdates = UpdateCompressor.compressRawUpdates( + null, + rawUpdates + ) + return PackManager.insertCompressedUpdates( + project_id, + doc_id, + lastCompressedUpdate, + compressedUpdates, + temporary, + function (error, result) { + if (error != null) { + return callback(error) + } + if (result != null) { + logger.log( + { + project_id, + doc_id, + orig_v: + lastCompressedUpdate != null + ? lastCompressedUpdate.v + : undefined, + new_v: result.v, + }, + 'inserted updates into pack' + ) + } + return callback() + } + ) + } + ) }, // Check whether the updates are temporary (per-project property) @@ -208,15 +207,15 @@ module.exports = UpdatesManager = { if (callback == null) { callback = function (error, temporary) {} } - return UpdateTrimmer.shouldTrimUpdates(project_id, function ( - error, - temporary - ) { - if (error != null) { - return callback(error) + return UpdateTrimmer.shouldTrimUpdates( + project_id, + function (error, temporary) { + if (error != null) { + return callback(error) + } + return callback(null, temporary) } - return callback(null, temporary) - }) + ) }, // Check for project id on document history (per-document property) @@ -248,71 +247,71 @@ module.exports = UpdatesManager = { } const { length } = docUpdates // parse the redis strings into ShareJs updates - return RedisManager.expandDocUpdates(docUpdates, function ( - error, - rawUpdates - ) { - if (error != null) { - logger.err( - { project_id, doc_id, docUpdates }, - 'failed to parse docUpdates' - ) - return callback(error) - } - logger.log( - { project_id, doc_id, rawUpdates }, - 'retrieved raw updates from redis' - ) - return UpdatesManager.compressAndSaveRawUpdates( - project_id, - doc_id, - rawUpdates, - temporary, - function (error) { - if (error != null) { - return callback(error) - } - logger.log( - { project_id, doc_id }, - 'compressed and saved doc updates' - ) - // delete the applied updates from redis - return RedisManager.deleteAppliedDocUpdates( - project_id, - doc_id, - docUpdates, - function (error) { - if (error != null) { - return callback(error) - } - if (length === UpdatesManager.REDIS_READ_BATCH_SIZE) { - // There might be more updates - logger.log( - { project_id, doc_id }, - 'continuing processing updates' - ) - return setTimeout( - () => - UpdatesManager.processUncompressedUpdates( - project_id, - doc_id, - temporary, - callback - ), - 0 - ) - } else { - logger.log( - { project_id, doc_id }, - 'all raw updates processed' - ) - return callback() - } - } + return RedisManager.expandDocUpdates( + docUpdates, + function (error, rawUpdates) { + if (error != null) { + logger.err( + { project_id, doc_id, docUpdates }, + 'failed to parse docUpdates' ) + return callback(error) } - ) - }) + logger.log( + { project_id, doc_id, rawUpdates }, + 'retrieved raw updates from redis' + ) + return UpdatesManager.compressAndSaveRawUpdates( + project_id, + doc_id, + rawUpdates, + temporary, + function (error) { + if (error != null) { + return callback(error) + } + logger.log( + { project_id, doc_id }, + 'compressed and saved doc updates' + ) + // delete the applied updates from redis + return RedisManager.deleteAppliedDocUpdates( + project_id, + doc_id, + docUpdates, + function (error) { + if (error != null) { + return callback(error) + } + if (length === UpdatesManager.REDIS_READ_BATCH_SIZE) { + // There might be more updates + logger.log( + { project_id, doc_id }, + 'continuing processing updates' + ) + return setTimeout( + () => + UpdatesManager.processUncompressedUpdates( + project_id, + doc_id, + temporary, + callback + ), + 0 + ) + } else { + logger.log( + { project_id, doc_id }, + 'all raw updates processed' + ) + return callback() + } + } + ) + } + ) + } + ) } ) }, @@ -322,20 +321,20 @@ module.exports = UpdatesManager = { if (callback == null) { callback = function (error) {} } - return UpdatesManager._prepareProjectForUpdates(project_id, function ( - error, - temporary - ) { - if (error != null) { - return callback(error) + return UpdatesManager._prepareProjectForUpdates( + project_id, + function (error, temporary) { + if (error != null) { + return callback(error) + } + return UpdatesManager._processUncompressedUpdatesForDocWithLock( + project_id, + doc_id, + temporary, + callback + ) } - return UpdatesManager._processUncompressedUpdatesForDocWithLock( - project_id, - doc_id, - temporary, - callback - ) - }) + ) }, // Process updates for a doc when the whole project is flushed (internal method) @@ -348,24 +347,26 @@ module.exports = UpdatesManager = { if (callback == null) { callback = function (error) {} } - return UpdatesManager._prepareDocForUpdates(project_id, doc_id, function ( - error - ) { - if (error != null) { - return callback(error) + return UpdatesManager._prepareDocForUpdates( + project_id, + doc_id, + function (error) { + if (error != null) { + return callback(error) + } + return LockManager.runWithLock( + keys.historyLock({ doc_id }), + releaseLock => + UpdatesManager.processUncompressedUpdates( + project_id, + doc_id, + temporary, + releaseLock + ), + callback + ) } - return LockManager.runWithLock( - keys.historyLock({ doc_id }), - (releaseLock) => - UpdatesManager.processUncompressedUpdates( - project_id, - doc_id, - temporary, - releaseLock - ), - callback - ) - }) + ) }, // Process all updates for a project, only check project-level information once @@ -373,32 +374,32 @@ module.exports = UpdatesManager = { if (callback == null) { callback = function (error) {} } - return RedisManager.getDocIdsWithHistoryOps(project_id, function ( - error, - doc_ids - ) { - if (error != null) { - return callback(error) - } - return UpdatesManager._prepareProjectForUpdates(project_id, function ( - error, - temporary - ) { - const jobs = [] - for (const doc_id of Array.from(doc_ids)) { - ;((doc_id) => - jobs.push((cb) => - UpdatesManager._processUncompressedUpdatesForDocWithLock( - project_id, - doc_id, - temporary, - cb - ) - ))(doc_id) + return RedisManager.getDocIdsWithHistoryOps( + project_id, + function (error, doc_ids) { + if (error != null) { + return callback(error) } - return async.parallelLimit(jobs, 5, callback) - }) - }) + return UpdatesManager._prepareProjectForUpdates( + project_id, + function (error, temporary) { + const jobs = [] + for (const doc_id of Array.from(doc_ids)) { + ;(doc_id => + jobs.push(cb => + UpdatesManager._processUncompressedUpdatesForDocWithLock( + project_id, + doc_id, + temporary, + cb + ) + ))(doc_id) + } + return async.parallelLimit(jobs, 5, callback) + } + ) + } + ) }, // flush all outstanding changes @@ -417,7 +418,7 @@ module.exports = UpdatesManager = { logger.log( { count: project_ids != null ? project_ids.length : undefined, - project_ids + project_ids, }, 'found projects' ) @@ -426,11 +427,11 @@ module.exports = UpdatesManager = { const selectedProjects = limit < 0 ? project_ids : project_ids.slice(0, limit) for (project_id of Array.from(selectedProjects)) { - ;((project_id) => - jobs.push((cb) => + ;(project_id => + jobs.push(cb => UpdatesManager.processUncompressedUpdatesForProject( project_id, - (err) => cb(null, { failed: err != null, project_id }) + err => cb(null, { failed: err != null, project_id }) ) ))(project_id) } @@ -460,7 +461,7 @@ module.exports = UpdatesManager = { return callback(null, { failed: failedProjects, succeeded: succeededProjects, - all: project_ids + all: project_ids, }) }) }) @@ -485,7 +486,7 @@ module.exports = UpdatesManager = { return callback(error) } // function to get doc_ids for each project - const task = (cb) => + const task = cb => async.concatSeries( all_project_ids, RedisManager.getDocIdsWithHistoryOps, @@ -542,20 +543,22 @@ module.exports = UpdatesManager = { if (callback == null) { callback = function (error, updates) {} } - return UpdatesManager.getDocUpdates(project_id, doc_id, options, function ( - error, - updates - ) { - if (error != null) { - return callback(error) - } - return UpdatesManager.fillUserInfo(updates, function (error, updates) { + return UpdatesManager.getDocUpdates( + project_id, + doc_id, + options, + function (error, updates) { if (error != null) { return callback(error) } - return callback(null, updates) - }) - }) + return UpdatesManager.fillUserInfo(updates, function (error, updates) { + if (error != null) { + return callback(error) + } + return callback(null, updates) + }) + } + ) }, getSummarizedProjectUpdates(project_id, options, callback) { @@ -577,63 +580,65 @@ module.exports = UpdatesManager = { if (error != null) { return callback(error) } - return PackManager.makeProjectIterator(project_id, before, function ( - err, - iterator - ) { - if (err != null) { - return callback(err) - } - // repeatedly get updates and pass them through the summariser to get an final output with user info - return async.whilst( - () => - // console.log "checking iterator.done", iterator.done() - summarizedUpdates.length < options.min_count && !iterator.done(), + return PackManager.makeProjectIterator( + project_id, + before, + function (err, iterator) { + if (err != null) { + return callback(err) + } + // repeatedly get updates and pass them through the summariser to get an final output with user info + return async.whilst( + () => + // console.log "checking iterator.done", iterator.done() + summarizedUpdates.length < options.min_count && + !iterator.done(), - (cb) => - iterator.next(function (err, partialUpdates) { - if (err != null) { - return callback(err) - } - // logger.log {partialUpdates}, 'got partialUpdates' - if (partialUpdates.length === 0) { - return cb() - } // # FIXME should try to avoid this happening - nextBeforeTimestamp = - partialUpdates[partialUpdates.length - 1].meta.end_ts - // add the updates to the summary list - summarizedUpdates = UpdatesManager._summarizeUpdates( - partialUpdates, - summarizedUpdates - ) - return cb() - }), - - () => - // finally done all updates - // console.log 'summarized Updates', summarizedUpdates - UpdatesManager.fillSummarizedUserInfo( - summarizedUpdates, - function (err, results) { + cb => + iterator.next(function (err, partialUpdates) { if (err != null) { return callback(err) } - return callback( - null, - results, - !iterator.done() ? nextBeforeTimestamp : undefined + // logger.log {partialUpdates}, 'got partialUpdates' + if (partialUpdates.length === 0) { + return cb() + } // # FIXME should try to avoid this happening + nextBeforeTimestamp = + partialUpdates[partialUpdates.length - 1].meta.end_ts + // add the updates to the summary list + summarizedUpdates = UpdatesManager._summarizeUpdates( + partialUpdates, + summarizedUpdates ) - } - ) - ) - }) + return cb() + }), + + () => + // finally done all updates + // console.log 'summarized Updates', summarizedUpdates + UpdatesManager.fillSummarizedUserInfo( + summarizedUpdates, + function (err, results) { + if (err != null) { + return callback(err) + } + return callback( + null, + results, + !iterator.done() ? nextBeforeTimestamp : undefined + ) + } + ) + ) + } + ) } ) }, exportProject(projectId, consumer) { // Flush anything before collecting updates. - UpdatesManager.processUncompressedUpdatesForProject(projectId, (err) => { + UpdatesManager.processUncompressedUpdatesForProject(projectId, err => { if (err) return consumer(err) // Fetch all the packs. @@ -646,7 +651,7 @@ module.exports = UpdatesManager = { async.whilst( () => !iterator.done(), - (cb) => + cb => iterator.next((err, updatesFromASinglePack) => { if (err) return cb(err) @@ -656,7 +661,7 @@ module.exports = UpdatesManager = { // call. return cb() } - updatesFromASinglePack.forEach((update) => { + updatesFromASinglePack.forEach(update => { accumulatedUserIds.add( // Super defensive access on update details. String(update && update.meta && update.meta.user_id) @@ -666,7 +671,7 @@ module.exports = UpdatesManager = { consumer(null, { updates: updatesFromASinglePack }, cb) }), - (err) => { + err => { if (err) return consumer(err) // Adding undefined can happen for broken updates. @@ -674,7 +679,7 @@ module.exports = UpdatesManager = { consumer(null, { updates: [], - userIds: Array.from(accumulatedUserIds).sort() + userIds: Array.from(accumulatedUserIds).sort(), }) } ) @@ -689,8 +694,8 @@ module.exports = UpdatesManager = { const jobs = [] const fetchedUserInfo = {} for (const user_id in users) { - ;((user_id) => - jobs.push((callback) => + ;(user_id => + jobs.push(callback => WebApiManager.getUserInfo(user_id, function (error, userInfo) { if (error != null) { return callback(error) @@ -722,22 +727,22 @@ module.exports = UpdatesManager = { } } - return UpdatesManager.fetchUserInfo(users, function ( - error, - fetchedUserInfo - ) { - if (error != null) { - return callback(error) - } - for (update of Array.from(updates)) { - ;({ user_id } = update.meta) - delete update.meta.user_id - if (UpdatesManager._validUserId(user_id)) { - update.meta.user = fetchedUserInfo[user_id] + return UpdatesManager.fetchUserInfo( + users, + function (error, fetchedUserInfo) { + if (error != null) { + return callback(error) } + for (update of Array.from(updates)) { + ;({ user_id } = update.meta) + delete update.meta.user_id + if (UpdatesManager._validUserId(user_id)) { + update.meta.user = fetchedUserInfo[user_id] + } + } + return callback(null, updates) } - return callback(null, updates) - }) + ) }, fillSummarizedUserInfo(updates, callback) { @@ -755,27 +760,27 @@ module.exports = UpdatesManager = { } } - return UpdatesManager.fetchUserInfo(users, function ( - error, - fetchedUserInfo - ) { - if (error != null) { - return callback(error) - } - for (update of Array.from(updates)) { - user_ids = update.meta.user_ids || [] - update.meta.users = [] - delete update.meta.user_ids - for (user_id of Array.from(user_ids)) { - if (UpdatesManager._validUserId(user_id)) { - update.meta.users.push(fetchedUserInfo[user_id]) - } else { - update.meta.users.push(null) + return UpdatesManager.fetchUserInfo( + users, + function (error, fetchedUserInfo) { + if (error != null) { + return callback(error) + } + for (update of Array.from(updates)) { + user_ids = update.meta.user_ids || [] + update.meta.users = [] + delete update.meta.user_ids + for (user_id of Array.from(user_ids)) { + if (UpdatesManager._validUserId(user_id)) { + update.meta.users.push(fetchedUserInfo[user_id]) + } else { + update.meta.users.push(null) + } } } + return callback(null, updates) } - return callback(null, updates) - }) + ) }, _validUserId(user_id) { @@ -830,7 +835,7 @@ module.exports = UpdatesManager = { // check if the user in this update is already present in the earliest update, // if not, add them to the users list of the earliest update earliestUpdate.meta.user_ids = _.union(earliestUpdate.meta.user_ids, [ - update.meta.user_id + update.meta.user_id, ]) doc_id = update.doc_id.toString() @@ -841,7 +846,7 @@ module.exports = UpdatesManager = { } else { earliestUpdate.docs[doc_id] = { fromV: update.v, - toV: update.v + toV: update.v, } } @@ -858,14 +863,14 @@ module.exports = UpdatesManager = { meta: { user_ids: [], start_ts: update.meta.start_ts, - end_ts: update.meta.end_ts + end_ts: update.meta.end_ts, }, - docs: {} + docs: {}, } newUpdate.docs[update.doc_id.toString()] = { fromV: update.v, - toV: update.v + toV: update.v, } newUpdate.meta.user_ids.push(update.meta.user_id) summarizedUpdates.push(newUpdate) @@ -873,7 +878,7 @@ module.exports = UpdatesManager = { } return summarizedUpdates - } + }, } function __guard__(value, transform) { diff --git a/services/track-changes/app/js/WebApiManager.js b/services/track-changes/app/js/WebApiManager.js index 2ab3bdfda1..b0706d8e71 100644 --- a/services/track-changes/app/js/WebApiManager.js +++ b/services/track-changes/app/js/WebApiManager.js @@ -13,7 +13,7 @@ let WebApiManager const request = require('requestretry') // allow retry on error https://github.com/FGRibreau/node-request-retry const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') // Don't let HTTP calls hang for a long time const MAX_HTTP_REQUEST_LENGTH = 15000 // 15 seconds @@ -36,8 +36,8 @@ module.exports = WebApiManager = { auth: { user: Settings.apis.web.user, pass: Settings.apis.web.pass, - sendImmediately: true - } + sendImmediately: true, + }, }, function (error, res, body) { if (error != null) { @@ -86,7 +86,7 @@ module.exports = WebApiManager = { id: user.id, email: user.email, first_name: user.first_name, - last_name: user.last_name + last_name: user.last_name, }) }) }, @@ -112,5 +112,5 @@ module.exports = WebApiManager = { } return callback(null, project) }) - } + }, } diff --git a/services/track-changes/app/js/mongodb.js b/services/track-changes/app/js/mongodb.js index e0d50a165b..a345d5ce70 100644 --- a/services/track-changes/app/js/mongodb.js +++ b/services/track-changes/app/js/mongodb.js @@ -1,4 +1,4 @@ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const { MongoClient, ObjectId } = require('mongodb') const clientPromise = MongoClient.connect( @@ -38,5 +38,5 @@ module.exports = { db, ObjectId, closeDb, - waitForDb + waitForDb, } diff --git a/services/track-changes/app/lib/diff_match_patch.js b/services/track-changes/app/lib/diff_match_patch.js index c4864d7bde..aeb2b1c570 100644 --- a/services/track-changes/app/lib/diff_match_patch.js +++ b/services/track-changes/app/lib/diff_match_patch.js @@ -178,7 +178,7 @@ diff_match_patch.prototype.diff_compute_ = function ( diffs = [ [DIFF_INSERT, longtext.substring(0, i)], [DIFF_EQUAL, shorttext], - [DIFF_INSERT, longtext.substring(i + shorttext.length)] + [DIFF_INSERT, longtext.substring(i + shorttext.length)], ] // Swap insertions for deletions if diff is reversed. if (text1.length > text2.length) { @@ -192,7 +192,7 @@ diff_match_patch.prototype.diff_compute_ = function ( // After the previous speedup, the character can't be an equality. return [ [DIFF_DELETE, text1], - [DIFF_INSERT, text2] + [DIFF_INSERT, text2], ] } @@ -415,7 +415,7 @@ diff_match_patch.prototype.diff_bisect_ = function (text1, text2, deadline) { // number of diffs equals number of characters, no commonality at all. return [ [DIFF_DELETE, text1], - [DIFF_INSERT, text2] + [DIFF_INSERT, text2], ] } @@ -716,7 +716,7 @@ diff_match_patch.prototype.diff_halfMatch_ = function (text1, text2) { best_longtext_b, best_shorttext_a, best_shorttext_b, - best_common + best_common, ] } else { return null @@ -809,7 +809,7 @@ diff_match_patch.prototype.diff_cleanupSemantic = function (diffs) { // Duplicate record. diffs.splice(equalities[equalitiesLength - 1], 0, [ DIFF_DELETE, - lastequality + lastequality, ]) // Change second copy to insert. diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT @@ -859,7 +859,7 @@ diff_match_patch.prototype.diff_cleanupSemantic = function (diffs) { // Overlap found. Insert an equality and trim the surrounding edits. diffs.splice(pointer, 0, [ DIFF_EQUAL, - insertion.substring(0, overlap_length1) + insertion.substring(0, overlap_length1), ]) diffs[pointer - 1][1] = deletion.substring( 0, @@ -877,7 +877,7 @@ diff_match_patch.prototype.diff_cleanupSemantic = function (diffs) { // Insert an equality and swap and trim the surrounding edits. diffs.splice(pointer, 0, [ DIFF_EQUAL, - deletion.substring(0, overlap_length2) + deletion.substring(0, overlap_length2), ]) diffs[pointer - 1][0] = DIFF_INSERT diffs[pointer - 1][1] = insertion.substring( @@ -1093,7 +1093,7 @@ diff_match_patch.prototype.diff_cleanupEfficiency = function (diffs) { // Duplicate record. diffs.splice(equalities[equalitiesLength - 1], 0, [ DIFF_DELETE, - lastequality + lastequality, ]) // Change second copy to insert. diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT @@ -1156,13 +1156,12 @@ diff_match_patch.prototype.diff_cleanupMerge = function (diffs) { diffs[pointer - count_delete - count_insert - 1][0] == DIFF_EQUAL ) { - diffs[ - pointer - count_delete - count_insert - 1 - ][1] += text_insert.substring(0, commonlength) + diffs[pointer - count_delete - count_insert - 1][1] += + text_insert.substring(0, commonlength) } else { diffs.splice(0, 0, [ DIFF_EQUAL, - text_insert.substring(0, commonlength) + text_insert.substring(0, commonlength), ]) pointer++ } @@ -1189,12 +1188,12 @@ diff_match_patch.prototype.diff_cleanupMerge = function (diffs) { if (count_delete === 0) { diffs.splice(pointer - count_insert, count_delete + count_insert, [ DIFF_INSERT, - text_insert + text_insert, ]) } else if (count_insert === 0) { diffs.splice(pointer - count_delete, count_delete + count_insert, [ DIFF_DELETE, - text_delete + text_delete, ]) } else { diffs.splice( diff --git a/services/track-changes/buildscript.txt b/services/track-changes/buildscript.txt index de6c7db932..36ed3a783a 100644 --- a/services/track-changes/buildscript.txt +++ b/services/track-changes/buildscript.txt @@ -3,6 +3,6 @@ track-changes --docker-repos=gcr.io/overleaf-ops --env-add=AWS_BUCKET=bucket --env-pass-through= ---node-version=12.21.0 +--node-version=12.22.3 --public-repo=True ---script-version=3.8.0 +--script-version=3.11.0 diff --git a/services/track-changes/config/settings.defaults.js b/services/track-changes/config/settings.defaults.js index 38ecce723a..faa8660b70 100755 --- a/services/track-changes/config/settings.defaults.js +++ b/services/track-changes/config/settings.defaults.js @@ -6,18 +6,18 @@ module.exports = { mongo: { options: { useUnifiedTopology: - (process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true' + (process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true', }, url: process.env.MONGO_CONNECTION_STRING || - `mongodb://${process.env.MONGO_HOST || 'localhost'}/sharelatex` + `mongodb://${process.env.MONGO_HOST || 'localhost'}/sharelatex`, }, internal: { trackchanges: { port: 3015, - host: process.env.LISTEN_ADDRESS || 'localhost' - } + host: process.env.LISTEN_ADDRESS || 'localhost', + }, }, apis: { documentupdater: { @@ -25,18 +25,18 @@ module.exports = { process.env.DOCUMENT_UPDATER_HOST || process.env.DOCUPDATER_HOST || 'localhost' - }:3003` + }:3003`, }, docstore: { - url: `http://${process.env.DOCSTORE_HOST || 'localhost'}:3016` + url: `http://${process.env.DOCSTORE_HOST || 'localhost'}:3016`, }, web: { url: `http://${ process.env.WEB_API_HOST || process.env.WEB_HOST || 'localhost' }:${process.env.WEB_API_PORT || process.env.WEB_PORT || 3000}`, user: process.env.WEB_API_USER || 'sharelatex', - pass: process.env.WEB_API_PASSWORD || 'password' - } + pass: process.env.WEB_API_PASSWORD || 'password', + }, }, redis: { lock: { @@ -49,8 +49,8 @@ module.exports = { }, historyIndexLock({ project_id: projectId }) { return `HistoryIndexLock:{${projectId}}` - } - } + }, + }, }, history: { host: process.env.REDIS_HOST || 'localhost', @@ -62,9 +62,9 @@ module.exports = { }, docsWithHistoryOps({ project_id: projectId }) { return `DocsWithHistoryOps:{${projectId}}` - } - } - } + }, + }, + }, }, trackchanges: { @@ -72,19 +72,19 @@ module.exports = { key: process.env.AWS_ACCESS_KEY_ID, secret: process.env.AWS_SECRET_ACCESS_KEY, endpoint: process.env.AWS_S3_ENDPOINT, - pathStyle: process.env.AWS_S3_PATH_STYLE === 'true' + pathStyle: process.env.AWS_S3_PATH_STYLE === 'true', }, stores: { - doc_history: process.env.AWS_BUCKET + doc_history: process.env.AWS_BUCKET, }, - continueOnError: process.env.TRACK_CHANGES_CONTINUE_ON_ERROR || false + continueOnError: process.env.TRACK_CHANGES_CONTINUE_ON_ERROR || false, }, path: { - dumpFolder: Path.join(TMP_DIR, 'dumpFolder') + dumpFolder: Path.join(TMP_DIR, 'dumpFolder'), }, sentry: { - dsn: process.env.SENTRY_DSN - } + dsn: process.env.SENTRY_DSN, + }, } diff --git a/services/track-changes/docker-compose.yml b/services/track-changes/docker-compose.yml index 89df8581d7..c4bac32698 100644 --- a/services/track-changes/docker-compose.yml +++ b/services/track-changes/docker-compose.yml @@ -6,7 +6,7 @@ version: "2.3" services: test_unit: - image: node:12.21.0 + image: node:12.22.3 volumes: - .:/app working_dir: /app @@ -18,7 +18,7 @@ services: user: node test_acceptance: - image: node:12.21.0 + image: node:12.22.3 volumes: - .:/app working_dir: /app diff --git a/services/track-changes/package-lock.json b/services/track-changes/package-lock.json index 73b894e8e2..0cb04e7652 100644 --- a/services/track-changes/package-lock.json +++ b/services/track-changes/package-lock.json @@ -5,152 +5,68 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" - } - }, - "@babel/generator": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.0.tgz", - "integrity": "sha512-onl4Oy46oGCzymOXtKMQpI7VXtCbTSHK1kqBydZ6AmzuNcacEVqGk9tZtAS+48IA9IstZcDCgIg8hQKnb7suRw==", - "dev": true, - "requires": { - "@babel/types": "^7.9.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", + "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", "dev": true }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.0.tgz", - "integrity": "sha512-Iwyp00CZsypoNJcpXCbq3G4tcDgphtlMwMVrMhhZ//XBkqjXF7LW6V511yk0+pBX3ZwwGnPea+pTKNJiqA7pUg==", - "dev": true - }, - "@babel/runtime": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", - "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "@eslint/eslintrc": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", + "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", "dev": true, "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/runtime-corejs3": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.9.0.tgz", - "integrity": "sha512-Fe3z3yVZNCUTaOFBAofwkEtFiYi7a7Gg2F5S1QX+mqP403i2iKJtyHJYEp/PV2ijUheT0PiKWbmXcqtwLhmBzg==", - "dev": true, - "requires": { - "core-js-pure": "^3.0.0", - "regenerator-runtime": "^0.13.4" + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" }, "dependencies": { - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true } } }, - "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" - } - }, - "@babel/traverse": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", - "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.0", - "@babel/types": "^7.9.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - } - }, - "@babel/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", - "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, "@google-cloud/common": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-2.4.0.tgz", @@ -229,11 +145,6 @@ "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.3.tgz", "integrity": "sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw==" }, - "acorn": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz", - "integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==" - }, "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", @@ -326,14 +237,6 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -905,6 +808,23 @@ "protobufjs": "^6.8.6" } }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@opencensus/core": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@opencensus/core/-/core-0.0.20.tgz", @@ -980,6 +900,11 @@ "ioredis": "~4.17.3" } }, + "@overleaf/settings": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@overleaf/settings/-/settings-2.1.1.tgz", + "integrity": "sha512-vcJwqCGFKmQxTP/syUqCeMaSRjHmBcQgKOACR9He2uJcErg2GZPa1go+nGvszMbkElM4HfRKm/MfxvqHhoN4TQ==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1084,23 +1009,11 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/console-log-level": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@types/console-log-level/-/console-log-level-1.4.0.tgz", "integrity": "sha512-x+OscEQwcx5Biair4enH7ov9W+clcqUWaZRaxn5IkT4yNWWjRr2oiYDkY/x1uXSTVZOQ2xlbFQySaQGB+VdXGQ==" }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/fs-extra": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", @@ -1109,12 +1022,6 @@ "@types/node": "*" } }, - "@types/json-schema": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", - "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", - "dev": true - }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -1130,58 +1037,11 @@ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==" }, - "@typescript-eslint/experimental-utils": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz", - "integrity": "sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "1.13.0", - "eslint-scope": "^4.0.0" - }, - "dependencies": { - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } - } - }, - "@typescript-eslint/parser": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.13.0.tgz", - "integrity": "sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "1.13.0", - "@typescript-eslint/typescript-estree": "1.13.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz", - "integrity": "sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==", - "dev": true, - "requires": { - "lodash.unescape": "4.0.1", - "semver": "5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - } - } + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true }, "JSONStream": { "version": "1.3.5", @@ -1230,15 +1090,14 @@ } }, "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", - "dev": true + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz", + "integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==" }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "agent-base": { @@ -1261,28 +1120,11 @@ } }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, - "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "dev": true, - "requires": { - "type-fest": "^0.11.0" - }, - "dependencies": { - "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", - "dev": true - } - } - }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -1299,9 +1141,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1331,48 +1173,50 @@ "sprintf-js": "~1.0.2" } }, - "aria-query": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", - "integrity": "sha512-majUxHgLehQTeSA+hClx+DY09OVUqG3GtezWkF1krgLGNdlDu9l9V8DaqNMWbq4Eddc8wsyDA0hpDUtnYxQEXw==", - "dev": true, - "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", "is-string": "^1.0.5" } }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + } } }, "arrify": { @@ -1380,6 +1224,14 @@ "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -1391,16 +1243,10 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", - "dev": true - }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { @@ -1458,37 +1304,6 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, - "axobject-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", - "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==", - "dev": true - }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "dependencies": { - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1513,9 +1328,9 @@ "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "bindings": { @@ -1577,12 +1392,6 @@ } } }, - "boolify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/boolify/-/boolify-1.0.1.tgz", - "integrity": "sha512-ma2q0Tc760dW54CdOyJjhrg/a54317o1zYADQJFgperNGKIKgAUGIcKnuMiff8z57+yGlrGNEt4lPgZfCgTJgA==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1638,14 +1447,12 @@ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==" }, "bunyan": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-2.0.2.tgz", - "integrity": "sha512-9/tdl5YpJ2FR1ldac8y+hAC3rLaVzXnrd1ZATS+ehg5VCpD+5vltW9VVWbMF8o5qiw4uQO0nEFK/wL7B2SDvpg==", - "dev": true, + "version": "1.8.15", + "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", + "integrity": "sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig==", "requires": { "dtrace-provider": "~0.8", - "exeunt": "1.1.0", - "moment": "^2.10.6", + "moment": "^2.19.3", "mv": "~2", "safe-json-stringify": "~1" } @@ -1660,6 +1467,16 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1667,22 +1484,11 @@ "dev": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, - "camelcase-keys": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.1.2.tgz", - "integrity": "sha512-QfFrU0CIw2oltVvpndW32kuJ/9YOJwUnmWrjlXt1nnJZHCaS9i6bfOpg9R4Lw8aZjStkJWM+jc0cdXjWBgVJSw==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1702,6 +1508,15 @@ "type-detect": "^4.0.5" } }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "requires": { + "check-error": "^1.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -1711,31 +1526,8 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -1748,19 +1540,18 @@ "dev": true }, "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "dev": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "readdirp": "~3.5.0" } }, "chownr": { @@ -1778,55 +1569,15 @@ "glob": "^7.1.1" } }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha512-EJLbKSuvHTrVRynOXCYFTbQKZOFXWNe3/6DN1yrEH3TuuZT1x4dMQnCHnfCrBUUiGjO63enEIfaB17VaRl2d4A==", - "dev": true - }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "cluster-key-slot": { @@ -1867,12 +1618,6 @@ "delayed-stream": "~1.0.0" } }, - "common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", - "dev": true - }, "compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -1937,12 +1682,6 @@ "resolved": "https://registry.npmjs.org/console-log-level/-/console-log-level-1.4.1.tgz", "integrity": "sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ==" }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha512-OKZnPGeMQy2RPaUIBPFFd71iNf4791H12MCRuVQDnzGRwCYNYmTDy5pdafo2SLAcEMKzTOQnLWG4QdcjeJUMEg==", - "dev": true - }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -1975,34 +1714,20 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, - "core-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", - "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==", - "dev": true - }, - "core-js-pure": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz", - "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "crypt": { @@ -2015,25 +1740,12 @@ "resolved": "https://registry.npmjs.org/d64/-/d64-1.0.0.tgz", "integrity": "sha1-QAKofoUMv8n52XBrYPymE6MzbpA=" }, - "damerau-levenshtein": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", - "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "requires": { "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - } } }, "debug": { @@ -2045,9 +1757,9 @@ } }, "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, "deep-eql": { @@ -2115,15 +1827,9 @@ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "doctrine": { @@ -2212,6 +1918,15 @@ "once": "^1.4.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -2227,22 +1942,24 @@ } }, "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "object-inspect": "^1.10.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" } }, "es-to-primitive": { @@ -2256,6 +1973,12 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2264,58 +1987,61 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.30.0.tgz", + "integrity": "sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.2", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -2324,87 +2050,130 @@ "uri-js": "^4.2.2" } }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "mkdirp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", - "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { - "minimist": "^1.2.5" + "yallist": "^4.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } }, "eslint-config-prettier": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", - "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true }, "eslint-config-standard": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", - "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", "dev": true }, - "eslint-config-standard-jsx": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", - "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", - "dev": true - }, - "eslint-config-standard-react": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-react/-/eslint-config-standard-react-9.2.0.tgz", - "integrity": "sha512-u+KRP2uCtthZ/W4DlLWCC59GZNV/y9k9yicWWammgTs/Omh8ZUUPF3EnYm81MAcbkYQq2Wg0oxutAhi/FQ8mIw==", - "dev": true, - "requires": { - "eslint-config-standard-jsx": "^8.0.0" - } - }, "eslint-import-resolver-node": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", - "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -2423,104 +2192,75 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, "eslint-module-utils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", - "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", + "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", "dev": true, "requires": { - "debug": "^2.6.9", + "debug": "^3.2.7", "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true } } }, "eslint-plugin-chai-expect": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.1.0.tgz", - "integrity": "sha512-rd0/4mjMV6c3i0o4DKkWI4uaFN9DK707kW+/fDphaDI6HVgxXnhML9Xgt5vHnTXmSSnDhupuCFBgsEAEpchXmQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-2.2.0.tgz", + "integrity": "sha512-ExTJKhgeYMfY8wDj3UiZmgpMKJOUHGNHmWMlxT49JUDB1vTnw0sSNfXJSxnX+LcebyBD/gudXzjzD136WqPJrQ==", "dev": true }, "eslint-plugin-chai-friendly": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.5.0.tgz", - "integrity": "sha512-Pxe6z8C9fP0pn2X2nGFU/b3GBOCM/5FVus1hsMwJsXP3R7RiXFl7g0ksJbsc0GxiLyidTW4mEFk77qsNn7Tk7g==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.6.0.tgz", + "integrity": "sha512-Uvvv1gkbRGp/qfN15B0kQyQWg+oFA8buDSqrwmW3egNSk/FpqH2MjQqKOuKwmEL6w4QIQrIjDp+gg6kGGmD3oQ==", "dev": true }, "eslint-plugin-es": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz", - "integrity": "sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", - "dev": true - } } }, "eslint-plugin-import": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz", - "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==", + "version": "2.23.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz", + "integrity": "sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==", "dev": true, "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", - "contains-path": "^0.1.0", + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.1", + "find-up": "^2.0.0", "has": "^1.0.3", + "is-core-module": "^2.4.0", "minimatch": "^3.0.4", - "object.values": "^1.1.0", - "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" + "object.values": "^1.1.3", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.9.0" }, "dependencies": { "debug": { @@ -2533,91 +2273,55 @@ } }, "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "has": "^1.0.3" } }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "eslint-plugin-jsx-a11y": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz", - "integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.5", - "aria-query": "^3.0.0", - "array-includes": "^3.0.3", - "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.2", - "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^7.0.2", - "has": "^1.0.3", - "jsx-ast-utils": "^2.2.1" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } }, "eslint-plugin-mocha": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz", - "integrity": "sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-8.2.0.tgz", + "integrity": "sha512-8oOR47Ejt+YJPNQzedbiklDqS1zurEaNrxXpRs+Uk4DMDPVmKNagShFeUaYsfvWP55AhI+P1non5QZAHV6K78A==", "dev": true, "requires": { - "eslint-utils": "^2.0.0", - "ramda": "^0.27.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - } + "eslint-utils": "^2.1.0", + "ramda": "^0.27.1" } }, "eslint-plugin-node": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz", - "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "requires": { "eslint-plugin-es": "^3.0.0", @@ -2628,30 +2332,12 @@ "semver": "^6.1.0" }, "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -2675,72 +2361,20 @@ "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "dev": true }, - "eslint-plugin-react": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz", - "integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.2.3", - "object.entries": "^1.1.1", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.15.1", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.2", - "xregexp": "^4.3.0" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-standard": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", - "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", - "dev": true - }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -2753,26 +2387,26 @@ "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, - "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true } } @@ -2784,21 +2418,26 @@ "dev": true }, "esquery": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", - "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -2837,12 +2476,6 @@ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==" }, - "exeunt": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/exeunt/-/exeunt-1.1.0.tgz", - "integrity": "sha512-dd++Yn/0Fp+gtJ04YHov7MeAii+LFivJc6KqnJNfplzLVUkUDrfKoQDTLlCgzcW15vY5hKlHasWeIsQJ8agHsw==", - "dev": true - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -2911,17 +2544,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -2954,22 +2576,13 @@ "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.1.tgz", "integrity": "sha512-x4FEgaz3zNRtJfLFqJmHWxkMDDvXVtaznj2V9jiP8ACUJrUgist4bP9FmDL2Vew2Y9mEQI/tG4GqabaitYp9CQ==" }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-uri-to-path": { @@ -3018,7 +2631,7 @@ "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" @@ -3030,63 +2643,24 @@ "integrity": "sha1-WKRmaX34piBc39vzlVNri9d3pfY=" }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } + "flatted": "^3.1.0" } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.1.tgz", + "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", "dev": true }, "forever-agent": { @@ -3127,13 +2701,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3226,11 +2793,16 @@ "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } }, "getpass": { "version": "0.1.7", @@ -3238,13 +2810,6 @@ "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "requires": { "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - } } }, "glob": { @@ -3261,19 +2826,22 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } }, "google-auth-library": { "version": "6.0.6", @@ -3418,9 +2986,9 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "growl": { @@ -3469,22 +3037,11 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - } - } + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true }, "has-flag": { "version": "3.0.0", @@ -3617,12 +3174,6 @@ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3642,108 +3193,6 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, - "inquirer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", - "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "run-async": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", - "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "internal-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz", - "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==", - "dev": true, - "requires": { - "es-abstract": "^1.17.0-next.1", - "has": "^1.0.3", - "side-channel": "^1.0.2" - } - }, "ioredis": { "version": "4.17.3", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", @@ -3773,7 +3222,13 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", "dev": true }, "is-binary-path": { @@ -3785,11 +3240,19 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { "version": "1.1.5", @@ -3814,7 +3277,7 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { @@ -3832,30 +3295,42 @@ "is-extglob": "^2.1.1" } }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "dev": true + }, "is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, - "is-promise": { + "is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha512-NECAi6wp6CgMesHuVUEK8JwjCvm/tvnn5pCbB42JOHp3mgUizN0nagXu4HEqQZBkieGEQ+jVcMKWqoVd6CDbLQ==", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2" } }, "is-stream": { @@ -3930,12 +3405,6 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-bigint": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-0.3.0.tgz", @@ -3944,6 +3413,12 @@ "bignumber.js": "^7.0.0" } }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -3965,6 +3440,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -3979,23 +3463,6 @@ "extsprintf": "1.3.0", "json-schema": "0.2.3", "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - } - } - }, - "jsx-ast-utils": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", - "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "object.assign": "^4.1.0" } }, "just-extend": { @@ -4024,13 +3491,13 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "line-reader": { @@ -4039,21 +3506,21 @@ "integrity": "sha512-AYJ8g+eE7v+Ba4s/cuYqzuNulH/WbjdKQ55fvx8fNVn8WQzTpioY6vI1MoxTuMgcHYX3VlmZWbVvnkIqkyJbCA==" }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^3.0.0" }, "dependencies": { "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } @@ -4061,7 +3528,7 @@ "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { "p-locate": "^2.0.0", @@ -4083,6 +3550,12 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", @@ -4104,22 +3577,16 @@ "resolved": "https://registry.npmjs.org/lodash.has/-/lodash.has-4.5.2.tgz", "integrity": "sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI=" }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha512-DhhGRshNS1aX6s5YdBE3njCCouPgnG29ebyHvImlZzXZf2SHgt+J08DHgytTPnpywNbO1Y8mNUFyQuIDBq2JZg==", + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, "log-driver": { @@ -4128,12 +3595,63 @@ "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "logger-sharelatex": { @@ -4149,17 +3667,6 @@ "yn": "^4.0.0" }, "dependencies": { - "bunyan": { - "version": "1.8.14", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.14.tgz", - "integrity": "sha512-LlahJUxXzZLuw/hetUQJmRgZ1LF6+cr5TPpRj6jf327AsiIq2jhYEH4oqUUkVKTor+9w2BT3oxVwhzE5lw9tcg==", - "requires": { - "dtrace-provider": "~0.8", - "moment": "^2.19.3", - "mv": "~2", - "safe-json-stringify": "~1" - } - }, "yn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-4.0.0.tgz", @@ -4167,78 +3674,11 @@ } } }, - "loglevel": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", - "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==", - "dev": true - }, - "loglevel-colored-level-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz", - "integrity": "sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "loglevel": "^1.4.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4247,24 +3687,6 @@ "yallist": "^3.0.2" } }, - "make-plural": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz", - "integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true, - "optional": true - } - } - }, "map-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", @@ -4278,13 +3700,6 @@ "charenc": "0.0.2", "crypt": "0.0.2", "is-buffer": "~1.1.6" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - } } }, "media-typer": { @@ -4309,29 +3724,6 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, - "messageformat": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz", - "integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==", - "dev": true, - "requires": { - "make-plural": "^4.3.0", - "messageformat-formatters": "^2.0.1", - "messageformat-parser": "^4.1.2" - } - }, - "messageformat-formatters": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz", - "integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==", - "dev": true - }, - "messageformat-parser": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.2.tgz", - "integrity": "sha512-7dWuifeyldz7vhEuL96Kwq1fhZXBW+TUfbnHN4UCrCxoXQTYjHnR78eI66Gk9LaLLsAvzPNVJBaa66DRfFNaiA==", - "dev": true - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -4355,12 +3747,6 @@ "mime-db": "~1.37.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -4370,9 +3756,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minipass": { "version": "2.9.0", @@ -4397,167 +3783,153 @@ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - } } }, "mocha": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", - "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.3", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "ms": "^2.1.1" + "color-convert": "^2.0.1" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "mkdirp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", - "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^3.0.2" } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "has-flag": "^4.0.0" } } } @@ -4596,12 +3968,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "mv": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", @@ -4611,17 +3977,6 @@ "mkdirp": "~0.5.1", "ncp": "~2.0.0", "rimraf": "~2.4.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "optional": true, - "requires": { - "minimist": "0.0.8" - } - } } }, "nan": { @@ -4630,6 +3985,12 @@ "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "optional": true }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4672,12 +4033,6 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "nise": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", @@ -4691,24 +4046,6 @@ "path-to-regexp": "^1.7.0" } }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -4823,9 +4160,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, "object-keys": { @@ -4835,61 +4172,26 @@ "dev": true }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.entries": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", - "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "object.fromentries": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", - "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "es-abstract": "^1.18.2" } }, "on-finished": { @@ -4913,27 +4215,18 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "os-homedir": { @@ -4956,18 +4249,17 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" @@ -4981,19 +4273,13 @@ "requires": { "p-try": "^1.0.0" } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true } } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "parent-module": { @@ -5011,12 +4297,13 @@ "integrity": "sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg==" }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse-ms": { @@ -5040,16 +4327,10 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -5075,18 +4356,18 @@ } }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "^3.0.0" }, "dependencies": { "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } @@ -5103,9 +4384,9 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "pify": { @@ -5116,7 +4397,16 @@ "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha512-ojakdnUgL5pzJYWw2AIDEupaQCX5OPbM688ZevubICjdIX01PRSYKqm33fJoCOJBRseYCTUlQRnBNX+Pchaejw==", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", "dev": true, "requires": { "find-up": "^2.1.0" @@ -5149,14 +4439,6 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, "protobufjs": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", @@ -5185,617 +4467,17 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.1.tgz", - "integrity": "sha512-piXGBcY1zoFOG0MvHpNE5reAGseLmaCRifQ/fmfF49BcYkInEs/naD/unxGNAeOKFA5+JxVrPyMvMlpzcd20UA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", "dev": true }, - "prettier-eslint": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-9.0.1.tgz", - "integrity": "sha512-KZT65QTosSAqBBqmrC+RpXbsMRe7Os2YSR9cAfFbDlyPAopzA/S5bioiZ3rpziNQNSJaOxmtXSx07EQ+o2Dlug==", - "dev": true, - "requires": { - "@typescript-eslint/parser": "^1.10.2", - "common-tags": "^1.4.0", - "core-js": "^3.1.4", - "dlv": "^1.1.0", - "eslint": "^5.0.0", - "indent-string": "^4.0.0", - "lodash.merge": "^4.6.0", - "loglevel-colored-level-prefix": "^1.0.0", - "prettier": "^1.7.0", - "pretty-format": "^23.0.1", - "require-relative": "^0.8.7", - "typescript": "^3.2.1", - "vue-eslint-parser": "^2.0.2" - }, - "dependencies": { - "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha512-wFUFA5bg5dviipbQQ32yOQhl6gcJaJXiHE7dvR8VYPG97+J/GNC5FKGepKdEDUFeXRzDxPF1X/Btc8L+v7oqIQ==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - } - } - }, - "prettier-eslint-cli": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/prettier-eslint-cli/-/prettier-eslint-cli-5.0.0.tgz", - "integrity": "sha512-cei9UbN1aTrz3sQs88CWpvY/10PYTevzd76zoG1tdJ164OhmNTFRKPTOZrutVvscoQWzbnLKkviS3gu5JXwvZg==", - "dev": true, - "requires": { - "arrify": "^2.0.1", - "boolify": "^1.0.0", - "camelcase-keys": "^6.0.0", - "chalk": "^2.4.2", - "common-tags": "^1.8.0", - "core-js": "^3.1.4", - "eslint": "^5.0.0", - "find-up": "^4.1.0", - "get-stdin": "^7.0.0", - "glob": "^7.1.4", - "ignore": "^5.1.2", - "lodash.memoize": "^4.1.2", - "loglevel-colored-level-prefix": "^1.0.0", - "messageformat": "^2.2.1", - "prettier-eslint": "^9.0.0", - "rxjs": "^6.5.2", - "yargs": "^13.2.4" - }, - "dependencies": { - "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha512-wFUFA5bg5dviipbQQ32yOQhl6gcJaJXiHE7dvR8VYPG97+J/GNC5FKGepKdEDUFeXRzDxPF1X/Btc8L+v7oqIQ==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - } - } - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -5805,24 +4487,6 @@ "fast-diff": "^1.1.2" } }, - "pretty-format": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", - "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha512-wFUFA5bg5dviipbQQ32yOQhl6gcJaJXiHE7dvR8VYPG97+J/GNC5FKGepKdEDUFeXRzDxPF1X/Btc8L+v7oqIQ==", - "dev": true - } - } - }, "pretty-ms": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", @@ -5850,17 +4514,6 @@ "tdigest": "^0.1.1" } }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, "protobufjs": { "version": "6.8.9", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.9.tgz", @@ -5952,17 +4605,20 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "ramda": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", + "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==", "dev": true }, - "ramda": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz", - "integrity": "sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA==", - "dev": true + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } }, "range-parser": { "version": "1.2.1", @@ -6020,11 +4676,6 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -6032,31 +4683,25 @@ } } }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "read-pkg": "^3.0.0" } }, "readable-stream": { @@ -6074,12 +4719,12 @@ } }, "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { - "picomatch": "^2.0.4" + "picomatch": "^2.2.1" } }, "redis": { @@ -6105,26 +4750,10 @@ "redis-errors": "^1.0.0" } }, - "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", - "dev": true - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "request": { @@ -6182,6 +4811,12 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-in-the-middle": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.1.0.tgz", @@ -6190,17 +4825,6 @@ "debug": "^4.1.1", "module-details-from-path": "^1.0.3", "resolve": "^1.12.0" - }, - "dependencies": { - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - } } }, "require-like": { @@ -6209,18 +4833,6 @@ "integrity": "sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "require-relative": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", - "integrity": "sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==", - "dev": true - }, "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", @@ -6231,11 +4843,11 @@ } }, "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", - "dev": true, + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "requires": { + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, @@ -6244,16 +4856,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", "integrity": "sha512-qpFcKaXsq8+oRoLilkwyc7zHGF5i9Q2/25NIgLQQ/+VVv9rU4qvr6nXVAw1DsnXJyQkZsR4Ytfbtg5ehfcUssQ==" }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "retry-request": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.1.1.tgz", @@ -6284,36 +4886,9 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } } } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha512-Fx+QT3fGtS0jk8OvKyKgAB2YHPsrmqBRcMeTC5AZ+lp4vzXKPPrFSY3iLdgvjA3HVBkIvJeM6J80LRjx8bQwhA==", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "s3-streams": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/s3-streams/-/s3-streams-0.4.0.tgz", @@ -6418,6 +4993,15 @@ } } }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -6439,34 +5023,19 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, - "settings-sharelatex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/settings-sharelatex/-/settings-sharelatex-1.1.0.tgz", - "integrity": "sha512-f7D+0lnlohoteSn6IKTH72NE+JnAdMWTKwQglAuimZWTID2FRRItZSGeYMTRpvEnaQApkoVwRp//WRMsiddnqw==", - "requires": { - "coffee-script": "1.6.0" - }, - "dependencies": { - "coffee-script": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.0.tgz", - "integrity": "sha512-Tx8itEfCsQp8RbLDFt7qwjqXycAx2g6SI7//4PPUR2j6meLmNifYm6zKrNDcU1+Q/GWRhjhEZk7DaLG1TfIzGA==" - } - } - }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "shimmer": { @@ -6474,16 +5043,6 @@ "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" }, - "side-channel": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz", - "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==", - "dev": true, - "requires": { - "es-abstract": "^1.17.0-next.1", - "object-inspect": "^1.7.0" - } - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -6528,20 +5087,20 @@ } }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true } } @@ -6579,9 +5138,9 @@ } }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -6589,15 +5148,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -6605,9 +5164,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", "dev": true }, "split": { @@ -6638,21 +5197,6 @@ "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" - }, - "dependencies": { - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - } } }, "stack-trace": { @@ -6685,59 +5229,34 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, - "string.prototype.matchall": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz", - "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==", + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "has-symbols": "^1.0.1", - "internal-slot": "^1.0.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -6749,32 +5268,24 @@ } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "ansi-regex": "^5.0.0" } }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "stubs": { @@ -6783,66 +5294,44 @@ "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.1.tgz", + "integrity": "sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true - }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } } } }, @@ -6917,21 +5406,6 @@ "integrity": "sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A==", "dev": true }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, "to-no-case": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", @@ -6983,11 +5457,16 @@ } } }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true + "tsconfig-paths": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "dev": true, + "requires": { + "json5": "^2.2.0", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } }, "tunnel-agent": { "version": "0.6.0", @@ -7003,12 +5482,12 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -7018,9 +5497,9 @@ "dev": true }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "type-is": { @@ -7047,11 +5526,25 @@ } } }, - "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", - "dev": true + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + } + } }, "underscore": { "version": "1.13.1", @@ -7103,9 +5596,9 @@ "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "validate-npm-package-license": { @@ -7131,81 +5624,6 @@ "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" - } - } - }, - "vue-eslint-parser": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz", - "integrity": "sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "lodash": "^4.17.4" - }, - "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha512-AU7pnZkguthwBjKgCg6998ByQNIMjbuDQZ8bb78QAFZwPfmKia8AIzgY/gWgqCjnht8JLdXmB4YxA0KaV60ncQ==", - "dev": true, - "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==", - "dev": true - } - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" - } - } } }, "walkdir": { @@ -7219,19 +5637,26 @@ "integrity": "sha512-5cZ7mecD3eYcMiCH4wtRPA5iFJZ50BJYDfckI5RRpQiktMiYTcn0ccLTZOvcbBume+1304fQztxeNzNS9Gvrnw==" }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", - "dev": true + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } }, "wide-align": { "version": "1.1.3", @@ -7276,40 +5701,20 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "dev": true + }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "wrappy": { @@ -7317,26 +5722,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -7351,19 +5736,10 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==" }, - "xregexp": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz", - "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==", - "dev": true, - "requires": { - "@babel/runtime-corejs3": "^7.8.3" - } - }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { @@ -7372,95 +5748,36 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true }, "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" } }, "yn": { diff --git a/services/track-changes/package.json b/services/track-changes/package.json index 805610ad5e..d3a2d990db 100644 --- a/services/track-changes/package.json +++ b/services/track-changes/package.json @@ -13,19 +13,22 @@ "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", "nodemon": "nodemon --config nodemon.json", - "lint": "node_modules/.bin/eslint --max-warnings 0 .", - "format": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --list-different", - "format:fix": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --write" + "lint": "eslint --max-warnings 0 --format unix .", + "format": "prettier --list-different $PWD/'**/*.js'", + "format:fix": "prettier --write $PWD/'**/*.js'", + "lint:fix": "eslint --fix ." }, "dependencies": { "@overleaf/metrics": "^3.5.1", "@overleaf/o-error": "^3.1.0", "@overleaf/redis-wrapper": "^2.0.0", + "@overleaf/settings": "^2.1.1", "JSONStream": "^1.3.5", "async": "^2.6.3", "aws-sdk": "^2.643.0", "body-parser": "^1.19.0", "bson": "^1.1.5", + "bunyan": "^1.8.15", "byline": "^5.0.0", "express": "4.17.1", "heap": "^0.2.6", @@ -37,33 +40,25 @@ "request": "~2.88.2", "requestretry": "^4.1.0", "s3-streams": "^0.4.0", - "settings-sharelatex": "^1.1.0", "underscore": "~1.13.1" }, "devDependencies": { - "babel-eslint": "^10.1.0", - "bunyan": "~2.0.2", - "chai": "~4.2.0", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", "cli": "^1.0.1", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-config-standard": "^14.1.0", - "eslint-config-standard-jsx": "^8.1.0", - "eslint-config-standard-react": "^9.2.0", - "eslint-plugin-chai-expect": "^2.1.0", - "eslint-plugin-chai-friendly": "^0.5.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-mocha": "^6.3.0", - "eslint-plugin-node": "^11.0.0", + "eslint": "^7.21.0", + "eslint-config-prettier": "^8.1.0", + "eslint-config-standard": "^16.0.2", + "eslint-plugin-chai-expect": "^2.2.0", + "eslint-plugin-chai-friendly": "^0.6.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.19.0", - "eslint-plugin-standard": "^4.0.1", "memorystream": "0.3.1", - "mocha": "^7.1.1", - "prettier": "^2.0.0", - "prettier-eslint-cli": "^5.0.0", + "mocha": "^8.3.2", + "prettier": "^2.2.1", "sandboxed-module": "~2.0.3", "sinon": "~9.0.1", "timekeeper": "2.2.0" diff --git a/services/track-changes/test/acceptance/js/AppendingUpdatesTests.js b/services/track-changes/test/acceptance/js/AppendingUpdatesTests.js index def0bdfa1d..9292005ba7 100644 --- a/services/track-changes/test/acceptance/js/AppendingUpdatesTests.js +++ b/services/track-changes/test/acceptance/js/AppendingUpdatesTests.js @@ -13,7 +13,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const request = require('request') const rclient = require('redis').createClient(Settings.redis.history) // Only works locally for now @@ -39,20 +39,20 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 + v: 3, }, { op: [{ i: 'o', p: 4 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 4 + v: 4, }, { op: [{ i: 'o', p: 5 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 5 - } + v: 5, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -76,8 +76,8 @@ describe('Appending doc ops to the history', function () { return expect(this.updates[0].pack[0].op).to.deep.equal([ { p: 3, - i: 'foo' - } + i: 'foo', + }, ]) }) @@ -121,20 +121,20 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 + v: 3, }, { op: [{ i: 'o', p: 4 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 4 + v: 4, }, { op: [{ i: 'o', p: 5 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 5 - } + v: 5, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -162,20 +162,20 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'b', p: 6 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 6 + v: 6, }, { op: [{ i: 'a', p: 7 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 7 + v: 7, }, { op: [{ i: 'r', p: 8 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 8 - } + v: 8, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -199,8 +199,8 @@ describe('Appending doc ops to the history', function () { return expect(this.updates[0].pack[1].op).to.deep.equal([ { p: 6, - i: 'bar' - } + i: 'bar', + }, ]) }) @@ -219,20 +219,20 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'b', p: 6 }], meta: { ts: Date.now() + oneDay, user_id: this.user_id }, - v: 6 + v: 6, }, { op: [{ i: 'a', p: 7 }], meta: { ts: Date.now() + oneDay, user_id: this.user_id }, - v: 7 + v: 7, }, { op: [{ i: 'r', p: 8 }], meta: { ts: Date.now() + oneDay, user_id: this.user_id }, - v: 8 - } + v: 8, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -256,14 +256,14 @@ describe('Appending doc ops to the history', function () { expect(this.updates[0].pack[0].op).to.deep.equal([ { p: 3, - i: 'foo' - } + i: 'foo', + }, ]) return expect(this.updates[0].pack[1].op).to.deep.equal([ { p: 6, - i: 'bar' - } + i: 'bar', + }, ]) }) }) @@ -281,7 +281,7 @@ describe('Appending doc ops to the history', function () { updates.push({ op: [{ i: 'a', p: 0 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: i + v: i, }) this.expectedOp[0].i = `a${this.expectedOp[0].i}` } @@ -290,7 +290,7 @@ describe('Appending doc ops to the history', function () { this.project_id, this.doc_id, updates, - (error) => { + error => { if (error != null) { throw error } @@ -334,22 +334,22 @@ describe('Appending doc ops to the history', function () { op: [ { i: 'f', p: 3 }, { i: 'o', p: 4 }, - { i: 'o', p: 5 } + { i: 'o', p: 5 }, ], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 + v: 3, }, { op: [ { i: 'b', p: 6 }, { i: 'a', p: 7 }, - { i: 'r', p: 8 } + { i: 'r', p: 8 }, ], meta: { ts: Date.now() + oneDay, user_id: this.user_id }, - v: 4 - } + v: 4, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -373,14 +373,14 @@ describe('Appending doc ops to the history', function () { expect(this.updates[0].pack[0].op).to.deep.equal([ { p: 3, - i: 'foo' - } + i: 'foo', + }, ]) return expect(this.updates[0].pack[1].op).to.deep.equal([ { p: 6, - i: 'bar' - } + i: 'bar', + }, ]) }) @@ -404,15 +404,15 @@ describe('Appending doc ops to the history', function () { { op: [], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 + v: 3, }, { op: [{ i: 'foo', p: 3 }], meta: { ts: Date.now() + oneDay, user_id: this.user_id }, - v: 4 - } + v: 4, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -440,8 +440,8 @@ describe('Appending doc ops to the history', function () { return expect(this.updates[0].pack[1].op).to.deep.equal([ { p: 3, - i: 'foo' - } + i: 'foo', + }, ]) }) @@ -464,13 +464,13 @@ describe('Appending doc ops to the history', function () { { op: [ { c: 'foo', p: 3 }, - { d: 'bar', p: 6 } + { d: 'bar', p: 6 }, ], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -492,7 +492,7 @@ describe('Appending doc ops to the history', function () { it('should ignore the comment op', function () { return expect(this.updates[0].pack[0].op).to.deep.equal([ - { d: 'bar', p: 6 } + { d: 'bar', p: 6 }, ]) }) @@ -515,10 +515,10 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } @@ -557,10 +557,10 @@ describe('Appending doc ops to the history', function () { { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } diff --git a/services/track-changes/test/acceptance/js/ArchivingUpdatesTests.js b/services/track-changes/test/acceptance/js/ArchivingUpdatesTests.js index a17ad6f1de..09435bc80c 100644 --- a/services/track-changes/test/acceptance/js/ArchivingUpdatesTests.js +++ b/services/track-changes/test/acceptance/js/ArchivingUpdatesTests.js @@ -17,7 +17,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { db, ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const request = require('request') const rclient = require('redis').createClient(Settings.redis.history) // Only works locally for now @@ -32,9 +32,9 @@ describe('Archiving updates', function () { __guard__( __guard__( Settings != null ? Settings.trackchanges : undefined, - (x1) => x1.s3 + x1 => x1.s3 ), - (x) => x.key.length + x => x.key.length ) < 1 ) { const message = new Error('s3 keys not setup, this test setup will fail') @@ -57,8 +57,8 @@ describe('Archiving updates', function () { MockWebApi.projects[this.project_id] = { features: { - versioning: true - } + versioning: true, + }, } sinon.spy(MockWebApi, 'getProjectDetails') @@ -66,13 +66,13 @@ describe('Archiving updates', function () { email: 'user@sharelatex.com', first_name: 'Leo', last_name: 'Lion', - id: this.user_id + id: this.user_id, } sinon.spy(MockWebApi, 'getUserInfo') MockDocStoreApi.docs[this.doc_id] = this.doc = { _id: this.doc_id, - project_id: this.project_id + project_id: this.project_id, } sinon.spy(MockDocStoreApi, 'getAllDoc') @@ -85,15 +85,15 @@ describe('Archiving updates', function () { this.updates.push({ op: [{ i: 'a', p: 0 }], meta: { ts: this.now + (i - 2048) * this.hours, user_id: this.user_id }, - v: 2 * i + 1 + v: 2 * i + 1, }) this.updates.push({ op: [{ i: 'b', p: 0 }], meta: { ts: this.now + (i - 2048) * this.hours + 10 * this.minutes, - user_id: this.user_id_2 + user_id: this.user_id_2, }, - v: 2 * i + 2 + v: 2 * i + 2, }) } TrackChangesApp.ensureRunning(() => { @@ -101,14 +101,14 @@ describe('Archiving updates', function () { this.project_id, this.doc_id, this.updates, - (error) => { + error => { if (error != null) { throw error } return TrackChangesClient.flushDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -163,7 +163,7 @@ describe('Archiving updates', function () { const expectedExportedUpdates = this.updates .slice() .reverse() - .map((update) => { + .map(update => { // clone object, updates are created once in before handler const exportedUpdate = Object.assign({}, update) exportedUpdate.meta = Object.assign({}, update.meta) @@ -180,7 +180,7 @@ describe('Archiving updates', function () { expect(this.exportedUpdates).to.deep.equal(expectedExportedUpdates) expect(this.exportedUserIds).to.deep.equal([ this.user_id, - this.user_id_2 + this.user_id_2, ]) }) }) @@ -192,16 +192,12 @@ describe('Archiving updates', function () { describe("archiving a doc's updates", function () { before(function (done) { - TrackChangesClient.pushDocHistory( - this.project_id, - this.doc_id, - (error) => { - if (error != null) { - throw error - } - return done() + TrackChangesClient.pushDocHistory(this.project_id, this.doc_id, error => { + if (error != null) { + throw error } - ) + return done() + }) return null }) @@ -222,7 +218,7 @@ describe('Archiving updates', function () { return db.docHistory.deleteMany( { doc_id: ObjectId(this.doc_id), - expiresAt: { $exists: true } + expiresAt: { $exists: true }, }, (err, result) => { if (typeof error !== 'undefined' && error !== null) { @@ -295,16 +291,12 @@ describe('Archiving updates', function () { return describe("unarchiving a doc's updates", function () { before(function (done) { - TrackChangesClient.pullDocHistory( - this.project_id, - this.doc_id, - (error) => { - if (error != null) { - throw error - } - return done() + TrackChangesClient.pullDocHistory(this.project_id, this.doc_id, error => { + if (error != null) { + throw error } - ) + return done() + }) return null }) diff --git a/services/track-changes/test/acceptance/js/FlushingUpdatesTests.js b/services/track-changes/test/acceptance/js/FlushingUpdatesTests.js index c9adeb5fd8..65e5ecc468 100644 --- a/services/track-changes/test/acceptance/js/FlushingUpdatesTests.js +++ b/services/track-changes/test/acceptance/js/FlushingUpdatesTests.js @@ -13,7 +13,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const request = require('request') const rclient = require('redis').createClient(Settings.redis.history) // Only works locally for now @@ -40,17 +40,17 @@ describe('Flushing updates', function () { { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } return TrackChangesClient.flushDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -67,8 +67,8 @@ describe('Flushing updates', function () { expect(updates[0].pack[0].op).to.deep.equal([ { p: 3, - i: 'f' - } + i: 'f', + }, ]) return done() }) @@ -87,8 +87,8 @@ describe('Flushing updates', function () { MockWebApi.projects[this.project_id] = { features: { - versioning: true - } + versioning: true, + }, } TrackChangesClient.pushRawUpdates( @@ -98,19 +98,19 @@ describe('Flushing updates', function () { { op: [{ i: 'g', p: 2 }], meta: { ts: Date.now() - 2 * this.weeks, user_id: this.user_id }, - v: 2 + v: 2, }, { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } - return TrackChangesClient.flushProject(this.project_id, (error) => { + return TrackChangesClient.flushProject(this.project_id, error => { if (error != null) { throw error } @@ -154,8 +154,8 @@ describe('Flushing updates', function () { MockWebApi.projects[this.project_id] = { features: { - versioning: false - } + versioning: false, + }, } TrackChangesClient.pushRawUpdates( @@ -165,19 +165,19 @@ describe('Flushing updates', function () { { op: [{ i: 'g', p: 2 }], meta: { ts: Date.now() - 2 * this.weeks, user_id: this.user_id }, - v: 2 + v: 2, }, { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } - return TrackChangesClient.flushProject(this.project_id, (error) => { + return TrackChangesClient.flushProject(this.project_id, error => { if (error != null) { throw error } @@ -210,13 +210,13 @@ describe('Flushing updates', function () { MockWebApi.projects[this.project_id] = { features: { - versioning: false - } + versioning: false, + }, } TrackChangesClient.setPreserveHistoryForProject( this.project_id, - (error) => { + error => { if (error != null) { throw error } @@ -228,23 +228,23 @@ describe('Flushing updates', function () { op: [{ i: 'g', p: 2 }], meta: { ts: Date.now() - 2 * this.weeks, - user_id: this.user_id + user_id: this.user_id, }, - v: 2 + v: 2, }, { op: [{ i: 'f', p: 3 }], meta: { ts: Date.now(), user_id: this.user_id }, - v: 3 - } + v: 3, + }, ], - (error) => { + error => { if (error != null) { throw error } return TrackChangesClient.flushProject( this.project_id, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/track-changes/test/acceptance/js/GettingADiffTests.js b/services/track-changes/test/acceptance/js/GettingADiffTests.js index 9ccc2cca36..f2de3d7d7f 100644 --- a/services/track-changes/test/acceptance/js/GettingADiffTests.js +++ b/services/track-changes/test/acceptance/js/GettingADiffTests.js @@ -12,7 +12,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const TrackChangesApp = require('./helpers/TrackChangesApp') const TrackChangesClient = require('./helpers/TrackChangesClient') @@ -35,7 +35,7 @@ describe('Getting a diff', function () { email: 'user@sharelatex.com', first_name: 'Leo', last_name: 'Lion', - id: this.user_id + id: this.user_id, } sinon.spy(MockWebApi, 'getUserInfo') @@ -45,23 +45,23 @@ describe('Getting a diff', function () { { op: [{ i: 'one ', p: 0 }], meta: { ts: this.from - twoMinutes, user_id: this.user_id }, - v: 3 + v: 3, }, { op: [{ i: 'two ', p: 4 }], meta: { ts: this.from + twoMinutes, user_id: this.user_id }, - v: (this.fromVersion = 4) + v: (this.fromVersion = 4), }, { op: [{ i: 'three ', p: 8 }], meta: { ts: this.to - twoMinutes, user_id: this.user_id }, - v: (this.toVersion = 5) + v: (this.toVersion = 5), }, { op: [{ i: 'four', p: 14 }], meta: { ts: this.to + twoMinutes, user_id: this.user_id }, - v: 6 - } + v: 6, + }, ] this.lines = ['one two three four'] this.expected_diff = [ @@ -71,21 +71,21 @@ describe('Getting a diff', function () { meta: { start_ts: this.from + twoMinutes, end_ts: this.to - twoMinutes, - user: this.user - } - } + user: this.user, + }, + }, ] MockDocUpdaterApi.docs[this.doc_id] = { lines: this.lines, - version: 7 + version: 7, } TrackChangesApp.ensureRunning(() => { return TrackChangesClient.pushRawUpdates( this.project_id, this.doc_id, this.updates, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/track-changes/test/acceptance/js/GettingUpdatesTests.js b/services/track-changes/test/acceptance/js/GettingUpdatesTests.js index f216d987a4..d3fce21171 100644 --- a/services/track-changes/test/acceptance/js/GettingUpdatesTests.js +++ b/services/track-changes/test/acceptance/js/GettingUpdatesTests.js @@ -13,7 +13,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const TrackChangesApp = require('./helpers/TrackChangesApp') const TrackChangesClient = require('./helpers/TrackChangesClient') @@ -33,15 +33,15 @@ describe('Getting updates', function () { MockWebApi.projects[this.project_id] = { features: { - versioning: true - } + versioning: true, + }, } MockWebApi.users[this.user_id] = this.user = { email: 'user@sharelatex.com', first_name: 'Leo', last_name: 'Lion', - id: this.user_id + id: this.user_id, } sinon.spy(MockWebApi, 'getUserInfo') @@ -51,14 +51,14 @@ describe('Getting updates', function () { op: [{ i: 'a', p: 0 }], meta: { ts: this.now - (9 - i) * this.hours - 2 * this.minutes, - user_id: this.user_id + user_id: this.user_id, }, - v: 2 * i + 1 + v: 2 * i + 1, }) this.updates.push({ op: [{ i: 'b', p: 0 }], meta: { ts: this.now - (9 - i) * this.hours, user_id: this.user_id }, - v: 2 * i + 2 + v: 2 * i + 2, }) } this.updates[0].meta.user_id = this.deleted_user_id @@ -68,7 +68,7 @@ describe('Getting updates', function () { this.project_id, this.doc_id, this.updates, - (error) => { + error => { if (error != null) { throw error } @@ -82,7 +82,7 @@ describe('Getting updates', function () { after() { MockWebApi.getUserInfo.restore() return null - } + }, }) describe('getting updates up to the limit', function () { @@ -118,25 +118,25 @@ describe('Getting updates', function () { meta: { start_ts: this.to - 2 * this.minutes, end_ts: this.to, - users: [this.user] - } + users: [this.user], + }, }, { docs: docs2, meta: { start_ts: this.to - 1 * this.hours - 2 * this.minutes, end_ts: this.to - 1 * this.hours, - users: [this.user] - } + users: [this.user], + }, }, { docs: docs3, meta: { start_ts: this.to - 2 * this.hours - 2 * this.minutes, end_ts: this.to - 2 * this.hours, - users: [this.user] - } - } + users: [this.user], + }, + }, ]) }) }) @@ -168,17 +168,17 @@ describe('Getting updates', function () { meta: { start_ts: this.to - 8 * this.hours - 2 * this.minutes, end_ts: this.to - 8 * this.hours, - users: [this.user] - } + users: [this.user], + }, }, { docs: docs2, meta: { start_ts: this.to - 9 * this.hours - 2 * this.minutes, end_ts: this.to - 9 * this.hours, - users: [this.user, null] - } - } + users: [this.user, null], + }, + }, ]) }) }) diff --git a/services/track-changes/test/acceptance/js/LockManagerTests.js b/services/track-changes/test/acceptance/js/LockManagerTests.js index 7062a83237..104e7c3220 100644 --- a/services/track-changes/test/acceptance/js/LockManagerTests.js +++ b/services/track-changes/test/acceptance/js/LockManagerTests.js @@ -11,7 +11,7 @@ */ const sinon = require('sinon') const { expect } = require('chai') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const LockManager = require('../../../app/js/LockManager') const rclient = require('redis').createClient(Settings.redis.history) // Only works locally for now const TrackChangesApp = require('./helpers/TrackChangesApp') @@ -27,24 +27,24 @@ describe('Locking document', function () { LockManager.LOCK_TTL = 1 // second LockManager.runWithLock( 'doc123', - (releaseA) => { + releaseA => { // we create a lock A and allow it to expire in redis return setTimeout( () => // now we create a new lock B and try to release A LockManager.runWithLock( 'doc123', - (releaseB) => { + releaseB => { return releaseA() }, // try to release lock A to see if it wipes out lock B - (error) => {} + error => {} ), // we never release lock B so nothing should happen here 1500 ) }, // enough time to wait until the lock has expired - (error) => + error => // we get here after trying to release lock A done() ) diff --git a/services/track-changes/test/acceptance/js/RestoringVersions.js b/services/track-changes/test/acceptance/js/RestoringVersions.js index a947dc09df..312d92bef9 100644 --- a/services/track-changes/test/acceptance/js/RestoringVersions.js +++ b/services/track-changes/test/acceptance/js/RestoringVersions.js @@ -12,7 +12,7 @@ const sinon = require('sinon') const { expect } = require('chai') const { ObjectId } = require('../../../app/js/mongodb') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const TrackChangesApp = require('./helpers/TrackChangesApp') const TrackChangesClient = require('./helpers/TrackChangesClient') @@ -35,23 +35,23 @@ describe('Restoring a version', function () { { op: [{ i: 'one ', p: 0 }], meta: { ts: this.now - 6 * minutes, user_id: this.user_id }, - v: 3 + v: 3, }, { op: [{ i: 'two ', p: 4 }], meta: { ts: this.now - 4 * minutes, user_id: this.user_id }, - v: 4 + v: 4, }, { op: [{ i: 'three ', p: 8 }], meta: { ts: this.now - 2 * minutes, user_id: this.user_id }, - v: 5 + v: 5, }, { op: [{ i: 'four', p: 14 }], meta: { ts: this.now, user_id: this.user_id }, - v: 6 - } + v: 6, + }, ] this.lines = ['one two three four'] this.restored_lines = ['one two '] @@ -61,12 +61,12 @@ describe('Restoring a version', function () { email: 'user@sharelatex.com', first_name: 'Leo', last_name: 'Lion', - id: this.user_id + id: this.user_id, } MockDocUpdaterApi.docs[this.doc_id] = { lines: this.lines, - version: 7 + version: 7, } TrackChangesApp.ensureRunning(() => { @@ -74,7 +74,7 @@ describe('Restoring a version', function () { this.project_id, this.doc_id, this.updates, - (error) => { + error => { if (error != null) { throw error } @@ -83,7 +83,7 @@ describe('Restoring a version', function () { this.doc_id, this.beforeVersion, this.user_id, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/track-changes/test/acceptance/js/helpers/MockDocStoreApi.js b/services/track-changes/test/acceptance/js/helpers/MockDocStoreApi.js index b1ebcf9cef..12787770a4 100644 --- a/services/track-changes/test/acceptance/js/helpers/MockDocStoreApi.js +++ b/services/track-changes/test/acceptance/js/helpers/MockDocStoreApi.js @@ -39,16 +39,16 @@ module.exports = MockDocUpdaterApi = { }) return app - .listen(3016, (error) => { + .listen(3016, error => { if (error != null) { throw error } }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockDocStoreApi:', error.message) return process.exit(1) }) - } + }, } MockDocUpdaterApi.run() diff --git a/services/track-changes/test/acceptance/js/helpers/MockDocUpdaterApi.js b/services/track-changes/test/acceptance/js/helpers/MockDocUpdaterApi.js index b3b5e23ba7..1c39ff5dbc 100644 --- a/services/track-changes/test/acceptance/js/helpers/MockDocUpdaterApi.js +++ b/services/track-changes/test/acceptance/js/helpers/MockDocUpdaterApi.js @@ -74,16 +74,16 @@ module.exports = MockDocUpdaterApi = { }) return app - .listen(3003, (error) => { + .listen(3003, error => { if (error != null) { throw error } }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockDocUpdaterApi:', error.message) return process.exit(1) }) - } + }, } MockDocUpdaterApi.run() diff --git a/services/track-changes/test/acceptance/js/helpers/MockWebApi.js b/services/track-changes/test/acceptance/js/helpers/MockWebApi.js index b7ebbc876f..db6968dc54 100644 --- a/services/track-changes/test/acceptance/js/helpers/MockWebApi.js +++ b/services/track-changes/test/acceptance/js/helpers/MockWebApi.js @@ -61,16 +61,16 @@ module.exports = MockWebApi = { }) return app - .listen(3000, (error) => { + .listen(3000, error => { if (error != null) { throw error } }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockWebApiServer:', error.message) return process.exit(1) }) - } + }, } MockWebApi.run() diff --git a/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js b/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js index 861dcdde88..f6ff0cc024 100644 --- a/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js +++ b/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js @@ -15,7 +15,7 @@ const app = require('../../../../app') const { waitForDb } = require('../../../../app/js/mongodb') const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') module.exports = { running: false, @@ -38,10 +38,10 @@ module.exports = { Settings.internal != null ? Settings.internal.trackchanges : undefined, - (x) => x.port + x => x.port ), 'localhost', - (error) => { + error => { if (error != null) { throw error } @@ -58,7 +58,7 @@ module.exports = { } ) }) - } + }, } function __guard__(value, transform) { return typeof value !== 'undefined' && value !== null diff --git a/services/track-changes/test/acceptance/js/helpers/TrackChangesClient.js b/services/track-changes/test/acceptance/js/helpers/TrackChangesClient.js index f20884448d..0216c2c928 100644 --- a/services/track-changes/test/acceptance/js/helpers/TrackChangesClient.js +++ b/services/track-changes/test/acceptance/js/helpers/TrackChangesClient.js @@ -16,7 +16,7 @@ let TrackChangesClient const async = require('async') const zlib = require('zlib') const request = require('request') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.history ) // Only works locally for now @@ -28,7 +28,7 @@ const s3 = new aws.S3({ accessKeyId: Settings.trackchanges.s3.key, secretAccessKey: Settings.trackchanges.s3.secret, endpoint: Settings.trackchanges.s3.endpoint, - s3ForcePathStyle: Settings.trackchanges.s3.pathStyle + s3ForcePathStyle: Settings.trackchanges.s3.pathStyle, }) const S3_BUCKET = Settings.trackchanges.stores.doc_history @@ -37,7 +37,7 @@ module.exports = TrackChangesClient = { if (callback == null) { callback = function (error, updates) {} } - return TrackChangesClient.flushDoc(project_id, doc_id, (error) => { + return TrackChangesClient.flushDoc(project_id, doc_id, error => { if (error != null) { return callback(error) } @@ -51,7 +51,7 @@ module.exports = TrackChangesClient = { } return request.post( { - url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/flush` + url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/flush`, }, (error, response, body) => { response.statusCode.should.equal(204) @@ -66,7 +66,7 @@ module.exports = TrackChangesClient = { } return request.post( { - url: `http://localhost:3015/project/${project_id}/flush` + url: `http://localhost:3015/project/${project_id}/flush`, }, (error, response, body) => { response.statusCode.should.equal(204) @@ -91,7 +91,7 @@ module.exports = TrackChangesClient = { } return db.projectHistoryMetaData.findOne( { - project_id: ObjectId(project_id) + project_id: ObjectId(project_id), }, callback ) @@ -103,13 +103,13 @@ module.exports = TrackChangesClient = { } return db.projectHistoryMetaData.updateOne( { - project_id: ObjectId(project_id) + project_id: ObjectId(project_id), }, { - $set: { preserveHistory: true } + $set: { preserveHistory: true }, }, { - upsert: true + upsert: true, }, callback ) @@ -122,13 +122,13 @@ module.exports = TrackChangesClient = { return rclient.sadd( Keys.docsWithHistoryOps({ project_id }), doc_id, - (error) => { + error => { if (error != null) { return callback(error) } return rclient.rpush( Keys.uncompressedHistoryOps({ doc_id }), - ...Array.from(Array.from(updates).map((u) => JSON.stringify(u))), + ...Array.from(Array.from(updates).map(u => JSON.stringify(u))), callback ) } @@ -141,7 +141,7 @@ module.exports = TrackChangesClient = { } return request.get( { - url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/diff?from=${from}&to=${to}` + url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/diff?from=${from}&to=${to}`, }, (error, response, body) => { response.statusCode.should.equal(200) @@ -156,7 +156,7 @@ module.exports = TrackChangesClient = { } return request.get( { - url: `http://localhost:3015/project/${project_id}/updates?before=${options.before}&min_count=${options.min_count}` + url: `http://localhost:3015/project/${project_id}/updates?before=${options.before}&min_count=${options.min_count}`, }, (error, response, body) => { response.statusCode.should.equal(200) @@ -184,8 +184,8 @@ module.exports = TrackChangesClient = { { url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/version/${version}/restore`, headers: { - 'X-User-Id': user_id - } + 'X-User-Id': user_id, + }, }, (error, response, body) => { response.statusCode.should.equal(204) @@ -200,7 +200,7 @@ module.exports = TrackChangesClient = { } return request.post( { - url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/push` + url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/push`, }, (error, response, body) => { response.statusCode.should.equal(204) @@ -215,7 +215,7 @@ module.exports = TrackChangesClient = { } return request.post( { - url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/pull` + url: `http://localhost:3015/project/${project_id}/doc/${doc_id}/pull`, }, (error, response, body) => { response.statusCode.should.equal(204) @@ -254,7 +254,7 @@ module.exports = TrackChangesClient = { } const params = { Bucket: S3_BUCKET, - Key: `${project_id}/changes-${doc_id}/pack-${pack_id}` + Key: `${project_id}/changes-${doc_id}/pack-${pack_id}`, } return s3.getObject(params, (error, data) => { @@ -280,7 +280,7 @@ module.exports = TrackChangesClient = { } let params = { Bucket: S3_BUCKET, - Prefix: `${project_id}/changes-${doc_id}` + Prefix: `${project_id}/changes-${doc_id}`, } return s3.listObjects(params, (error, data) => { @@ -291,11 +291,11 @@ module.exports = TrackChangesClient = { params = { Bucket: S3_BUCKET, Delete: { - Objects: data.Contents.map((s3object) => ({ Key: s3object.Key })) - } + Objects: data.Contents.map(s3object => ({ Key: s3object.Key })), + }, } return s3.deleteObjects(params, callback) }) - } + }, } diff --git a/services/track-changes/test/setup.js b/services/track-changes/test/setup.js index 9ebe599cea..17e1782172 100644 --- a/services/track-changes/test/setup.js +++ b/services/track-changes/test/setup.js @@ -14,8 +14,8 @@ SandboxedModule.configure({ warn() {}, err() {}, error() {}, - fatal() {} - } + fatal() {}, + }, }, - globals: { Buffer, JSON, console, process } + globals: { Buffer, JSON, console, process }, }) diff --git a/services/track-changes/test/unit/js/DiffGenerator/DiffGeneratorTests.js b/services/track-changes/test/unit/js/DiffGenerator/DiffGeneratorTests.js index 75a8ab2c0f..2b67220de9 100644 --- a/services/track-changes/test/unit/js/DiffGenerator/DiffGeneratorTests.js +++ b/services/track-changes/test/unit/js/DiffGenerator/DiffGeneratorTests.js @@ -24,7 +24,7 @@ describe('DiffGenerator', function () { return (this.meta = { start_ts: this.ts, end_ts: this.ts, - user_id: this.user_id + user_id: this.user_id, }) }) @@ -34,7 +34,7 @@ describe('DiffGenerator', function () { const content = 'hello world' const rewoundContent = this.DiffGenerator.rewindOp(content, { p: 6, - i: 'wo' + i: 'wo', }) return rewoundContent.should.equal('hello rld') }) @@ -45,7 +45,7 @@ describe('DiffGenerator', function () { const content = 'hello rld' const rewoundContent = this.DiffGenerator.rewindOp(content, { p: 6, - d: 'wo' + d: 'wo', }) return rewoundContent.should.equal('hello world') }) @@ -65,7 +65,7 @@ describe('DiffGenerator', function () { const content = 'foobar' const rewoundContent = this.DiffGenerator.rewindOp(content, { p: 4, - i: 'bar' + i: 'bar', }) return rewoundContent.should.equal('foo') }) @@ -78,8 +78,8 @@ describe('DiffGenerator', function () { const update = { op: [ { p: 3, i: 'bbb' }, - { p: 6, i: 'ccc' } - ] + { p: 6, i: 'ccc' }, + ], } const rewoundContent = this.DiffGenerator.rewindUpdate(content, update) return rewoundContent.should.equal('aaa') @@ -91,7 +91,7 @@ describe('DiffGenerator', function () { const content = 'aaabbbccc' const updates = [ { op: [{ p: 3, i: 'bbb' }] }, - { op: [{ p: 6, i: 'ccc' }] } + { op: [{ p: 6, i: 'ccc' }] }, ] const rewoundContent = this.DiffGenerator.rewindUpdates(content, updates) return rewoundContent.should.equal('aaa') @@ -105,7 +105,7 @@ describe('DiffGenerator', function () { this.updates = [ { i: 'mock-update-1' }, { i: 'mock-update-2' }, - { i: 'mock-update-3' } + { i: 'mock-update-3' }, ] this.DiffGenerator.applyUpdateToDiff = sinon.stub().returns(this.diff) this.DiffGenerator.compressDiff = sinon.stub().returns(this.diff) @@ -124,8 +124,8 @@ describe('DiffGenerator', function () { .calledWith( [ { - u: this.content - } + u: this.content, + }, ], this.updates[0] ) @@ -133,7 +133,7 @@ describe('DiffGenerator', function () { }) it('should apply each update', function () { - return Array.from(this.updates).map((update) => + return Array.from(this.updates).map(update => this.DiffGenerator.applyUpdateToDiff .calledWith(sinon.match.any, update) .should.equal(true) @@ -153,18 +153,18 @@ describe('DiffGenerator', function () { const diff = this.DiffGenerator.compressDiff([ { i: 'foo', - meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } } + meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } }, }, { i: 'bar', - meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id } } - } + meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id } }, + }, ]) return expect(diff).to.deep.equal([ { i: 'foobar', - meta: { start_ts: 5, end_ts: 20, user: { id: this.user_id } } - } + meta: { start_ts: 5, end_ts: 20, user: { id: this.user_id } }, + }, ]) }) }) @@ -174,12 +174,12 @@ describe('DiffGenerator', function () { const input = [ { i: 'foo', - meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } } + meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } }, }, { i: 'bar', - meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id_2 } } - } + meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id_2 } }, + }, ] const output = this.DiffGenerator.compressDiff(input) return expect(output).to.deep.equal(input) @@ -191,18 +191,18 @@ describe('DiffGenerator', function () { const diff = this.DiffGenerator.compressDiff([ { d: 'foo', - meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } } + meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } }, }, { d: 'bar', - meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id } } - } + meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id } }, + }, ]) return expect(diff).to.deep.equal([ { d: 'foobar', - meta: { start_ts: 5, end_ts: 20, user: { id: this.user_id } } - } + meta: { start_ts: 5, end_ts: 20, user: { id: this.user_id } }, + }, ]) }) }) @@ -212,12 +212,12 @@ describe('DiffGenerator', function () { const input = [ { d: 'foo', - meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } } + meta: { start_ts: 10, end_ts: 20, user: { id: this.user_id } }, }, { d: 'bar', - meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id_2 } } - } + meta: { start_ts: 5, end_ts: 15, user: { id: this.user_id_2 } }, + }, ] const output = this.DiffGenerator.compressDiff(input) return expect(output).to.deep.equal(input) @@ -230,34 +230,34 @@ describe('DiffGenerator', function () { it('should insert into the middle of (u)nchanged text', function () { const diff = this.DiffGenerator.applyUpdateToDiff([{ u: 'foobar' }], { op: [{ p: 3, i: 'baz' }], - meta: this.meta + meta: this.meta, }) return expect(diff).to.deep.equal([ { u: 'foo' }, { i: 'baz', meta: this.meta }, - { u: 'bar' } + { u: 'bar' }, ]) }) it('should insert into the start of (u)changed text', function () { const diff = this.DiffGenerator.applyUpdateToDiff([{ u: 'foobar' }], { op: [{ p: 0, i: 'baz' }], - meta: this.meta + meta: this.meta, }) return expect(diff).to.deep.equal([ { i: 'baz', meta: this.meta }, - { u: 'foobar' } + { u: 'foobar' }, ]) }) it('should insert into the end of (u)changed text', function () { const diff = this.DiffGenerator.applyUpdateToDiff([{ u: 'foobar' }], { op: [{ p: 6, i: 'baz' }], - meta: this.meta + meta: this.meta, }) return expect(diff).to.deep.equal([ { u: 'foobar' }, - { i: 'baz', meta: this.meta } + { i: 'baz', meta: this.meta }, ]) }) @@ -269,7 +269,7 @@ describe('DiffGenerator', function () { return expect(diff).to.deep.equal([ { i: 'foo', meta: this.meta }, { i: 'baz', meta: this.meta }, - { i: 'bar', meta: this.meta } + { i: 'bar', meta: this.meta }, ]) }) @@ -282,7 +282,7 @@ describe('DiffGenerator', function () { { d: 'deleted', meta: this.meta }, { u: 'foo' }, { i: 'baz', meta: this.meta }, - { u: 'bar' } + { u: 'bar' }, ]) }) }) @@ -297,7 +297,7 @@ describe('DiffGenerator', function () { return expect(diff).to.deep.equal([ { u: 'foo' }, { d: 'baz', meta: this.meta }, - { u: 'bar' } + { u: 'bar' }, ]) }) @@ -308,7 +308,7 @@ describe('DiffGenerator', function () { ) return expect(diff).to.deep.equal([ { d: 'foo', meta: this.meta }, - { u: 'bazbar' } + { u: 'bazbar' }, ]) }) @@ -319,7 +319,7 @@ describe('DiffGenerator', function () { ) return expect(diff).to.deep.equal([ { u: 'foobaz' }, - { d: 'bar', meta: this.meta } + { d: 'bar', meta: this.meta }, ]) }) @@ -333,7 +333,7 @@ describe('DiffGenerator', function () { { d: 'o', meta: this.meta }, { d: 'baz', meta: this.meta }, { d: 'b', meta: this.meta }, - { u: 'ar' } + { u: 'ar' }, ]) }) }) @@ -346,7 +346,7 @@ describe('DiffGenerator', function () { ) return expect(diff).to.deep.equal([ { i: 'foo', meta: this.meta }, - { i: 'bar', meta: this.meta } + { i: 'bar', meta: this.meta }, ]) }) @@ -375,7 +375,7 @@ describe('DiffGenerator', function () { { u: 'fo' }, { d: 'o', meta: this.meta }, { d: 'b', meta: this.meta }, - { u: 'ar' } + { u: 'ar' }, ]) }) }) @@ -391,7 +391,7 @@ describe('DiffGenerator', function () { { d: 'o', meta: this.meta }, { d: 'baz', meta: this.meta }, { d: 'b', meta: this.meta }, - { u: 'ar' } + { u: 'ar' }, ]) }) }) @@ -401,7 +401,7 @@ describe('DiffGenerator', function () { return expect(() => this.DiffGenerator.applyUpdateToDiff([{ u: 'foobazbar' }], { op: [{ p: 3, d: 'xxx' }], - meta: this.meta + meta: this.meta, }) ).to.throw(this.DiffGenerator.ConsistencyError) }) @@ -410,7 +410,7 @@ describe('DiffGenerator', function () { return expect(() => this.DiffGenerator.applyUpdateToDiff([{ u: 'foobazbar' }], { op: [{ p: 0, d: 'xxx' }], - meta: this.meta + meta: this.meta, }) ).to.throw(this.DiffGenerator.ConsistencyError) }) @@ -419,7 +419,7 @@ describe('DiffGenerator', function () { return expect(() => this.DiffGenerator.applyUpdateToDiff([{ u: 'foobazbar' }], { op: [{ p: 6, d: 'xxx' }], - meta: this.meta + meta: this.meta, }) ).to.throw(this.DiffGenerator.ConsistencyError) }) @@ -434,7 +434,7 @@ describe('DiffGenerator', function () { return expect(diff).to.deep.equal([ { u: 'foo' }, { i: 'baz', meta: this.meta }, - { d: 'bar', meta: this.meta } + { d: 'bar', meta: this.meta }, ]) }) }) @@ -447,7 +447,7 @@ describe('DiffGenerator', function () { ) return expect(diff).to.deep.equal([ { d: 'bar', meta: this.meta }, - { i: 'baz', meta: this.meta } + { i: 'baz', meta: this.meta }, ]) }) }) diff --git a/services/track-changes/test/unit/js/DiffManager/DiffManagerTests.js b/services/track-changes/test/unit/js/DiffManager/DiffManagerTests.js index b2f4ec6a59..846ad706c2 100644 --- a/services/track-changes/test/unit/js/DiffManager/DiffManagerTests.js +++ b/services/track-changes/test/unit/js/DiffManager/DiffManagerTests.js @@ -21,8 +21,8 @@ describe('DiffManager', function () { requires: { './UpdatesManager': (this.UpdatesManager = {}), './DocumentUpdaterManager': (this.DocumentUpdaterManager = {}), - './DiffGenerator': (this.DiffGenerator = {}) - } + './DiffGenerator': (this.DiffGenerator = {}), + }, }) this.callback = sinon.stub() this.from = new Date() @@ -114,23 +114,23 @@ describe('DiffManager', function () { { op: 'mock-4', v: 42, - meta: { start_ts: new Date(this.to.getTime() + 20) } + meta: { start_ts: new Date(this.to.getTime() + 20) }, }, { op: 'mock-3', v: 41, - meta: { start_ts: new Date(this.to.getTime() + 10) } + meta: { start_ts: new Date(this.to.getTime() + 10) }, }, { op: 'mock-2', v: 40, - meta: { start_ts: new Date(this.to.getTime() - 10) } + meta: { start_ts: new Date(this.to.getTime() - 10) }, }, { op: 'mock-1', v: 39, - meta: { start_ts: new Date(this.to.getTime() - 20) } - } + meta: { start_ts: new Date(this.to.getTime() - 20) }, + }, ] this.fromVersion = 39 this.toVersion = 40 @@ -333,23 +333,23 @@ describe('DiffManager', function () { { op: 'mock-4', v: 42, - meta: { start_ts: new Date(this.to.getTime() + 20) } + meta: { start_ts: new Date(this.to.getTime() + 20) }, }, { op: 'mock-3', v: 41, - meta: { start_ts: new Date(this.to.getTime() + 10) } + meta: { start_ts: new Date(this.to.getTime() + 10) }, }, { op: 'mock-2', v: 40, - meta: { start_ts: new Date(this.to.getTime() - 10) } + meta: { start_ts: new Date(this.to.getTime() - 10) }, }, { op: 'mock-1', v: 39, - meta: { start_ts: new Date(this.to.getTime() - 20) } - } + meta: { start_ts: new Date(this.to.getTime() - 20) }, + }, ] this.fromVersion = 39 this.rewound_content = 'rewound-content' @@ -400,7 +400,7 @@ describe('DiffManager', function () { this.version = 50 this.updates = [ { op: 'mock-1', v: 40 }, - { op: 'mock-1', v: 39 } + { op: 'mock-1', v: 39 }, ] this.DiffManager.getLatestDocAndUpdates = sinon .stub() diff --git a/services/track-changes/test/unit/js/DocArchive/MongoAWS.js b/services/track-changes/test/unit/js/DocArchive/MongoAWS.js index dd4374e965..72bcaccddf 100644 --- a/services/track-changes/test/unit/js/DocArchive/MongoAWS.js +++ b/services/track-changes/test/unit/js/DocArchive/MongoAWS.js @@ -21,16 +21,16 @@ describe('MongoAWS', function () { this.MongoAWS = SandboxedModule.require(modulePath, { singleOnly: true, requires: { - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { trackchanges: { s3: { secret: 's3-secret', - key: 's3-key' + key: 's3-key', }, stores: { - doc_history: 's3-bucket' - } - } + doc_history: 's3-bucket', + }, + }, }), child_process: (this.child_process = {}), 'mongo-uri': (this.mongouri = {}), @@ -40,8 +40,8 @@ describe('MongoAWS', function () { './mongodb': { db: (this.db = {}), ObjectId }, JSONStream: (this.JSONStream = {}), 'readline-stream': (this.readline = sinon.stub()), - '@overleaf/metrics': { inc() {} } - } + '@overleaf/metrics': { inc() {} }, + }, }) this.project_id = ObjectId().toString() diff --git a/services/track-changes/test/unit/js/DocumentUpdaterManager/DocumentUpdaterManagerTests.js b/services/track-changes/test/unit/js/DocumentUpdaterManager/DocumentUpdaterManagerTests.js index 2825a10fb5..8221f98d06 100644 --- a/services/track-changes/test/unit/js/DocumentUpdaterManager/DocumentUpdaterManagerTests.js +++ b/services/track-changes/test/unit/js/DocumentUpdaterManager/DocumentUpdaterManagerTests.js @@ -19,10 +19,10 @@ describe('DocumentUpdaterManager', function () { this.DocumentUpdaterManager = SandboxedModule.require(modulePath, { requires: { request: (this.request = {}), - 'settings-sharelatex': (this.settings = { - apis: { documentupdater: { url: 'http://example.com' } } - }) - } + '@overleaf/settings': (this.settings = { + apis: { documentupdater: { url: 'http://example.com' } }, + }), + }, }) this.callback = sinon.stub() this.lines = ['one', 'two', 'three'] @@ -35,7 +35,7 @@ describe('DocumentUpdaterManager', function () { this.body = JSON.stringify({ lines: this.lines, version: this.version, - ops: [] + ops: [], }) this.request.get = sinon .stub() @@ -135,8 +135,8 @@ describe('DocumentUpdaterManager', function () { lines: this.content.split('\n'), source: 'restore', user_id: this.user_id, - undoing: true - } + undoing: true, + }, }) .should.equal(true) }) diff --git a/services/track-changes/test/unit/js/HttpController/HttpControllerTests.js b/services/track-changes/test/unit/js/HttpController/HttpControllerTests.js index 9746213922..6b82dd2b80 100644 --- a/services/track-changes/test/unit/js/HttpController/HttpControllerTests.js +++ b/services/track-changes/test/unit/js/HttpController/HttpControllerTests.js @@ -24,8 +24,8 @@ describe('HttpController', function () { './RestoreManager': (this.RestoreManager = {}), './PackManager': (this.PackManager = {}), './DocArchiveManager': (this.DocArchiveManager = {}), - './HealthChecker': (this.HealthChecker = {}) - } + './HealthChecker': (this.HealthChecker = {}), + }, }) this.doc_id = 'doc-id-123' this.project_id = 'project-id-123' @@ -39,8 +39,8 @@ describe('HttpController', function () { this.req = { params: { doc_id: this.doc_id, - project_id: this.project_id - } + project_id: this.project_id, + }, } this.res = { sendStatus: sinon.stub() } this.UpdatesManager.processUncompressedUpdatesWithLock = sinon @@ -64,8 +64,8 @@ describe('HttpController', function () { beforeEach(function () { this.req = { params: { - project_id: this.project_id - } + project_id: this.project_id, + }, } this.res = { sendStatus: sinon.stub() } this.UpdatesManager.processUncompressedUpdatesForProject = sinon @@ -92,12 +92,12 @@ describe('HttpController', function () { this.req = { params: { doc_id: this.doc_id, - project_id: this.project_id + project_id: this.project_id, }, query: { from: this.from.toString(), - to: this.to.toString() - } + to: this.to.toString(), + }, } this.res = { json: sinon.stub() } this.diff = [{ u: 'mock-diff' }] @@ -128,12 +128,12 @@ describe('HttpController', function () { this.min_count = 10 this.req = { params: { - project_id: this.project_id + project_id: this.project_id, }, query: { before: this.before.toString(), - min_count: this.min_count.toString() - } + min_count: this.min_count.toString(), + }, } this.res = { json: sinon.stub() } this.updates = ['mock-summarized-updates'] @@ -147,7 +147,7 @@ describe('HttpController', function () { return this.UpdatesManager.getSummarizedProjectUpdates .calledWith(this.project_id, { before: this.before, - min_count: this.min_count + min_count: this.min_count, }) .should.equal(true) }) @@ -156,7 +156,7 @@ describe('HttpController', function () { return this.res.json .calledWith({ updates: this.updates, - nextBeforeTimestamp: this.nextBeforeTimestamp + nextBeforeTimestamp: this.nextBeforeTimestamp, }) .should.equal(true) }) @@ -169,11 +169,11 @@ describe('HttpController', function () { params: { doc_id: this.doc_id, project_id: this.project_id, - version: this.version + version: this.version, }, headers: { - 'x-user-id': this.user_id - } + 'x-user-id': this.user_id, + }, } this.res = { sendStatus: sinon.stub() } diff --git a/services/track-changes/test/unit/js/LockManager/LockManagerTests.js b/services/track-changes/test/unit/js/LockManager/LockManagerTests.js index fc26997574..fd76bc0d2d 100644 --- a/services/track-changes/test/unit/js/LockManager/LockManagerTests.js +++ b/services/track-changes/test/unit/js/LockManager/LockManagerTests.js @@ -24,18 +24,18 @@ describe('LockManager', function () { beforeEach(function () { this.Settings = { redis: { - lock: {} - } + lock: {}, + }, } this.LockManager = SandboxedModule.require(modulePath, { requires: { '@overleaf/redis-wrapper': { createClient: () => { return (this.rclient = { auth: sinon.stub() }) - } + }, }, - 'settings-sharelatex': this.Settings - } + '@overleaf/settings': this.Settings, + }, }) this.key = 'lock-key' @@ -240,7 +240,7 @@ describe('LockManager', function () { describe('when the runner function returns an error', function () { beforeEach(function () { this.error = new Error('oops') - this.runner = (releaseLock) => { + this.runner = releaseLock => { if (releaseLock == null) { releaseLock = function (error) {} } diff --git a/services/track-changes/test/unit/js/MongoManager/MongoManagerTests.js b/services/track-changes/test/unit/js/MongoManager/MongoManagerTests.js index d96b27d8d0..6e560e7ab8 100644 --- a/services/track-changes/test/unit/js/MongoManager/MongoManagerTests.js +++ b/services/track-changes/test/unit/js/MongoManager/MongoManagerTests.js @@ -24,8 +24,8 @@ describe('MongoManager', function () { requires: { './mongodb': { db: (this.db = {}), ObjectId }, './PackManager': (this.PackManager = {}), - '@overleaf/metrics': { timeAsyncMethod() {} } - } + '@overleaf/metrics': { timeAsyncMethod() {} }, + }, }) this.callback = sinon.stub() this.doc_id = ObjectId().toString() @@ -166,10 +166,10 @@ describe('MongoManager', function () { .calledWith( { doc_id: ObjectId(this.doc_id), - project_id: { $exists: false } + project_id: { $exists: false }, }, { - $set: { project_id: ObjectId(this.project_id) } + $set: { project_id: ObjectId(this.project_id) }, } ) .should.equal(true) @@ -184,7 +184,7 @@ describe('MongoManager', function () { beforeEach(function () { this.metadata = { mock: 'metadata' } this.db.projectHistoryMetaData = { - findOne: sinon.stub().callsArgWith(1, null, this.metadata) + findOne: sinon.stub().callsArgWith(1, null, this.metadata), } return this.MongoManager.getProjectMetaData( this.project_id, @@ -207,7 +207,7 @@ describe('MongoManager', function () { beforeEach(function () { this.metadata = { mock: 'metadata' } this.db.projectHistoryMetaData = { - updateOne: sinon.stub().yields() + updateOne: sinon.stub().yields(), } return this.MongoManager.setProjectMetaData( this.project_id, @@ -220,13 +220,13 @@ describe('MongoManager', function () { return this.db.projectHistoryMetaData.updateOne .calledWith( { - project_id: ObjectId(this.project_id) + project_id: ObjectId(this.project_id), }, { - $set: this.metadata + $set: this.metadata, }, { - upsert: true + upsert: true, } ) .should.equal(true) diff --git a/services/track-changes/test/unit/js/PackManager/PackManagerTests.js b/services/track-changes/test/unit/js/PackManager/PackManagerTests.js index 957c22aac8..4f538f2109 100644 --- a/services/track-changes/test/unit/js/PackManager/PackManagerTests.js +++ b/services/track-changes/test/unit/js/PackManager/PackManagerTests.js @@ -30,10 +30,10 @@ describe('PackManager', function () { './MongoAWS': {}, '@overleaf/metrics': { inc() {} }, './ProjectIterator': require('../../../../app/js/ProjectIterator.js'), // Cache for speed - 'settings-sharelatex': { - redis: { lock: { key_schema: {} } } - } - } + '@overleaf/settings': { + redis: { lock: { key_schema: {} } }, + }, + }, }) this.callback = sinon.stub() this.doc_id = ObjectId().toString() @@ -51,20 +51,20 @@ describe('PackManager', function () { _id: '12345', pack: [ { op: 'op-1', meta: 'meta-1', v: 1 }, - { op: 'op-2', meta: 'meta-2', v: 2 } + { op: 'op-2', meta: 'meta-2', v: 2 }, ], n: 2, - sz: 100 + sz: 100, } this.newUpdates = [ { op: 'op-3', meta: 'meta-3', v: 3 }, - { op: 'op-4', meta: 'meta-4', v: 4 } + { op: 'op-4', meta: 'meta-4', v: 4 }, ] return (this.db.docHistory = { insertOne: sinon.stub().yields(), insert: sinon.stub().callsArg(1), updateOne: sinon.stub().yields(), - findAndModify: sinon.stub().callsArg(1) + findAndModify: sinon.stub().callsArg(1), }) }) @@ -95,10 +95,10 @@ describe('PackManager', function () { return describe('for many small updates', function () { beforeEach(function () { - this.newUpdates = __range__(0, 2048, true).map((i) => ({ + this.newUpdates = __range__(0, 2048, true).map(i => ({ op: `op-${i}`, meta: `meta-${i}`, - v: i + v: i, })) return this.PackManager.insertCompressedUpdates( this.project_id, @@ -209,10 +209,10 @@ describe('PackManager', function () { describe('for many small updates', function () { beforeEach(function () { - this.newUpdates = __range__(0, 2048, true).map((i) => ({ + this.newUpdates = __range__(0, 2048, true).map(i => ({ op: `op-${i}`, meta: `meta-${i}`, - v: i + v: i, })) return this.PackManager.insertCompressedUpdates( this.project_id, @@ -292,12 +292,12 @@ describe('PackManager', function () { 0.75 * this.PackManager.MAX_SIZE, true ) - .map((j) => 'a') + .map(j => 'a') .join('') - this.newUpdates = [0, 1, 2, 3, 4].map((i) => ({ + this.newUpdates = [0, 1, 2, 3, 4].map(i => ({ op: `op-${i}-${longString}`, meta: `meta-${i}`, - v: i + v: i, })) return this.PackManager.insertCompressedUpdates( this.project_id, @@ -393,7 +393,7 @@ describe('PackManager', function () { doc_id: ObjectId(this.doc_id), n: this.newUpdates.length, v: this.newUpdates[0].v, - v_end: this.newUpdates[this.newUpdates.length - 1].v + v_end: this.newUpdates[this.newUpdates.length - 1].v, }) .should.equal(true) }) @@ -401,7 +401,7 @@ describe('PackManager', function () { it('should set an expiry time in the future', function () { return this.db.docHistory.insertOne .calledWithMatch({ - expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000) + expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000), }) .should.equal(true) }) @@ -419,12 +419,12 @@ describe('PackManager', function () { _id: '12345', pack: [ { op: 'op-1', meta: 'meta-1', v: 1 }, - { op: 'op-2', meta: 'meta-2', v: 2 } + { op: 'op-2', meta: 'meta-2', v: 2 }, ], n: 2, sz: 100, meta: { start_ts: Date.now() - 6 * 3600 * 1000 }, - expiresAt: new Date(Date.now()) + expiresAt: new Date(Date.now()), } return this.PackManager.flushCompressedUpdates( @@ -444,7 +444,7 @@ describe('PackManager', function () { { _id: this.lastUpdate._id }, { $push: { pack: { $each: this.newUpdates } }, - $set: { v_end: this.newUpdates[this.newUpdates.length - 1].v } + $set: { v_end: this.newUpdates[this.newUpdates.length - 1].v }, } ) .should.equal(true) @@ -453,7 +453,7 @@ describe('PackManager', function () { it('should set an expiry time in the future', function () { return this.db.docHistory.updateOne .calledWithMatch(sinon.match.any, { - $set: { expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000) } + $set: { expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000) }, }) .should.equal(true) }) @@ -472,12 +472,12 @@ describe('PackManager', function () { _id: '12345', pack: [ { op: 'op-1', meta: 'meta-1', v: 1 }, - { op: 'op-2', meta: 'meta-2', v: 2 } + { op: 'op-2', meta: 'meta-2', v: 2 }, ], n: 2, sz: 100, meta: { start_ts: Date.now() - 6 * 3600 * 1000 }, - expiresAt: new Date(Date.now()) + expiresAt: new Date(Date.now()), } return this.PackManager.flushCompressedUpdates( @@ -499,7 +499,7 @@ describe('PackManager', function () { doc_id: ObjectId(this.doc_id), n: this.newUpdates.length, v: this.newUpdates[0].v, - v_end: this.newUpdates[this.newUpdates.length - 1].v + v_end: this.newUpdates[this.newUpdates.length - 1].v, }) .should.equal(true) }) @@ -522,12 +522,12 @@ describe('PackManager', function () { _id: '12345', pack: [ { op: 'op-1', meta: 'meta-1', v: 1 }, - { op: 'op-2', meta: 'meta-2', v: 2 } + { op: 'op-2', meta: 'meta-2', v: 2 }, ], n: 2, sz: 100, meta: { start_ts: Date.now() - 30 * 24 * 3600 * 1000 }, - expiresAt: new Date(Date.now() - 30 * 24 * 3600 * 1000) + expiresAt: new Date(Date.now() - 30 * 24 * 3600 * 1000), } return this.PackManager.flushCompressedUpdates( @@ -549,7 +549,7 @@ describe('PackManager', function () { doc_id: ObjectId(this.doc_id), n: this.newUpdates.length, v: this.newUpdates[0].v, - v_end: this.newUpdates[this.newUpdates.length - 1].v + v_end: this.newUpdates[this.newUpdates.length - 1].v, }) .should.equal(true) }) @@ -557,7 +557,7 @@ describe('PackManager', function () { it('should set an expiry time in the future', function () { return this.db.docHistory.insertOne .calledWithMatch({ - expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000) + expiresAt: new Date(Date.now() + 7 * 24 * 3600 * 1000), }) .should.equal(true) }) @@ -602,7 +602,7 @@ describe('PackManager', function () { describe('when an archive is in progress', function () { beforeEach(function () { this.db.docHistoryIndex = { - findOne: sinon.stub().callsArgWith(2, null, { inS3: false }) + findOne: sinon.stub().callsArgWith(2, null, { inS3: false }), } return this.PackManager.checkArchiveNotInProgress( this.project_id, @@ -624,7 +624,7 @@ describe('PackManager', function () { describe('when an archive is completed', function () { beforeEach(function () { this.db.docHistoryIndex = { - findOne: sinon.stub().callsArgWith(2, null, { inS3: true }) + findOne: sinon.stub().callsArgWith(2, null, { inS3: true }), } return this.PackManager.checkArchiveNotInProgress( this.project_id, @@ -646,7 +646,7 @@ describe('PackManager', function () { return describe('when the archive has not started or completed', function () { beforeEach(function () { this.db.docHistoryIndex = { - findOne: sinon.stub().callsArgWith(2, null, {}) + findOne: sinon.stub().callsArgWith(2, null, {}), } return this.PackManager.checkArchiveNotInProgress( this.project_id, diff --git a/services/track-changes/test/unit/js/RedisManager/RedisManagerTests.js b/services/track-changes/test/unit/js/RedisManager/RedisManagerTests.js index 13fa467570..f0c9b0f3d5 100644 --- a/services/track-changes/test/unit/js/RedisManager/RedisManagerTests.js +++ b/services/track-changes/test/unit/js/RedisManager/RedisManagerTests.js @@ -24,11 +24,11 @@ describe('RedisManager', function () { createClient: () => { return (this.rclient = { auth: sinon.stub(), - multi: () => this.rclient + multi: () => this.rclient, }) - } + }, }, - 'settings-sharelatex': { + '@overleaf/settings': { redis: { history: { key_schema: { @@ -37,12 +37,12 @@ describe('RedisManager', function () { }, docsWithHistoryOps({ project_id }) { return `DocsWithHistoryOps:${project_id}` - } - } - } - } - } - } + }, + }, + }, + }, + }, + }, }) this.doc_id = 'doc-id-123' this.project_id = 'project-id-123' @@ -54,9 +54,9 @@ describe('RedisManager', function () { beforeEach(function () { this.rawUpdates = [ { v: 42, op: 'mock-op-42' }, - { v: 45, op: 'mock-op-45' } + { v: 45, op: 'mock-op-45' }, ] - this.jsonUpdates = Array.from(this.rawUpdates).map((update) => + this.jsonUpdates = Array.from(this.rawUpdates).map(update => JSON.stringify(update) ) this.rclient.lrange = sinon.stub().callsArgWith(3, null, this.jsonUpdates) diff --git a/services/track-changes/test/unit/js/RestoreManager/RestoreManagerTests.js b/services/track-changes/test/unit/js/RestoreManager/RestoreManagerTests.js index dd664a6003..9047946405 100644 --- a/services/track-changes/test/unit/js/RestoreManager/RestoreManagerTests.js +++ b/services/track-changes/test/unit/js/RestoreManager/RestoreManagerTests.js @@ -19,8 +19,8 @@ describe('RestoreManager', function () { this.RestoreManager = SandboxedModule.require(modulePath, { requires: { './DocumentUpdaterManager': (this.DocumentUpdaterManager = {}), - './DiffManager': (this.DiffManager = {}) - } + './DiffManager': (this.DiffManager = {}), + }, }) this.callback = sinon.stub() this.project_id = 'mock-project-id' diff --git a/services/track-changes/test/unit/js/UpdateCompressor/UpdateCompressorTests.js b/services/track-changes/test/unit/js/UpdateCompressor/UpdateCompressorTests.js index a703ae8084..cd7c6c4b76 100644 --- a/services/track-changes/test/unit/js/UpdateCompressor/UpdateCompressorTests.js +++ b/services/track-changes/test/unit/js/UpdateCompressor/UpdateCompressorTests.js @@ -15,18 +15,18 @@ const modulePath = '../../../../app/js/UpdateCompressor.js' const SandboxedModule = require('sandboxed-module') const bigstring = __range__(0, 2 * 1024 * 1024, true) - .map((i) => 'a') + .map(i => 'a') .join('') const mediumstring = __range__(0, 1024 * 1024, true) - .map((j) => 'a') + .map(j => 'a') .join('') describe('UpdateCompressor', function () { beforeEach(function () { this.UpdateCompressor = SandboxedModule.require(modulePath, { requires: { - '../lib/diff_match_patch': require('../../../../app/lib/diff_match_patch') - } + '../lib/diff_match_patch': require('../../../../app/lib/diff_match_patch'), + }, }) this.user_id = 'user-id-1' this.other_user_id = 'user-id-2' @@ -41,37 +41,37 @@ describe('UpdateCompressor', function () { { op: [ (this.op1 = { p: 0, i: 'Foo' }), - (this.op2 = { p: 6, i: 'bar' }) + (this.op2 = { p: 6, i: 'bar' }), ], meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: [(this.op3 = { p: 10, i: 'baz' })], meta: { ts: this.ts2, user_id: this.other_user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { op: this.op1, meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: this.op2, meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: this.op3, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.other_user_id + user_id: this.other_user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -81,15 +81,15 @@ describe('UpdateCompressor', function () { { op: [], meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 - } + v: 42, + }, ]) ).to.deep.equal([ { op: this.UpdateCompressor.NOOP, meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 - } + v: 42, + }, ]) }) @@ -100,23 +100,23 @@ describe('UpdateCompressor', function () { op: [ (this.op1 = { p: 0, i: 'Foo' }), (this.op2 = { p: 9, c: 'baz' }), - (this.op3 = { p: 6, i: 'bar' }) + (this.op3 = { p: 6, i: 'bar' }), ], meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 - } + v: 42, + }, ]) ).to.deep.equal([ { op: this.op1, meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: this.op3, meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 - } + v: 42, + }, ]) }) }) @@ -130,44 +130,44 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: (this.op2 = { p: 6, i: 'bar' }), meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: (this.op3 = { p: 10, i: 'baz' }), meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.other_user_id + user_id: this.other_user_id, }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { op: [this.op1, this.op2], meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: [this.op3], meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.other_user_id + user_id: this.other_user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -179,17 +179,17 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 - } + v: 42, + }, ]) ).to.deep.equal([ { op: [], meta: { start_ts: this.ts1, end_ts: this.ts1, user_id: this.user_id }, - v: 42 - } + v: 42, + }, ]) }) }) @@ -202,13 +202,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 6, i: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -216,10 +216,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -229,13 +229,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 5, i: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -243,10 +243,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -256,13 +256,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 9, i: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -270,19 +270,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 9, i: 'bar' }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -292,13 +292,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 6, i: bigstring }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -306,19 +306,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 6, i: bigstring }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -328,13 +328,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: bigstring }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3 + bigstring.length, i: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -342,19 +342,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 3 + bigstring.length, i: 'bar' }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -364,13 +364,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: mediumstring }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3 + mediumstring.length, i: mediumstring }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -378,19 +378,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 3 + mediumstring.length, i: mediumstring }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -402,13 +402,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, d: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3, d: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -416,10 +416,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -429,13 +429,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, d: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 1, d: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -443,10 +443,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -456,13 +456,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, d: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 9, d: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -470,19 +470,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 9, d: 'bar' }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -494,13 +494,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 5, d: 'o' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -508,10 +508,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -521,13 +521,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'fobaro' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 5, d: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -535,10 +535,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -548,13 +548,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3, d: 'foo' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -562,10 +562,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -575,13 +575,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foo' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 9, d: 'bar' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -589,19 +589,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 9, d: 'bar' }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -611,13 +611,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, i: 'foobar' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 6, d: 'bardle' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -625,19 +625,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 6, d: 'bardle' }, meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -649,13 +649,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, d: 'one two three four five six seven eight' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3, i: 'one 2 three four five six seven eight' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -663,19 +663,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 + v: 43, }, { op: { p: 7, i: '2' }, meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) @@ -685,13 +685,13 @@ describe('UpdateCompressor', function () { { op: { p: 3, d: 'one two three four five six seven eight' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 3, i: 'one two three four five six seven eight' }, meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -699,10 +699,10 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -714,13 +714,13 @@ describe('UpdateCompressor', function () { { op: this.UpdateCompressor.NOOP, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 6, i: 'bar' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -728,19 +728,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 6, i: 'bar' }, meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -752,13 +752,13 @@ describe('UpdateCompressor', function () { { op: this.UpdateCompressor.NOOP, meta: { ts: this.ts1, user_id: this.user_id }, - v: 42 + v: 42, }, { op: { p: 6, d: 'bar' }, meta: { ts: this.ts1, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ]) ).to.deep.equal([ { @@ -766,19 +766,19 @@ describe('UpdateCompressor', function () { meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: { p: 6, d: 'bar' }, meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) @@ -792,45 +792,45 @@ describe('UpdateCompressor', function () { { op: [ { p: 1000, d: 'hello' }, - { p: 1000, i: 'HELLO()' } + { p: 1000, i: 'HELLO()' }, ], meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, [ { op: [{ p: 1006, i: 'WORLD' }], meta: { ts: this.ts2, user_id: this.user_id }, - v: 43 - } + v: 43, + }, ] ) ).to.deep.equal([ { op: [ { p: 1000, d: 'hello' }, - { p: 1000, i: 'HELLO()' } + { p: 1000, i: 'HELLO()' }, ], meta: { start_ts: this.ts1, end_ts: this.ts1, - user_id: this.user_id + user_id: this.user_id, }, - v: 42 + v: 42, }, { op: [{ p: 1006, i: 'WORLD' }], meta: { start_ts: this.ts2, end_ts: this.ts2, - user_id: this.user_id + user_id: this.user_id, }, - v: 43 - } + v: 43, + }, ]) }) }) diff --git a/services/track-changes/test/unit/js/UpdateTrimmer/UpdateTrimmerTests.js b/services/track-changes/test/unit/js/UpdateTrimmer/UpdateTrimmerTests.js index 2d89a3520d..a49554d9bb 100644 --- a/services/track-changes/test/unit/js/UpdateTrimmer/UpdateTrimmerTests.js +++ b/services/track-changes/test/unit/js/UpdateTrimmer/UpdateTrimmerTests.js @@ -23,8 +23,8 @@ describe('UpdateTrimmer', function () { this.UpdateTrimmer = SandboxedModule.require(modulePath, { requires: { './WebApiManager': (this.WebApiManager = {}), - './MongoManager': (this.MongoManager = {}) - } + './MongoManager': (this.MongoManager = {}), + }, }) this.callback = sinon.stub() diff --git a/services/track-changes/test/unit/js/UpdatesManager/UpdatesManagerTests.js b/services/track-changes/test/unit/js/UpdatesManager/UpdatesManagerTests.js index b90d1567c8..74233e6ffa 100644 --- a/services/track-changes/test/unit/js/UpdatesManager/UpdatesManagerTests.js +++ b/services/track-changes/test/unit/js/UpdatesManager/UpdatesManagerTests.js @@ -32,18 +32,18 @@ describe('UpdatesManager', function () { './WebApiManager': (this.WebApiManager = {}), './UpdateTrimmer': (this.UpdateTrimmer = {}), './DocArchiveManager': (this.DocArchiveManager = {}), - 'settings-sharelatex': { + '@overleaf/settings': { redis: { lock: { key_schema: { historyLock({ doc_id }) { return `HistoryLock:${doc_id}` - } - } - } - } - } - } + }, + }, + }, + }, + }, + }, }) this.doc_id = 'doc-id-123' this.project_id = 'project-id-123' @@ -79,7 +79,7 @@ describe('UpdatesManager', function () { beforeEach(function () { this.rawUpdates = [ { v: 12, op: 'mock-op-12' }, - { v: 13, op: 'mock-op-13' } + { v: 13, op: 'mock-op-13' }, ] this.compressedUpdates = [{ v: 13, op: 'compressed-op-12' }] @@ -127,7 +127,7 @@ describe('UpdatesManager', function () { this.lastCompressedUpdate = { v: 11, op: 'compressed-op-11' } this.compressedUpdates = [ { v: 12, op: 'compressed-op-11+12' }, - { v: 13, op: 'compressed-op-12' } + { v: 13, op: 'compressed-op-12' }, ] this.MongoManager.peekLastCompressedUpdate = sinon @@ -148,7 +148,7 @@ describe('UpdatesManager', function () { beforeEach(function () { this.rawUpdates = [ { v: 12, op: 'mock-op-12' }, - { v: 13, op: 'mock-op-13' } + { v: 13, op: 'mock-op-13' }, ] return this.UpdatesManager.compressAndSaveRawUpdates( this.project_id, @@ -192,11 +192,11 @@ describe('UpdatesManager', function () { beforeEach(function () { this.lastCompressedUpdate = { pack: [{ v: 11, op: 'compressed-op-11' }], - v: 11 + v: 11, } this.rawUpdates = [ { v: 12, op: 'mock-op-12' }, - { v: 13, op: 'mock-op-13' } + { v: 13, op: 'mock-op-13' }, ] this.MongoManager.peekLastCompressedUpdate = sinon .stub() @@ -250,7 +250,7 @@ describe('UpdatesManager', function () { { v: 10, op: 'mock-op-10' }, { v: 11, op: 'mock-op-11' }, { v: 12, op: 'mock-op-12' }, - { v: 13, op: 'mock-op-13' } + { v: 13, op: 'mock-op-13' }, ] return this.UpdatesManager.compressAndSaveRawUpdates( @@ -303,7 +303,7 @@ describe('UpdatesManager', function () { beforeEach(function () { this.rawUpdates = [ { v: 13, op: 'mock-op-13' }, - { v: 12, op: 'mock-op-12' } + { v: 12, op: 'mock-op-12' }, ] return this.UpdatesManager.compressAndSaveRawUpdates( this.project_id, @@ -347,7 +347,7 @@ describe('UpdatesManager', function () { beforeEach(function () { this.rawUpdates = [ { v: 12, op: 'mock-op-12' }, - { v: 13, op: 'mock-op-13' } + { v: 13, op: 'mock-op-13' }, ] return this.UpdatesManager.compressAndSaveRawUpdates( this.project_id, @@ -454,7 +454,7 @@ describe('UpdatesManager', function () { 'mock-update-1', 'mock-update-2', 'mock-update-3', - 'mock-update-4' + 'mock-update-4', ] this.redisArray = this.updates.slice() this.RedisManager.getOldestDocUpdates = ( @@ -673,7 +673,7 @@ describe('UpdatesManager', function () { }) it('should process the doc ops for the each doc_id', function () { - return Array.from(this.doc_ids).map((doc_id) => + return Array.from(this.doc_ids).map(doc_id => this.UpdatesManager._processUncompressedUpdatesForDocWithLock .calledWith(this.project_id, doc_id, this.temporary) .should.equal(true) @@ -692,26 +692,26 @@ describe('UpdatesManager', function () { doc_id: 123, v: 456, op: 'mock-updates', - meta: { user_id: 123, start_ts: 1233, end_ts: 1234 } - } + meta: { user_id: 123, start_ts: 1233, end_ts: 1234 }, + }, ] this.options = { before: 'mock-before', limit: 'mock-limit' } this.summarizedUpdates = [ { meta: { user_ids: [123], start_ts: 1233, end_ts: 1234 }, - docs: { '123': { fromV: 456, toV: 456 } } - } + docs: { 123: { fromV: 456, toV: 456 } }, + }, ] this.updatesWithUserInfo = ['updates-with-user-info'] this.done_state = false this.iterator = { - next: (cb) => { + next: cb => { this.done_state = true return cb(null, this.updates) }, done: () => { return this.done_state - } + }, } this.PackManager.makeProjectIterator = sinon .stub() @@ -867,22 +867,22 @@ describe('UpdatesManager', function () { this.updates = [ { meta: { - user_id: this.user_id_1 + user_id: this.user_id_1, }, - op: 'mock-op-1' + op: 'mock-op-1', }, { meta: { - user_id: this.user_id_1 + user_id: this.user_id_1, }, - op: 'mock-op-2' + op: 'mock-op-2', }, { meta: { - user_id: this.user_id_2 + user_id: this.user_id_2, }, - op: 'mock-op-3' - } + op: 'mock-op-3', + }, ] this.user_info = {} this.user_info[this.user_id_1] = { email: 'user1@sharelatex.com' } @@ -920,27 +920,27 @@ describe('UpdatesManager', function () { { meta: { user: { - email: 'user1@sharelatex.com' - } + email: 'user1@sharelatex.com', + }, }, - op: 'mock-op-1' + op: 'mock-op-1', }, { meta: { user: { - email: 'user1@sharelatex.com' - } + email: 'user1@sharelatex.com', + }, }, - op: 'mock-op-2' + op: 'mock-op-2', }, { meta: { user: { - email: 'user2@sharelatex.com' - } + email: 'user2@sharelatex.com', + }, }, - op: 'mock-op-3' - } + op: 'mock-op-3', + }, ]) }) }) @@ -950,16 +950,16 @@ describe('UpdatesManager', function () { this.updates = [ { meta: { - user_id: null + user_id: null, }, - op: 'mock-op-1' + op: 'mock-op-1', }, { meta: { - user_id: 'anonymous-user' + user_id: 'anonymous-user', }, - op: 'mock-op-2' - } + op: 'mock-op-2', + }, ] this.WebApiManager.getUserInfo = (user_id, callback) => { if (callback == null) { @@ -986,12 +986,12 @@ describe('UpdatesManager', function () { return expect(this.results).to.deep.equal([ { meta: {}, - op: 'mock-op-1' + op: 'mock-op-1', }, { meta: {}, - op: 'mock-op-2' - } + op: 'mock-op-2', + }, ]) }) }) @@ -1011,19 +1011,19 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-1', meta: { user_id: this.user_2.id, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 - } + v: 4, + }, ]) return expect(result).to.deep.equal([ @@ -1031,15 +1031,15 @@ describe('UpdatesManager', function () { docs: { 'doc-id-1': { fromV: 4, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [this.user_1.id, this.user_2.id], start_ts: this.now, - end_ts: this.now + 30 - } - } + end_ts: this.now + 30, + }, + }, ]) }) @@ -1051,47 +1051,47 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_2.id, start_ts: this.now + oneDay, - end_ts: this.now + oneDay + 10 + end_ts: this.now + oneDay + 10, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-1', meta: { user_id: this.user_1.id, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 - } + v: 4, + }, ]) return expect(result).to.deep.equal([ { docs: { 'doc-id-1': { fromV: 5, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [this.user_2.id], start_ts: this.now + oneDay, - end_ts: this.now + oneDay + 10 - } + end_ts: this.now + oneDay + 10, + }, }, { docs: { 'doc-id-1': { fromV: 4, - toV: 4 - } + toV: 4, + }, }, meta: { user_ids: [this.user_1.id], start_ts: this.now, - end_ts: this.now + 10 - } - } + end_ts: this.now + 10, + }, + }, ]) }) @@ -1103,34 +1103,34 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-2', meta: { user_id: this.user_2.id, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 - } + v: 4, + }, ], [ { docs: { 'doc-id-1': { fromV: 6, - toV: 8 - } + toV: 8, + }, }, meta: { user_ids: [this.user_1.id], start_ts: this.now + 40, - end_ts: this.now + 50 - } - } + end_ts: this.now + 50, + }, + }, ] ) return expect(result).to.deep.equal([ @@ -1138,19 +1138,19 @@ describe('UpdatesManager', function () { docs: { 'doc-id-1': { toV: 8, - fromV: 6 + fromV: 6, }, 'doc-id-2': { toV: 5, - fromV: 4 - } + fromV: 4, + }, }, meta: { user_ids: [this.user_1.id, this.user_2.id], start_ts: this.now, - end_ts: this.now + 50 - } - } + end_ts: this.now + 50, + }, + }, ]) }) @@ -1161,34 +1161,34 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-1', meta: { user_id: null, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 - } + v: 4, + }, ]) return expect(result).to.deep.equal([ { docs: { 'doc-id-1': { fromV: 4, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [this.user_1.id, null], start_ts: this.now, - end_ts: this.now + 30 - } - } + end_ts: this.now + 30, + }, + }, ]) }) @@ -1199,34 +1199,34 @@ describe('UpdatesManager', function () { meta: { user_id: null, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 + v: 4, }, { doc_id: 'doc-id-1', meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 - } + v: 5, + }, ]) return expect(result).to.deep.equal([ { docs: { 'doc-id-1': { fromV: 4, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [null, this.user_1.id], start_ts: this.now, - end_ts: this.now + 30 - } - } + end_ts: this.now + 30, + }, + }, ]) }) @@ -1237,43 +1237,43 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-1', meta: { user_id: null, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 + v: 4, }, { doc_id: 'doc-id-1', meta: { user_id: null, start_ts: this.now + 2, - end_ts: this.now + 4 + end_ts: this.now + 4, }, - v: 4 - } + v: 4, + }, ]) return expect(result).to.deep.equal([ { docs: { 'doc-id-1': { fromV: 4, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [this.user_1.id, null], start_ts: this.now, - end_ts: this.now + 30 - } - } + end_ts: this.now + 30, + }, + }, ]) }) @@ -1285,19 +1285,19 @@ describe('UpdatesManager', function () { meta: { user_id: this.user_1.id, start_ts: this.now + 20, - end_ts: this.now + 30 + end_ts: this.now + 30, }, - v: 5 + v: 5, }, { doc_id: 'doc-id-1', meta: { user_id: this.user_2.id, start_ts: this.now, - end_ts: this.now + 10 + end_ts: this.now + 10, }, - v: 4 - } + v: 4, + }, ]) return expect(result).to.deep.equal([ @@ -1305,28 +1305,28 @@ describe('UpdatesManager', function () { docs: { 'doc-id-1': { fromV: 5, - toV: 5 - } + toV: 5, + }, }, meta: { user_ids: [this.user_1.id], start_ts: this.now + 20, - end_ts: this.now + 30 - } + end_ts: this.now + 30, + }, }, { docs: { 'doc-id-1': { fromV: 4, - toV: 4 - } + toV: 4, + }, }, meta: { user_ids: [this.user_2.id], start_ts: this.now, - end_ts: this.now + 10 - } - } + end_ts: this.now + 10, + }, + }, ]) }) }) diff --git a/services/track-changes/test/unit/js/WebApiManager/WebApiManagerTests.js b/services/track-changes/test/unit/js/WebApiManager/WebApiManagerTests.js index 7e23e72b0a..9caba5185e 100644 --- a/services/track-changes/test/unit/js/WebApiManager/WebApiManagerTests.js +++ b/services/track-changes/test/unit/js/WebApiManager/WebApiManagerTests.js @@ -19,16 +19,16 @@ describe('WebApiManager', function () { this.WebApiManager = SandboxedModule.require(modulePath, { requires: { requestretry: (this.request = {}), - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { apis: { web: { url: 'http://example.com', user: 'sharelatex', - pass: 'password' - } - } - }) - } + pass: 'password', + }, + }, + }), + }, }) this.callback = sinon.stub() this.user_id = 'mock-user-id' @@ -38,7 +38,7 @@ describe('WebApiManager', function () { id: this.user_id, first_name: 'Leo', last_nane: 'Lion', - extra_param: 'blah' + extra_param: 'blah', } return (this.project = { features: 'mock-features' }) }) @@ -60,8 +60,8 @@ describe('WebApiManager', function () { auth: { user: this.settings.apis.web.user, pass: this.settings.apis.web.pass, - sendImmediately: true - } + sendImmediately: true, + }, }) .should.equal(true) }) @@ -72,7 +72,7 @@ describe('WebApiManager', function () { id: this.user_id, email: this.user_info.email, first_name: this.user_info.first_name, - last_name: this.user_info.last_name + last_name: this.user_info.last_name, }) .should.equal(true) }) @@ -150,8 +150,8 @@ describe('WebApiManager', function () { auth: { user: this.settings.apis.web.user, pass: this.settings.apis.web.pass, - sendImmediately: true - } + sendImmediately: true, + }, }) .should.equal(true) })