From a26ae735974bfb0666455f5fe7ffc84a3b707756 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:47:18 +0100 Subject: [PATCH 1/9] [misc] switch from settings-sharelatex to @overleaf/settings --- services/real-time/app.js | 2 +- services/real-time/app/js/ChannelManager.js | 2 +- .../real-time/app/js/ConnectedUsersManager.js | 2 +- .../real-time/app/js/DeploymentManager.js | 2 +- .../app/js/DocumentUpdaterController.js | 2 +- .../app/js/DocumentUpdaterManager.js | 2 +- services/real-time/app/js/EventLogger.js | 2 +- services/real-time/app/js/Router.js | 2 +- services/real-time/app/js/SafeJsonParse.js | 2 +- services/real-time/app/js/WebApiManager.js | 2 +- .../real-time/app/js/WebsocketLoadBalancer.js | 2 +- services/real-time/package-lock.json | 20 +++++-------------- services/real-time/package.json | 2 +- .../test/acceptance/js/ApplyUpdateTests.js | 2 +- .../test/acceptance/js/DrainManagerTests.js | 2 +- .../test/acceptance/js/EarlyDisconnect.js | 2 +- .../test/acceptance/js/LeaveProjectTests.js | 2 +- .../test/acceptance/js/MatrixTests.js | 2 +- .../test/acceptance/js/PubSubRace.js | 2 +- .../test/acceptance/js/ReceiveUpdateTests.js | 2 +- .../test/acceptance/js/SessionSocketsTests.js | 2 +- .../acceptance/js/helpers/RealTimeClient.js | 2 +- .../acceptance/js/helpers/RealtimeServer.js | 2 +- .../test/unit/js/ChannelManagerTests.js | 2 +- .../unit/js/ConnectedUsersManagerTests.js | 2 +- .../unit/js/DocumentUpdaterControllerTests.js | 2 +- .../unit/js/DocumentUpdaterManagerTests.js | 2 +- .../test/unit/js/RoomManagerTests.js | 2 +- .../test/unit/js/SafeJsonParseTest.js | 2 +- .../test/unit/js/WebApiManagerTests.js | 2 +- 30 files changed, 34 insertions(+), 44 deletions(-) diff --git a/services/real-time/app.js b/services/real-time/app.js index bde00b2e17..0b8be4d17b 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -1,5 +1,5 @@ const Metrics = require('@overleaf/metrics') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') Metrics.initialize(Settings.appName || 'real-time') const async = require('async') diff --git a/services/real-time/app/js/ChannelManager.js b/services/real-time/app/js/ChannelManager.js index 1ca9f6e88b..c777fb2250 100644 --- a/services/real-time/app/js/ChannelManager.js +++ b/services/real-time/app/js/ChannelManager.js @@ -1,6 +1,6 @@ const logger = require('logger-sharelatex') const metrics = require('@overleaf/metrics') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const OError = require('@overleaf/o-error') const ClientMap = new Map() // for each redis client, store a Map of subscribed channels (channelname -> subscribe promise) diff --git a/services/real-time/app/js/ConnectedUsersManager.js b/services/real-time/app/js/ConnectedUsersManager.js index 6b98043ff7..006e763645 100644 --- a/services/real-time/app/js/ConnectedUsersManager.js +++ b/services/real-time/app/js/ConnectedUsersManager.js @@ -2,7 +2,7 @@ camelcase, */ const async = require('async') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const redis = require('@overleaf/redis-wrapper') const OError = require('@overleaf/o-error') diff --git a/services/real-time/app/js/DeploymentManager.js b/services/real-time/app/js/DeploymentManager.js index ddb98fd4ce..fd482740f5 100644 --- a/services/real-time/app/js/DeploymentManager.js +++ b/services/real-time/app/js/DeploymentManager.js @@ -1,5 +1,5 @@ const logger = require('logger-sharelatex') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const fs = require('fs') // Monitor a status file (e.g. /etc/real_time_status) periodically and close the diff --git a/services/real-time/app/js/DocumentUpdaterController.js b/services/real-time/app/js/DocumentUpdaterController.js index 0e51339600..7ce516524c 100644 --- a/services/real-time/app/js/DocumentUpdaterController.js +++ b/services/real-time/app/js/DocumentUpdaterController.js @@ -2,7 +2,7 @@ camelcase, */ const logger = require('logger-sharelatex') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const RedisClientManager = require('./RedisClientManager') const SafeJsonParse = require('./SafeJsonParse') const EventLogger = require('./EventLogger') diff --git a/services/real-time/app/js/DocumentUpdaterManager.js b/services/real-time/app/js/DocumentUpdaterManager.js index 39bef96ebd..715d1a70d3 100644 --- a/services/real-time/app/js/DocumentUpdaterManager.js +++ b/services/real-time/app/js/DocumentUpdaterManager.js @@ -5,7 +5,7 @@ const request = require('request') const _ = require('underscore') const OError = require('@overleaf/o-error') const logger = require('logger-sharelatex') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const metrics = require('@overleaf/metrics') const { ClientRequestedMissingOpsError, diff --git a/services/real-time/app/js/EventLogger.js b/services/real-time/app/js/EventLogger.js index 1a2d898577..e6baffaa50 100644 --- a/services/real-time/app/js/EventLogger.js +++ b/services/real-time/app/js/EventLogger.js @@ -4,7 +4,7 @@ let EventLogger const logger = require('logger-sharelatex') const metrics = require('@overleaf/metrics') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') // keep track of message counters to detect duplicate and out of order events // messsage ids have the format "UNIQUEHOSTKEY-COUNTER" diff --git a/services/real-time/app/js/Router.js b/services/real-time/app/js/Router.js index 28765ecfa8..85b48eaf66 100644 --- a/services/real-time/app/js/Router.js +++ b/services/real-time/app/js/Router.js @@ -3,7 +3,7 @@ */ const metrics = require('@overleaf/metrics') const logger = require('logger-sharelatex') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const WebsocketController = require('./WebsocketController') const HttpController = require('./HttpController') const HttpApiController = require('./HttpApiController') diff --git a/services/real-time/app/js/SafeJsonParse.js b/services/real-time/app/js/SafeJsonParse.js index a8a3afae4d..b66f032ec6 100644 --- a/services/real-time/app/js/SafeJsonParse.js +++ b/services/real-time/app/js/SafeJsonParse.js @@ -1,4 +1,4 @@ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const { DataTooLargeToParseError } = require('./Errors') module.exports = { diff --git a/services/real-time/app/js/WebApiManager.js b/services/real-time/app/js/WebApiManager.js index 403de53cfe..c5ac369149 100644 --- a/services/real-time/app/js/WebApiManager.js +++ b/services/real-time/app/js/WebApiManager.js @@ -3,7 +3,7 @@ */ const request = require('request') const OError = require('@overleaf/o-error') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const { CodedError, diff --git a/services/real-time/app/js/WebsocketLoadBalancer.js b/services/real-time/app/js/WebsocketLoadBalancer.js index ee6ba4d335..4f1a4935a7 100644 --- a/services/real-time/app/js/WebsocketLoadBalancer.js +++ b/services/real-time/app/js/WebsocketLoadBalancer.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase, */ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const RedisClientManager = require('./RedisClientManager') const SafeJsonParse = require('./SafeJsonParse') diff --git a/services/real-time/package-lock.json b/services/real-time/package-lock.json index ba777f5d4c..85a0167a95 100644 --- a/services/real-time/package-lock.json +++ b/services/real-time/package-lock.json @@ -703,6 +703,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", @@ -5918,21 +5923,6 @@ "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", diff --git a/services/real-time/package.json b/services/real-time/package.json index f07ab3da62..37cd18f81f 100644 --- a/services/real-time/package.json +++ b/services/real-time/package.json @@ -24,6 +24,7 @@ "@overleaf/metrics": "^3.5.1", "@overleaf/o-error": "^3.1.0", "@overleaf/redis-wrapper": "^2.0.0", + "@overleaf/settings": "^2.1.1", "async": "^0.9.0", "base64id": "0.1.0", "basic-auth-connect": "^1.0.0", @@ -35,7 +36,6 @@ "express-session": "^1.17.1", "logger-sharelatex": "^2.2.0", "request": "^2.88.2", - "settings-sharelatex": "^1.1.0", "socket.io": "https://github.com/overleaf/socket.io/archive/0.9.19-overleaf-5.tar.gz", "socket.io-client": "https://github.com/overleaf/socket.io-client/archive/0.9.17-overleaf-3.tar.gz", "underscore": "1.13.1" diff --git a/services/real-time/test/acceptance/js/ApplyUpdateTests.js b/services/real-time/test/acceptance/js/ApplyUpdateTests.js index 14a8faa186..785afa3bf4 100644 --- a/services/real-time/test/acceptance/js/ApplyUpdateTests.js +++ b/services/real-time/test/acceptance/js/ApplyUpdateTests.js @@ -18,7 +18,7 @@ const { expect } = require('chai') const RealTimeClient = require('./helpers/RealTimeClient') const FixturesManager = require('./helpers/FixturesManager') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.documentupdater) diff --git a/services/real-time/test/acceptance/js/DrainManagerTests.js b/services/real-time/test/acceptance/js/DrainManagerTests.js index d312d34aa9..f4d5636adb 100644 --- a/services/real-time/test/acceptance/js/DrainManagerTests.js +++ b/services/real-time/test/acceptance/js/DrainManagerTests.js @@ -16,7 +16,7 @@ const { expect } = require('chai') const async = require('async') const request = require('request') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const drain = function (rate, callback) { request.post( diff --git a/services/real-time/test/acceptance/js/EarlyDisconnect.js b/services/real-time/test/acceptance/js/EarlyDisconnect.js index b6d360d0ea..cce2b318ec 100644 --- a/services/real-time/test/acceptance/js/EarlyDisconnect.js +++ b/services/real-time/test/acceptance/js/EarlyDisconnect.js @@ -18,7 +18,7 @@ const MockDocUpdaterServer = require('./helpers/MockDocUpdaterServer') const MockWebServer = require('./helpers/MockWebServer') const FixturesManager = require('./helpers/FixturesManager') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.pubsub) const rclientRT = redis.createClient(settings.redis.realtime) diff --git a/services/real-time/test/acceptance/js/LeaveProjectTests.js b/services/real-time/test/acceptance/js/LeaveProjectTests.js index 8364e25c4a..0d30c90c8f 100644 --- a/services/real-time/test/acceptance/js/LeaveProjectTests.js +++ b/services/real-time/test/acceptance/js/LeaveProjectTests.js @@ -17,7 +17,7 @@ const FixturesManager = require('./helpers/FixturesManager') const async = require('async') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.pubsub) diff --git a/services/real-time/test/acceptance/js/MatrixTests.js b/services/real-time/test/acceptance/js/MatrixTests.js index 9da735083e..ee7686679a 100644 --- a/services/real-time/test/acceptance/js/MatrixTests.js +++ b/services/real-time/test/acceptance/js/MatrixTests.js @@ -53,7 +53,7 @@ const async = require('async') const RealTimeClient = require('./helpers/RealTimeClient') const FixturesManager = require('./helpers/FixturesManager') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const Keys = settings.redis.documentupdater.key_schema const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.pubsub) diff --git a/services/real-time/test/acceptance/js/PubSubRace.js b/services/real-time/test/acceptance/js/PubSubRace.js index a331f73c1b..db97a3d00e 100644 --- a/services/real-time/test/acceptance/js/PubSubRace.js +++ b/services/real-time/test/acceptance/js/PubSubRace.js @@ -15,7 +15,7 @@ const FixturesManager = require('./helpers/FixturesManager') const async = require('async') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.pubsub) diff --git a/services/real-time/test/acceptance/js/ReceiveUpdateTests.js b/services/real-time/test/acceptance/js/ReceiveUpdateTests.js index ae7ab8ef55..92d29b014f 100644 --- a/services/real-time/test/acceptance/js/ReceiveUpdateTests.js +++ b/services/real-time/test/acceptance/js/ReceiveUpdateTests.js @@ -19,7 +19,7 @@ const FixturesManager = require('./helpers/FixturesManager') const async = require('async') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(settings.redis.pubsub) diff --git a/services/real-time/test/acceptance/js/SessionSocketsTests.js b/services/real-time/test/acceptance/js/SessionSocketsTests.js index 45f62195e5..44835142ea 100644 --- a/services/real-time/test/acceptance/js/SessionSocketsTests.js +++ b/services/real-time/test/acceptance/js/SessionSocketsTests.js @@ -9,7 +9,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const RealTimeClient = require('./helpers/RealTimeClient') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const { expect } = require('chai') describe('SessionSockets', function () { diff --git a/services/real-time/test/acceptance/js/helpers/RealTimeClient.js b/services/real-time/test/acceptance/js/helpers/RealTimeClient.js index 03589e4fa0..d5e8b79343 100644 --- a/services/real-time/test/acceptance/js/helpers/RealTimeClient.js +++ b/services/real-time/test/acceptance/js/helpers/RealTimeClient.js @@ -17,7 +17,7 @@ const io = require('socket.io-client') const async = require('async') const request = require('request') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(Settings.redis.websessions) diff --git a/services/real-time/test/acceptance/js/helpers/RealtimeServer.js b/services/real-time/test/acceptance/js/helpers/RealtimeServer.js index 950c4b966d..ef1a85a2a5 100644 --- a/services/real-time/test/acceptance/js/helpers/RealtimeServer.js +++ b/services/real-time/test/acceptance/js/helpers/RealtimeServer.js @@ -14,7 +14,7 @@ */ const app = require('../../../../app') const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') module.exports = { running: false, diff --git a/services/real-time/test/unit/js/ChannelManagerTests.js b/services/real-time/test/unit/js/ChannelManagerTests.js index aad5ddbd42..a7d857dada 100644 --- a/services/real-time/test/unit/js/ChannelManagerTests.js +++ b/services/real-time/test/unit/js/ChannelManagerTests.js @@ -20,7 +20,7 @@ describe('ChannelManager', function () { this.other_rclient = {} return (this.ChannelManager = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': (this.settings = {}), + '@overleaf/settings': (this.settings = {}), '@overleaf/metrics': (this.metrics = { inc: sinon.stub(), summary: sinon.stub() diff --git a/services/real-time/test/unit/js/ConnectedUsersManagerTests.js b/services/real-time/test/unit/js/ConnectedUsersManagerTests.js index a0ab01631e..8525b94b02 100644 --- a/services/real-time/test/unit/js/ConnectedUsersManagerTests.js +++ b/services/real-time/test/unit/js/ConnectedUsersManagerTests.js @@ -56,7 +56,7 @@ describe('ConnectedUsersManager', function () { this.ConnectedUsersManager = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': this.settings, + '@overleaf/settings': this.settings, '@overleaf/redis-wrapper': { createClient: () => { return this.rClient diff --git a/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js b/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js index 8f0be7f87d..333fe53499 100644 --- a/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js +++ b/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js @@ -28,7 +28,7 @@ describe('DocumentUpdaterController', function () { this.RoomEvents = { on: sinon.stub() } this.EditorUpdatesController = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { redis: { documentupdater: { key_schema: { diff --git a/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js b/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js index 94ef11f716..e2b6bdbe51 100644 --- a/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js +++ b/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js @@ -41,7 +41,7 @@ describe('DocumentUpdaterManager', function () { return (this.DocumentUpdaterManager = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': this.settings, + '@overleaf/settings': this.settings, request: (this.request = {}), '@overleaf/redis-wrapper': { createClient: () => this.rclient }, '@overleaf/metrics': (this.Metrics = { diff --git a/services/real-time/test/unit/js/RoomManagerTests.js b/services/real-time/test/unit/js/RoomManagerTests.js index fd22271469..b2cd2fe0e3 100644 --- a/services/real-time/test/unit/js/RoomManagerTests.js +++ b/services/real-time/test/unit/js/RoomManagerTests.js @@ -23,7 +23,7 @@ describe('RoomManager', function () { this.client = { namespace: { name: '' }, id: 'first-client' } this.RoomManager = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': (this.settings = {}), + '@overleaf/settings': (this.settings = {}), '@overleaf/metrics': (this.metrics = { gauge: sinon.stub() }) } }) diff --git a/services/real-time/test/unit/js/SafeJsonParseTest.js b/services/real-time/test/unit/js/SafeJsonParseTest.js index de50bccebb..bdbba00c93 100644 --- a/services/real-time/test/unit/js/SafeJsonParseTest.js +++ b/services/real-time/test/unit/js/SafeJsonParseTest.js @@ -19,7 +19,7 @@ describe('SafeJsonParse', function () { beforeEach(function () { return (this.SafeJsonParse = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': (this.Settings = { + '@overleaf/settings': (this.Settings = { maxUpdateSize: 16 * 1024 }) } diff --git a/services/real-time/test/unit/js/WebApiManagerTests.js b/services/real-time/test/unit/js/WebApiManagerTests.js index 97be3c27f0..b1291b4205 100644 --- a/services/real-time/test/unit/js/WebApiManagerTests.js +++ b/services/real-time/test/unit/js/WebApiManagerTests.js @@ -23,7 +23,7 @@ describe('WebApiManager', function () { return (this.WebApiManager = SandboxedModule.require(modulePath, { requires: { request: (this.request = {}), - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { apis: { web: { url: 'http://web.example.com', From e66d1231f24a5528c35100bc5888f04e40c99a5d Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:51:04 +0100 Subject: [PATCH 2/9] [misc] run npm dedupe --- services/real-time/package-lock.json | 213 +++------------------------ 1 file changed, 20 insertions(+), 193 deletions(-) diff --git a/services/real-time/package-lock.json b/services/real-time/package-lock.json index 85a0167a95..87bfbe62ff 100644 --- a/services/real-time/package-lock.json +++ b/services/real-time/package-lock.json @@ -175,17 +175,8 @@ "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-1.0.4.tgz", "integrity": "sha512-VccZDcOql77obTnFh0TbNED/6ZbbmHDf8UMNnzO1d5g9V0Htfm4k5cllY8P1tJsRKC3zWYGRLaViiupcgVjBoQ==" }, - "agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", - "requires": { - "debug": "4" - } - }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "version": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { "ms": "^2.1.1" @@ -247,34 +238,6 @@ "mime": "^2.2.0" } }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, "mime": { "version": "2.4.6", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", @@ -318,22 +281,13 @@ "google-auth-library": "^6.0.0" }, "dependencies": { - "agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", - "requires": { - "debug": "4" - } - }, "bignumber.js": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "version": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { "ms": "^2.1.1" @@ -351,15 +305,6 @@ "node-fetch": "^2.3.0" } }, - "gcp-metadata": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.1.4.tgz", - "integrity": "sha512-5J/GIH0yWt/56R3dNaNWPGQ/zXsZOddYECfJaqxFWgrZ9HC2Kvc5vl9upOgUUHKzURjAVf2N+f6tEJiojqXUuA==", - "requires": { - "gaxios": "^3.0.0", - "json-bigint": "^1.0.0" - } - }, "google-auth-library": { "version": "6.0.6", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-6.0.6.tgz", @@ -376,61 +321,13 @@ "lru-cache": "^6.0.0" } }, - "google-p12-pem": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.2.tgz", - "integrity": "sha512-tbjzndQvSIHGBLzHnhDs3cL4RBjLbLXc2pYvGH+imGVu5b4RMAttUTdnmW2UH0t11QeBTXZ7wlXPS7hrypO/tg==", - "requires": { - "node-forge": "^0.9.0" - } - }, - "gtoken": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.0.3.tgz", - "integrity": "sha512-Nyd1wZCMRc2dj/mAD0LlfQLcAO06uKdpKJXvK85SGrF5+5+Bpfil9u/2aw35ltvEHjvl0h5FMKN5knEU+9JrOg==", - "requires": { - "gaxios": "^3.0.0", - "google-p12-pem": "^3.0.0", - "jws": "^4.0.0", - "mime": "^2.2.0" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "version": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", "requires": { "bignumber.js": "^9.0.0" } }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -440,8 +337,7 @@ } }, "mime": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "version": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==" }, "ms": { @@ -450,8 +346,7 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node-forge": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.1.tgz", + "version": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.1.tgz", "integrity": "sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ==" }, "yallist": { @@ -1381,7 +1276,6 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -2573,13 +2467,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2780,17 +2667,8 @@ "walkdir": "^0.4.0" }, "dependencies": { - "agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", - "requires": { - "debug": "4" - } - }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "version": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { "ms": "^2.1.1" @@ -2852,34 +2730,6 @@ "mime": "^2.2.0" } }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, "mime": { "version": "2.4.6", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", @@ -3023,14 +2873,6 @@ "debug": "4" }, "dependencies": { - "agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", - "requires": { - "debug": "4" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -3281,6 +3123,11 @@ "binary-extensions": "^2.0.0" } }, + "is-buffer": { + "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.2.0", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", @@ -3662,19 +3509,6 @@ "yn": "^4.0.0" }, "dependencies": { - "dtrace-provider": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.8.tgz", - "integrity": "sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg==", - "requires": { - "nan": "^2.14.0" - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" - }, "yn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-4.0.0.tgz", @@ -3784,13 +3618,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": { @@ -5685,15 +5512,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -6396,6 +6214,15 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, "tsconfig-paths": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", From 91fe61b1672550a0c636171eef7708c5d69bbc93 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 10:07:02 +0100 Subject: [PATCH 3/9] [misc] goodbye coffee-script --- services/real-time/package-lock.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/real-time/package-lock.json b/services/real-time/package-lock.json index 87bfbe62ff..3da4ce62ac 100644 --- a/services/real-time/package-lock.json +++ b/services/real-time/package-lock.json @@ -1276,6 +1276,7 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", + "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -2467,6 +2468,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", From d17cda1a7ba30e93cb6c2634df55b284f29c18ba Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 11:55:16 +0100 Subject: [PATCH 4/9] [misc] upgrade build scripts to version 3.11.0 and cleanup packages ``` npm uninstall prettier-eslint-cli eslint-plugin-standard eslint-plugin-jsx-a11y eslint-plugin-react eslint-config-standard-jsx eslint-config-standard-react babel-eslint npm dedupe ``` --- services/real-time/.eslintrc | 2 +- services/real-time/.github/dependabot.yml | 2 +- services/real-time/.prettierrc | 6 +- services/real-time/buildscript.txt | 2 +- services/real-time/package-lock.json | 2732 ++++++--------------- services/real-time/package.json | 30 +- 6 files changed, 804 insertions(+), 1970 deletions(-) diff --git a/services/real-time/.eslintrc b/services/real-time/.eslintrc index 321353f971..1c14f50efe 100644 --- a/services/real-time/.eslintrc +++ b/services/real-time/.eslintrc @@ -3,9 +3,9 @@ // https://github.com/sharelatex/sharelatex-dev-environment { "extends": [ + "eslint:recommended", "standard", "prettier", - "prettier/standard" ], "parserOptions": { "ecmaVersion": 2018 diff --git a/services/real-time/.github/dependabot.yml b/services/real-time/.github/dependabot.yml index e2c64a3351..c856753655 100644 --- a/services/real-time/.github/dependabot.yml +++ b/services/real-time/.github/dependabot.yml @@ -20,4 +20,4 @@ updates: # future if we reorganise teams labels: - "dependencies" - - "Team-Magma" + - "type:maintenance" diff --git a/services/real-time/.prettierrc b/services/real-time/.prettierrc index 24f9ec526f..c92c3526e7 100644 --- a/services/real-time/.prettierrc +++ b/services/real-time/.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/real-time/buildscript.txt b/services/real-time/buildscript.txt index d8fc7d8c7d..e536d601f3 100644 --- a/services/real-time/buildscript.txt +++ b/services/real-time/buildscript.txt @@ -5,4 +5,4 @@ real-time --env-pass-through= --node-version=12.21.0 --public-repo=True ---script-version=3.8.0 +--script-version=3.11.0 diff --git a/services/real-time/package-lock.json b/services/real-time/package-lock.json index 3da4ce62ac..34cea2a4ea 100644 --- a/services/real-time/package-lock.json +++ b/services/real-time/package-lock.json @@ -5,31 +5,77 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", - "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==", + "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.10.3" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-validator-identifier": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz", - "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==", + "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.10.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz", - "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==", + "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.10.3", + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, + "@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": { + "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": { + "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" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + } + } + }, "@google-cloud/common": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", @@ -87,11 +133,6 @@ "split": "^1.0.0" }, "dependencies": { - "acorn": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", - "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==" - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -100,14 +141,6 @@ "yallist": "^4.0.0" } }, - "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" - } - }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -528,6 +561,40 @@ "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" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + } + } + }, + "@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", @@ -664,14 +731,6 @@ "dev": true, "requires": { "type-detect": "4.0.8" - }, - "dependencies": { - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - } } }, "@sinonjs/fake-timers": { @@ -692,14 +751,6 @@ "@sinonjs/commons": "^1.6.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" - }, - "dependencies": { - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - } } }, "@sinonjs/text-encoding": { @@ -713,23 +764,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", @@ -738,18 +777,6 @@ "@types/node": "*" } }, - "@types/json-schema": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", - "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -765,59 +792,6 @@ "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", @@ -862,15 +836,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.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", + "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==" }, "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==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "active-x-obfuscator": { @@ -921,23 +894,6 @@ "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", @@ -992,24 +948,27 @@ "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" } }, "arrify": { @@ -1031,15 +990,15 @@ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" }, "assertion-error": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", - "integrity": "sha512-g/gZV+G476cnmtYI+Ko9d5khxSoCSoom/EaNmmCfwpOvBXEJ18qwFrxfP1/CsIqk2no1sAKKwxndV0tP7ROOFQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "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": { @@ -1147,12 +1106,6 @@ "type-is": "~1.6.17" } }, - "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", @@ -1208,6 +1161,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", @@ -1215,35 +1178,37 @@ "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.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "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", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "chai": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-1.9.2.tgz", - "integrity": "sha512-olRoaitftnzWHFEAza6MXR4w+FfZrOVyV7r7U/Z8ObJefCgL8IuWkAuASJjSXrpP9wvgoL8+1dB9RbMLc2FkNg==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", "dev": true, "requires": { - "assertion-error": "1.0.0", - "deep-eql": "0.1.3" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "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": { @@ -1257,17 +1222,17 @@ "supports-color": "^5.3.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", "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, "chokidar": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", @@ -1276,7 +1241,6 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -1289,55 +1253,15 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, - "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.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "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": { @@ -1383,12 +1307,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=" }, - "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", @@ -1464,12 +1382,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", @@ -1531,36 +1443,20 @@ "integrity": "sha512-Alvs19Vgq07eunykd3Xy2jF0/qSNv2u7KDbAek9H5liV1UMijbqFs5cycZvv5dVsvseT/U4H8/7/w8Koh35C4A==", "dev": true }, - "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", - "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" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "crypt": { @@ -1590,18 +1486,18 @@ } }, "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": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "integrity": "sha512-6sEotTRGBFiNcqVoeHwnfopbSpi5NbH1VWJmYCVkmxMmaVTT0bUTrNaGyBwhgP4MZL012W/mkzIn3Da+iDYweg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "type-detect": "0.1.1" + "type-detect": "^4.0.0" } }, "deep-extend": { @@ -1665,12 +1561,6 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, - "dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1757,6 +1647,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", @@ -1772,22 +1671,27 @@ } }, "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "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.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.10.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.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": { @@ -1815,61 +1719,168 @@ "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": { - "debug": { + "chalk": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { - "ms": "^2.1.1" + "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 + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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==" + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "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" + } + }, + "glob-parent": { + "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" + } + }, + "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 + }, + "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==" + }, + "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": { + "yallist": "^4.0.0" } }, "ms": { @@ -1877,22 +1888,42 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "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": "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.11.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", - "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", - "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-import-resolver-node": { @@ -1906,25 +1937,42 @@ } }, "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "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": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "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 + } } }, "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": { @@ -1935,86 +1983,60 @@ "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "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" - } - }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - } } }, "eslint-plugin-import": { - "version": "2.21.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.21.2.tgz", - "integrity": "sha512-FEmxeGI6yaz+SnEB6YgNHlQK1Bs2DKLM+YF+vuTk5H8J9CLbJLtlPvRFgZZ2+sXiKAlN5dpdlrWOjK8ZoZJpQA==", + "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.1.1", - "array.prototype.flat": "^1.2.3", - "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.3", - "eslint-module-utils": "^2.6.0", + "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.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.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": { "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" } }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } } } }, "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.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" - } - } + "eslint-utils": "^2.1.0", + "ramda": "^0.27.1" } }, "eslint-plugin-node": { @@ -2031,15 +2053,6 @@ "semver": "^6.1.0" }, "dependencies": { - "eslint-utils": { - "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" - } - }, "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", @@ -2063,26 +2076,20 @@ "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "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.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "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" @@ -2095,20 +2102,20 @@ "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.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true } } @@ -2120,31 +2127,28 @@ "dev": true }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true + }, + "esrecurse": { + "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": "^5.1.0" + "estraverse": "^5.2.0" }, "dependencies": { "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "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==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", @@ -2279,17 +2283,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", @@ -2322,22 +2315,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": { @@ -2371,7 +2355,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" @@ -2389,45 +2373,18 @@ "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" - } - }, - "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.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.1.tgz", + "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", "dev": true }, "forever-agent": { @@ -2468,13 +2425,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2577,12 +2527,23 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "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==", + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "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", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -2614,12 +2575,12 @@ } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "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.8.1" + "type-fest": "^0.20.2" } }, "google-auth-library": { @@ -2764,9 +2725,9 @@ } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "growl": { @@ -2808,22 +2769,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", @@ -2832,9 +2782,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "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 }, "has-unicode": { @@ -2968,12 +2918,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", @@ -2993,88 +2937,6 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, - "inquirer": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.2.0.tgz", - "integrity": "sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ==", - "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 - }, - "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" - } - } - } - }, "ioredis": { "version": "4.17.3", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", @@ -3119,7 +2981,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": { @@ -3131,21 +2999,39 @@ "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": "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.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, + "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": { + "has": "^1.0.3" + } + }, "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", "dev": true }, "is-extglob": { @@ -3169,12 +3055,24 @@ "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", @@ -3187,12 +3085,13 @@ "dev": true }, "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "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-symbols": "^1.0.1" + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" } }, "is-stream": { @@ -3206,18 +3105,18 @@ "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" }, "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", "dev": true }, "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" } }, "is-typedarray": { @@ -3270,6 +3169,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", @@ -3292,12 +3197,12 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "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.0" + "minimist": "^1.2.5" }, "dependencies": { "minimist": { @@ -3345,31 +3250,31 @@ } }, "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" } }, "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 } } @@ -3377,19 +3282,13 @@ "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", "path-exists": "^3.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "lodash.at": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.at/-/lodash.at-4.6.0.tgz", @@ -3400,6 +3299,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", @@ -3421,22 +3326,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": { @@ -3524,64 +3423,6 @@ } } }, - "loglevel": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz", - "integrity": "sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==", - "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", @@ -3595,24 +3436,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", @@ -3638,29 +3461,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.3", - "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.3.tgz", - "integrity": "sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg==", - "dev": true - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -3684,12 +3484,6 @@ "mime-db": "~1.33.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", @@ -3772,7 +3566,6 @@ "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" } @@ -3783,22 +3576,10 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "cliui": { - "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": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.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" } @@ -3806,8 +3587,7 @@ "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 + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "debug": { "version": "4.3.1", @@ -3892,15 +3672,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, "p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -3916,21 +3687,6 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "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" - } - }, - "strip-json-comments": { - "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 - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3939,47 +3695,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "which": { - "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" - } - }, - "wrap-ansi": { - "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": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true } } }, @@ -3999,12 +3714,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "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", @@ -4069,12 +3778,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.1.0", "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", @@ -4258,9 +3961,9 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "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": { @@ -4270,27 +3973,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==", + "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": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "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": { @@ -4314,27 +4016,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" } }, "options": { @@ -4362,18 +4055,17 @@ } }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "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" @@ -4387,19 +4079,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": { @@ -4417,12 +4103,13 @@ "integrity": "sha512-X4kUkCTHU1N/kEbwK9FpUJ0UZQa90VzeczfS704frR30gljxDG0pSziws06XlK+CGRSo/1wtG1mFIdBFQTMQNw==" }, "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": { @@ -4446,16 +4133,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": { @@ -4469,22 +4150,28 @@ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "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 } } }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -4504,7 +4191,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" @@ -4537,14 +4233,6 @@ "resolved": "https://registry.npmjs.org/delay/-/delay-4.4.1.tgz", "integrity": "sha512-aL3AhqtfhOlT/3ai6sWXeqwnw63ATNpnUiN4HL7x9q+My5QtHlO3OIkasmug9LKzpheLdmUKGRKnYXYAS7FQkQ==" }, - "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", @@ -4573,599 +4261,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.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", + "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.2", - "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-9.0.2.tgz", - "integrity": "sha512-u6EQqxUhaGfra9gy9shcR7MT7r/2twwEfRGy1tfzyaJvLQwSg34M9IU5HuF7FsLW2QUgr5VIUc56EPWibw1pdw==", - "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": { - "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" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "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" - } - }, - "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" - } - }, - "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 - }, - "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 - }, - "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 - }, - "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" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "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": { - "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" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "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" - } - }, - "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" - } - }, - "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 - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "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 - }, - "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 - }, - "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" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "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", @@ -5175,24 +4281,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", @@ -5313,16 +4401,10 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true - }, "ramda": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz", - "integrity": "sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", + "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==", "dev": true }, "random-bytes": { @@ -5398,24 +4480,24 @@ } }, "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": { @@ -5465,9 +4547,9 @@ } }, "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": { @@ -5533,6 +4615,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", @@ -5564,18 +4652,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 - }, "resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", @@ -5590,16 +4666,6 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "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", @@ -5633,21 +4699,6 @@ "glob": "^6.0.1" } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "rxjs": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", - "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -5750,18 +4801,18 @@ "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, "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": { @@ -5806,20 +4857,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 } } @@ -5902,9 +4953,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": { @@ -5974,37 +5025,26 @@ "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.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "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.5" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "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", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -6016,32 +5056,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.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "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": { @@ -6059,38 +5091,28 @@ } }, "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": { - "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==", + "ajv": { + "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": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" } } } @@ -6178,15 +5200,6 @@ "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz", "integrity": "sha1-MgtaUtg6u1l42Bo+iH1K77FaYWQ=" }, - "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-no-case": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", @@ -6232,13 +5245,12 @@ } }, "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "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": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", + "json5": "^2.2.0", "minimist": "^1.2.0", "strip-bom": "^3.0.0" }, @@ -6251,12 +5263,6 @@ } } }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -6271,24 +5277,24 @@ "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": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha512-5rqszGVwYgBoDkIm2oUtvkfZMQ0vk29iDMU0W2qCa3rG0vPDNczCMT4hV/bLBgLg8k8ri6+u3Zbt+S/14eMzlA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "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": { @@ -6315,12 +5321,6 @@ } } }, - "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", - "dev": true - }, "uglify-js": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz", @@ -6334,6 +5334,18 @@ "random-bytes": "~1.0.0" } }, + "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" + } + }, "underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", @@ -6368,9 +5380,9 @@ "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "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": { @@ -6398,99 +5410,32 @@ "extsprintf": "^1.2.0" } }, - "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.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "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" - } - }, - "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 - } - } - }, "walkdir": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz", "integrity": "sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==" }, "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", @@ -6542,39 +5487,13 @@ "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": { @@ -6582,15 +5501,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" - } - }, "ws": { "version": "0.4.32", "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.32.tgz", @@ -6626,91 +5536,25 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "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.2" - }, - "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" - } - }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - } + "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": "2.0.0", @@ -6722,20 +5566,6 @@ "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - } } }, "yn": { diff --git a/services/real-time/package.json b/services/real-time/package.json index 37cd18f81f..308957330d 100644 --- a/services/real-time/package.json +++ b/services/real-time/package.json @@ -16,9 +16,10 @@ "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", @@ -41,22 +42,21 @@ "underscore": "1.13.1" }, "devDependencies": { - "chai": "~1.9.1", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", "cookie-signature": "^1.1.0", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-config-standard": "^14.1.0", - "eslint-plugin-chai-expect": "^2.1.0", - "eslint-plugin-chai-friendly": "^0.5.0", - "eslint-plugin-import": "^2.20.1", - "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-standard": "^4.0.1", "mocha": "^8.3.2", - "prettier": "^2.0.0", - "prettier-eslint-cli": "^5.0.0", + "prettier": "^2.2.1", "sandboxed-module": "~0.3.0", "sinon": "^9.2.4", "timekeeper": "0.0.4", From 7e8e231059a696225ffcce080ab00cbacba17c4f Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:04:45 +0100 Subject: [PATCH 5/9] [misc] run format_fix and lint:fix --- services/real-time/app.js | 16 +- .../real-time/app/js/AuthorizationManager.js | 2 +- services/real-time/app/js/ChannelManager.js | 4 +- .../real-time/app/js/ConnectedUsersManager.js | 100 ++--- .../real-time/app/js/DeploymentManager.js | 4 +- .../app/js/DocumentUpdaterController.js | 16 +- .../app/js/DocumentUpdaterManager.js | 38 +- services/real-time/app/js/DrainManager.js | 2 +- services/real-time/app/js/Errors.js | 8 +- services/real-time/app/js/EventLogger.js | 2 +- .../real-time/app/js/HttpApiController.js | 2 +- services/real-time/app/js/HttpController.js | 10 +- .../real-time/app/js/RedisClientManager.js | 4 +- services/real-time/app/js/RoomManager.js | 8 +- services/real-time/app/js/Router.js | 93 +++-- services/real-time/app/js/SafeJsonParse.js | 2 +- services/real-time/app/js/SessionSockets.js | 2 +- services/real-time/app/js/WebApiManager.js | 8 +- .../real-time/app/js/WebsocketController.js | 384 +++++++++--------- .../real-time/app/js/WebsocketLoadBalancer.js | 25 +- .../real-time/config/settings.defaults.js | 32 +- services/real-time/config/settings.test.js | 4 +- .../test/acceptance/js/ApplyUpdateTests.js | 118 +++--- .../test/acceptance/js/ClientTrackingTests.js | 72 ++-- .../test/acceptance/js/DrainManagerTests.js | 24 +- .../test/acceptance/js/EarlyDisconnect.js | 60 +-- .../test/acceptance/js/HttpControllerTests.js | 22 +- .../test/acceptance/js/JoinDocTests.js | 108 ++--- .../test/acceptance/js/JoinProjectTests.js | 58 +-- .../test/acceptance/js/LeaveDocTests.js | 20 +- .../test/acceptance/js/LeaveProjectTests.js | 50 +-- .../test/acceptance/js/MatrixTests.js | 96 ++--- .../test/acceptance/js/PubSubRace.js | 72 ++-- .../test/acceptance/js/ReceiveUpdateTests.js | 82 ++-- .../test/acceptance/js/RouterTests.js | 34 +- .../test/acceptance/js/SessionSocketsTests.js | 12 +- .../test/acceptance/js/SessionTests.js | 4 +- .../acceptance/js/helpers/FixturesManager.js | 25 +- .../js/helpers/MockDocUpdaterServer.js | 8 +- .../acceptance/js/helpers/MockWebServer.js | 8 +- .../acceptance/js/helpers/RealTimeClient.js | 32 +- .../acceptance/js/helpers/RealtimeServer.js | 6 +- .../test/acceptance/libs/XMLHttpRequest.js | 82 ++-- services/real-time/test/setup.js | 10 +- .../test/unit/js/AuthorizationManagerTests.js | 34 +- .../test/unit/js/ChannelManagerTests.js | 8 +- .../unit/js/ConnectedUsersManagerTests.js | 58 +-- .../unit/js/DocumentUpdaterControllerTests.js | 46 ++- .../unit/js/DocumentUpdaterManagerTests.js | 34 +- .../test/unit/js/DrainManagerTests.js | 20 +- .../test/unit/js/EventLoggerTests.js | 4 +- .../test/unit/js/RoomManagerTests.js | 18 +- .../test/unit/js/SafeJsonParseTest.js | 6 +- .../test/unit/js/SessionSocketsTests.js | 24 +- .../test/unit/js/WebApiManagerTests.js | 30 +- .../test/unit/js/WebsocketControllerTests.js | 100 ++--- .../unit/js/WebsocketLoadBalancerTests.js | 60 +-- 57 files changed, 1104 insertions(+), 1107 deletions(-) diff --git a/services/real-time/app.js b/services/real-time/app.js index 0b8be4d17b..31216bb07e 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -34,7 +34,7 @@ const socketIoLogger = { }, info() {}, debug() {}, - log() {} + log() {}, } // monitor status file to take dark deployments out of the load-balancer @@ -45,7 +45,7 @@ const app = express() const server = require('http').createServer(app) const io = require('socket.io').listen(server, { - logger: socketIoLogger + logger: socketIoLogger, }) // Bind to sessions @@ -78,7 +78,7 @@ io.configure(function () { 'flashsocket', 'htmlfile', 'xhr-polling', - 'jsonp-polling' + 'jsonp-polling', ]) }) @@ -195,10 +195,10 @@ function drainAndShutdown(signal) { const staleClients = io.sockets.clients() if (staleClients.length !== 0) { logger.warn( - { staleClients: staleClients.map((client) => client.id) }, + { staleClients: staleClients.map(client => client.id) }, 'forcefully disconnecting stale clients' ) - staleClients.forEach((client) => { + staleClients.forEach(client => { client.disconnect() }) } @@ -222,7 +222,7 @@ if (Settings.shutdownDrainTimeWindow) { 'SIGUSR1', 'SIGUSR2', 'SIGTERM', - 'SIGABRT' + 'SIGABRT', ]) { process.on(signal, drainAndShutdown) } // signal is passed as argument to event handler @@ -237,7 +237,7 @@ if (Settings.shutdownDrainTimeWindow) { 'EHOSTUNREACH', 'EPIPE', 'ECONNRESET', - 'ERR_STREAM_WRITE_AFTER_END' + 'ERR_STREAM_WRITE_AFTER_END', ].includes(error.code) ) { Metrics.inc('disconnected_write', 1, { status: error.code }) @@ -266,7 +266,7 @@ if (Settings.continualPubsubTraffic) { const json = JSON.stringify({ health_check: true, key: checker.id, - date: new Date().toString() + date: new Date().toString(), }) Metrics.summary(`redis.publish.${channel}`, json.length) pubsubClient.publish(channel, json, function (err) { diff --git a/services/real-time/app/js/AuthorizationManager.js b/services/real-time/app/js/AuthorizationManager.js index 0c37ac1423..4b48ed0e8c 100644 --- a/services/real-time/app/js/AuthorizationManager.js +++ b/services/real-time/app/js/AuthorizationManager.js @@ -63,5 +63,5 @@ module.exports = AuthorizationManager = { removeAccessToDoc(client, doc_id, callback) { delete client.ol_context[`doc:${doc_id}`] callback(null) - } + }, } diff --git a/services/real-time/app/js/ChannelManager.js b/services/real-time/app/js/ChannelManager.js index c777fb2250..81caa7dd83 100644 --- a/services/real-time/app/js/ChannelManager.js +++ b/services/real-time/app/js/ChannelManager.js @@ -39,7 +39,7 @@ module.exports = { metrics.inc(`subscribe.failed.${baseChannel}`) // add context for the stack-trace at the call-site throw new OError('failed to subscribe to channel', { - channel + channel, }).withCause(err) }) } @@ -97,5 +97,5 @@ module.exports = { // we publish on a different client to the subscribe, so we can't // check for the channel existing here rclient.publish(channel, data) - } + }, } diff --git a/services/real-time/app/js/ConnectedUsersManager.js b/services/real-time/app/js/ConnectedUsersManager.js index 006e763645..f8dd40fd6a 100644 --- a/services/real-time/app/js/ConnectedUsersManager.js +++ b/services/real-time/app/js/ConnectedUsersManager.js @@ -111,66 +111,66 @@ module.exports = { }, _getConnectedUser(project_id, client_id, callback) { - rclient.hgetall(Keys.connectedUser({ project_id, client_id }), function ( - err, - result - ) { - if (err) { - err = new OError('problem fetching connected user details', { - other_client_id: client_id - }).withCause(err) - return callback(err) - } - if (!(result && result.user_id)) { - result = { - connected: false, - client_id + rclient.hgetall( + Keys.connectedUser({ project_id, client_id }), + function (err, result) { + if (err) { + err = new OError('problem fetching connected user details', { + other_client_id: client_id, + }).withCause(err) + return callback(err) } - } else { - result.connected = true - result.client_id = client_id - result.client_age = - (Date.now() - parseInt(result.last_updated_at, 10)) / 1000 - if (result.cursorData) { - try { - result.cursorData = JSON.parse(result.cursorData) - } catch (e) { - OError.tag(e, 'error parsing cursorData JSON', { - other_client_id: client_id, - cursorData: result.cursorData - }) - return callback(e) + if (!(result && result.user_id)) { + result = { + connected: false, + client_id, + } + } else { + result.connected = true + result.client_id = client_id + result.client_age = + (Date.now() - parseInt(result.last_updated_at, 10)) / 1000 + if (result.cursorData) { + try { + result.cursorData = JSON.parse(result.cursorData) + } catch (e) { + OError.tag(e, 'error parsing cursorData JSON', { + other_client_id: client_id, + cursorData: result.cursorData, + }) + return callback(e) + } } } + callback(err, result) } - callback(err, result) - }) + ) }, getConnectedUsers(project_id, callback) { const self = this - rclient.smembers(Keys.clientsInProject({ project_id }), function ( - err, - results - ) { - if (err) { - err = new OError('problem getting clients in project').withCause(err) - return callback(err) - } - const jobs = results.map((client_id) => (cb) => - self._getConnectedUser(project_id, client_id, cb) - ) - async.series(jobs, function (err, users) { + rclient.smembers( + Keys.clientsInProject({ project_id }), + function (err, results) { if (err) { - OError.tag(err, 'problem getting connected users') + err = new OError('problem getting clients in project').withCause(err) return callback(err) } - users = users.filter( - (user) => - user && user.connected && user.client_age < REFRESH_TIMEOUT_IN_S + const jobs = results.map( + client_id => cb => self._getConnectedUser(project_id, client_id, cb) ) - callback(null, users) - }) - }) - } + async.series(jobs, function (err, users) { + if (err) { + OError.tag(err, 'problem getting connected users') + return callback(err) + } + users = users.filter( + user => + user && user.connected && user.client_age < REFRESH_TIMEOUT_IN_S + ) + callback(null, users) + }) + } + ) + }, } diff --git a/services/real-time/app/js/DeploymentManager.js b/services/real-time/app/js/DeploymentManager.js index fd482740f5..0e6b2a7f05 100644 --- a/services/real-time/app/js/DeploymentManager.js +++ b/services/real-time/app/js/DeploymentManager.js @@ -9,7 +9,7 @@ const FILE_CHECK_INTERVAL = 5000 const statusFile = settings.deploymentFile const deploymentColour = settings.deploymentColour -var serviceCloseTime +let serviceCloseTime function updateDeploymentStatus(fileContent) { const closed = fileContent && !fileContent.includes(deploymentColour) @@ -55,5 +55,5 @@ module.exports = { }, deploymentIsClosed() { return settings.serviceIsClosed && Date.now() > serviceCloseTime - } + }, } diff --git a/services/real-time/app/js/DocumentUpdaterController.js b/services/real-time/app/js/DocumentUpdaterController.js index 7ce516524c..290882c41f 100644 --- a/services/real-time/app/js/DocumentUpdaterController.js +++ b/services/real-time/app/js/DocumentUpdaterController.js @@ -50,7 +50,7 @@ module.exports = DocumentUpdaterController = { handleRoomUpdates(rclientSubList) { const roomEvents = RoomManager.eventSource() roomEvents.on('doc-active', function (doc_id) { - const subscribePromises = rclientSubList.map((rclient) => + const subscribePromises = rclientSubList.map(rclient => ChannelManager.subscribe(rclient, 'applied-ops', doc_id) ) RoomManager.emitOnCompletion( @@ -58,8 +58,8 @@ module.exports = DocumentUpdaterController = { `doc-subscribed-${doc_id}` ) }) - roomEvents.on('doc-empty', (doc_id) => - rclientSubList.map((rclient) => + roomEvents.on('doc-empty', doc_id => + rclientSubList.map(rclient => ChannelManager.unsubscribe(rclient, 'applied-ops', doc_id) ) ) @@ -117,7 +117,7 @@ module.exports = DocumentUpdaterController = { doc_id, version: update.v, source: update.meta && update.meta.source, - socketIoClients: clientList.map((client) => client.id) + socketIoClients: clientList.map(client => client.id), }, 'distributing updates to clients' ) @@ -131,7 +131,7 @@ module.exports = DocumentUpdaterController = { { doc_id, version: update.v, - source: update.meta.source + source: update.meta.source, }, 'distributing update to sender' ) @@ -143,7 +143,7 @@ module.exports = DocumentUpdaterController = { doc_id, version: update.v, source: update.meta.source, - client_id: client.id + client_id: client.id, }, 'distributing update to collaborator' ) @@ -156,7 +156,7 @@ module.exports = DocumentUpdaterController = { logger.log( { doc_id, - socketIoClients: clientList.map((client) => client.id) + socketIoClients: clientList.map(client => client.id), }, 'discarded duplicate clients' ) @@ -172,5 +172,5 @@ module.exports = DocumentUpdaterController = { client.emit('otUpdateError', error, message) client.disconnect() } - } + }, } diff --git a/services/real-time/app/js/DocumentUpdaterManager.js b/services/real-time/app/js/DocumentUpdaterManager.js index 715d1a70d3..9f01ed73e3 100644 --- a/services/real-time/app/js/DocumentUpdaterManager.js +++ b/services/real-time/app/js/DocumentUpdaterManager.js @@ -11,7 +11,7 @@ const { ClientRequestedMissingOpsError, DocumentUpdaterRequestFailedError, NullBytesInOpError, - UpdateTooLargeError + UpdateTooLargeError, } = require('./Errors') const rclient = require('@overleaf/redis-wrapper').createClient( @@ -105,7 +105,7 @@ const DocumentUpdaterManager = { 'dupIfSource', 'meta', 'lastV', - 'hash' + 'hash', ] change = _.pick(change, allowedKeys) const jsonChange = JSON.stringify(change) @@ -125,24 +125,26 @@ const DocumentUpdaterManager = { const doc_key = `${project_id}:${doc_id}` // Push onto pendingUpdates for doc_id first, because once the doc updater // gets an entry on pending-updates-list, it starts processing. - rclient.rpush(Keys.pendingUpdates({ doc_id }), jsonChange, function ( - error - ) { - if (error) { - error = new OError('error pushing update into redis').withCause(error) - return callback(error) - } - const queueKey = DocumentUpdaterManager._getPendingUpdateListKey() - rclient.rpush(queueKey, doc_key, function (error) { + rclient.rpush( + Keys.pendingUpdates({ doc_id }), + jsonChange, + function (error) { if (error) { - error = new OError('error pushing doc_id into redis') - .withInfo({ queueKey }) - .withCause(error) + error = new OError('error pushing update into redis').withCause(error) + return callback(error) } - callback(error) - }) - }) - } + const queueKey = DocumentUpdaterManager._getPendingUpdateListKey() + rclient.rpush(queueKey, doc_key, function (error) { + if (error) { + error = new OError('error pushing doc_id into redis') + .withInfo({ queueKey }) + .withCause(error) + } + callback(error) + }) + } + ) + }, } module.exports = DocumentUpdaterManager diff --git a/services/real-time/app/js/DrainManager.js b/services/real-time/app/js/DrainManager.js index 06885f1d28..5f9c192afd 100644 --- a/services/real-time/app/js/DrainManager.js +++ b/services/real-time/app/js/DrainManager.js @@ -55,5 +55,5 @@ module.exports = { return true } return false - } + }, } diff --git a/services/real-time/app/js/Errors.js b/services/real-time/app/js/Errors.js index 562c9888ab..a5177be737 100644 --- a/services/real-time/app/js/Errors.js +++ b/services/real-time/app/js/Errors.js @@ -3,7 +3,7 @@ const OError = require('@overleaf/o-error') class ClientRequestedMissingOpsError extends OError { constructor(statusCode) { super('doc updater could not load requested ops', { - statusCode + statusCode, }) } } @@ -24,7 +24,7 @@ class DataTooLargeToParseError extends OError { constructor(data) { super('data too large to parse', { head: data.slice(0, 1024), - length: data.length + length: data.length, }) } } @@ -33,7 +33,7 @@ class DocumentUpdaterRequestFailedError extends OError { constructor(action, statusCode) { super('doc updater returned a non-success status code', { action, - statusCode + statusCode, }) } } @@ -99,5 +99,5 @@ module.exports = { NullBytesInOpError, UnexpectedArgumentsError, UpdateTooLargeError, - WebApiRequestFailedError + WebApiRequestFailedError, } diff --git a/services/real-time/app/js/EventLogger.js b/services/real-time/app/js/EventLogger.js index e6baffaa50..21c3460865 100644 --- a/services/real-time/app/js/EventLogger.js +++ b/services/real-time/app/js/EventLogger.js @@ -80,5 +80,5 @@ module.exports = EventLogger = { delete EVENT_LOG_TIMESTAMP[key] } }) - } + }, } diff --git a/services/real-time/app/js/HttpApiController.js b/services/real-time/app/js/HttpApiController.js index dceb294310..625bbbf739 100644 --- a/services/real-time/app/js/HttpApiController.js +++ b/services/real-time/app/js/HttpApiController.js @@ -48,5 +48,5 @@ module.exports = { logger.warn({ client_id }, 'api: requesting client disconnect') client.on('disconnect', () => res.sendStatus(204)) client.disconnect() - } + }, } diff --git a/services/real-time/app/js/HttpController.js b/services/real-time/app/js/HttpController.js index 68e5d4cd07..6e9d48cf63 100644 --- a/services/real-time/app/js/HttpController.js +++ b/services/real-time/app/js/HttpController.js @@ -17,7 +17,7 @@ module.exports = HttpController = { first_name, last_name, email, - connected_time + connected_time, } = ioClient.ol_context const client = { client_id, @@ -26,14 +26,14 @@ module.exports = HttpController = { first_name, last_name, email, - connected_time + connected_time, } client.rooms = Object.keys(ioClient.manager.roomClients[client_id] || {}) // drop the namespace - .filter((room) => room !== '') + .filter(room => room !== '') // room names are composed as '/' and the default // namespace is empty (see comments in RoomManager), just drop the '/' - .map((fullRoomPath) => fullRoomPath.slice(1)) + .map(fullRoomPath => fullRoomPath.slice(1)) return client }, @@ -53,5 +53,5 @@ module.exports = HttpController = { return } res.json(HttpController._getConnectedClientView(ioClient)) - } + }, } diff --git a/services/real-time/app/js/RedisClientManager.js b/services/real-time/app/js/RedisClientManager.js index c2070d3ad5..226bf91cfd 100644 --- a/services/real-time/app/js/RedisClientManager.js +++ b/services/real-time/app/js/RedisClientManager.js @@ -4,7 +4,7 @@ const logger = require('logger-sharelatex') module.exports = { createClientList(...configs) { // create a dynamic list of redis clients, excluding any configurations which are not defined - return configs.filter(Boolean).map((x) => { + return configs.filter(Boolean).map(x => { const redisType = x.cluster ? 'cluster' : x.sentinels @@ -15,5 +15,5 @@ module.exports = { logger.log({ redis: redisType }, 'creating redis client') return redis.createClient(x) }) - } + }, } diff --git a/services/real-time/app/js/RoomManager.js b/services/real-time/app/js/RoomManager.js index c1e03635a6..e030b60490 100644 --- a/services/real-time/app/js/RoomManager.js +++ b/services/real-time/app/js/RoomManager.js @@ -49,7 +49,7 @@ module.exports = { emitOnCompletion(promiseList, eventName) { Promise.all(promiseList) .then(() => RoomEvents.emit(eventName)) - .catch((err) => RoomEvents.emit(eventName, err)) + .catch(err => RoomEvents.emit(eventName, err)) }, eventSource() { @@ -150,15 +150,15 @@ module.exports = { return ( Object.keys(rooms) // drop the namespace - .filter((room) => room !== '') + .filter(room => room !== '') // room names are composed as '/' and the default // namespace is empty (see comments above), just drop the '/' - .map((fullRoomPath) => fullRoomPath.slice(1)) + .map(fullRoomPath => fullRoomPath.slice(1)) ) }, _clientAlreadyInRoom(client, room) { const rooms = client.manager.roomClients[client.id] || {} return !!rooms['/' + room] - } + }, } diff --git a/services/real-time/app/js/Router.js b/services/real-time/app/js/Router.js index 85b48eaf66..eff8dc7b1a 100644 --- a/services/real-time/app/js/Router.js +++ b/services/real-time/app/js/Router.js @@ -52,7 +52,7 @@ module.exports = Router = { [ 'not authorized', 'joinLeaveEpoch mismatch', - 'doc updater could not load requested ops' + 'doc updater could not load requested ops', ].includes(error.message) ) { logger.warn(attrs, error.message) @@ -62,7 +62,7 @@ module.exports = Router = { logger.error(attrs, `server side error in ${method}`) // Don't return raw error to prevent leaking server side info const serializedError = { - message: 'Something went wrong in real-time service' + message: 'Something went wrong in real-time service', } callback(serializedError) } @@ -201,7 +201,7 @@ module.exports = Router = { if (err) { Router._handleError(callback, err, client, 'joinProject', { project_id: data.project_id, - user_id: user._id + user_id: user._id, }) } else { callback(null, ...args) @@ -263,7 +263,7 @@ module.exports = Router = { if (err) { Router._handleError(callback, err, client, 'joinDoc', { doc_id, - fromVersion + fromVersion, }) } else { callback(null, ...args) @@ -280,7 +280,7 @@ module.exports = Router = { WebsocketController.leaveDoc(client, doc_id, function (err, ...args) { if (err) { Router._handleError(callback, err, client, 'leaveDoc', { - doc_id + doc_id, }) } else { callback(null, ...args) @@ -311,36 +311,38 @@ module.exports = Router = { }) }) - client.on('clientTracking.updatePosition', function ( - cursorData, - callback - ) { - if (!callback) { - callback = function () {} - } - if (typeof callback !== 'function') { - return Router._handleInvalidArguments( + client.on( + 'clientTracking.updatePosition', + function (cursorData, callback) { + if (!callback) { + callback = function () {} + } + if (typeof callback !== 'function') { + return Router._handleInvalidArguments( + client, + 'clientTracking.updatePosition', + arguments + ) + } + + WebsocketController.updateClientPosition( client, - 'clientTracking.updatePosition', - arguments + cursorData, + function (err) { + if (err) { + Router._handleError( + callback, + err, + client, + 'clientTracking.updatePosition' + ) + } else { + callback() + } + } ) } - - WebsocketController.updateClientPosition(client, cursorData, function ( - err - ) { - if (err) { - Router._handleError( - callback, - err, - client, - 'clientTracking.updatePosition' - ) - } else { - callback() - } - }) - }) + ) client.on('applyOtUpdate', function (doc_id, update, callback) { if (typeof callback !== 'function') { @@ -351,19 +353,22 @@ module.exports = Router = { ) } - WebsocketController.applyOtUpdate(client, doc_id, update, function ( - err - ) { - if (err) { - Router._handleError(callback, err, client, 'applyOtUpdate', { - doc_id, - update - }) - } else { - callback() + WebsocketController.applyOtUpdate( + client, + doc_id, + update, + function (err) { + if (err) { + Router._handleError(callback, err, client, 'applyOtUpdate', { + doc_id, + update, + }) + } else { + callback() + } } - }) + ) }) }) - } + }, } diff --git a/services/real-time/app/js/SafeJsonParse.js b/services/real-time/app/js/SafeJsonParse.js index b66f032ec6..bc7a6bed10 100644 --- a/services/real-time/app/js/SafeJsonParse.js +++ b/services/real-time/app/js/SafeJsonParse.js @@ -13,5 +13,5 @@ module.exports = { return callback(e) } callback(null, parsed) - } + }, } diff --git a/services/real-time/app/js/SessionSockets.js b/services/real-time/app/js/SessionSockets.js index f19147925a..b8ccde2ea8 100644 --- a/services/real-time/app/js/SessionSockets.js +++ b/services/real-time/app/js/SessionSockets.js @@ -20,7 +20,7 @@ module.exports = function (io, sessionStore, cookieParser, cookieName) { sessionStore.get(sessionId, function (error, session) { if (error) { OError.tag(error, 'error getting session from sessionStore', { - sessionId + sessionId, }) return next(error, socket) } diff --git a/services/real-time/app/js/WebApiManager.js b/services/real-time/app/js/WebApiManager.js index c5ac369149..a51610ee77 100644 --- a/services/real-time/app/js/WebApiManager.js +++ b/services/real-time/app/js/WebApiManager.js @@ -9,7 +9,7 @@ const { CodedError, CorruptedJoinProjectResponseError, NotAuthorizedError, - WebApiRequestFailedError + WebApiRequestFailedError, } = require('./Errors') module.exports = { @@ -28,11 +28,11 @@ module.exports = { auth: { user: settings.apis.web.user, pass: settings.apis.web.pass, - sendImmediately: true + sendImmediately: true, }, json: true, jar: false, - headers + headers, }, function (error, response, data) { if (error) { @@ -65,5 +65,5 @@ module.exports = { } } ) - } + }, } diff --git a/services/real-time/app/js/WebsocketController.js b/services/real-time/app/js/WebsocketController.js index bdf27d6967..c1ea8d232c 100644 --- a/services/real-time/app/js/WebsocketController.js +++ b/services/real-time/app/js/WebsocketController.js @@ -13,7 +13,7 @@ const RoomManager = require('./RoomManager') const { JoinLeaveEpochMismatchError, NotAuthorizedError, - NotJoinedError + NotJoinedError, } = require('./Errors') let WebsocketController @@ -26,7 +26,7 @@ module.exports = WebsocketController = { joinProject(client, user, project_id, callback) { if (client.disconnected) { metrics.inc('editor.join-project.disconnected', 1, { - status: 'immediately' + status: 'immediately', }) return callback() } @@ -37,71 +37,70 @@ module.exports = WebsocketController = { 'user joining project' ) metrics.inc('editor.join-project', 1, { status: client.transport }) - WebApiManager.joinProject(project_id, user, function ( - error, - project, - privilegeLevel, - isRestrictedUser - ) { - if (error) { - return callback(error) - } - if (client.disconnected) { - metrics.inc('editor.join-project.disconnected', 1, { - status: 'after-web-api-call' - }) - return callback() - } - - if (!privilegeLevel) { - return callback(new NotAuthorizedError()) - } - - client.ol_context = {} - client.ol_context.privilege_level = privilegeLevel - client.ol_context.user_id = user_id - client.ol_context.project_id = project_id - client.ol_context.owner_id = project.owner && project.owner._id - client.ol_context.first_name = user.first_name - client.ol_context.last_name = user.last_name - client.ol_context.email = user.email - client.ol_context.connected_time = new Date() - client.ol_context.signup_date = user.signUpDate - client.ol_context.login_count = user.loginCount - client.ol_context.is_restricted_user = !!isRestrictedUser - - RoomManager.joinProject(client, project_id, function (err) { - if (err) { - return callback(err) + WebApiManager.joinProject( + project_id, + user, + function (error, project, privilegeLevel, isRestrictedUser) { + if (error) { + return callback(error) + } + if (client.disconnected) { + metrics.inc('editor.join-project.disconnected', 1, { + status: 'after-web-api-call', + }) + return callback() } - logger.log( - { user_id, project_id, client_id: client.id }, - 'user joined project' - ) - callback( - null, - project, - privilegeLevel, - WebsocketController.PROTOCOL_VERSION - ) - }) - // No need to block for setting the user as connected in the cursor tracking - ConnectedUsersManager.updateUserPosition( - project_id, - client.publicId, - user, - null, - function (err) { + if (!privilegeLevel) { + return callback(new NotAuthorizedError()) + } + + client.ol_context = {} + client.ol_context.privilege_level = privilegeLevel + client.ol_context.user_id = user_id + client.ol_context.project_id = project_id + client.ol_context.owner_id = project.owner && project.owner._id + client.ol_context.first_name = user.first_name + client.ol_context.last_name = user.last_name + client.ol_context.email = user.email + client.ol_context.connected_time = new Date() + client.ol_context.signup_date = user.signUpDate + client.ol_context.login_count = user.loginCount + client.ol_context.is_restricted_user = !!isRestrictedUser + + RoomManager.joinProject(client, project_id, function (err) { if (err) { - logger.warn( - { err, project_id, user_id, client_id: client.id }, - 'background cursor update failed' - ) + return callback(err) } - } - ) - }) + logger.log( + { user_id, project_id, client_id: client.id }, + 'user joined project' + ) + callback( + null, + project, + privilegeLevel, + WebsocketController.PROTOCOL_VERSION + ) + }) + + // No need to block for setting the user as connected in the cursor tracking + ConnectedUsersManager.updateUserPosition( + project_id, + client.publicId, + user, + null, + function (err) { + if (err) { + logger.warn( + { err, project_id, user_id, client_id: client.id }, + 'background cursor update failed' + ) + } + } + ) + } + ) }, // We want to flush a project if there are no more (local) connected clients @@ -177,110 +176,112 @@ module.exports = WebsocketController = { 'client joining doc' ) - WebsocketController._assertClientAuthorization(client, doc_id, function ( - error - ) { - if (error) { - return callback(error) - } - if (client.disconnected) { - metrics.inc('editor.join-doc.disconnected', 1, { - status: 'after-client-auth-check' - }) - // the client will not read the response anyways - return callback() - } - if (joinLeaveEpoch !== client.joinLeaveEpoch) { - // another joinDoc or leaveDoc rpc overtook us - return callback(new JoinLeaveEpochMismatchError()) - } - // ensure the per-doc applied-ops channel is subscribed before sending the - // doc to the client, so that no events are missed. - RoomManager.joinDoc(client, doc_id, function (error) { + WebsocketController._assertClientAuthorization( + client, + doc_id, + function (error) { if (error) { return callback(error) } if (client.disconnected) { metrics.inc('editor.join-doc.disconnected', 1, { - status: 'after-joining-room' + status: 'after-client-auth-check', }) // the client will not read the response anyways return callback() } - - DocumentUpdaterManager.getDocument( - project_id, - doc_id, - fromVersion, - function (error, lines, version, ranges, ops) { - if (error) { - return callback(error) - } - if (client.disconnected) { - metrics.inc('editor.join-doc.disconnected', 1, { - status: 'after-doc-updater-call' - }) - // the client will not read the response anyways - return callback() - } - - if (is_restricted_user && ranges && ranges.comments) { - ranges.comments = [] - } - - // Encode any binary bits of data so it can go via WebSockets - // See http://ecmanaut.blogspot.co.uk/2006/07/encoding-decoding-utf8-in-javascript.html - const encodeForWebsockets = (text) => - unescape(encodeURIComponent(text)) - const escapedLines = [] - for (let line of lines) { - try { - line = encodeForWebsockets(line) - } catch (err) { - OError.tag(err, 'error encoding line uri component', { line }) - return callback(err) - } - escapedLines.push(line) - } - if (options.encodeRanges) { - try { - for (const comment of (ranges && ranges.comments) || []) { - if (comment.op.c) { - comment.op.c = encodeForWebsockets(comment.op.c) - } - } - for (const change of (ranges && ranges.changes) || []) { - if (change.op.i) { - change.op.i = encodeForWebsockets(change.op.i) - } - if (change.op.d) { - change.op.d = encodeForWebsockets(change.op.d) - } - } - } catch (err) { - OError.tag(err, 'error encoding range uri component', { - ranges - }) - return callback(err) - } - } - - AuthorizationManager.addAccessToDoc(client, doc_id, () => {}) - logger.log( - { - user_id, - project_id, - doc_id, - fromVersion, - client_id: client.id - }, - 'client joined doc' - ) - callback(null, escapedLines, version, ops, ranges) + if (joinLeaveEpoch !== client.joinLeaveEpoch) { + // another joinDoc or leaveDoc rpc overtook us + return callback(new JoinLeaveEpochMismatchError()) + } + // ensure the per-doc applied-ops channel is subscribed before sending the + // doc to the client, so that no events are missed. + RoomManager.joinDoc(client, doc_id, function (error) { + if (error) { + return callback(error) } - ) - }) - }) + if (client.disconnected) { + metrics.inc('editor.join-doc.disconnected', 1, { + status: 'after-joining-room', + }) + // the client will not read the response anyways + return callback() + } + + DocumentUpdaterManager.getDocument( + project_id, + doc_id, + fromVersion, + function (error, lines, version, ranges, ops) { + if (error) { + return callback(error) + } + if (client.disconnected) { + metrics.inc('editor.join-doc.disconnected', 1, { + status: 'after-doc-updater-call', + }) + // the client will not read the response anyways + return callback() + } + + if (is_restricted_user && ranges && ranges.comments) { + ranges.comments = [] + } + + // Encode any binary bits of data so it can go via WebSockets + // See http://ecmanaut.blogspot.co.uk/2006/07/encoding-decoding-utf8-in-javascript.html + const encodeForWebsockets = text => + unescape(encodeURIComponent(text)) + const escapedLines = [] + for (let line of lines) { + try { + line = encodeForWebsockets(line) + } catch (err) { + OError.tag(err, 'error encoding line uri component', { line }) + return callback(err) + } + escapedLines.push(line) + } + if (options.encodeRanges) { + try { + for (const comment of (ranges && ranges.comments) || []) { + if (comment.op.c) { + comment.op.c = encodeForWebsockets(comment.op.c) + } + } + for (const change of (ranges && ranges.changes) || []) { + if (change.op.i) { + change.op.i = encodeForWebsockets(change.op.i) + } + if (change.op.d) { + change.op.d = encodeForWebsockets(change.op.d) + } + } + } catch (err) { + OError.tag(err, 'error encoding range uri component', { + ranges, + }) + return callback(err) + } + } + + AuthorizationManager.addAccessToDoc(client, doc_id, () => {}) + logger.log( + { + user_id, + project_id, + doc_id, + fromVersion, + client_id: client.id, + }, + 'client joined doc' + ) + callback(null, escapedLines, version, ops, ranges) + } + ) + }) + } + ) }, _assertClientAuthorization(client, doc_id, callback) { @@ -297,16 +298,18 @@ module.exports = WebsocketController = { if (error) { // No cached access, check docupdater const { project_id } = client.ol_context - DocumentUpdaterManager.checkDocument(project_id, doc_id, function ( - error - ) { - if (error) { - return callback(error) - } else { - // Success - AuthorizationManager.addAccessToDoc(client, doc_id, callback) + DocumentUpdaterManager.checkDocument( + project_id, + doc_id, + function (error) { + if (error) { + return callback(error) + } else { + // Success + AuthorizationManager.addAccessToDoc(client, doc_id, callback) + } } - }) + ) } else { // Access already cached callback() @@ -339,15 +342,10 @@ module.exports = WebsocketController = { } metrics.inc('editor.update-client-position', 0.1, { - status: client.transport + status: client.transport, }) - const { - project_id, - first_name, - last_name, - email, - user_id - } = client.ol_context + const { project_id, first_name, last_name, email, user_id } = + client.ol_context logger.log( { user_id, project_id, client_id: client.id, cursorData }, 'updating client position' @@ -388,12 +386,12 @@ module.exports = WebsocketController = { first_name, last_name, email, - _id: user_id + _id: user_id, }, { row: cursorData.row, column: cursorData.column, - doc_id: cursorData.doc_id + doc_id: cursorData.doc_id, }, callback ) @@ -433,19 +431,19 @@ module.exports = WebsocketController = { WebsocketLoadBalancer.emitToRoom(project_id, 'clientTracking.refresh') setTimeout( () => - ConnectedUsersManager.getConnectedUsers(project_id, function ( - error, - users - ) { - if (error) { - return callback(error) + ConnectedUsersManager.getConnectedUsers( + project_id, + function (error, users) { + if (error) { + return callback(error) + } + logger.log( + { user_id, project_id, client_id: client.id }, + 'got connected users' + ) + callback(null, users) } - logger.log( - { user_id, project_id, client_id: client.id }, - 'got connected users' - ) - callback(null, users) - }), + ), WebsocketController.CLIENT_REFRESH_DELAY ) }) @@ -485,7 +483,7 @@ module.exports = WebsocketController = { doc_id, project_id, client_id: client.id, - version: update.v + version: update.v, }, 'sending update to doc updater' ) @@ -510,13 +508,13 @@ module.exports = WebsocketController = { const message = { project_id, doc_id, - error: 'update is too large' + error: 'update is too large', } setTimeout(function () { if (client.disconnected) { // skip the message broadcast, the client has moved on return metrics.inc('editor.doc-update.disconnected', 1, { - status: 'at-otUpdateError' + status: 'at-otUpdateError', }) } client.emit('otUpdateError', message.error, message) @@ -527,7 +525,7 @@ module.exports = WebsocketController = { if (error) { OError.tag(error, 'document was not available for update', { - version: update.v + version: update.v, }) client.disconnect() } @@ -571,5 +569,5 @@ module.exports = WebsocketController = { } } return true - } + }, } diff --git a/services/real-time/app/js/WebsocketLoadBalancer.js b/services/real-time/app/js/WebsocketLoadBalancer.js index 4f1a4935a7..f90f28c76b 100644 --- a/services/real-time/app/js/WebsocketLoadBalancer.js +++ b/services/real-time/app/js/WebsocketLoadBalancer.js @@ -19,7 +19,7 @@ const RESTRICTED_USER_MESSAGE_TYPE_PASS_LIST = [ 'reciveNewDoc', 'reciveNewFile', 'reciveNewFolder', - 'removeEntity' + 'removeEntity', ] let WebsocketLoadBalancer @@ -38,14 +38,14 @@ module.exports = WebsocketLoadBalancer = { const data = JSON.stringify({ room_id, message, - payload + payload, }) logger.log( { room_id, message, payload, length: data.length }, 'emitting to room' ) - this.rclientPubList.map((rclientPub) => + this.rclientPubList.map(rclientPub => ChannelManager.publish(rclientPub, 'editor-events', room_id, data) ) }, @@ -74,7 +74,7 @@ module.exports = WebsocketLoadBalancer = { handleRoomUpdates(rclientSubList) { const roomEvents = RoomManager.eventSource() roomEvents.on('project-active', function (project_id) { - const subscribePromises = rclientSubList.map((rclient) => + const subscribePromises = rclientSubList.map(rclient => ChannelManager.subscribe(rclient, 'editor-events', project_id) ) RoomManager.emitOnCompletion( @@ -82,8 +82,8 @@ module.exports = WebsocketLoadBalancer = { `project-subscribed-${project_id}` ) }) - roomEvents.on('project-empty', (project_id) => - rclientSubList.map((rclient) => + roomEvents.on('project-empty', project_id => + rclientSubList.map(rclient => ChannelManager.unsubscribe(rclient, 'editor-events', project_id) ) ) @@ -108,7 +108,7 @@ module.exports = WebsocketLoadBalancer = { message: message.message, room_id: message.room_id, message_id: message._id, - socketIoClients: clientList.map((client) => client.id) + socketIoClients: clientList.map(client => client.id), }, 'refreshing client list' ) @@ -127,15 +127,14 @@ module.exports = WebsocketLoadBalancer = { } } - const is_restricted_message = !RESTRICTED_USER_MESSAGE_TYPE_PASS_LIST.includes( - message.message - ) + const is_restricted_message = + !RESTRICTED_USER_MESSAGE_TYPE_PASS_LIST.includes(message.message) // send messages only to unique clients (due to duplicate entries in io.sockets.clients) const clientList = io.sockets .clients(message.room_id) .filter( - (client) => + client => !(is_restricted_message && client.ol_context.is_restricted_user) ) @@ -149,7 +148,7 @@ module.exports = WebsocketLoadBalancer = { message: message.message, room_id: message.room_id, message_id: message._id, - socketIoClients: clientList.map((client) => client.id) + socketIoClients: clientList.map(client => client.id), }, 'distributing event to clients' ) @@ -168,5 +167,5 @@ module.exports = WebsocketLoadBalancer = { HealthCheckManager.check(channel, message.key) } }) - } + }, } diff --git a/services/real-time/config/settings.defaults.js b/services/real-time/config/settings.defaults.js index c15ca57f6f..49b15e46fd 100644 --- a/services/real-time/config/settings.defaults.js +++ b/services/real-time/config/settings.defaults.js @@ -12,7 +12,7 @@ const settings = { process.env.PUBSUB_REDIS_MAX_RETRIES_PER_REQUEST || process.env.REDIS_MAX_RETRIES_PER_REQUEST || '20' - ) + ), }, realtime: { @@ -32,13 +32,13 @@ const settings = { }, connectedUser({ project_id, client_id }) { return `connected_user:{${project_id}}:${client_id}` - } + }, }, maxRetriesPerRequest: parseInt( process.env.REAL_TIME_REDIS_MAX_RETRIES_PER_REQUEST || process.env.REDIS_MAX_RETRIES_PER_REQUEST || '20' - ) + ), }, documentupdater: { @@ -55,13 +55,13 @@ const settings = { key_schema: { pendingUpdates({ doc_id }) { return `PendingUpdates:{${doc_id}}` - } + }, }, maxRetriesPerRequest: parseInt( process.env.DOC_UPDATER_REDIS_MAX_RETRIES_PER_REQUEST || process.env.REDIS_MAX_RETRIES_PER_REQUEST || '20' - ) + ), }, websessions: { @@ -73,8 +73,8 @@ const settings = { process.env.WEB_REDIS_MAX_RETRIES_PER_REQUEST || process.env.REDIS_MAX_RETRIES_PER_REQUEST || '20' - ) - } + ), + }, }, internal: { @@ -82,8 +82,8 @@ const settings = { port: 3026, host: process.env.LISTEN_ADDRESS || 'localhost', user: 'sharelatex', - pass: 'password' - } + pass: 'password', + }, }, apis: { @@ -92,19 +92,19 @@ const settings = { 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', }, documentupdater: { url: `http://${ process.env.DOCUMENT_UPDATER_HOST || process.env.DOCUPDATER_HOST || 'localhost' - }:3003` - } + }:3003`, + }, }, security: { - sessionSecret: process.env.SESSION_SECRET || 'secret-please-change' + sessionSecret: process.env.SESSION_SECRET || 'secret-please-change', }, cookieName: process.env.COOKIE_NAME || 'sharelatex.sid', @@ -155,13 +155,13 @@ const settings = { deploymentFile: process.env.DEPLOYMENT_FILE, sentry: { - dsn: process.env.SENTRY_DSN + dsn: process.env.SENTRY_DSN, }, errors: { catchUncaughtErrors: true, - shutdownOnUncaughtError: true - } + shutdownOnUncaughtError: true, + }, } // console.log settings.redis diff --git a/services/real-time/config/settings.test.js b/services/real-time/config/settings.test.js index 7e2e0b24b6..9b426631b9 100644 --- a/services/real-time/config/settings.test.js +++ b/services/real-time/config/settings.test.js @@ -1,5 +1,5 @@ module.exports = { errors: { - catchUncaughtErrors: false - } + catchUncaughtErrors: false, + }, } diff --git a/services/real-time/test/acceptance/js/ApplyUpdateTests.js b/services/real-time/test/acceptance/js/ApplyUpdateTests.js index 785afa3bf4..bfa05d0b35 100644 --- a/services/real-time/test/acceptance/js/ApplyUpdateTests.js +++ b/services/real-time/test/acceptance/js/ApplyUpdateTests.js @@ -24,7 +24,7 @@ const rclient = redis.createClient(settings.redis.documentupdater) const redisSettings = settings.redis -const PENDING_UPDATES_LIST_KEYS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((n) => { +const PENDING_UPDATES_LIST_KEYS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(n => { let key = 'pending-updates-list' if (n !== 0) { key += `-${n}` @@ -33,10 +33,8 @@ const PENDING_UPDATES_LIST_KEYS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((n) => { }) function getPendingUpdatesList(cb) { - Promise.all( - PENDING_UPDATES_LIST_KEYS.map((key) => rclient.lrange(key, 0, -1)) - ) - .then((results) => { + Promise.all(PENDING_UPDATES_LIST_KEYS.map(key => rclient.lrange(key, 0, -1))) + .then(results => { cb( null, results.reduce((acc, more) => { @@ -51,7 +49,7 @@ function getPendingUpdatesList(cb) { } function clearPendingUpdatesList(cb) { - Promise.all(PENDING_UPDATES_LIST_KEYS.map((key) => rclient.del(key))) + Promise.all(PENDING_UPDATES_LIST_KEYS.map(key => rclient.del(key))) .then(() => cb(null)) .catch(cb) } @@ -59,17 +57,17 @@ function clearPendingUpdatesList(cb) { describe('applyOtUpdate', function () { before(function () { return (this.update = { - op: [{ i: 'foo', p: 42 }] + op: [{ i: 'foo', p: 42 }], }) }) describe('when authorized', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -79,7 +77,7 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -90,12 +88,12 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -103,18 +101,18 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return this.client.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.client.emit( 'applyOtUpdate', this.doc_id, this.update, cb ) - } + }, ], done ) @@ -132,7 +130,7 @@ describe('applyOtUpdate', function () { it('should push the update into redis', function (done) { rclient.lrange( redisSettings.documentupdater.key_schema.pendingUpdates({ - doc_id: this.doc_id + doc_id: this.doc_id, }), 0, -1, @@ -142,7 +140,7 @@ describe('applyOtUpdate', function () { update.op.should.deep.equal(this.update.op) update.meta.should.deep.equal({ source: this.client.publicId, - user_id: this.user_id + user_id: this.user_id, }) return done() } @@ -153,20 +151,20 @@ describe('applyOtUpdate', function () { return after(function (done) { return async.series( [ - (cb) => clearPendingUpdatesList(cb), - (cb) => + cb => clearPendingUpdatesList(cb), + cb => rclient.del( 'DocsWithPendingUpdates', `${this.project_id}:${this.doc_id}`, cb ), - (cb) => + cb => rclient.del( redisSettings.documentupdater.key_schema.pendingUpdates( this.doc_id ), cb - ) + ), ], done ) @@ -178,15 +176,15 @@ describe('applyOtUpdate', function () { this.update = { op: { p: 12, - t: 'update is too large'.repeat(1024 * 400) // >7MB - } + t: 'update is too large'.repeat(1024 * 400), // >7MB + }, } return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -196,7 +194,7 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -207,15 +205,15 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() this.client.on('connectionAccepted', cb) - return this.client.on('otUpdateError', (otUpdateError) => { + return this.client.on('otUpdateError', otUpdateError => { this.otUpdateError = otUpdateError }) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -223,21 +221,21 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return this.client.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.client.emit( 'applyOtUpdate', this.doc_id, this.update, - (error) => { + error => { this.error = error return cb() } ) - } + }, ], done ) @@ -264,7 +262,7 @@ describe('applyOtUpdate', function () { return it('should not put the update in redis', function (done) { rclient.llen( redisSettings.documentupdater.key_schema.pendingUpdates({ - doc_id: this.doc_id + doc_id: this.doc_id, }), (error, len) => { len.should.equal(0) @@ -279,10 +277,10 @@ describe('applyOtUpdate', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readOnly' + privilegeLevel: 'readOnly', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -292,7 +290,7 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -303,12 +301,12 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -316,21 +314,21 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return this.client.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.client.emit( 'applyOtUpdate', this.doc_id, this.update, - (error) => { + error => { this.error = error return cb() } ) - } + }, ], done ) @@ -350,7 +348,7 @@ describe('applyOtUpdate', function () { return it('should not put the update in redis', function (done) { rclient.llen( redisSettings.documentupdater.key_schema.pendingUpdates({ - doc_id: this.doc_id + doc_id: this.doc_id, }), (error, len) => { len.should.equal(0) @@ -364,14 +362,14 @@ describe('applyOtUpdate', function () { return describe('when authorized to read-only with a comment update', function () { before(function (done) { this.comment_update = { - op: [{ c: 'foo', p: 42 }] + op: [{ c: 'foo', p: 42 }], } return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readOnly' + privilegeLevel: 'readOnly', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -381,7 +379,7 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -392,12 +390,12 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -405,18 +403,18 @@ describe('applyOtUpdate', function () { ) }, - (cb) => { + cb => { return this.client.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.client.emit( 'applyOtUpdate', this.doc_id, this.comment_update, cb ) - } + }, ], done ) @@ -434,7 +432,7 @@ describe('applyOtUpdate', function () { it('should push the update into redis', function (done) { rclient.lrange( redisSettings.documentupdater.key_schema.pendingUpdates({ - doc_id: this.doc_id + doc_id: this.doc_id, }), 0, -1, @@ -444,7 +442,7 @@ describe('applyOtUpdate', function () { update.op.should.deep.equal(this.comment_update.op) update.meta.should.deep.equal({ source: this.client.publicId, - user_id: this.user_id + user_id: this.user_id, }) return done() } @@ -455,20 +453,20 @@ describe('applyOtUpdate', function () { return after(function (done) { return async.series( [ - (cb) => clearPendingUpdatesList(cb), - (cb) => + cb => clearPendingUpdatesList(cb), + cb => rclient.del( 'DocsWithPendingUpdates', `${this.project_id}:${this.doc_id}`, cb ), - (cb) => + cb => rclient.del( redisSettings.documentupdater.key_schema.pendingUpdates({ - doc_id: this.doc_id + doc_id: this.doc_id, }), cb - ) + ), ], done ) diff --git a/services/real-time/test/acceptance/js/ClientTrackingTests.js b/services/real-time/test/acceptance/js/ClientTrackingTests.js index 702b2288ab..0fc6c6cd5b 100644 --- a/services/real-time/test/acceptance/js/ClientTrackingTests.js +++ b/services/real-time/test/acceptance/js/ClientTrackingTests.js @@ -25,11 +25,11 @@ describe('clientTracking', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', - project: { name: 'Test Project' } + project: { name: 'Test Project' }, }, (error, { user_id, project_id }) => { this.user_id = user_id @@ -39,7 +39,7 @@ describe('clientTracking', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -50,43 +50,43 @@ describe('clientTracking', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.clientB = RealTimeClient.connect() return this.clientB.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.clientB.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { this.updates = [] - this.clientB.on('clientTracking.clientUpdated', (data) => { + this.clientB.on('clientTracking.clientUpdated', data => { return this.updates.push(data) }) @@ -95,16 +95,16 @@ describe('clientTracking', function () { { row: (this.row = 42), column: (this.column = 36), - doc_id: this.doc_id + doc_id: this.doc_id, }, - (error) => { + error => { if (error != null) { throw error } return setTimeout(cb, 300) } ) - } // Give the message a chance to reach client B. + }, // Give the message a chance to reach client B. ], done ) @@ -118,8 +118,8 @@ describe('clientTracking', function () { doc_id: this.doc_id, id: this.clientA.publicId, user_id: this.user_id, - name: 'Joe Bloggs' - } + name: 'Joe Bloggs', + }, ]) }) @@ -132,7 +132,7 @@ describe('clientTracking', function () { expect(user.cursorData).to.deep.equal({ row: this.row, column: this.column, - doc_id: this.doc_id + doc_id: this.doc_id, }) return done() } @@ -147,12 +147,12 @@ describe('clientTracking', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { name: 'Test Project' }, - publicAccess: 'readAndWrite' + publicAccess: 'readAndWrite', }, (error, { user_id, project_id }) => { this.user_id = user_id @@ -162,7 +162,7 @@ describe('clientTracking', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -173,47 +173,47 @@ describe('clientTracking', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { return RealTimeClient.setSession({}, cb) }, - (cb) => { + cb => { this.anonymous = RealTimeClient.connect() return this.anonymous.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.anonymous.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { return this.anonymous.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { this.updates = [] - this.clientA.on('clientTracking.clientUpdated', (data) => { + this.clientA.on('clientTracking.clientUpdated', data => { return this.updates.push(data) }) @@ -222,16 +222,16 @@ describe('clientTracking', function () { { row: (this.row = 42), column: (this.column = 36), - doc_id: this.doc_id + doc_id: this.doc_id, }, - (error) => { + error => { if (error != null) { throw error } return setTimeout(cb, 300) } ) - } // Give the message a chance to reach client B. + }, // Give the message a chance to reach client B. ], done ) @@ -245,8 +245,8 @@ describe('clientTracking', function () { doc_id: this.doc_id, id: this.anonymous.publicId, user_id: 'anonymous-user', - name: '' - } + name: '', + }, ]) }) }) diff --git a/services/real-time/test/acceptance/js/DrainManagerTests.js b/services/real-time/test/acceptance/js/DrainManagerTests.js index f4d5636adb..0f4d67fb3d 100644 --- a/services/real-time/test/acceptance/js/DrainManagerTests.js +++ b/services/real-time/test/acceptance/js/DrainManagerTests.js @@ -24,8 +24,8 @@ const drain = function (rate, callback) { url: `http://localhost:3026/drain?rate=${rate}`, auth: { user: Settings.internal.realTime.user, - pass: Settings.internal.realTime.pass - } + pass: Settings.internal.realTime.pass, + }, }, (error, response, data) => callback(error, data) ) @@ -38,8 +38,8 @@ describe('DrainManagerTests', function () { { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -71,17 +71,17 @@ describe('DrainManagerTests', function () { beforeEach(function (done) { return async.series( [ - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.clientB = RealTimeClient.connect() return this.clientB.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -89,13 +89,13 @@ describe('DrainManagerTests', function () { ) }, - (cb) => { + cb => { return this.clientB.emit( 'joinProject', { project_id: this.project_id }, cb ) - } + }, ], done ) @@ -105,14 +105,14 @@ describe('DrainManagerTests', function () { beforeEach(function (done) { return async.parallel( [ - (cb) => { + cb => { return this.clientA.on('reconnectGracefully', cb) }, - (cb) => { + cb => { return this.clientB.on('reconnectGracefully', cb) }, - (cb) => drain(2, cb) + cb => drain(2, cb), ], done ) diff --git a/services/real-time/test/acceptance/js/EarlyDisconnect.js b/services/real-time/test/acceptance/js/EarlyDisconnect.js index cce2b318ec..14356f42ac 100644 --- a/services/real-time/test/acceptance/js/EarlyDisconnect.js +++ b/services/real-time/test/acceptance/js/EarlyDisconnect.js @@ -45,13 +45,13 @@ describe('EarlyDisconnect', function () { beforeEach(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -61,12 +61,12 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -77,10 +77,10 @@ describe('EarlyDisconnect', function () { return this.clientA.disconnect() }, - (cb) => { + cb => { // wait for joinDoc and subscribe return setTimeout(cb, 500) - } + }, ], done ) @@ -88,7 +88,7 @@ describe('EarlyDisconnect', function () { // we can force the race condition, there is no need to repeat too often return Array.from(Array.from({ length: 5 }).map((_, i) => i + 1)).map( - (attempt) => + attempt => it(`should not subscribe to the pub/sub channel anymore (race ${attempt})`, function (done) { rclient.pubsub('CHANNELS', (err, resp) => { if (err) { @@ -106,13 +106,13 @@ describe('EarlyDisconnect', function () { beforeEach(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -122,12 +122,12 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -140,7 +140,7 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -151,17 +151,17 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { this.clientA.emit('joinDoc', this.doc_id, () => {}) // disconnect before joinDoc completes this.clientA.on('disconnect', () => cb()) return this.clientA.disconnect() }, - (cb) => { + cb => { // wait for subscribe and unsubscribe return setTimeout(cb, 100) - } + }, ], done ) @@ -169,7 +169,7 @@ describe('EarlyDisconnect', function () { // we can not force the race condition, so we have to try many times return Array.from(Array.from({ length: 20 }).map((_, i) => i + 1)).map( - (attempt) => + attempt => it(`should not subscribe to the pub/sub channels anymore (race ${attempt})`, function (done) { rclient.pubsub('CHANNELS', (err, resp) => { if (err) { @@ -194,13 +194,13 @@ describe('EarlyDisconnect', function () { beforeEach(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -210,12 +210,12 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -228,7 +228,7 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -239,17 +239,17 @@ describe('EarlyDisconnect', function () { ) }, - (cb) => { + cb => { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { this.clientA.emit( 'clientTracking.updatePosition', { row: 42, column: 36, - doc_id: this.doc_id + doc_id: this.doc_id, }, () => {} ) @@ -258,10 +258,10 @@ describe('EarlyDisconnect', function () { return this.clientA.disconnect() }, - (cb) => { + cb => { // wait for updateClientPosition return setTimeout(cb, 100) - } + }, ], done ) @@ -269,7 +269,7 @@ describe('EarlyDisconnect', function () { // we can not force the race condition, so we have to try many times return Array.from(Array.from({ length: 20 }).map((_, i) => i + 1)).map( - (attempt) => + attempt => it(`should not show the client as connected (race ${attempt})`, function (done) { rclientRT.smembers( KeysRT.clientsInProject({ project_id: this.project_id }), diff --git a/services/real-time/test/acceptance/js/HttpControllerTests.js b/services/real-time/test/acceptance/js/HttpControllerTests.js index 5d40a30def..8704c18135 100644 --- a/services/real-time/test/acceptance/js/HttpControllerTests.js +++ b/services/real-time/test/acceptance/js/HttpControllerTests.js @@ -11,7 +11,7 @@ const async = require('async') const { expect } = require('chai') const request = require('request').defaults({ - baseUrl: 'http://localhost:3026' + baseUrl: 'http://localhost:3026', }) const RealTimeClient = require('./helpers/RealTimeClient') @@ -24,7 +24,7 @@ describe('HttpControllerTests', function () { return request.get( { url: `/clients/${client_id}`, - json: true + json: true, }, (error, response, data) => { if (error) { @@ -41,10 +41,10 @@ describe('HttpControllerTests', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'owner' + privilegeLevel: 'owner', }, (error, { project_id, user_id }) => { this.project_id = project_id @@ -54,7 +54,7 @@ describe('HttpControllerTests', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, {}, @@ -65,12 +65,12 @@ describe('HttpControllerTests', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -78,9 +78,9 @@ describe('HttpControllerTests', function () { ) }, - (cb) => { + cb => { return this.client.emit('joinDoc', this.doc_id, cb) - } + }, ], done ) @@ -90,7 +90,7 @@ describe('HttpControllerTests', function () { return request.get( { url: `/clients/${this.client.socket.sessionid}`, - json: true + json: true, }, (error, response, data) => { if (error) { @@ -107,7 +107,7 @@ describe('HttpControllerTests', function () { last_name: 'Bloggs', project_id: this.project_id, user_id: this.user_id, - rooms: [this.project_id, this.doc_id] + rooms: [this.project_id, this.doc_id], }) return done() } diff --git a/services/real-time/test/acceptance/js/JoinDocTests.js b/services/real-time/test/acceptance/js/JoinDocTests.js index 936b8c8e04..abe8714cca 100644 --- a/services/real-time/test/acceptance/js/JoinDocTests.js +++ b/services/real-time/test/acceptance/js/JoinDocTests.js @@ -31,10 +31,10 @@ describe('joinDoc', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -44,14 +44,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -60,12 +60,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -73,7 +73,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -82,7 +82,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -99,7 +99,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) @@ -118,10 +118,10 @@ describe('joinDoc', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readOnly' + privilegeLevel: 'readOnly', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -131,14 +131,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -147,12 +147,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -160,7 +160,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -169,7 +169,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -186,7 +186,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) @@ -205,10 +205,10 @@ describe('joinDoc', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'owner' + privilegeLevel: 'owner', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -218,14 +218,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -234,12 +234,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -247,7 +247,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -256,7 +256,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -273,7 +273,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) @@ -297,10 +297,10 @@ describe('joinDoc', function () { this.fromVersion = 36 return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -310,14 +310,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -326,12 +326,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -339,7 +339,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -349,7 +349,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -366,7 +366,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) @@ -386,10 +386,10 @@ describe('joinDoc', function () { this.options = { encodeRanges: true } return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -399,14 +399,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -415,12 +415,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -428,7 +428,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -438,7 +438,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -455,7 +455,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) @@ -476,10 +476,10 @@ describe('joinDoc', function () { this.options = { encodeRanges: true } return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -489,14 +489,14 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops, - ranges: this.ranges + ranges: this.ranges, }, (e, { doc_id }) => { this.doc_id = doc_id @@ -505,12 +505,12 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -518,7 +518,7 @@ describe('joinDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -529,7 +529,7 @@ describe('joinDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -546,7 +546,7 @@ describe('joinDoc', function () { this.lines, this.version, this.ops, - this.ranges + this.ranges, ]) }) diff --git a/services/real-time/test/acceptance/js/JoinProjectTests.js b/services/real-time/test/acceptance/js/JoinProjectTests.js index 61ede26f87..63e46d9a3a 100644 --- a/services/real-time/test/acceptance/js/JoinProjectTests.js +++ b/services/real-time/test/acceptance/js/JoinProjectTests.js @@ -23,13 +23,13 @@ describe('joinProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -39,12 +39,12 @@ describe('joinProject', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -55,7 +55,7 @@ describe('joinProject', function () { return cb(error) } ) - } + }, ], done ) @@ -69,7 +69,7 @@ describe('joinProject', function () { it('should return the project', function () { return this.project.should.deep.equal({ - name: 'Test Project' + name: 'Test Project', }) }) @@ -118,13 +118,13 @@ describe('joinProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: null, project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -134,12 +134,12 @@ describe('joinProject', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -151,7 +151,7 @@ describe('joinProject', function () { return cb() } ) - } + }, ], done ) @@ -178,14 +178,14 @@ describe('joinProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { project_id: 'forbidden', privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -195,12 +195,12 @@ describe('joinProject', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -212,7 +212,7 @@ describe('joinProject', function () { cb() } ) - } + }, ], done ) @@ -239,14 +239,14 @@ describe('joinProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { project_id: 'not-found', privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -256,12 +256,12 @@ describe('joinProject', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -273,7 +273,7 @@ describe('joinProject', function () { cb() } ) - } + }, ], done ) @@ -300,21 +300,21 @@ describe('joinProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: 'rate-limited' }, - (error) => { + error => { this.error = error return cb() } ) - } + }, ], done ) diff --git a/services/real-time/test/acceptance/js/LeaveDocTests.js b/services/real-time/test/acceptance/js/LeaveDocTests.js index fc77da6314..61a3288176 100644 --- a/services/real-time/test/acceptance/js/LeaveDocTests.js +++ b/services/real-time/test/acceptance/js/LeaveDocTests.js @@ -44,10 +44,10 @@ describe('leaveDoc', function () { beforeEach(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { - privilegeLevel: 'readAndWrite' + privilegeLevel: 'readAndWrite', }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -57,7 +57,7 @@ describe('leaveDoc', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -68,12 +68,12 @@ describe('leaveDoc', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.client.emit( 'joinProject', { project_id: this.project_id }, @@ -81,7 +81,7 @@ describe('leaveDoc', function () { ) }, - (cb) => { + cb => { return this.client.emit( 'joinDoc', this.doc_id, @@ -90,7 +90,7 @@ describe('leaveDoc', function () { return cb(error) } ) - } + }, ], done ) @@ -98,7 +98,7 @@ describe('leaveDoc', function () { describe('then leaving the doc', function () { beforeEach(function (done) { - return this.client.emit('leaveDoc', this.doc_id, (error) => { + return this.client.emit('leaveDoc', this.doc_id, error => { if (error != null) { throw error } @@ -123,7 +123,7 @@ describe('leaveDoc', function () { beforeEach(function (done) { this.client.emit('leaveDoc', this.doc_id, () => {}) this.client.emit('joinDoc', this.doc_id, () => {}) - return this.client.emit('leaveDoc', this.doc_id, (error) => { + return this.client.emit('leaveDoc', this.doc_id, error => { if (error != null) { throw error } @@ -154,7 +154,7 @@ describe('leaveDoc', function () { return describe('when sending a leaveDoc for a room the client has not joined ', function () { beforeEach(function (done) { - return this.client.emit('leaveDoc', this.other_doc_id, (error) => { + return this.client.emit('leaveDoc', this.other_doc_id, error => { if (error != null) { throw error } diff --git a/services/real-time/test/acceptance/js/LeaveProjectTests.js b/services/real-time/test/acceptance/js/LeaveProjectTests.js index 0d30c90c8f..9c71678087 100644 --- a/services/real-time/test/acceptance/js/LeaveProjectTests.js +++ b/services/real-time/test/acceptance/js/LeaveProjectTests.js @@ -30,13 +30,13 @@ describe('leaveProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -46,25 +46,25 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.clientB = RealTimeClient.connect() this.clientB.on('connectionAccepted', cb) this.clientBDisconnectMessages = [] return this.clientB.on( 'clientTracking.clientDisconnected', - (data) => { + data => { return this.clientBDisconnectMessages.push(data) } ) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -77,7 +77,7 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { return this.clientB.emit( 'joinProject', { project_id: this.project_id }, @@ -90,7 +90,7 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -101,23 +101,23 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.clientB.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { // leaveProject is called when the client disconnects this.clientA.on('disconnect', () => cb()) return this.clientA.disconnect() }, - (cb) => { + cb => { // The API waits a little while before flushing changes return setTimeout(done, 1000) - } + }, ], done ) @@ -125,7 +125,7 @@ describe('leaveProject', function () { it('should emit a disconnect message to the room', function () { return this.clientBDisconnectMessages.should.deep.equal([ - this.clientA.publicId + this.clientA.publicId, ]) }) @@ -176,13 +176,13 @@ describe('leaveProject', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -192,12 +192,12 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connect', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -210,7 +210,7 @@ describe('leaveProject', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -220,20 +220,20 @@ describe('leaveProject', function () { } ) }, - (cb) => { + cb => { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { // leaveProject is called when the client disconnects this.clientA.on('disconnect', () => cb()) return this.clientA.disconnect() }, - (cb) => { + cb => { // The API waits a little while before flushing changes return setTimeout(done, 1000) - } + }, ], done ) diff --git a/services/real-time/test/acceptance/js/MatrixTests.js b/services/real-time/test/acceptance/js/MatrixTests.js index ee7686679a..690a61fc24 100644 --- a/services/real-time/test/acceptance/js/MatrixTests.js +++ b/services/real-time/test/acceptance/js/MatrixTests.js @@ -81,7 +81,7 @@ describe('MatrixTests', function () { privateClient.emit( 'joinProject', { project_id: privateProjectId }, - (err) => { + err => { if (err) return done(err) privateClient.emit('joinDoc', privateDocId, done) } @@ -94,7 +94,7 @@ describe('MatrixTests', function () { before(function setupReadWriteProject(done) { FixturesManager.setUpEditorSession( { - publicAccess: 'readAndWrite' + publicAccess: 'readAndWrite', }, (err, { project_id, doc_id }) => { readWriteProjectId = project_id @@ -107,13 +107,13 @@ describe('MatrixTests', function () { const USER_SETUP = { anonymous: { setup(cb) { - RealTimeClient.setSession({}, (err) => { + RealTimeClient.setSession({}, err => { if (err) return cb(err) cb(null, { - client: RealTimeClient.connect() + client: RealTimeClient.connect(), }) }) - } + }, }, registered: { @@ -124,18 +124,18 @@ describe('MatrixTests', function () { user: { _id: user_id, first_name: 'Joe', - last_name: 'Bloggs' - } + last_name: 'Bloggs', + }, }, - (err) => { + err => { if (err) return cb(err) cb(null, { user_id, - client: RealTimeClient.connect() + client: RealTimeClient.connect(), }) } ) - } + }, }, registeredWithOwnedProject: { @@ -148,16 +148,16 @@ describe('MatrixTests', function () { user_id, project_id, doc_id, - client: RealTimeClient.connect() + client: RealTimeClient.connect(), }) } ) }, - hasOwnProject: true - } + hasOwnProject: true, + }, } - Object.entries(USER_SETUP).forEach((level0) => { + Object.entries(USER_SETUP).forEach(level0 => { const [userDescription, userItem] = level0 let options, client @@ -166,46 +166,46 @@ describe('MatrixTests', function () { getActions(cb) { cb(null, []) }, - needsOwnProject: false + needsOwnProject: false, }, joinReadWriteProject: { getActions(cb) { cb(null, [ - { rpc: 'joinProject', args: [{ project_id: readWriteProjectId }] } + { rpc: 'joinProject', args: [{ project_id: readWriteProjectId }] }, ]) }, - needsOwnProject: false + needsOwnProject: false, }, joinReadWriteProjectAndDoc: { getActions(cb) { cb(null, [ { rpc: 'joinProject', args: [{ project_id: readWriteProjectId }] }, - { rpc: 'joinDoc', args: [readWriteDocId] } + { rpc: 'joinDoc', args: [readWriteDocId] }, ]) }, - needsOwnProject: false + needsOwnProject: false, }, joinOwnProject: { getActions(cb) { cb(null, [ - { rpc: 'joinProject', args: [{ project_id: options.project_id }] } + { rpc: 'joinProject', args: [{ project_id: options.project_id }] }, ]) }, - needsOwnProject: true + needsOwnProject: true, }, joinOwnProjectAndDoc: { getActions(cb) { cb(null, [ { rpc: 'joinProject', args: [{ project_id: options.project_id }] }, - { rpc: 'joinDoc', args: [options.doc_id] } + { rpc: 'joinDoc', args: [options.doc_id] }, ]) }, - needsOwnProject: true - } + needsOwnProject: true, + }, } function performActions(getActions, done) { @@ -245,13 +245,13 @@ describe('MatrixTests', function () { }) }) - Object.entries(SESSION_SETUP).forEach((level1) => { + Object.entries(SESSION_SETUP).forEach(level1 => { const [sessionSetupDescription, sessionSetupItem] = level1 const INVALID_REQUESTS = { noop: { getActions(cb) { cb(null, []) - } + }, }, joinProjectWithDocId: { @@ -260,16 +260,16 @@ describe('MatrixTests', function () { { rpc: 'joinProject', args: [{ project_id: privateDocId }], - fails: 1 - } + fails: 1, + }, ]) - } + }, }, joinDocWithDocId: { getActions(cb) { cb(null, [{ rpc: 'joinDoc', args: [privateDocId], fails: 1 }]) - } + }, }, joinProjectWithProjectId: { @@ -278,16 +278,16 @@ describe('MatrixTests', function () { { rpc: 'joinProject', args: [{ project_id: privateProjectId }], - fails: 1 - } + fails: 1, + }, ]) - } + }, }, joinDocWithProjectId: { getActions(cb) { cb(null, [{ rpc: 'joinDoc', args: [privateProjectId], fails: 1 }]) - } + }, }, joinProjectWithProjectIdThenJoinDocWithDocId: { @@ -296,12 +296,12 @@ describe('MatrixTests', function () { { rpc: 'joinProject', args: [{ project_id: privateProjectId }], - fails: 1 + fails: 1, }, - { rpc: 'joinDoc', args: [privateDocId], fails: 1 } + { rpc: 'joinDoc', args: [privateDocId], fails: 1 }, ]) - } - } + }, + }, } // skip some areas of the matrix @@ -314,7 +314,7 @@ describe('MatrixTests', function () { performActions(sessionSetupItem.getActions, done) }) - Object.entries(INVALID_REQUESTS).forEach((level2) => { + Object.entries(INVALID_REQUESTS).forEach(level2 => { const [InvalidRequestDescription, InvalidRequestItem] = level2 describe(InvalidRequestDescription, function () { beforeEach(function performInvalidRequests(done) { @@ -354,10 +354,10 @@ describe('MatrixTests', function () { meta: { source: privateClient.publicId }, v: 42, doc: privateDocId, - op: [{ i: 'foo', p: 50 }] - } + op: [{ i: 'foo', p: 50 }], + }, } - client.on('otUpdateApplied', (update) => { + client.on('otUpdateApplied', update => { receivedMessages.push(update) }) privateClient.once('otUpdateApplied', () => { @@ -378,7 +378,7 @@ describe('MatrixTests', function () { room_id: privateProjectId, message: 'removeEntity', payload: ['foo', 'convertDocToFile'], - _id: 'web:123' + _id: 'web:123', } client.on('removeEntity', (...args) => { receivedMessages.push(args) @@ -408,14 +408,14 @@ describe('MatrixTests', function () { v: 43, lastV: 42, doc: privateDocId, - op: [{ i: 'foo', p: 50 }] - } + op: [{ i: 'foo', p: 50 }], + }, } }) beforeEach(function sendAsUser(done) { const userUpdate = Object.assign({}, update, { - hash: 'user' + hash: 'user', }) client.emit( @@ -431,7 +431,7 @@ describe('MatrixTests', function () { beforeEach(function sendAsPrivateUserForReferenceOp(done) { const privateUpdate = Object.assign({}, update, { - hash: 'private' + hash: 'private', }) privateClient.emit( @@ -457,7 +457,7 @@ describe('MatrixTests', function () { expect( [ 'no project_id found on client', - 'not authorized' + 'not authorized', ].includes(receivedArgs[0].message) ).to.equal(true) }) diff --git a/services/real-time/test/acceptance/js/PubSubRace.js b/services/real-time/test/acceptance/js/PubSubRace.js index db97a3d00e..9563f71354 100644 --- a/services/real-time/test/acceptance/js/PubSubRace.js +++ b/services/real-time/test/acceptance/js/PubSubRace.js @@ -28,13 +28,13 @@ describe('PubSubRace', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -44,12 +44,12 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connect', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -62,7 +62,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -73,16 +73,16 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA.emit('joinDoc', this.doc_id, () => {}) // leave before joinDoc completes return this.clientA.emit('leaveDoc', this.doc_id, cb) }, - (cb) => { + cb => { // wait for subscribe and unsubscribe return setTimeout(cb, 100) - } + }, ], done ) @@ -104,13 +104,13 @@ describe('PubSubRace', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -120,12 +120,12 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connect', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -138,7 +138,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -149,7 +149,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA.emit('joinDoc', this.doc_id, () => {}) this.clientA.emit('leaveDoc', this.doc_id, () => {}) this.clientA.emit('joinDoc', this.doc_id, () => {}) @@ -162,10 +162,10 @@ describe('PubSubRace', function () { return this.clientA.emit('leaveDoc', this.doc_id, cb) }, - (cb) => { + cb => { // wait for subscribe and unsubscribe return setTimeout(cb, 100) - } + }, ], done ) @@ -187,13 +187,13 @@ describe('PubSubRace', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -203,12 +203,12 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connect', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -221,7 +221,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -232,7 +232,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA.emit('joinDoc', this.doc_id, () => {}) this.clientA.emit('leaveDoc', this.doc_id, () => {}) this.clientA.emit('joinDoc', this.doc_id, () => {}) @@ -244,10 +244,10 @@ describe('PubSubRace', function () { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { // wait for subscribe and unsubscribe return setTimeout(cb, 100) - } + }, ], done ) @@ -269,13 +269,13 @@ describe('PubSubRace', function () { before(function (done) { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -285,12 +285,12 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connect', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { project_id: this.project_id }, @@ -303,7 +303,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -314,7 +314,7 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { let joinDocCompleted = false this.clientA.emit( 'joinDoc', @@ -339,10 +339,10 @@ describe('PubSubRace', function () { ) }, - (cb) => { + cb => { // wait for subscribe and unsubscribe return setTimeout(cb, 100) - } + }, ], done ) diff --git a/services/real-time/test/acceptance/js/ReceiveUpdateTests.js b/services/real-time/test/acceptance/js/ReceiveUpdateTests.js index 92d29b014f..b8cd9858b6 100644 --- a/services/real-time/test/acceptance/js/ReceiveUpdateTests.js +++ b/services/real-time/test/acceptance/js/ReceiveUpdateTests.js @@ -31,11 +31,11 @@ describe('receiveUpdate', function () { return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', - project: { name: 'Test Project' } + project: { name: 'Test Project' }, }, (error, { user_id, project_id }) => { this.user_id = user_id @@ -45,7 +45,7 @@ describe('receiveUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id, { lines: this.lines, version: this.version, ops: this.ops }, @@ -56,49 +56,49 @@ describe('receiveUpdate', function () { ) }, - (cb) => { + cb => { this.clientA = RealTimeClient.connect() return this.clientA.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.clientB = RealTimeClient.connect() return this.clientB.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientA.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { return this.clientA.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return this.clientB.emit( 'joinProject', { - project_id: this.project_id + project_id: this.project_id, }, cb ) }, - (cb) => { + cb => { return this.clientB.emit('joinDoc', this.doc_id, cb) }, - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', - project: { name: 'Test Project' } + project: { name: 'Test Project' }, }, ( error, @@ -111,7 +111,7 @@ describe('receiveUpdate', function () { ) }, - (cb) => { + cb => { return FixturesManager.setUpDoc( this.project_id_second, { lines: this.lines, version: this.version, ops: this.ops }, @@ -122,52 +122,52 @@ describe('receiveUpdate', function () { ) }, - (cb) => { + cb => { this.clientC = RealTimeClient.connect() return this.clientC.on('connectionAccepted', cb) }, - (cb) => { + cb => { return this.clientC.emit( 'joinProject', { - project_id: this.project_id_second + project_id: this.project_id_second, }, cb ) }, - (cb) => { + cb => { return this.clientC.emit('joinDoc', this.doc_id_second, cb) }, - (cb) => { + cb => { this.clientAUpdates = [] - this.clientA.on('otUpdateApplied', (update) => + this.clientA.on('otUpdateApplied', update => this.clientAUpdates.push(update) ) this.clientBUpdates = [] - this.clientB.on('otUpdateApplied', (update) => + this.clientB.on('otUpdateApplied', update => this.clientBUpdates.push(update) ) this.clientCUpdates = [] - this.clientC.on('otUpdateApplied', (update) => + this.clientC.on('otUpdateApplied', update => this.clientCUpdates.push(update) ) this.clientAErrors = [] - this.clientA.on('otUpdateError', (error) => + this.clientA.on('otUpdateError', error => this.clientAErrors.push(error) ) this.clientBErrors = [] - this.clientB.on('otUpdateError', (error) => + this.clientB.on('otUpdateError', error => this.clientBErrors.push(error) ) this.clientCErrors = [] - this.clientC.on('otUpdateError', (error) => + this.clientC.on('otUpdateError', error => this.clientCErrors.push(error) ) return cb() - } + }, ], done ) @@ -189,12 +189,12 @@ describe('receiveUpdate', function () { doc_id: this.doc_id, op: { meta: { - source: this.clientA.publicId + source: this.clientA.publicId, }, v: this.version, doc: this.doc_id, - op: [{ i: 'foo', p: 50 }] - } + op: [{ i: 'foo', p: 50 }], + }, } rclient.publish('applied-ops', JSON.stringify(this.update)) return setTimeout(done, 200) @@ -208,8 +208,8 @@ describe('receiveUpdate', function () { return this.clientAUpdates.should.deep.equal([ { v: this.version, - doc: this.doc_id - } + doc: this.doc_id, + }, ]) }) @@ -224,12 +224,12 @@ describe('receiveUpdate', function () { doc_id: this.doc_id_second, op: { meta: { - source: this.clientC.publicId + source: this.clientC.publicId, }, v: this.version, doc: this.doc_id_second, - op: [{ i: 'update from clientC', p: 50 }] - } + op: [{ i: 'update from clientC', p: 50 }], + }, } rclient.publish('applied-ops', JSON.stringify(this.update)) return setTimeout(done, 200) @@ -247,8 +247,8 @@ describe('receiveUpdate', function () { return this.clientCUpdates.should.deep.equal([ { v: this.version, - doc: this.doc_id_second - } + doc: this.doc_id_second, + }, ]) }) }) @@ -259,12 +259,12 @@ describe('receiveUpdate', function () { doc_id: this.doc_id, op: { meta: { - source: 'this-is-a-remote-client-id' + source: 'this-is-a-remote-client-id', }, v: this.version, doc: this.doc_id, - op: [{ i: 'foo', p: 50 }] - } + op: [{ i: 'foo', p: 50 }], + }, } rclient.publish('applied-ops', JSON.stringify(this.update)) return setTimeout(done, 200) @@ -289,7 +289,7 @@ describe('receiveUpdate', function () { 'applied-ops', JSON.stringify({ doc_id: this.doc_id, - error: (this.error = 'something went wrong') + error: (this.error = 'something went wrong'), }) ) return setTimeout(done, 200) @@ -320,7 +320,7 @@ describe('receiveUpdate', function () { 'applied-ops', JSON.stringify({ doc_id: this.doc_id_second, - error: (this.error = 'something went wrong') + error: (this.error = 'something went wrong'), }) ) return setTimeout(done, 200) diff --git a/services/real-time/test/acceptance/js/RouterTests.js b/services/real-time/test/acceptance/js/RouterTests.js index 729947281c..cc3862975d 100644 --- a/services/real-time/test/acceptance/js/RouterTests.js +++ b/services/real-time/test/acceptance/js/RouterTests.js @@ -22,17 +22,17 @@ describe('Router', function () { }) before(function (done) { - this.onUnhandled = (error) => done(error) + this.onUnhandled = error => done(error) process.on('unhandledRejection', this.onUnhandled) return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -42,20 +42,20 @@ describe('Router', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.client.emit('joinProject', { project_id: this.project_id }) return setTimeout(cb, 100) - } + }, ], done ) @@ -72,17 +72,17 @@ describe('Router', function () { }) before(function (done) { - this.onUnhandled = (error) => done(error) + this.onUnhandled = error => done(error) process.on('unhandledRejection', this.onUnhandled) return async.series( [ - (cb) => { + cb => { return FixturesManager.setUpProject( { privilegeLevel: 'owner', project: { - name: 'Test Project' - } + name: 'Test Project', + }, }, (e, { project_id, user_id }) => { this.project_id = project_id @@ -92,22 +92,22 @@ describe('Router', function () { ) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { + cb => { this.client = RealTimeClient.connect() return this.client.on('connectionAccepted', cb) }, - (cb) => { - return this.client.emit('joinProject', 1, 2, 3, 4, 5, (error) => { + cb => { + return this.client.emit('joinProject', 1, 2, 3, 4, 5, error => { this.error = error return cb() }) - } + }, ], done ) diff --git a/services/real-time/test/acceptance/js/SessionSocketsTests.js b/services/real-time/test/acceptance/js/SessionSocketsTests.js index 44835142ea..ae636fdd96 100644 --- a/services/real-time/test/acceptance/js/SessionSocketsTests.js +++ b/services/real-time/test/acceptance/js/SessionSocketsTests.js @@ -28,7 +28,7 @@ describe('SessionSockets', function () { }) return it('should return a lookup error', function (done) { - return this.checkSocket((error) => { + return this.checkSocket(error => { expect(error).to.exist expect(error.message).to.equal('invalid session') return done() @@ -42,7 +42,7 @@ describe('SessionSockets', function () { }) return it('should return a lookup error', function (done) { - return this.checkSocket((error) => { + return this.checkSocket(error => { expect(error).to.exist expect(error.message).to.equal('invalid session') return done() @@ -52,7 +52,7 @@ describe('SessionSockets', function () { describe('with an invalid cookie', function () { before(function (done) { - RealTimeClient.setSession({}, (error) => { + RealTimeClient.setSession({}, error => { if (error) { return done(error) } @@ -65,7 +65,7 @@ describe('SessionSockets', function () { }) return it('should return a lookup error', function (done) { - return this.checkSocket((error) => { + return this.checkSocket(error => { expect(error).to.exist expect(error.message).to.equal('invalid session') return done() @@ -79,7 +79,7 @@ describe('SessionSockets', function () { }) return it('should return a lookup error', function (done) { - return this.checkSocket((error) => { + return this.checkSocket(error => { expect(error).to.exist expect(error.message).to.equal('invalid session') return done() @@ -94,7 +94,7 @@ describe('SessionSockets', function () { }) return it('should not return an error', function (done) { - return this.checkSocket((error) => { + return this.checkSocket(error => { expect(error).to.not.exist return done() }) diff --git a/services/real-time/test/acceptance/js/SessionTests.js b/services/real-time/test/acceptance/js/SessionTests.js index 858a2dd48a..21d691bea3 100644 --- a/services/real-time/test/acceptance/js/SessionTests.js +++ b/services/real-time/test/acceptance/js/SessionTests.js @@ -21,9 +21,9 @@ describe('Session', function () { this.user_id = 'mock-user-id' RealTimeClient.setSession( { - user: { _id: this.user_id } + user: { _id: this.user_id }, }, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/real-time/test/acceptance/js/helpers/FixturesManager.js b/services/real-time/test/acceptance/js/helpers/FixturesManager.js index b3b7aaa78d..48fdc16ada 100644 --- a/services/real-time/test/acceptance/js/helpers/FixturesManager.js +++ b/services/real-time/test/acceptance/js/helpers/FixturesManager.js @@ -32,13 +32,8 @@ module.exports = FixturesManager = { if (!options.project) { options.project = { name: 'Test Project' } } - const { - project_id, - user_id, - privilegeLevel, - project, - publicAccess - } = options + const { project_id, user_id, privilegeLevel, project, publicAccess } = + options const privileges = {} privileges[user_id] = privilegeLevel @@ -47,7 +42,7 @@ module.exports = FixturesManager = { } MockWebServer.createMockProject(project_id, privileges, project) - return MockWebServer.run((error) => { + return MockWebServer.run(error => { if (error != null) { throw error } @@ -56,10 +51,10 @@ module.exports = FixturesManager = { user: { _id: user_id, first_name: 'Joe', - last_name: 'Bloggs' - } + last_name: 'Bloggs', + }, }, - (error) => { + error => { if (error != null) { throw error } @@ -67,7 +62,7 @@ module.exports = FixturesManager = { project_id, user_id, privilegeLevel, - project + project, }) } ) @@ -99,9 +94,9 @@ module.exports = FixturesManager = { lines, version, ops, - ranges + ranges, }) - return MockDocUpdaterServer.run((error) => { + return MockDocUpdaterServer.run(error => { if (error != null) { throw error } @@ -131,5 +126,5 @@ module.exports = FixturesManager = { .update(Math.random().toString()) .digest('hex') .slice(0, 24) - } + }, } diff --git a/services/real-time/test/acceptance/js/helpers/MockDocUpdaterServer.js b/services/real-time/test/acceptance/js/helpers/MockDocUpdaterServer.js index 26cc4722a0..519da94745 100644 --- a/services/real-time/test/acceptance/js/helpers/MockDocUpdaterServer.js +++ b/services/real-time/test/acceptance/js/helpers/MockDocUpdaterServer.js @@ -53,7 +53,7 @@ module.exports = MockDocUpdaterServer = { deleteProjectRequest(req, res, next) { const { project_id } = req.params - return MockDocUpdaterServer.deleteProject(project_id, (error) => { + return MockDocUpdaterServer.deleteProject(project_id, error => { if (error != null) { return next(error) } @@ -79,15 +79,15 @@ module.exports = MockDocUpdaterServer = { MockDocUpdaterServer.deleteProjectRequest ) return app - .listen(3003, (error) => { + .listen(3003, error => { MockDocUpdaterServer.running = true return callback(error) }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockDocUpdaterServer:', error.message) return process.exit(1) }) - } + }, } sinon.spy(MockDocUpdaterServer, 'getDocument') diff --git a/services/real-time/test/acceptance/js/helpers/MockWebServer.js b/services/real-time/test/acceptance/js/helpers/MockWebServer.js index 160996c6b9..c84bfd14b6 100644 --- a/services/real-time/test/acceptance/js/helpers/MockWebServer.js +++ b/services/real-time/test/acceptance/js/helpers/MockWebServer.js @@ -57,7 +57,7 @@ module.exports = MockWebServer = { } return res.json({ project, - privilegeLevel + privilegeLevel, }) } ) @@ -75,15 +75,15 @@ module.exports = MockWebServer = { const app = express() app.post('/project/:project_id/join', MockWebServer.joinProjectRequest) return app - .listen(3000, (error) => { + .listen(3000, error => { MockWebServer.running = true return callback(error) }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockWebServer:', error.message) return process.exit(1) }) - } + }, } sinon.spy(MockWebServer, 'joinProject') diff --git a/services/real-time/test/acceptance/js/helpers/RealTimeClient.js b/services/real-time/test/acceptance/js/helpers/RealTimeClient.js index d5e8b79343..00f00b5ee9 100644 --- a/services/real-time/test/acceptance/js/helpers/RealTimeClient.js +++ b/services/real-time/test/acceptance/js/helpers/RealTimeClient.js @@ -45,19 +45,15 @@ module.exports = Client = { } const sessionId = uid(24) session.cookie = {} - return rclient.set( - 'sess:' + sessionId, - JSON.stringify(session), - (error) => { - if (error != null) { - return callback(error) - } - const secret = Settings.security.sessionSecret - const cookieKey = 's:' + signature.sign(sessionId, secret) - Client.cookie = `${Settings.cookieName}=${cookieKey}` - return callback() + return rclient.set('sess:' + sessionId, JSON.stringify(session), error => { + if (error != null) { + return callback(error) } - ) + const secret = Settings.security.sessionSecret + const cookieKey = 's:' + signature.sign(sessionId, secret) + Client.cookie = `${Settings.cookieName}=${cookieKey}` + return callback() + }) }, unsetSession(callback) { @@ -70,7 +66,7 @@ module.exports = Client = { connect(cookie) { const client = io.connect('http://localhost:3026', { - 'force new connection': true + 'force new connection': true, }) client.on( 'connectionAccepted', @@ -86,7 +82,7 @@ module.exports = Client = { return request.get( { url: 'http://localhost:3026/clients', - json: true + json: true, }, (error, response, data) => callback(error, data) ) @@ -99,7 +95,7 @@ module.exports = Client = { return request.get( { url: `http://localhost:3026/clients/${client_id}`, - json: true + json: true, }, (error, response, data) => callback(error, data) ) @@ -111,8 +107,8 @@ module.exports = Client = { url: `http://localhost:3026/client/${client_id}/disconnect`, auth: { user: Settings.internal.realTime.user, - pass: Settings.internal.realTime.pass - } + pass: Settings.internal.realTime.pass, + }, }, (error, response, data) => callback(error, data) ) @@ -127,5 +123,5 @@ module.exports = Client = { callback ) ) - } + }, } diff --git a/services/real-time/test/acceptance/js/helpers/RealtimeServer.js b/services/real-time/test/acceptance/js/helpers/RealtimeServer.js index ef1a85a2a5..e964765b7a 100644 --- a/services/real-time/test/acceptance/js/helpers/RealtimeServer.js +++ b/services/real-time/test/acceptance/js/helpers/RealtimeServer.js @@ -34,10 +34,10 @@ module.exports = { return app.listen( __guard__( Settings.internal != null ? Settings.internal.realtime : undefined, - (x) => x.port + x => x.port ), 'localhost', - (error) => { + error => { if (error != null) { throw error } @@ -54,7 +54,7 @@ module.exports = { } ) } - } + }, } function __guard__(value, transform) { diff --git a/services/real-time/test/acceptance/libs/XMLHttpRequest.js b/services/real-time/test/acceptance/libs/XMLHttpRequest.js index 0222bc906b..b0436718e3 100644 --- a/services/real-time/test/acceptance/libs/XMLHttpRequest.js +++ b/services/real-time/test/acceptance/libs/XMLHttpRequest.js @@ -12,36 +12,36 @@ */ const { URL } = require('url') -var spawn = require('child_process').spawn -var fs = require('fs') +const spawn = require('child_process').spawn +const fs = require('fs') exports.XMLHttpRequest = function () { /** * Private variables */ - var self = this - var http = require('http') - var https = require('https') + const self = this + const http = require('http') + const https = require('https') // Holds http.js objects - var request - var response + let request + let response // Request settings - var settings = {} + let settings = {} // Set some default headers - var defaultHeaders = { + const defaultHeaders = { 'User-Agent': 'node-XMLHttpRequest', - Accept: '*/*' + Accept: '*/*', } - var headers = defaultHeaders + let headers = defaultHeaders // These headers are not user setable. // The following are allowed but banned in the spec: // * user-agent - var forbiddenRequestHeaders = [ + const forbiddenRequestHeaders = [ 'accept-charset', 'accept-encoding', 'access-control-request-headers', @@ -61,19 +61,19 @@ exports.XMLHttpRequest = function () { 'trailer', 'transfer-encoding', 'upgrade', - 'via' + 'via', ] // These request methods are not allowed - var forbiddenRequestMethods = ['TRACE', 'TRACK', 'CONNECT'] + const forbiddenRequestMethods = ['TRACE', 'TRACK', 'CONNECT'] // Send flag - var sendFlag = false + let sendFlag = false // Error flag, used when errors occur or abort is called - var errorFlag = false + let errorFlag = false // Event listeners - var listeners = {} + const listeners = {} /** * Constants @@ -111,7 +111,7 @@ exports.XMLHttpRequest = function () { * @param string header Header to validate * @return boolean False if not allowed, otherwise true */ - var isAllowedHttpHeader = function (header) { + const isAllowedHttpHeader = function (header) { return ( header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1 ) @@ -123,7 +123,7 @@ exports.XMLHttpRequest = function () { * @param string method Request method to validate * @return boolean False if not allowed, otherwise true */ - var isAllowedHttpMethod = function (method) { + const isAllowedHttpMethod = function (method) { return method && forbiddenRequestMethods.indexOf(method) === -1 } @@ -154,7 +154,7 @@ exports.XMLHttpRequest = function () { url: url.toString(), async: typeof async !== 'boolean' ? true : async, user: user || null, - password: password || null + password: password || null, } setState(this.OPENED) @@ -210,9 +210,9 @@ exports.XMLHttpRequest = function () { if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { return '' } - var result = '' + let result = '' - for (var i in response.headers) { + for (const i in response.headers) { // Cookie headers are excluded if (i !== 'set-cookie' && i !== 'set-cookie2') { result += i + ': ' + response.headers[i] + '\r\n' @@ -252,10 +252,10 @@ exports.XMLHttpRequest = function () { throw new Error('INVALID_STATE_ERR: send has already been called') } - var host - var ssl = false - var local = false - var url = new URL(settings.url) + let host + let ssl = false + let local = false + const url = new URL(settings.url) // Determine the server switch (url.protocol) { @@ -311,9 +311,9 @@ exports.XMLHttpRequest = function () { // Default to port 80. If accessing localhost on another port be sure // to use http://localhost:port/path - var port = url.port || (ssl ? 443 : 80) + const port = url.port || (ssl ? 443 : 80) // Add query string if one is used - var uri = url.pathname + (url.search ? url.search : '') + const uri = url.pathname + (url.search ? url.search : '') // Set the Host header or the server may reject the request headers.Host = host @@ -326,7 +326,7 @@ exports.XMLHttpRequest = function () { if (typeof settings.password === 'undefined') { settings.password = '' } - var authBuf = Buffer.from(settings.user + ':' + settings.password) + const authBuf = Buffer.from(settings.user + ':' + settings.password) headers.Authorization = 'Basic ' + authBuf.toString('base64') } @@ -345,12 +345,12 @@ exports.XMLHttpRequest = function () { headers['Content-Length'] = 0 } - var options = { + const options = { host: host, port: port, path: uri, method: settings.method, - headers: headers + headers: headers, } // Reset error flag @@ -359,7 +359,7 @@ exports.XMLHttpRequest = function () { // Handle async requests if (settings.async) { // Use the proper protocol - var doRequest = ssl ? https.request : http.request + const doRequest = ssl ? https.request : http.request // Request is being sent, set send flag sendFlag = true @@ -368,14 +368,14 @@ exports.XMLHttpRequest = function () { self.dispatchEvent('readystatechange') // Create the request - request = doRequest(options, (resp) => { + request = doRequest(options, resp => { response = resp response.setEncoding('utf8') setState(self.HEADERS_RECEIVED) self.status = response.statusCode - response.on('data', (chunk) => { + response.on('data', chunk => { // Make sure there's some data if (chunk) { self.responseText += chunk @@ -394,10 +394,10 @@ exports.XMLHttpRequest = function () { } }) - response.on('error', (error) => { + response.on('error', error => { self.handleError(error) }) - }).on('error', (error) => { + }).on('error', error => { self.handleError(error) }) @@ -412,10 +412,10 @@ exports.XMLHttpRequest = function () { } else { // Synchronous // Create a temporary file for communication with the other Node process - var syncFile = '.node-xmlhttprequest-sync-' + process.pid + const syncFile = '.node-xmlhttprequest-sync-' + process.pid fs.writeFileSync(syncFile, '', 'utf8') // The async request the other Node process executes - var execString = + const execString = "var http = require('http'), https = require('https'), fs = require('fs');" + 'var doRequest = http' + (ssl ? 's' : '') + @@ -457,7 +457,7 @@ exports.XMLHttpRequest = function () { fs.unlinkSync(syncFile) if (self.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)) { // If the file returned an error, handle it - var errorObj = self.responseText.replace( + const errorObj = self.responseText.replace( /^NODE-XMLHTTPREQUEST-ERROR:/, '' ) @@ -532,7 +532,7 @@ exports.XMLHttpRequest = function () { this.removeEventListener = function (event, callback) { if (event in listeners) { // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter((ev) => { + listeners[event] = listeners[event].filter(ev => { return ev !== callback }) } @@ -546,7 +546,7 @@ exports.XMLHttpRequest = function () { self['on' + event]() } if (event in listeners) { - for (var i = 0, len = listeners[event].length; i < len; i++) { + for (let i = 0, len = listeners[event].length; i < len; i++) { listeners[event][i].call(self) } } diff --git a/services/real-time/test/setup.js b/services/real-time/test/setup.js index 90f4363c52..19520444e8 100644 --- a/services/real-time/test/setup.js +++ b/services/real-time/test/setup.js @@ -14,16 +14,16 @@ const stubs = { info: sandbox.stub(), warn: sandbox.stub(), err: sandbox.stub(), - error: sandbox.stub() - } + error: sandbox.stub(), + }, } // SandboxedModule configuration SandboxedModule.configure({ requires: { - 'logger-sharelatex': stubs.logger + 'logger-sharelatex': stubs.logger, }, - globals: { Buffer, JSON, console, process } + globals: { Buffer, JSON, console, process }, }) // Mocha hooks @@ -34,5 +34,5 @@ exports.mochaHooks = { afterEach() { sandbox.reset() - } + }, } diff --git a/services/real-time/test/unit/js/AuthorizationManagerTests.js b/services/real-time/test/unit/js/AuthorizationManagerTests.js index d8a3f7ae66..422ce8d15d 100644 --- a/services/real-time/test/unit/js/AuthorizationManagerTests.js +++ b/services/real-time/test/unit/js/AuthorizationManagerTests.js @@ -20,7 +20,7 @@ describe('AuthorizationManager', function () { this.client = { ol_context: {} } return (this.AuthorizationManager = SandboxedModule.require(modulePath, { - requires: {} + requires: {}, })) }) @@ -29,7 +29,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'readOnly' return this.AuthorizationManager.assertClientCanViewProject( this.client, - (error) => { + error => { expect(error).to.be.null return done() } @@ -40,7 +40,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'readAndWrite' return this.AuthorizationManager.assertClientCanViewProject( this.client, - (error) => { + error => { expect(error).to.be.null return done() } @@ -51,7 +51,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'owner' return this.AuthorizationManager.assertClientCanViewProject( this.client, - (error) => { + error => { expect(error).to.be.null return done() } @@ -62,7 +62,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'unknown' return this.AuthorizationManager.assertClientCanViewProject( this.client, - (error) => { + error => { error.message.should.equal('not authorized') return done() } @@ -75,7 +75,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'readOnly' return this.AuthorizationManager.assertClientCanEditProject( this.client, - (error) => { + error => { error.message.should.equal('not authorized') return done() } @@ -86,7 +86,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'readAndWrite' return this.AuthorizationManager.assertClientCanEditProject( this.client, - (error) => { + error => { expect(error).to.be.null return done() } @@ -97,7 +97,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'owner' return this.AuthorizationManager.assertClientCanEditProject( this.client, - (error) => { + error => { expect(error).to.be.null return done() } @@ -108,7 +108,7 @@ describe('AuthorizationManager', function () { this.client.ol_context.privilege_level = 'unknown' return this.AuthorizationManager.assertClientCanEditProject( this.client, - (error) => { + error => { error.message.should.equal('not authorized') return done() } @@ -134,7 +134,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanViewProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) @@ -151,7 +151,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanViewProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) @@ -167,7 +167,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanViewProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) @@ -210,7 +210,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanViewProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) @@ -233,7 +233,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanEditProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) @@ -250,7 +250,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanEditProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) @@ -266,7 +266,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanEditProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) @@ -309,7 +309,7 @@ describe('AuthorizationManager', function () { return this.AuthorizationManager.assertClientCanEditProjectAndDoc( this.client, this.doc_id, - (err) => err.message.should.equal('not authorized') + err => err.message.should.equal('not authorized') ) }) }) diff --git a/services/real-time/test/unit/js/ChannelManagerTests.js b/services/real-time/test/unit/js/ChannelManagerTests.js index a7d857dada..2e51c584f2 100644 --- a/services/real-time/test/unit/js/ChannelManagerTests.js +++ b/services/real-time/test/unit/js/ChannelManagerTests.js @@ -23,9 +23,9 @@ describe('ChannelManager', function () { '@overleaf/settings': (this.settings = {}), '@overleaf/metrics': (this.metrics = { inc: sinon.stub(), - summary: sinon.stub() - }) - } + summary: sinon.stub(), + }), + }, })) }) @@ -83,7 +83,7 @@ describe('ChannelManager', function () { '1234567890abcdef' ) p.then(() => done(new Error('should not subscribe but fail'))).catch( - (err) => { + err => { err.message.should.equal('failed to subscribe to channel') err.cause.message.should.equal('some redis error') this.ChannelManager.getClientMapEntry(this.rclient) diff --git a/services/real-time/test/unit/js/ConnectedUsersManagerTests.js b/services/real-time/test/unit/js/ConnectedUsersManagerTests.js index 8525b94b02..51abee1bc7 100644 --- a/services/real-time/test/unit/js/ConnectedUsersManagerTests.js +++ b/services/real-time/test/unit/js/ConnectedUsersManagerTests.js @@ -31,10 +31,10 @@ describe('ConnectedUsersManager', function () { }, connectedUser({ project_id, client_id }) { return `connected_user:${project_id}:${client_id}` - } - } - } - } + }, + }, + }, + }, } this.rClient = { auth() {}, @@ -50,7 +50,7 @@ describe('ConnectedUsersManager', function () { exec: sinon.stub(), multi: () => { return this.rClient - } + }, } tk.freeze(new Date()) @@ -60,9 +60,9 @@ describe('ConnectedUsersManager', function () { '@overleaf/redis-wrapper': { createClient: () => { return this.rClient - } - } - } + }, + }, + }, }) this.client_id = '32132132' this.project_id = 'dskjh2u21321' @@ -70,12 +70,12 @@ describe('ConnectedUsersManager', function () { _id: 'user-id-123', first_name: 'Joe', last_name: 'Bloggs', - email: 'joe@example.com' + email: 'joe@example.com', } return (this.cursorData = { row: 12, column: 9, - doc_id: '53c3b8c85fee64000023dc6e' + doc_id: '53c3b8c85fee64000023dc6e', }) }) @@ -94,7 +94,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -113,7 +113,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -132,7 +132,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -151,7 +151,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -170,7 +170,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -189,7 +189,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.sadd .calledWith(`clients_in_project:${this.project_id}`, this.client_id) .should.equal(true) @@ -204,7 +204,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.expire .calledWith( `clients_in_project:${this.project_id}`, @@ -222,7 +222,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, null, - (err) => { + err => { this.rClient.expire .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -240,7 +240,7 @@ describe('ConnectedUsersManager', function () { this.client_id, this.user, this.cursorData, - (err) => { + err => { this.rClient.hset .calledWith( `connected_user:${this.project_id}:${this.client_id}`, @@ -263,7 +263,7 @@ describe('ConnectedUsersManager', function () { return this.ConnectedUsersManager.markUserAsDisconnected( this.project_id, this.client_id, - (err) => { + err => { this.rClient.srem .calledWith(`clients_in_project:${this.project_id}`, this.client_id) .should.equal(true) @@ -276,7 +276,7 @@ describe('ConnectedUsersManager', function () { return this.ConnectedUsersManager.markUserAsDisconnected( this.project_id, this.client_id, - (err) => { + err => { this.rClient.del .calledWith(`connected_user:${this.project_id}:${this.client_id}`) .should.equal(true) @@ -289,7 +289,7 @@ describe('ConnectedUsersManager', function () { return this.ConnectedUsersManager.markUserAsDisconnected( this.project_id, this.client_id, - (err) => { + err => { this.rClient.expire .calledWith( `clients_in_project:${this.project_id}`, @@ -309,7 +309,7 @@ describe('ConnectedUsersManager', function () { connected_at: new Date(), user_id: this.user._id, last_updated_at: `${Date.now()}`, - cursorData + cursorData, }) return this.ConnectedUsersManager._getConnectedUser( this.project_id, @@ -359,28 +359,28 @@ describe('ConnectedUsersManager', function () { .callsArgWith(2, null, { connected: true, client_age: 2, - client_id: this.users[0] + client_id: this.users[0], }) this.ConnectedUsersManager._getConnectedUser .withArgs(this.project_id, this.users[1]) .callsArgWith(2, null, { connected: false, client_age: 1, - client_id: this.users[1] + client_id: this.users[1], }) this.ConnectedUsersManager._getConnectedUser .withArgs(this.project_id, this.users[2]) .callsArgWith(2, null, { connected: true, client_age: 3, - client_id: this.users[2] + client_id: this.users[2], }) return this.ConnectedUsersManager._getConnectedUser .withArgs(this.project_id, this.users[3]) .callsArgWith(2, null, { connected: true, client_age: 11, - client_id: this.users[3] + client_id: this.users[3], }) }) // connected but old @@ -392,12 +392,12 @@ describe('ConnectedUsersManager', function () { users[0].should.deep.equal({ client_id: this.users[0], client_age: 2, - connected: true + connected: true, }) users[1].should.deep.equal({ client_id: this.users[2], client_age: 3, - connected: true + connected: true, }) return done() } diff --git a/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js b/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js index 333fe53499..20fa5bfe18 100644 --- a/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js +++ b/services/real-time/test/unit/js/DocumentUpdaterControllerTests.js @@ -34,34 +34,34 @@ describe('DocumentUpdaterController', function () { key_schema: { pendingUpdates({ doc_id }) { return `PendingUpdates:${doc_id}` - } - } + }, + }, }, - pubsub: null - } + pubsub: null, + }, }), './RedisClientManager': { createClientList: () => { this.redis = { - createClient: (name) => { + createClient: name => { let rclientStub this.rclient.push((rclientStub = { name })) return rclientStub - } + }, } - } + }, }, './SafeJsonParse': (this.SafeJsonParse = { - parse: (data, cb) => cb(null, JSON.parse(data)) + parse: (data, cb) => cb(null, JSON.parse(data)), }), './EventLogger': (this.EventLogger = { checkEventOrder: sinon.stub() }), './HealthCheckManager': { check: sinon.stub() }, '@overleaf/metrics': (this.metrics = { inc: sinon.stub() }), './RoomManager': (this.RoomManager = { - eventSource: sinon.stub().returns(this.RoomEvents) + eventSource: sinon.stub().returns(this.RoomEvents), }), - './ChannelManager': (this.ChannelManager = {}) - } + './ChannelManager': (this.ChannelManager = {}), + }, }) }) @@ -70,7 +70,7 @@ describe('DocumentUpdaterController', function () { this.rclient.length = 0 // clear any existing clients this.EditorUpdatesController.rclientList = [ this.redis.createClient('first'), - this.redis.createClient('second') + this.redis.createClient('second'), ] this.rclient[0].subscribe = sinon.stub() this.rclient[0].on = sinon.stub() @@ -115,9 +115,10 @@ describe('DocumentUpdaterController', function () { beforeEach(function () { this.message = { doc_id: this.doc_id, - op: { t: 'foo', p: 12 } + op: { t: 'foo', p: 12 }, } - this.EditorUpdatesController._applyUpdateFromDocumentUpdater = sinon.stub() + this.EditorUpdatesController._applyUpdateFromDocumentUpdater = + sinon.stub() return this.EditorUpdatesController._processMessageFromDocumentUpdater( this.io, 'applied-ops', @@ -136,9 +137,10 @@ describe('DocumentUpdaterController', function () { beforeEach(function () { this.message = { doc_id: this.doc_id, - error: 'Something went wrong' + error: 'Something went wrong', } - this.EditorUpdatesController._processErrorFromDocumentUpdater = sinon.stub() + this.EditorUpdatesController._processErrorFromDocumentUpdater = + sinon.stub() return this.EditorUpdatesController._processMessageFromDocumentUpdater( this.io, 'applied-ops', @@ -162,7 +164,7 @@ describe('DocumentUpdaterController', function () { op: [{ t: 'foo', p: 12 }], meta: { source: this.sourceClient.publicId }, v: (this.version = 42), - doc: this.doc_id + doc: this.doc_id, } return (this.io.sockets = { clients: sinon @@ -170,8 +172,8 @@ describe('DocumentUpdaterController', function () { .returns([ this.sourceClient, ...Array.from(this.otherClients), - this.sourceClient - ]) + this.sourceClient, + ]), }) }) // include a duplicate client @@ -198,7 +200,7 @@ describe('DocumentUpdaterController', function () { }) return it('should send the full update to the other clients', function () { - return Array.from(this.otherClients).map((client) => + return Array.from(this.otherClients).map(client => client.emit .calledWith('otUpdateApplied', this.update) .should.equal(true) @@ -223,7 +225,7 @@ describe('DocumentUpdaterController', function () { }) return it("should not send anything to the other clients (they've already had the op)", function () { - return Array.from(this.otherClients).map((client) => + return Array.from(this.otherClients).map(client => client.emit.calledWith('otUpdateApplied').should.equal(false) ) }) @@ -247,7 +249,7 @@ describe('DocumentUpdaterController', function () { return it('should disconnect all clients in that document', function () { this.io.sockets.clients.calledWith(this.doc_id).should.equal(true) - return Array.from(this.clients).map((client) => + return Array.from(this.clients).map(client => client.disconnect.called.should.equal(true) ) }) diff --git a/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js b/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js index e2b6bdbe51..9d565b4a3b 100644 --- a/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js +++ b/services/real-time/test/unit/js/DocumentUpdaterManagerTests.js @@ -30,12 +30,12 @@ describe('DocumentUpdaterManager', function () { key_schema: { pendingUpdates({ doc_id }) { return `PendingUpdates:${doc_id}` - } - } - } + }, + }, + }, }, maxUpdateSize: 7 * 1024 * 1024, - pendingUpdateListShardCount: 10 + pendingUpdateListShardCount: 10, } this.rclient = { auth() {} } @@ -48,9 +48,9 @@ describe('DocumentUpdaterManager', function () { summary: sinon.stub(), Timer: (Timer = class Timer { done() {} - }) - }) - } + }), + }), + }, })) }) // avoid modifying JSON object directly @@ -65,7 +65,7 @@ describe('DocumentUpdaterManager', function () { lines: this.lines, version: this.version, ops: (this.ops = ['mock-op-1', 'mock-op-2']), - ranges: (this.ranges = { mock: 'ranges' }) + ranges: (this.ranges = { mock: 'ranges' }), }) this.fromVersion = 2 this.request.get = sinon @@ -113,7 +113,7 @@ describe('DocumentUpdaterManager', function () { return this.callback.calledWith(this.error).should.equal(true) }) }) - ;[404, 422].forEach((statusCode) => + ;[404, 422].forEach(statusCode => describe(`when the document updater returns a ${statusCode} status code`, function () { beforeEach(function () { this.request.get = sinon @@ -133,7 +133,7 @@ describe('DocumentUpdaterManager', function () { .calledWith( sinon.match({ message: 'doc updater could not load requested ops', - info: { statusCode } + info: { statusCode }, }) ) .should.equal(true) @@ -164,8 +164,8 @@ describe('DocumentUpdaterManager', function () { message: 'doc updater returned a non-success status code', info: { action: 'getDocument', - statusCode: 500 - } + statusCode: 500, + }, }) ) .should.equal(true) @@ -240,8 +240,8 @@ describe('DocumentUpdaterManager', function () { message: 'doc updater returned a non-success status code', info: { action: 'flushProjectToMongoAndDelete', - statusCode: 500 - } + statusCode: 500, + }, }) ) .should.equal(true) @@ -254,7 +254,7 @@ describe('DocumentUpdaterManager', function () { this.change = { doc: '1234567890', op: [{ d: 'test', p: 345 }], - v: 789 + v: 789, } this.rclient.rpush = sinon.stub().yields() return (this.callback = sinon.stub()) @@ -345,7 +345,7 @@ describe('DocumentUpdaterManager', function () { describe('when the update is too large', function () { beforeEach(function () { this.change = { - op: { p: 12, t: 'update is too large'.repeat(1024 * 400) } + op: { p: 12, t: 'update is too large'.repeat(1024 * 400) }, } return this.DocumentUpdaterManager.queueChange( this.project_id, @@ -374,7 +374,7 @@ describe('DocumentUpdaterManager', function () { beforeEach(function () { this.change = { op: [{ d: 'test', p: 345 }], - version: 789 // not a valid key + version: 789, // not a valid key } return this.DocumentUpdaterManager.queueChange( this.project_id, diff --git a/services/real-time/test/unit/js/DrainManagerTests.js b/services/real-time/test/unit/js/DrainManagerTests.js index bf8de6a6e9..3075c647c7 100644 --- a/services/real-time/test/unit/js/DrainManagerTests.js +++ b/services/real-time/test/unit/js/DrainManagerTests.js @@ -19,8 +19,8 @@ describe('DrainManager', function () { this.DrainManager = SandboxedModule.require(modulePath, {}) return (this.io = { sockets: { - clients: sinon.stub() - } + clients: sinon.stub(), + }, }) }) @@ -30,7 +30,7 @@ describe('DrainManager', function () { for (let i = 0; i <= 5399; i++) { this.clients[i] = { id: i, - emit: sinon.stub() + emit: sinon.stub(), } } this.io.sockets.clients.returns(this.clients) @@ -50,7 +50,7 @@ describe('DrainManager', function () { for (let i = 0; i <= 9; i++) { this.clients[i] = { id: i, - emit: sinon.stub() + emit: sinon.stub(), } } return this.io.sockets.clients.returns(this.clients) @@ -62,7 +62,7 @@ describe('DrainManager', function () { }) it('should reconnect the first 3 clients', function () { - return [0, 1, 2].map((i) => + return [0, 1, 2].map(i => this.clients[i].emit .calledWith('reconnectGracefully') .should.equal(true) @@ -70,7 +70,7 @@ describe('DrainManager', function () { }) it('should not reconnect any more clients', function () { - return [3, 4, 5, 6, 7, 8, 9].map((i) => + return [3, 4, 5, 6, 7, 8, 9].map(i => this.clients[i].emit .calledWith('reconnectGracefully') .should.equal(false) @@ -83,7 +83,7 @@ describe('DrainManager', function () { }) it('should reconnect the next 3 clients', function () { - return [3, 4, 5].map((i) => + return [3, 4, 5].map(i => this.clients[i].emit .calledWith('reconnectGracefully') .should.equal(true) @@ -91,7 +91,7 @@ describe('DrainManager', function () { }) it('should not reconnect any more clients', function () { - return [6, 7, 8, 9].map((i) => + return [6, 7, 8, 9].map(i => this.clients[i].emit .calledWith('reconnectGracefully') .should.equal(false) @@ -99,7 +99,7 @@ describe('DrainManager', function () { }) it('should not reconnect the first 3 clients again', function () { - return [0, 1, 2].map((i) => + return [0, 1, 2].map(i => this.clients[i].emit.calledOnce.should.equal(true) ) }) @@ -110,7 +110,7 @@ describe('DrainManager', function () { }) it('should not reconnect the first 6 clients again', function () { - return [0, 1, 2, 3, 4, 5].map((i) => + return [0, 1, 2, 3, 4, 5].map(i => this.clients[i].emit.calledOnce.should.equal(true) ) }) diff --git a/services/real-time/test/unit/js/EventLoggerTests.js b/services/real-time/test/unit/js/EventLoggerTests.js index 340e17184e..f647741fcf 100644 --- a/services/real-time/test/unit/js/EventLoggerTests.js +++ b/services/real-time/test/unit/js/EventLoggerTests.js @@ -20,8 +20,8 @@ describe('EventLogger', function () { tk.freeze(new Date(this.start)) this.EventLogger = SandboxedModule.require(modulePath, { requires: { - '@overleaf/metrics': (this.metrics = { inc: sinon.stub() }) - } + '@overleaf/metrics': (this.metrics = { inc: sinon.stub() }), + }, }) this.channel = 'applied-ops' this.id_1 = 'random-hostname:abc-1' diff --git a/services/real-time/test/unit/js/RoomManagerTests.js b/services/real-time/test/unit/js/RoomManagerTests.js index b2cd2fe0e3..f33d2ecce2 100644 --- a/services/real-time/test/unit/js/RoomManagerTests.js +++ b/services/real-time/test/unit/js/RoomManagerTests.js @@ -24,8 +24,8 @@ describe('RoomManager', function () { this.RoomManager = SandboxedModule.require(modulePath, { requires: { '@overleaf/settings': (this.settings = {}), - '@overleaf/metrics': (this.metrics = { gauge: sinon.stub() }) - } + '@overleaf/metrics': (this.metrics = { gauge: sinon.stub() }), + }, }) this.RoomManager._clientsInRoom = sinon.stub() this.RoomManager._clientAlreadyInRoom = sinon.stub() @@ -41,7 +41,7 @@ describe('RoomManager', function () { }) beforeEach(function (done) { - this.onUnhandled = (error) => { + this.onUnhandled = error => { this.unhandledError = error return done(new Error(`unhandledRejection: ${error.message}`)) } @@ -71,7 +71,7 @@ describe('RoomManager', function () { .returns(0) this.client.join = sinon.stub() this.callback = sinon.stub() - this.RoomEvents.on('project-active', (id) => { + this.RoomEvents.on('project-active', id => { return setTimeout(() => { return this.RoomEvents.emit(`project-subscribed-${id}`) }, 100) @@ -79,7 +79,7 @@ describe('RoomManager', function () { return this.RoomManager.joinProject( this.client, this.project_id, - (err) => { + err => { this.callback(err) return done() } @@ -136,12 +136,12 @@ describe('RoomManager', function () { .returns(0) this.client.join = sinon.stub() this.callback = sinon.stub() - this.RoomEvents.on('doc-active', (id) => { + this.RoomEvents.on('doc-active', id => { return setTimeout(() => { return this.RoomEvents.emit(`doc-subscribed-${id}`) }, 100) }) - return this.RoomManager.joinDoc(this.client, this.doc_id, (err) => { + return this.RoomManager.joinDoc(this.client, this.doc_id, err => { this.callback(err) return done() }) @@ -301,12 +301,12 @@ describe('RoomManager', function () { .returns(true) .withArgs(this.client, this.project_id) .returns(true) - this.RoomEvents.on('project-active', (id) => { + this.RoomEvents.on('project-active', id => { return setTimeout(() => { return this.RoomEvents.emit(`project-subscribed-${id}`) }, 100) }) - this.RoomEvents.on('doc-active', (id) => { + this.RoomEvents.on('doc-active', id => { return setTimeout(() => { return this.RoomEvents.emit(`doc-subscribed-${id}`) }, 100) diff --git a/services/real-time/test/unit/js/SafeJsonParseTest.js b/services/real-time/test/unit/js/SafeJsonParseTest.js index bdbba00c93..dbdb4a41d2 100644 --- a/services/real-time/test/unit/js/SafeJsonParseTest.js +++ b/services/real-time/test/unit/js/SafeJsonParseTest.js @@ -20,9 +20,9 @@ describe('SafeJsonParse', function () { return (this.SafeJsonParse = SandboxedModule.require(modulePath, { requires: { '@overleaf/settings': (this.Settings = { - maxUpdateSize: 16 * 1024 - }) - } + maxUpdateSize: 16 * 1024, + }), + }, })) }) diff --git a/services/real-time/test/unit/js/SessionSocketsTests.js b/services/real-time/test/unit/js/SessionSocketsTests.js index f4ae34bf78..b6f6c87fb9 100644 --- a/services/real-time/test/unit/js/SessionSocketsTests.js +++ b/services/real-time/test/unit/js/SessionSocketsTests.js @@ -23,7 +23,7 @@ describe('SessionSockets', function () { this.id2 = Math.random().toString() const redisResponses = { error: [new Error('Redis: something went wrong'), null], - unknownId: [null, null] + unknownId: [null, null], } redisResponses[this.id1] = [null, { user: { _id: '123' } }] redisResponses[this.id2] = [null, { user: { _id: 'abc' } }] @@ -31,7 +31,7 @@ describe('SessionSockets', function () { this.sessionStore = { get: sinon .stub() - .callsFake((id, fn) => fn.apply(null, redisResponses[id])) + .callsFake((id, fn) => fn.apply(null, redisResponses[id])), } this.cookieParser = function (req, res, next) { req.signedCookies = req._signedCookies @@ -55,7 +55,7 @@ describe('SessionSockets', function () { }) it('should return a lookup error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.exist expect(error.message).to.equal('could not look up session by key') return done() @@ -76,7 +76,7 @@ describe('SessionSockets', function () { }) it('should return a lookup error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.exist expect(error.message).to.equal('could not look up session by key') return done() @@ -94,7 +94,7 @@ describe('SessionSockets', function () { describe('with a valid cookie and a failing session lookup', function () { before(function () { return (this.socket = { - handshake: { _signedCookies: { 'ol.sid': 'error' } } + handshake: { _signedCookies: { 'ol.sid': 'error' } }, }) }) @@ -106,7 +106,7 @@ describe('SessionSockets', function () { }) return it('should return a redis error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.exist expect(error.message).to.equal('Redis: something went wrong') return done() @@ -117,7 +117,7 @@ describe('SessionSockets', function () { describe('with a valid cookie and no matching session', function () { before(function () { return (this.socket = { - handshake: { _signedCookies: { 'ol.sid': 'unknownId' } } + handshake: { _signedCookies: { 'ol.sid': 'unknownId' } }, }) }) @@ -129,7 +129,7 @@ describe('SessionSockets', function () { }) return it('should return a lookup error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.exist expect(error.message).to.equal('could not look up session by key') return done() @@ -140,7 +140,7 @@ describe('SessionSockets', function () { describe('with a valid cookie and a matching session', function () { before(function () { return (this.socket = { - handshake: { _signedCookies: { 'ol.sid': this.id1 } } + handshake: { _signedCookies: { 'ol.sid': this.id1 } }, }) }) @@ -152,7 +152,7 @@ describe('SessionSockets', function () { }) it('should not return an error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.not.exist return done() }) @@ -169,7 +169,7 @@ describe('SessionSockets', function () { return describe('with a different valid cookie and matching session', function () { before(function () { return (this.socket = { - handshake: { _signedCookies: { 'ol.sid': this.id2 } } + handshake: { _signedCookies: { 'ol.sid': this.id2 } }, }) }) @@ -181,7 +181,7 @@ describe('SessionSockets', function () { }) it('should not return an error', function (done) { - return this.checkSocket(this.socket, (error) => { + return this.checkSocket(this.socket, error => { expect(error).to.not.exist return done() }) diff --git a/services/real-time/test/unit/js/WebApiManagerTests.js b/services/real-time/test/unit/js/WebApiManagerTests.js index b1291b4205..922e15a8f8 100644 --- a/services/real-time/test/unit/js/WebApiManagerTests.js +++ b/services/real-time/test/unit/js/WebApiManagerTests.js @@ -28,11 +28,11 @@ describe('WebApiManager', function () { web: { url: 'http://web.example.com', user: 'username', - pass: 'password' - } - } - }) - } + pass: 'password', + }, + }, + }), + }, })) }) @@ -42,7 +42,7 @@ describe('WebApiManager', function () { this.response = { project: { name: 'Test project' }, privilegeLevel: 'owner', - isRestrictedUser: true + isRestrictedUser: true, } this.request.post = sinon .stub() @@ -59,16 +59,16 @@ describe('WebApiManager', function () { .calledWith({ url: `${this.settings.apis.web.url}/project/${this.project_id}/join`, qs: { - user_id: this.user_id + user_id: this.user_id, }, auth: { user: this.settings.apis.web.user, pass: this.settings.apis.web.pass, - sendImmediately: true + sendImmediately: true, }, json: true, jar: false, - headers: {} + headers: {}, }) .should.equal(true) }) @@ -101,7 +101,7 @@ describe('WebApiManager', function () { this.callback .calledWith( sinon.match({ - message: 'not authorized' + message: 'not authorized', }) ) .should.equal(true) @@ -125,7 +125,7 @@ describe('WebApiManager', function () { .calledWith( sinon.match({ message: 'project not found', - info: { code: 'ProjectNotFound' } + info: { code: 'ProjectNotFound' }, }) ) .should.equal(true) @@ -149,7 +149,7 @@ describe('WebApiManager', function () { .calledWith( sinon.match({ message: 'non-success status code from web', - info: { statusCode: 500 } + info: { statusCode: 500 }, }) ) .should.equal(true) @@ -172,7 +172,7 @@ describe('WebApiManager', function () { return this.callback .calledWith( sinon.match({ - message: 'no data returned from joinProject request' + message: 'no data returned from joinProject request', }) ) .should.equal(true) @@ -197,8 +197,8 @@ describe('WebApiManager', function () { sinon.match({ message: 'rate-limit hit when joining project', info: { - code: 'TooManyRequests' - } + code: 'TooManyRequests', + }, }) ) .should.equal(true) diff --git a/services/real-time/test/unit/js/WebsocketControllerTests.js b/services/real-time/test/unit/js/WebsocketControllerTests.js index e227a1ce82..8b7c60aed6 100644 --- a/services/real-time/test/unit/js/WebsocketControllerTests.js +++ b/services/real-time/test/unit/js/WebsocketControllerTests.js @@ -29,7 +29,7 @@ describe('WebsocketController', function () { last_name: 'Allen', email: 'james@example.com', signUpDate: new Date('2014-01-01'), - loginCount: 42 + loginCount: 42, } this.callback = sinon.stub() this.client = { @@ -39,7 +39,7 @@ describe('WebsocketController', function () { ol_context: {}, joinLeaveEpoch: 0, join: sinon.stub(), - leave: sinon.stub() + leave: sinon.stub(), } return (this.WebsocketController = SandboxedModule.require(modulePath, { requires: { @@ -50,10 +50,10 @@ describe('WebsocketController', function () { './WebsocketLoadBalancer': (this.WebsocketLoadBalancer = {}), '@overleaf/metrics': (this.metrics = { inc: sinon.stub(), - set: sinon.stub() + set: sinon.stub(), }), - './RoomManager': (this.RoomManager = {}) - } + './RoomManager': (this.RoomManager = {}), + }, })) }) @@ -68,8 +68,8 @@ describe('WebsocketController', function () { this.project = { name: 'Test Project', owner: { - _id: (this.owner_id = 'mock-owner-id-123') - } + _id: (this.owner_id = 'mock-owner-id-123'), + }, } this.privilegeLevel = 'owner' this.ConnectedUsersManager.updateUserPosition = sinon @@ -205,8 +205,8 @@ describe('WebsocketController', function () { this.project = { name: 'Test Project', owner: { - _id: (this.owner_id = 'mock-owner-id-123') - } + _id: (this.owner_id = 'mock-owner-id-123'), + }, } this.privilegeLevel = 'owner' this.ConnectedUsersManager.updateUserPosition = sinon @@ -264,7 +264,7 @@ describe('WebsocketController', function () { return it('should increment the editor.join-project.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.join-project.disconnected', 1, { - status: 'immediately' + status: 'immediately', }) ).to.equal(true) }) @@ -297,7 +297,7 @@ describe('WebsocketController', function () { return it('should increment the editor.join-project.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.join-project.disconnected', 1, { - status: 'after-web-api-call' + status: 'after-web-api-call', }) ).to.equal(true) }) @@ -317,13 +317,13 @@ describe('WebsocketController', function () { this.clientsInRoom = [] this.io = { sockets: { - clients: (room_id) => { + clients: room_id => { if (room_id !== this.project_id) { throw 'expected room_id to be project_id' } return this.clientsInRoom - } - } + }, + }, } this.client.ol_context.project_id = this.project_id this.client.ol_context.user_id = this.user_id @@ -396,13 +396,13 @@ describe('WebsocketController', function () { this.clientsInRoom = ['mock-remaining-client'] this.io = { sockets: { - clients: (room_id) => { + clients: room_id => { if (room_id !== this.project_id) { throw 'expected room_id to be project_id' } return this.clientsInRoom - } - } + }, + }, } return this.WebsocketController.leaveProject(this.io, this.client, done) }) @@ -729,7 +729,7 @@ describe('WebsocketController', function () { it('should increment the editor.join-doc.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.join-doc.disconnected', 1, { - status: 'immediately' + status: 'immediately', }) ).to.equal(true) }) @@ -775,7 +775,7 @@ describe('WebsocketController', function () { it('should increment the editor.join-doc.disconnected metric with a status', function () { expect( this.metrics.inc.calledWith('editor.join-doc.disconnected', 1, { - status: 'after-client-auth-check' + status: 'after-client-auth-check', }) ).to.equal(true) }) @@ -894,7 +894,7 @@ describe('WebsocketController', function () { it('should increment the editor.join-doc.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.join-doc.disconnected', 1, { - status: 'after-joining-room' + status: 'after-joining-room', }) ).to.equal(true) }) @@ -940,7 +940,7 @@ describe('WebsocketController', function () { return it('should increment the editor.join-doc.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.join-doc.disconnected', 1, { - status: 'after-doc-updater-call' + status: 'after-doc-updater-call', }) ).to.equal(true) }) @@ -1110,7 +1110,7 @@ describe('WebsocketController', function () { return (this.update = { doc_id: (this.doc_id = 'doc-id-123'), row: (this.row = 42), - column: (this.column = 37) + column: (this.column = 37), }) }) @@ -1121,7 +1121,7 @@ describe('WebsocketController', function () { first_name: (this.first_name = 'Douglas'), last_name: (this.last_name = 'Adams'), email: (this.email = 'joe@example.com'), - user_id: (this.user_id = 'user-id-123') + user_id: (this.user_id = 'user-id-123'), } this.populatedCursorData = { @@ -1131,7 +1131,7 @@ describe('WebsocketController', function () { row: this.row, column: this.column, email: this.email, - user_id: this.user_id + user_id: this.user_id, } this.WebsocketController.updateClientPosition( this.client, @@ -1159,12 +1159,12 @@ describe('WebsocketController', function () { _id: this.user_id, email: this.email, first_name: this.first_name, - last_name: this.last_name + last_name: this.last_name, }, { row: this.row, column: this.column, - doc_id: this.doc_id + doc_id: this.doc_id, } ) .should.equal(true) @@ -1185,7 +1185,7 @@ describe('WebsocketController', function () { first_name: (this.first_name = 'Douglas'), last_name: undefined, email: (this.email = 'joe@example.com'), - user_id: (this.user_id = 'user-id-123') + user_id: (this.user_id = 'user-id-123'), } this.populatedCursorData = { @@ -1195,7 +1195,7 @@ describe('WebsocketController', function () { row: this.row, column: this.column, email: this.email, - user_id: this.user_id + user_id: this.user_id, } this.WebsocketController.updateClientPosition( this.client, @@ -1223,12 +1223,12 @@ describe('WebsocketController', function () { _id: this.user_id, email: this.email, first_name: this.first_name, - last_name: undefined + last_name: undefined, }, { row: this.row, column: this.column, - doc_id: this.doc_id + doc_id: this.doc_id, } ) .should.equal(true) @@ -1249,7 +1249,7 @@ describe('WebsocketController', function () { first_name: undefined, last_name: (this.last_name = 'Adams'), email: (this.email = 'joe@example.com'), - user_id: (this.user_id = 'user-id-123') + user_id: (this.user_id = 'user-id-123'), } this.populatedCursorData = { @@ -1259,7 +1259,7 @@ describe('WebsocketController', function () { row: this.row, column: this.column, email: this.email, - user_id: this.user_id + user_id: this.user_id, } this.WebsocketController.updateClientPosition( this.client, @@ -1287,12 +1287,12 @@ describe('WebsocketController', function () { _id: this.user_id, email: this.email, first_name: undefined, - last_name: this.last_name + last_name: this.last_name, }, { row: this.row, column: this.column, - doc_id: this.doc_id + doc_id: this.doc_id, } ) .should.equal(true) @@ -1312,7 +1312,7 @@ describe('WebsocketController', function () { first_name: undefined, last_name: undefined, email: (this.email = 'joe@example.com'), - user_id: (this.user_id = 'user-id-123') + user_id: (this.user_id = 'user-id-123'), } return this.WebsocketController.updateClientPosition( this.client, @@ -1330,7 +1330,7 @@ describe('WebsocketController', function () { name: '', row: this.row, column: this.column, - email: this.email + email: this.email, }) .should.equal(true) }) @@ -1339,7 +1339,7 @@ describe('WebsocketController', function () { describe('with an anonymous user', function () { beforeEach(function (done) { this.client.ol_context = { - project_id: this.project_id + project_id: this.project_id, } return this.WebsocketController.updateClientPosition( this.client, @@ -1355,7 +1355,7 @@ describe('WebsocketController', function () { id: this.client.publicId, name: '', row: this.row, - column: this.column + column: this.column, }) .should.equal(true) }) @@ -1369,7 +1369,8 @@ describe('WebsocketController', function () { return describe('when the client has disconnected', function () { beforeEach(function (done) { this.client.disconnected = true - this.AuthorizationManager.assertClientCanViewProjectAndDoc = sinon.stub() + this.AuthorizationManager.assertClientCanViewProjectAndDoc = + sinon.stub() return this.WebsocketController.updateClientPosition( this.client, this.update, @@ -1526,9 +1527,9 @@ describe('WebsocketController', function () { user_id: this.user_id, project_id: this.project_id, doc_id: this.doc_id, - updateSize: 7372835 + updateSize: 7372835, }, - 'update is too large' + 'update is too large', ]) }) @@ -1565,7 +1566,7 @@ describe('WebsocketController', function () { return it('should increment the editor.doc-update.disconnected metric with a status', function () { return expect( this.metrics.inc.calledWith('editor.doc-update.disconnected', 1, { - status: 'at-otUpdateError' + status: 'at-otUpdateError', }) ).to.equal(true) }) @@ -1578,12 +1579,13 @@ describe('WebsocketController', function () { this.edit_update = { op: [ { i: 'foo', p: 42 }, - { c: 'bar', p: 132 } - ] + { c: 'bar', p: 132 }, + ], } // comments may still be in an edit op this.comment_update = { op: [{ c: 'bar', p: 132 }] } this.AuthorizationManager.assertClientCanEditProjectAndDoc = sinon.stub() - return (this.AuthorizationManager.assertClientCanViewProjectAndDoc = sinon.stub()) + return (this.AuthorizationManager.assertClientCanViewProjectAndDoc = + sinon.stub()) }) describe('with a read-write client', function () { @@ -1593,7 +1595,7 @@ describe('WebsocketController', function () { this.client, this.doc_id, this.edit_update, - (error) => { + error => { expect(error).to.be.null return done() } @@ -1611,7 +1613,7 @@ describe('WebsocketController', function () { this.client, this.doc_id, this.edit_update, - (error) => { + error => { expect(error.message).to.equal('not authorized') return done() } @@ -1629,7 +1631,7 @@ describe('WebsocketController', function () { this.client, this.doc_id, this.comment_update, - (error) => { + error => { expect(error).to.be.null return done() } @@ -1649,7 +1651,7 @@ describe('WebsocketController', function () { this.client, this.doc_id, this.comment_update, - (error) => { + error => { expect(error.message).to.equal('not authorized') return done() } diff --git a/services/real-time/test/unit/js/WebsocketLoadBalancerTests.js b/services/real-time/test/unit/js/WebsocketLoadBalancerTests.js index 9e61501305..ec341a43bd 100644 --- a/services/real-time/test/unit/js/WebsocketLoadBalancerTests.js +++ b/services/real-time/test/unit/js/WebsocketLoadBalancerTests.js @@ -23,29 +23,29 @@ describe('WebsocketLoadBalancer', function () { this.WebsocketLoadBalancer = SandboxedModule.require(modulePath, { requires: { './RedisClientManager': { - createClientList: () => [] + createClientList: () => [], }, './SafeJsonParse': (this.SafeJsonParse = { - parse: (data, cb) => cb(null, JSON.parse(data)) + parse: (data, cb) => cb(null, JSON.parse(data)), }), './EventLogger': { checkEventOrder: sinon.stub() }, './HealthCheckManager': { check: sinon.stub() }, './RoomManager': (this.RoomManager = { - eventSource: sinon.stub().returns(this.RoomEvents) + eventSource: sinon.stub().returns(this.RoomEvents), }), './ChannelManager': (this.ChannelManager = { publish: sinon.stub() }), './ConnectedUsersManager': (this.ConnectedUsersManager = { - refreshClient: sinon.stub() - }) - } + refreshClient: sinon.stub(), + }), + }, }) this.io = {} this.WebsocketLoadBalancer.rclientPubList = [{ publish: sinon.stub() }] this.WebsocketLoadBalancer.rclientSubList = [ { subscribe: sinon.stub(), - on: sinon.stub() - } + on: sinon.stub(), + }, ] this.room_id = 'room-id' @@ -71,7 +71,7 @@ describe('WebsocketLoadBalancer', function () { JSON.stringify({ room_id: this.room_id, message: this.message, - payload: this.payload + payload: this.payload, }) ) .should.equal(true) @@ -139,24 +139,24 @@ describe('WebsocketLoadBalancer', function () { { id: 'client-id-1', emit: (this.emit1 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-2', emit: (this.emit2 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-1', emit: (this.emit3 = sinon.stub()), - ol_context: {} - } // duplicate client - ]) + ol_context: {}, + }, // duplicate client + ]), } const data = JSON.stringify({ room_id: this.room_id, message: this.message, - payload: this.payload + payload: this.payload, }) return this.WebsocketLoadBalancer._processEditorEvent( this.io, @@ -184,29 +184,29 @@ describe('WebsocketLoadBalancer', function () { { id: 'client-id-1', emit: (this.emit1 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-2', emit: (this.emit2 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-1', emit: (this.emit3 = sinon.stub()), - ol_context: {} + ol_context: {}, }, // duplicate client { id: 'client-id-4', emit: (this.emit4 = sinon.stub()), - ol_context: { is_restricted_user: true } - } - ]) + ol_context: { is_restricted_user: true }, + }, + ]), } const data = JSON.stringify({ room_id: this.room_id, message: this.message, - payload: this.payload + payload: this.payload, }) return this.WebsocketLoadBalancer._processEditorEvent( this.io, @@ -235,29 +235,29 @@ describe('WebsocketLoadBalancer', function () { { id: 'client-id-1', emit: (this.emit1 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-2', emit: (this.emit2 = sinon.stub()), - ol_context: {} + ol_context: {}, }, { id: 'client-id-1', emit: (this.emit3 = sinon.stub()), - ol_context: {} + ol_context: {}, }, // duplicate client { id: 'client-id-4', emit: (this.emit4 = sinon.stub()), - ol_context: { is_restricted_user: true } - } - ]) + ol_context: { is_restricted_user: true }, + }, + ]), } const data = JSON.stringify({ room_id: this.room_id, message: (this.restrictedMessage = 'new-comment'), - payload: this.payload + payload: this.payload, }) return this.WebsocketLoadBalancer._processEditorEvent( this.io, @@ -285,7 +285,7 @@ describe('WebsocketLoadBalancer', function () { const data = JSON.stringify({ room_id: 'all', message: this.message, - payload: this.payload + payload: this.payload, }) return this.WebsocketLoadBalancer._processEditorEvent( this.io, From 9e4624315bd1042ee6976e35e285eb010cf06f29 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:21:10 +0100 Subject: [PATCH 6/9] [misc] temporary override a few new/changed eslint rules --- services/real-time/.eslintrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/services/real-time/.eslintrc b/services/real-time/.eslintrc index 1c14f50efe..a97661b15f 100644 --- a/services/real-time/.eslintrc +++ b/services/real-time/.eslintrc @@ -5,7 +5,7 @@ "extends": [ "eslint:recommended", "standard", - "prettier", + "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", From 89928dd19db5323dc3f7590fd70ce144c28ee475 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:26:33 +0100 Subject: [PATCH 7/9] [misc] upgrade node version to latest v12 LTS version 12.22.3 --- services/real-time/.nvmrc | 2 +- services/real-time/Dockerfile | 2 +- services/real-time/buildscript.txt | 2 +- services/real-time/docker-compose.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/real-time/.nvmrc b/services/real-time/.nvmrc index e68b860383..5a80a7e912 100644 --- a/services/real-time/.nvmrc +++ b/services/real-time/.nvmrc @@ -1 +1 @@ -12.21.0 +12.22.3 diff --git a/services/real-time/Dockerfile b/services/real-time/Dockerfile index 4f417a2a4b..6b286376dc 100644 --- a/services/real-time/Dockerfile +++ b/services/real-time/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/real-time/buildscript.txt b/services/real-time/buildscript.txt index e536d601f3..fcf340d99c 100644 --- a/services/real-time/buildscript.txt +++ b/services/real-time/buildscript.txt @@ -3,6 +3,6 @@ real-time --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=12.21.0 +--node-version=12.22.3 --public-repo=True --script-version=3.11.0 diff --git a/services/real-time/docker-compose.yml b/services/real-time/docker-compose.yml index ad04d1ab54..59ad1c5efe 100644 --- a/services/real-time/docker-compose.yml +++ b/services/real-time/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 From bd5e8b8f7160f66594f89becad1e71099dd8f2d3 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:34:56 +0100 Subject: [PATCH 8/9] [misc] fix chai assertions .equal.true -> .equals(true) --- .../real-time/test/unit/js/EventLoggerTests.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/services/real-time/test/unit/js/EventLoggerTests.js b/services/real-time/test/unit/js/EventLoggerTests.js index f647741fcf..fd759c8b42 100644 --- a/services/real-time/test/unit/js/EventLoggerTests.js +++ b/services/real-time/test/unit/js/EventLoggerTests.js @@ -54,8 +54,9 @@ describe('EventLogger', function () { }) return it('should increment the valid event metric', function () { - return this.metrics.inc.calledWith(`event.${this.channel}.valid`, 1) - .should.equal.true + return this.metrics.inc + .calledWith(`event.${this.channel}.valid`, 1) + .should.equals(true) }) }) @@ -78,8 +79,9 @@ describe('EventLogger', function () { }) return it('should increment the duplicate event metric', function () { - return this.metrics.inc.calledWith(`event.${this.channel}.duplicate`, 1) - .should.equal.true + return this.metrics.inc + .calledWith(`event.${this.channel}.duplicate`, 1) + .should.equals(true) }) }) @@ -107,10 +109,9 @@ describe('EventLogger', function () { }) return it('should increment the out-of-order event metric', function () { - return this.metrics.inc.calledWith( - `event.${this.channel}.out-of-order`, - 1 - ).should.equal.true + return this.metrics.inc + .calledWith(`event.${this.channel}.out-of-order`, 1) + .should.equals(true) }) }) From b8fcb265b2f2f5dbd6f915ff510635a7b6c531ff Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:40:46 +0100 Subject: [PATCH 9/9] [misc] EventLogger: drop explicit metrics.inc amount The module has a hard-coded increment of 1, which is the only value the prometheus backend supports. --- services/real-time/app/js/EventLogger.js | 2 +- services/real-time/test/unit/js/EventLoggerTests.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/real-time/app/js/EventLogger.js b/services/real-time/app/js/EventLogger.js index 21c3460865..91f63e143c 100644 --- a/services/real-time/app/js/EventLogger.js +++ b/services/real-time/app/js/EventLogger.js @@ -43,7 +43,7 @@ module.exports = EventLogger = { // store the last count in a hash for each host const previous = EventLogger._storeEventCount(key, count) if (!previous || count === previous + 1) { - metrics.inc(`event.${channel}.valid`, 0.001) // downsample high rate docupdater events + metrics.inc(`event.${channel}.valid`) return // order is ok } if (count === previous) { diff --git a/services/real-time/test/unit/js/EventLoggerTests.js b/services/real-time/test/unit/js/EventLoggerTests.js index fd759c8b42..037f2e214a 100644 --- a/services/real-time/test/unit/js/EventLoggerTests.js +++ b/services/real-time/test/unit/js/EventLoggerTests.js @@ -55,7 +55,7 @@ describe('EventLogger', function () { return it('should increment the valid event metric', function () { return this.metrics.inc - .calledWith(`event.${this.channel}.valid`, 1) + .calledWith(`event.${this.channel}.valid`) .should.equals(true) }) }) @@ -80,7 +80,7 @@ describe('EventLogger', function () { return it('should increment the duplicate event metric', function () { return this.metrics.inc - .calledWith(`event.${this.channel}.duplicate`, 1) + .calledWith(`event.${this.channel}.duplicate`) .should.equals(true) }) }) @@ -110,7 +110,7 @@ describe('EventLogger', function () { return it('should increment the out-of-order event metric', function () { return this.metrics.inc - .calledWith(`event.${this.channel}.out-of-order`, 1) + .calledWith(`event.${this.channel}.out-of-order`) .should.equals(true) }) })