From 835dbe784b34235d9a098b6383a7c56cea712ec1 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:35:45 +0100 Subject: [PATCH 01/11] [misc] install bunyan as production dependency ``` Error: Cannot find module 'bunyan' Require stack: - .../node_modules/@google-cloud/logging-bunyan/build/src/middleware/express.js - .../node_modules/@google-cloud/logging-bunyan/build/src/index.js - .../node_modules/logger-sharelatex/logging-manager.js - .../node_modules/logger-sharelatex/index.js - .../app.js ``` --- services/document-updater/package-lock.json | 24 ++++++++------------- services/document-updater/package.json | 2 +- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/services/document-updater/package-lock.json b/services/document-updater/package-lock.json index 67a88a7e6e..bda3f21608 100644 --- a/services/document-updater/package-lock.json +++ b/services/document-updater/package-lock.json @@ -1540,7 +1540,7 @@ "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", "dev": true }, "bson": { @@ -1564,20 +1564,14 @@ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==" }, "bunyan": { - "version": "0.22.3", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-0.22.3.tgz", - "integrity": "sha1-ehncG0yMZF90AkGnQPIkUUfGfsI=", + "version": "1.8.15", + "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", + "integrity": "sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig==", "requires": { - "dtrace-provider": "0.2.8", - "mv": "~2" - }, - "dependencies": { - "dtrace-provider": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.2.8.tgz", - "integrity": "sha512-wufYnYt4ISHnT9MEiRgQ3trXuolt7mICTa/ckT+KYHR667K9H82lmI8KM7zKUJ8l5I343A34wJnvL++1TJn1iA==", - "optional": true - } + "dtrace-provider": "~0.8", + "moment": "^2.19.3", + "mv": "~2", + "safe-json-stringify": "~1" } }, "bytes": { @@ -6566,7 +6560,7 @@ "stubs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==" + "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" }, "supports-color": { "version": "5.4.0", diff --git a/services/document-updater/package.json b/services/document-updater/package.json index d26f8978c3..230fd6f7cb 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -23,7 +23,7 @@ "@overleaf/redis-wrapper": "^2.0.1", "async": "^2.5.0", "body-parser": "^1.19.0", - "bunyan": "~0.22.1", + "bunyan": "^1.8.15", "diff-match-patch": "https://github.com/overleaf/diff-match-patch/archive/89805f9c671a77a263fc53461acd62aa7498f688.tar.gz", "express": "4.17.1", "lodash": "^4.17.21", From 519dd274bf91851269c8f55c6678b9e0d2d1734f Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:47:15 +0100 Subject: [PATCH 02/11] [misc] switch from settings-sharelatex to @overleaf/settings --- services/document-updater/app.js | 2 +- .../app/js/DeleteQueueManager.js | 2 +- .../app/js/DispatchManager.js | 2 +- .../document-updater/app/js/HistoryManager.js | 2 +- .../app/js/HistoryRedisManager.js | 2 +- .../document-updater/app/js/HttpController.js | 2 +- .../document-updater/app/js/LockManager.js | 2 +- .../app/js/PersistenceManager.js | 2 +- services/document-updater/app/js/Profiler.js | 2 +- .../document-updater/app/js/ProjectFlusher.js | 2 +- .../app/js/ProjectHistoryRedisManager.js | 2 +- .../app/js/RateLimitManager.js | 2 +- .../app/js/RealTimeRedisManager.js | 2 +- .../document-updater/app/js/RedisManager.js | 2 +- .../app/js/ShareJsUpdateManager.js | 2 +- .../document-updater/app/js/UpdateManager.js | 2 +- services/document-updater/app/js/mongodb.js | 2 +- services/document-updater/expire_docops.js | 2 +- services/document-updater/package-lock.json | 20 +++++-------------- services/document-updater/package.json | 4 ++-- .../js/ApplyingUpdatesToADocTests.js | 2 +- .../ApplyingUpdatesToProjectStructureTests.js | 2 +- .../acceptance/js/SettingADocumentTests.js | 2 +- .../test/acceptance/js/SizeCheckTests.js | 2 +- .../acceptance/js/helpers/DocUpdaterClient.js | 2 +- .../DispatchManager/DispatchManagerTests.js | 2 +- .../js/HistoryManager/HistoryManagerTests.js | 2 +- .../HistoryRedisManagerTests.js | 2 +- .../unit/js/LockManager/ReleasingTheLock.js | 2 +- .../test/unit/js/LockManager/tryLockTests.js | 2 +- .../PersistenceManagerTests.js | 2 +- .../ProjectHistoryRedisManagerTests.js | 2 +- .../js/RateLimitManager/RateLimitManager.js | 2 +- .../RealTimeRedisManagerTests.js | 2 +- .../unit/js/RedisManager/RedisManagerTests.js | 2 +- .../js/UpdateManager/UpdateManagerTests.js | 2 +- 36 files changed, 41 insertions(+), 51 deletions(-) diff --git a/services/document-updater/app.js b/services/document-updater/app.js index d8b67dd31e..553ab9403b 100644 --- a/services/document-updater/app.js +++ b/services/document-updater/app.js @@ -2,7 +2,7 @@ const Metrics = require('@overleaf/metrics') Metrics.initialize('doc-updater') const express = require('express') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') logger.initialize('document-updater') diff --git a/services/document-updater/app/js/DeleteQueueManager.js b/services/document-updater/app/js/DeleteQueueManager.js index fc5bb904e3..36466f8b10 100644 --- a/services/document-updater/app/js/DeleteQueueManager.js +++ b/services/document-updater/app/js/DeleteQueueManager.js @@ -13,7 +13,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let DeleteQueueManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const RedisManager = require('./RedisManager') const ProjectManager = require('./ProjectManager') const logger = require('logger-sharelatex') diff --git a/services/document-updater/app/js/DispatchManager.js b/services/document-updater/app/js/DispatchManager.js index c600adec7b..e94e6cde0e 100644 --- a/services/document-updater/app/js/DispatchManager.js +++ b/services/document-updater/app/js/DispatchManager.js @@ -15,7 +15,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let DispatchManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const Keys = require('./UpdateKeys') const redis = require('@overleaf/redis-wrapper') diff --git a/services/document-updater/app/js/HistoryManager.js b/services/document-updater/app/js/HistoryManager.js index 18c5b7f6d2..4b7de3f5af 100644 --- a/services/document-updater/app/js/HistoryManager.js +++ b/services/document-updater/app/js/HistoryManager.js @@ -15,7 +15,7 @@ let HistoryManager const async = require('async') const logger = require('logger-sharelatex') const request = require('request') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const HistoryRedisManager = require('./HistoryRedisManager') const ProjectHistoryRedisManager = require('./ProjectHistoryRedisManager') const RedisManager = require('./RedisManager') diff --git a/services/document-updater/app/js/HistoryRedisManager.js b/services/document-updater/app/js/HistoryRedisManager.js index 20ce0651dd..bd7b3672f4 100644 --- a/services/document-updater/app/js/HistoryRedisManager.js +++ b/services/document-updater/app/js/HistoryRedisManager.js @@ -12,7 +12,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let HistoryRedisManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.history ) diff --git a/services/document-updater/app/js/HttpController.js b/services/document-updater/app/js/HttpController.js index 5e47cf5bf1..9959a84b07 100644 --- a/services/document-updater/app/js/HttpController.js +++ b/services/document-updater/app/js/HttpController.js @@ -3,7 +3,7 @@ const HistoryManager = require('./HistoryManager') const ProjectManager = require('./ProjectManager') const Errors = require('./Errors') const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const Metrics = require('./Metrics') const ProjectFlusher = require('./ProjectFlusher') const DeleteQueueManager = require('./DeleteQueueManager') diff --git a/services/document-updater/app/js/LockManager.js b/services/document-updater/app/js/LockManager.js index 1c4427ed44..c23379d811 100644 --- a/services/document-updater/app/js/LockManager.js +++ b/services/document-updater/app/js/LockManager.js @@ -13,7 +13,7 @@ */ let LockManager const metrics = require('./Metrics') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const redis = require('@overleaf/redis-wrapper') const rclient = redis.createClient(Settings.redis.lock) const keys = Settings.redis.lock.key_schema diff --git a/services/document-updater/app/js/PersistenceManager.js b/services/document-updater/app/js/PersistenceManager.js index fca23a7c47..664d36a3c7 100644 --- a/services/document-updater/app/js/PersistenceManager.js +++ b/services/document-updater/app/js/PersistenceManager.js @@ -15,7 +15,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let PersistenceManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const Errors = require('./Errors') const Metrics = require('./Metrics') const logger = require('logger-sharelatex') diff --git a/services/document-updater/app/js/Profiler.js b/services/document-updater/app/js/Profiler.js index 60431e64cb..6f7a66a7aa 100644 --- a/services/document-updater/app/js/Profiler.js +++ b/services/document-updater/app/js/Profiler.js @@ -9,7 +9,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let Profiler -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const deltaMs = function (ta, tb) { diff --git a/services/document-updater/app/js/ProjectFlusher.js b/services/document-updater/app/js/ProjectFlusher.js index 7f9783ac0d..704600fbc3 100644 --- a/services/document-updater/app/js/ProjectFlusher.js +++ b/services/document-updater/app/js/ProjectFlusher.js @@ -13,7 +13,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const request = require('request') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const RedisManager = require('./RedisManager') const { rclient } = RedisManager const docUpdaterKeys = Settings.redis.documentupdater.key_schema diff --git a/services/document-updater/app/js/ProjectHistoryRedisManager.js b/services/document-updater/app/js/ProjectHistoryRedisManager.js index ab7a9d0faa..3d8b0cd95a 100644 --- a/services/document-updater/app/js/ProjectHistoryRedisManager.js +++ b/services/document-updater/app/js/ProjectHistoryRedisManager.js @@ -14,7 +14,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let ProjectHistoryRedisManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const projectHistoryKeys = __guard__( Settings.redis != null ? Settings.redis.project_history : undefined, (x) => x.key_schema diff --git a/services/document-updater/app/js/RateLimitManager.js b/services/document-updater/app/js/RateLimitManager.js index 831b34eae1..9b699235b7 100644 --- a/services/document-updater/app/js/RateLimitManager.js +++ b/services/document-updater/app/js/RateLimitManager.js @@ -10,7 +10,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let RateLimiter -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') const Metrics = require('./Metrics') diff --git a/services/document-updater/app/js/RealTimeRedisManager.js b/services/document-updater/app/js/RealTimeRedisManager.js index 1059dc6079..298fb26940 100644 --- a/services/document-updater/app/js/RealTimeRedisManager.js +++ b/services/document-updater/app/js/RealTimeRedisManager.js @@ -12,7 +12,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let RealTimeRedisManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) diff --git a/services/document-updater/app/js/RedisManager.js b/services/document-updater/app/js/RedisManager.js index 418e3ec6d4..59eb10e332 100644 --- a/services/document-updater/app/js/RedisManager.js +++ b/services/document-updater/app/js/RedisManager.js @@ -14,7 +14,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let RedisManager -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) diff --git a/services/document-updater/app/js/ShareJsUpdateManager.js b/services/document-updater/app/js/ShareJsUpdateManager.js index 8ae91df32c..19bfee9ea4 100644 --- a/services/document-updater/app/js/ShareJsUpdateManager.js +++ b/services/document-updater/app/js/ShareJsUpdateManager.js @@ -16,7 +16,7 @@ let ShareJsUpdateManager const ShareJsModel = require('./sharejs/server/model') const ShareJsDB = require('./ShareJsDB') const logger = require('logger-sharelatex') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const Keys = require('./UpdateKeys') const { EventEmitter } = require('events') const util = require('util') diff --git a/services/document-updater/app/js/UpdateManager.js b/services/document-updater/app/js/UpdateManager.js index e92e40f44c..999994d556 100644 --- a/services/document-updater/app/js/UpdateManager.js +++ b/services/document-updater/app/js/UpdateManager.js @@ -20,7 +20,7 @@ const RedisManager = require('./RedisManager') const RealTimeRedisManager = require('./RealTimeRedisManager') const ShareJsUpdateManager = require('./ShareJsUpdateManager') const HistoryManager = require('./HistoryManager') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const _ = require('lodash') const async = require('async') const logger = require('logger-sharelatex') diff --git a/services/document-updater/app/js/mongodb.js b/services/document-updater/app/js/mongodb.js index 86b015a308..115d0adcb7 100644 --- a/services/document-updater/app/js/mongodb.js +++ b/services/document-updater/app/js/mongodb.js @@ -1,4 +1,4 @@ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const { MongoClient, ObjectId } = require('mongodb') const clientPromise = MongoClient.connect( diff --git a/services/document-updater/expire_docops.js b/services/document-updater/expire_docops.js index 398bf5229a..b9fafb072d 100644 --- a/services/document-updater/expire_docops.js +++ b/services/document-updater/expire_docops.js @@ -1,4 +1,4 @@ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) diff --git a/services/document-updater/package-lock.json b/services/document-updater/package-lock.json index bda3f21608..ff38a00247 100644 --- a/services/document-updater/package-lock.json +++ b/services/document-updater/package-lock.json @@ -926,6 +926,11 @@ "ioredis": "~4.27.1" } }, + "@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", @@ -6239,21 +6244,6 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, - "settings-sharelatex": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/settings-sharelatex/-/settings-sharelatex-1.3.0.tgz", - "integrity": "sha512-AWSeCiY1eHi+z6DF4bmTyC3tusOc6EF5zDkC28aAOhEAbgVEIuY034kx1X7a4j9HE0iVs0sVOlZrQMWJBVk3oQ==", - "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": "sha1-gIs5bhEPU9AhoZpO8fZb4OjjX6M=" - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/services/document-updater/package.json b/services/document-updater/package.json index 230fd6f7cb..44c57d0e05 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -21,6 +21,7 @@ "@overleaf/metrics": "^3.5.1", "@overleaf/o-error": "^3.3.1", "@overleaf/redis-wrapper": "^2.0.1", + "@overleaf/settings": "^2.1.1", "async": "^2.5.0", "body-parser": "^1.19.0", "bunyan": "^1.8.15", @@ -30,8 +31,7 @@ "logger-sharelatex": "^2.2.0", "mongodb": "^3.6.6", "request": "^2.88.2", - "requestretry": "^4.1.2", - "settings-sharelatex": "^1.3.0" + "requestretry": "^4.1.2" }, "devDependencies": { "babel-eslint": "^10.1.0", diff --git a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js index adf045645e..4c069008bc 100644 --- a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js +++ b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js @@ -14,7 +14,7 @@ const sinon = require('sinon') const { expect } = require('chai') const async = require('async') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclient_history = require('@overleaf/redis-wrapper').createClient( Settings.redis.history ) // note: this is track changes, not project-history diff --git a/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js b/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js index 3bc2c793e1..ea4cc7b0ee 100644 --- a/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js +++ b/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js @@ -1,5 +1,5 @@ const sinon = require('sinon') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const rclientProjectHistory = require('@overleaf/redis-wrapper').createClient( Settings.redis.project_history ) diff --git a/services/document-updater/test/acceptance/js/SettingADocumentTests.js b/services/document-updater/test/acceptance/js/SettingADocumentTests.js index 7d2307c526..60d46dcdec 100644 --- a/services/document-updater/test/acceptance/js/SettingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/SettingADocumentTests.js @@ -1,6 +1,6 @@ const sinon = require('sinon') const { expect } = require('chai') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const docUpdaterRedis = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) diff --git a/services/document-updater/test/acceptance/js/SizeCheckTests.js b/services/document-updater/test/acceptance/js/SizeCheckTests.js index 288cc485e1..ed893884be 100644 --- a/services/document-updater/test/acceptance/js/SizeCheckTests.js +++ b/services/document-updater/test/acceptance/js/SizeCheckTests.js @@ -1,5 +1,5 @@ const { expect } = require('chai') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const MockWebApi = require('./helpers/MockWebApi') const DocUpdaterClient = require('./helpers/DocUpdaterClient') diff --git a/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js b/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js index 719df741c3..ee356d3bf7 100644 --- a/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js +++ b/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js @@ -1,5 +1,5 @@ let DocUpdaterClient -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const _ = require('lodash') const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater diff --git a/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js b/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js index 81ef37f4be..d4cb72b89d 100644 --- a/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js +++ b/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js @@ -23,7 +23,7 @@ describe('DispatchManager', function () { this.DispatchManager = SandboxedModule.require(modulePath, { requires: { './UpdateManager': (this.UpdateManager = {}), - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { redis: { documentupdater: {} } diff --git a/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js b/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js index df3261b0f4..5f1529ab0b 100644 --- a/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js +++ b/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js @@ -21,7 +21,7 @@ describe('HistoryManager', function () { this.HistoryManager = SandboxedModule.require(modulePath, { requires: { request: (this.request = {}), - 'settings-sharelatex': (this.Settings = { + '@overleaf/settings': (this.Settings = { apis: { project_history: { enabled: true, diff --git a/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js b/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js index f9b719991a..626398fc6b 100644 --- a/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js +++ b/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js @@ -26,7 +26,7 @@ describe('HistoryRedisManager', function () { this.HistoryRedisManager = SandboxedModule.require(modulePath, { requires: { '@overleaf/redis-wrapper': { createClient: () => this.rclient }, - 'settings-sharelatex': { + '@overleaf/settings': { redis: { history: (this.settings = { key_schema: { diff --git a/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js b/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js index 3d6cf7a5ba..177869d0db 100644 --- a/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js +++ b/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js @@ -30,7 +30,7 @@ describe('LockManager - releasing the lock', function () { '@overleaf/redis-wrapper': { createClient: () => this.client }, - 'settings-sharelatex': { + '@overleaf/settings': { redis: { lock: { key_schema: { diff --git a/services/document-updater/test/unit/js/LockManager/tryLockTests.js b/services/document-updater/test/unit/js/LockManager/tryLockTests.js index fb49e94aa1..ef92b50214 100644 --- a/services/document-updater/test/unit/js/LockManager/tryLockTests.js +++ b/services/document-updater/test/unit/js/LockManager/tryLockTests.js @@ -29,7 +29,7 @@ describe('LockManager - trying the lock', function () { } }, './Metrics': { inc() {} }, - 'settings-sharelatex': { + '@overleaf/settings': { redis: { lock: { key_schema: { diff --git a/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js b/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js index 4015ef2662..a9137175b6 100644 --- a/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js +++ b/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js @@ -23,7 +23,7 @@ describe('PersistenceManager', function () { this.PersistenceManager = SandboxedModule.require(modulePath, { requires: { requestretry: this.request, - 'settings-sharelatex': (this.Settings = {}), + '@overleaf/settings': (this.Settings = {}), './Metrics': (this.Metrics = { Timer: (Timer = (function () { Timer = class Timer { diff --git a/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js b/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js index 1ff3d53ded..8e20214e88 100644 --- a/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js +++ b/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js @@ -28,7 +28,7 @@ describe('ProjectHistoryRedisManager', function () { modulePath, { requires: { - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { redis: { project_history: { key_schema: { diff --git a/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js b/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js index 8fef08051f..6c488c4c29 100644 --- a/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js +++ b/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js @@ -20,7 +20,7 @@ describe('RateLimitManager', function () { let Timer this.RateLimitManager = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': (this.settings = {}), + '@overleaf/settings': (this.settings = {}), './Metrics': (this.Metrics = { Timer: (Timer = (function () { Timer = class Timer { diff --git a/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js b/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js index 83cd5f99ce..c05ede76df 100644 --- a/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js +++ b/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js @@ -29,7 +29,7 @@ describe('RealTimeRedisManager', function () { createClient: (config) => config.name === 'pubsub' ? this.pubsubClient : this.rclient }, - 'settings-sharelatex': { + '@overleaf/settings': { redis: { documentupdater: (this.settings = { key_schema: { diff --git a/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js b/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js index 29329e8411..7679d217a3 100644 --- a/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js +++ b/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js @@ -27,7 +27,7 @@ describe('RedisManager', function () { this.RedisManager = SandboxedModule.require(modulePath, { requires: { './ProjectHistoryRedisManager': (this.ProjectHistoryRedisManager = {}), - 'settings-sharelatex': (this.settings = { + '@overleaf/settings': (this.settings = { documentupdater: { logHashErrors: { write: true, read: true } }, apis: { project_history: { enabled: true } diff --git a/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js b/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js index cac51b9f5f..907fac3d12 100644 --- a/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js +++ b/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js @@ -40,7 +40,7 @@ describe('UpdateManager', function () { return Timer })()) }), - 'settings-sharelatex': (this.Settings = {}), + '@overleaf/settings': (this.Settings = {}), './DocumentManager': (this.DocumentManager = {}), './RangesManager': (this.RangesManager = {}), './SnapshotManager': (this.SnapshotManager = {}), From 34de603e90e8097243a1ac05bce115540bd04cb5 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:51:01 +0100 Subject: [PATCH 03/11] [misc] run npm dedupe --- services/document-updater/package-lock.json | 860 +++----------------- 1 file changed, 115 insertions(+), 745 deletions(-) diff --git a/services/document-updater/package-lock.json b/services/document-updater/package-lock.json index ff38a00247..de158d6016 100644 --- a/services/document-updater/package-lock.json +++ b/services/document-updater/package-lock.json @@ -188,134 +188,16 @@ "split": "^1.0.0" }, "dependencies": { - "@google-cloud/common": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", - "integrity": "sha512-aHIFTqJZmeTNO9md8XxV+ywuvXF3xBm5WNmgWeeCK+XN5X+kGW0WEX94wGwj+/MdOnrVf4dL2RvSIt9J5yJG6Q==", - "requires": { - "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", - "arrify": "^2.0.1", - "duplexify": "^4.1.1", - "ent": "^2.2.0", - "extend": "^3.0.2", - "google-auth-library": "^7.0.2", - "retry-request": "^4.1.1", - "teeny-request": "^7.0.0" - } - }, - "@google-cloud/projectify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.0.1.tgz", - "integrity": "sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ==" - }, - "@google-cloud/promisify": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.3.tgz", - "integrity": "sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw==" - }, "acorn": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==" }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" - }, "coffeescript": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.5.1.tgz", "integrity": "sha512-J2jRPX0eeFh5VKyVnoLrfVFgLZtnnmp96WQSLAS8OrLm2wtQLcnikYKe1gViJKDH7vucjuhHvBKKBP3rKcD1tQ==" }, - "duplexify": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", - "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "gaxios": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.2.0.tgz", - "integrity": "sha512-Ms7fNifGv0XVU+6eIyL9LB7RVESeML9+cMvkwGS70xyD6w2Z80wl6RiqiJ9k1KFlJCUTQqFFc8tXmPQfSKUe8g==", - "requires": { - "abort-controller": "^3.0.0", - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.3.0" - } - }, - "gcp-metadata": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", - "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", - "requires": { - "gaxios": "^4.0.0", - "json-bigint": "^1.0.0" - } - }, - "google-auth-library": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.0.3.tgz", - "integrity": "sha512-6wJNYqY1QUr5I2lWaUkkzOT2b9OCNhNQrdFOt/bsBbGb7T7NCdEvrBsXraUm+KTUGk2xGlQ7m9RgUd4Llcw8NQ==", - "requires": { - "arrify": "^2.0.0", - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^4.0.0", - "gcp-metadata": "^4.2.0", - "gtoken": "^5.0.4", - "jws": "^4.0.0", - "lru-cache": "^6.0.0" - } - }, - "google-p12-pem": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", - "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", - "requires": { - "node-forge": "^0.10.0" - } - }, - "gtoken": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", - "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", - "requires": { - "gaxios": "^4.0.0", - "google-p12-pem": "^3.0.3", - "jws": "^4.0.0" - } - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "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" - } - }, - "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==", - "requires": { - "yallist": "^4.0.0" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -332,18 +214,6 @@ "lru-cache": "^6.0.0" } }, - "teeny-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz", - "integrity": "sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw==", - "requires": { - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -428,149 +298,11 @@ "teeny-request": "^7.0.0" }, "dependencies": { - "@google-cloud/common": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", - "integrity": "sha512-aHIFTqJZmeTNO9md8XxV+ywuvXF3xBm5WNmgWeeCK+XN5X+kGW0WEX94wGwj+/MdOnrVf4dL2RvSIt9J5yJG6Q==", - "requires": { - "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", - "arrify": "^2.0.1", - "duplexify": "^4.1.1", - "ent": "^2.2.0", - "extend": "^3.0.2", - "google-auth-library": "^7.0.2", - "retry-request": "^4.1.1", - "teeny-request": "^7.0.0" - } - }, - "@google-cloud/projectify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.0.1.tgz", - "integrity": "sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ==" - }, - "@google-cloud/promisify": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.3.tgz", - "integrity": "sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw==" - }, "@types/node": { "version": "13.13.48", "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.48.tgz", "integrity": "sha512-z8wvSsgWQzkr4sVuMEEOvwMdOQjiRY2Y/ZW4fDfjfe3+TfQrZqFKOthBgk2RnVEmtOKrkwdZ7uTvsxTBLjKGDQ==" }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" - }, - "duplexify": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", - "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "gaxios": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.2.0.tgz", - "integrity": "sha512-Ms7fNifGv0XVU+6eIyL9LB7RVESeML9+cMvkwGS70xyD6w2Z80wl6RiqiJ9k1KFlJCUTQqFFc8tXmPQfSKUe8g==", - "requires": { - "abort-controller": "^3.0.0", - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.3.0" - } - }, - "gcp-metadata": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", - "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", - "requires": { - "gaxios": "^4.0.0", - "json-bigint": "^1.0.0" - } - }, - "google-auth-library": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.0.3.tgz", - "integrity": "sha512-6wJNYqY1QUr5I2lWaUkkzOT2b9OCNhNQrdFOt/bsBbGb7T7NCdEvrBsXraUm+KTUGk2xGlQ7m9RgUd4Llcw8NQ==", - "requires": { - "arrify": "^2.0.0", - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^4.0.0", - "gcp-metadata": "^4.2.0", - "gtoken": "^5.0.4", - "jws": "^4.0.0", - "lru-cache": "^6.0.0" - } - }, - "google-p12-pem": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", - "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", - "requires": { - "node-forge": "^0.10.0" - } - }, - "gtoken": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", - "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", - "requires": { - "gaxios": "^4.0.0", - "google-p12-pem": "^3.0.3", - "jws": "^4.0.0" - } - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "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" - } - }, - "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==", - "requires": { - "yallist": "^4.0.0" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, - "protobufjs": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", - "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -579,18 +311,6 @@ "lru-cache": "^6.0.0" } }, - "teeny-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz", - "integrity": "sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw==", - "requires": { - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -636,146 +356,6 @@ "uuid": "^8.0.0" }, "dependencies": { - "@google-cloud/common": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", - "integrity": "sha512-aHIFTqJZmeTNO9md8XxV+ywuvXF3xBm5WNmgWeeCK+XN5X+kGW0WEX94wGwj+/MdOnrVf4dL2RvSIt9J5yJG6Q==", - "requires": { - "@google-cloud/projectify": "^2.0.0", - "@google-cloud/promisify": "^2.0.0", - "arrify": "^2.0.1", - "duplexify": "^4.1.1", - "ent": "^2.2.0", - "extend": "^3.0.2", - "google-auth-library": "^7.0.2", - "retry-request": "^4.1.1", - "teeny-request": "^7.0.0" - } - }, - "@google-cloud/projectify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.0.1.tgz", - "integrity": "sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ==" - }, - "@google-cloud/promisify": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.3.tgz", - "integrity": "sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw==" - }, - "@opencensus/core": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/@opencensus/core/-/core-0.0.22.tgz", - "integrity": "sha512-ErazJtivjceNoOZI1bG9giQ6cWS45J4i6iPUtlp7dLNu58OLs/v+CD0FsaPCh47XgPxAI12vbBE8Ec09ViwHNA==", - "requires": { - "continuation-local-storage": "^3.2.1", - "log-driver": "^1.2.7", - "semver": "^7.0.0", - "shimmer": "^1.2.0", - "uuid": "^8.0.0" - } - }, - "@opencensus/propagation-stackdriver": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/@opencensus/propagation-stackdriver/-/propagation-stackdriver-0.0.22.tgz", - "integrity": "sha512-eBvf/ihb1mN8Yz/ASkz8nHzuMKqygu77+VNnUeR0yEh3Nj+ykB8VVR6lK+NAFXo1Rd1cOsTmgvuXAZgDAGleQQ==", - "requires": { - "@opencensus/core": "^0.0.22", - "hex2dec": "^1.0.1", - "uuid": "^8.0.0" - } - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" - }, - "duplexify": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", - "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "gaxios": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.2.0.tgz", - "integrity": "sha512-Ms7fNifGv0XVU+6eIyL9LB7RVESeML9+cMvkwGS70xyD6w2Z80wl6RiqiJ9k1KFlJCUTQqFFc8tXmPQfSKUe8g==", - "requires": { - "abort-controller": "^3.0.0", - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.3.0" - } - }, - "gcp-metadata": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", - "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", - "requires": { - "gaxios": "^4.0.0", - "json-bigint": "^1.0.0" - } - }, - "google-auth-library": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.0.3.tgz", - "integrity": "sha512-6wJNYqY1QUr5I2lWaUkkzOT2b9OCNhNQrdFOt/bsBbGb7T7NCdEvrBsXraUm+KTUGk2xGlQ7m9RgUd4Llcw8NQ==", - "requires": { - "arrify": "^2.0.0", - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^4.0.0", - "gcp-metadata": "^4.2.0", - "gtoken": "^5.0.4", - "jws": "^4.0.0", - "lru-cache": "^6.0.0" - } - }, - "google-p12-pem": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", - "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", - "requires": { - "node-forge": "^0.10.0" - } - }, - "gtoken": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", - "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", - "requires": { - "gaxios": "^4.0.0", - "google-p12-pem": "^3.0.3", - "jws": "^4.0.0" - } - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "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" - } - }, - "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==", - "requires": { - "yallist": "^4.0.0" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -784,18 +364,6 @@ "lru-cache": "^6.0.0" } }, - "teeny-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz", - "integrity": "sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw==", - "requires": { - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -1229,14 +797,6 @@ "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": { @@ -1653,7 +1213,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", @@ -1842,6 +1401,27 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "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 + } + } + }, "crypt": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", @@ -2022,6 +1602,11 @@ "safe-buffer": "^5.0.1" } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, "emitter-listener": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", @@ -2155,27 +1740,6 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "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 - } - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -2195,19 +1759,8 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "ms": { "version": "2.1.2", @@ -2274,10 +1827,8 @@ }, "dependencies": { "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "version": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, "requires": { "locate-path": "^2.0.0" } @@ -2286,7 +1837,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -2296,7 +1846,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, "requires": { "p-try": "^1.0.0" } @@ -2305,7 +1854,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, "requires": { "p-limit": "^1.1.0" } @@ -2313,17 +1861,7 @@ "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" } } }, @@ -2397,31 +1935,16 @@ } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "version": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, "requires": { "locate-path": "^2.0.0" } }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -2431,7 +1954,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, "requires": { "p-try": "^1.0.0" } @@ -2440,7 +1962,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, "requires": { "p-limit": "^1.1.0" } @@ -2448,53 +1969,11 @@ "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.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": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } + "version": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -2932,16 +2411,6 @@ "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" - }, - "dependencies": { - "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", - "requires": { - "mime-db": "1.43.0" - } - } } }, "forwarded": { @@ -2967,13 +2436,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "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", @@ -3356,14 +2818,6 @@ "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - } } }, "imurmurhash": { @@ -3483,12 +2937,6 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - }, "rxjs": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", @@ -3818,6 +3266,17 @@ "type-check": "~0.3.2" } }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "strip-bom": "^3.0.0" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -3950,17 +3409,6 @@ "yn": "^4.0.0" }, "dependencies": { - "bunyan": { - "version": "1.8.15", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", - "integrity": "sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig==", - "requires": { - "dtrace-provider": "~0.8", - "moment": "^2.19.3", - "mv": "~2", - "safe-json-stringify": "~1" - } - }, "yn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-4.0.0.tgz", @@ -4164,12 +3612,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "optional": true - }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -4511,17 +3953,6 @@ "mkdirp": "~0.5.1", "ncp": "~2.0.0", "rimraf": "~2.4.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "optional": true, - "requires": { - "minimist": "0.0.8" - } - } } }, "nan": { @@ -4818,13 +4249,6 @@ "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "requires": { "ee-first": "1.1.1" - }, - "dependencies": { - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - } } }, "on-headers": { @@ -4930,6 +4354,15 @@ "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.0.0.tgz", "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": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, "parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", @@ -4943,8 +4376,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -4973,6 +4405,12 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -4989,6 +4427,12 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==" }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true + }, "pprof": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pprof/-/pprof-3.0.0.tgz", @@ -5024,26 +4468,6 @@ "yocto-queue": "^0.1.0" } }, - "protobufjs": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", - "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", @@ -5105,19 +4529,6 @@ "restore-cursor": "^2.0.0" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "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" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -5260,19 +4671,8 @@ "dev": true }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "ms": { "version": "2.1.2", @@ -5390,19 +4790,6 @@ "restore-cursor": "^2.0.0" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "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" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -5584,19 +4971,8 @@ "dev": true }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "ms": { "version": "2.1.2", @@ -5907,6 +5283,26 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.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": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "read-pkg": "^2.0.0" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -5993,27 +5389,10 @@ "uuid": "^3.3.2" }, "dependencies": { - "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", - "requires": { - "mime-db": "1.43.0" - } - }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "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" - } } } }, @@ -6084,6 +5463,12 @@ "path-parse": "^1.0.6" } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "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", @@ -6633,28 +6018,9 @@ "readable-stream": "2 || 3" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } } } }, @@ -6719,6 +6085,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" + } + }, "tslib": { "version": "1.11.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", @@ -6753,6 +6128,12 @@ "integrity": "sha512-f9Uv6ezcpvCQjJU0Zqbg+65qdcszv3qUQsZfjdRbWiZ7AMenrX1u0lNk9EoWWX6e1F+NULyg27mtdeZ5WhpljA==", "dev": true }, + "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 + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -6996,19 +6377,8 @@ }, "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 - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" } } }, From 98097b0804746b30b6b0a4763d0eae72b507ab14 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 10:07:00 +0100 Subject: [PATCH 04/11] [misc] goodbye coffee-script --- services/document-updater/package-lock.json | 132 ++++++++++++++++++-- services/document-updater/package.json | 1 - 2 files changed, 124 insertions(+), 9 deletions(-) diff --git a/services/document-updater/package-lock.json b/services/document-updater/package-lock.json index de158d6016..ad5f52aa32 100644 --- a/services/document-updater/package-lock.json +++ b/services/document-updater/package-lock.json @@ -1213,6 +1213,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", @@ -1261,12 +1262,6 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, - "coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "dev": true - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2436,6 +2431,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "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", @@ -3274,7 +3276,16 @@ "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", + "pify": "^2.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": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "locate-path": { @@ -4409,7 +4420,18 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true + "dev": true, + "requires": { + "pify": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } }, "performance-now": { "version": "2.1.0", @@ -4431,7 +4453,55 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } + } }, "pprof": { "version": "3.0.0", @@ -5300,7 +5370,53 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { + "find-up": "^2.0.0", "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } } }, "readable-stream": { diff --git a/services/document-updater/package.json b/services/document-updater/package.json index 44c57d0e05..b033ddedfb 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -37,7 +37,6 @@ "babel-eslint": "^10.1.0", "chai": "^3.5.0", "cluster-key-slot": "^1.0.5", - "coffee-script": "^1.12.7", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-config-standard": "^14.1.0", From 2a3f2641404a56c2c1004c19be2b18cddd66033d Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 11:55:13 +0100 Subject: [PATCH 05/11] [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/document-updater/.eslintrc | 2 +- .../document-updater/.github/dependabot.yml | 2 +- services/document-updater/.prettierrc | 6 +- services/document-updater/buildscript.txt | 2 +- services/document-updater/package-lock.json | 3231 +++++------------ services/document-updater/package.json | 35 +- 6 files changed, 863 insertions(+), 2415 deletions(-) diff --git a/services/document-updater/.eslintrc b/services/document-updater/.eslintrc index 321353f971..1c14f50efe 100644 --- a/services/document-updater/.eslintrc +++ b/services/document-updater/.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/document-updater/.github/dependabot.yml b/services/document-updater/.github/dependabot.yml index e2c64a3351..c856753655 100644 --- a/services/document-updater/.github/dependabot.yml +++ b/services/document-updater/.github/dependabot.yml @@ -20,4 +20,4 @@ updates: # future if we reorganise teams labels: - "dependencies" - - "Team-Magma" + - "type:maintenance" diff --git a/services/document-updater/.prettierrc b/services/document-updater/.prettierrc index 24f9ec526f..c92c3526e7 100644 --- a/services/document-updater/.prettierrc +++ b/services/document-updater/.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/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index b7b22bd21d..b75d1c1e34 100644 --- a/services/document-updater/buildscript.txt +++ b/services/document-updater/buildscript.txt @@ -5,4 +5,4 @@ document-updater --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/document-updater/package-lock.json b/services/document-updater/package-lock.json index ad5f52aa32..2fe0324acd 100644 --- a/services/document-updater/package-lock.json +++ b/services/document-updater/package-lock.json @@ -5,134 +5,67 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.10.4" } }, - "@babel/generator": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz", - "integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==", - "dev": true, - "requires": { - "@babel/types": "^7.8.7", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "@babel/helper-validator-identifier": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", + "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "dev": true }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz", - "integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==", - "dev": true - }, - "@babel/runtime": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", - "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "@eslint/eslintrc": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", + "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", "dev": true, "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/runtime-corejs3": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.9.6.tgz", - "integrity": "sha512-6toWAfaALQjt3KMZQc6fABqZwUDDuWzz+cAfPhqyEnzxvdWOAkjwPNxgF8xlmo7OWLsSjaKjsskpKHRLaMArOA==", - "dev": true, - "requires": { - "core-js-pure": "^3.0.0", - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" - } - }, - "@babel/traverse": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz", - "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.6", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "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": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "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": { - "ms": "^2.1.1" + "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": { @@ -143,17 +76,6 @@ } } }, - "@babel/types": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz", - "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, "@google-cloud/common": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", @@ -188,24 +110,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==" - }, - "coffeescript": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.5.1.tgz", - "integrity": "sha512-J2jRPX0eeFh5VKyVnoLrfVFgLZtnnmp96WQSLAS8OrLm2wtQLcnikYKe1gViJKDH7vucjuhHvBKKBP3rKcD1tQ==" - }, - "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", @@ -413,6 +317,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.22", "resolved": "https://registry.npmjs.org/@opencensus/core/-/core-0.0.22.tgz", @@ -477,13 +415,6 @@ "integrity": "sha512-1FRBYZO0lbJ0U+FRGZVS8ou6RhEw3e2B86WW/NbtBw554g0h5iC8ESf+juIfPMU/WDf/JDIFbg3eB/LnP2RSow==", "requires": { "core-js": "^3.8.3" - }, - "dependencies": { - "core-js": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.11.1.tgz", - "integrity": "sha512-k93Isqg7e4txZWMGNYwevZL9MiogLk8pd1PtwrmFmi8IBq4GXqUaVW/a33Llt6amSI36uSjd0GWwc9pTT9ALlQ==" - } } }, "@overleaf/redis-wrapper": { @@ -560,14 +491,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": { @@ -598,14 +521,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": { @@ -619,29 +534,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/json-schema": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", - "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", - "dev": true - }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -657,59 +554,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", @@ -739,15 +583,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 }, "agent-base": { @@ -790,19 +633,10 @@ "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" - } - }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -863,40 +697,50 @@ "sprintf-js": "~1.0.2" } }, - "aria-query": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", - "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", - "dev": true, - "requires": { - "ast-types-flow": "0.0.7", - "commander": "^2.11.0" - } - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", "dev": true, "requires": { + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", "is-string": "^1.0.5" } }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + } } }, "arrify": { @@ -920,19 +764,13 @@ "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=", - "dev": true - }, - "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", + "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": { @@ -974,26 +812,6 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" }, - "axobject-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", - "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==", - "dev": true - }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1078,12 +896,6 @@ "type-is": "~1.6.17" } }, - "boolify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/boolify/-/boolify-1.0.1.tgz", - "integrity": "sha1-tcCeF8rNET0Rt7s+04TMASmU2Gs=", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1144,6 +956,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", @@ -1151,36 +973,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": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chai": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", - "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "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.1", - "deep-eql": "^0.1.3", - "type-detect": "^1.0.0" + "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": { @@ -1194,17 +1017,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", @@ -1213,7 +1036,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", @@ -1226,30 +1048,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" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "cluster-key-slot": { @@ -1262,6 +1069,11 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "coffeescript": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.5.1.tgz", + "integrity": "sha512-J2jRPX0eeFh5VKyVnoLrfVFgLZtnnmp96WQSLAS8OrLm2wtQLcnikYKe1gViJKDH7vucjuhHvBKKBP3rKcD1tQ==" + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1285,18 +1097,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "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", @@ -1341,12 +1141,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": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -1380,16 +1174,9 @@ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "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-js-pure": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", - "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", - "dev": true + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.11.1.tgz", + "integrity": "sha512-k93Isqg7e4txZWMGNYwevZL9MiogLk8pd1PtwrmFmi8IBq4GXqUaVW/a33Llt6amSI36uSjd0GWwc9pTT9ALlQ==" }, "core-util-is": { "version": "1.0.2", @@ -1397,24 +1184,14 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "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": { @@ -1427,12 +1204,6 @@ "resolved": "https://registry.npmjs.org/d64/-/d64-1.0.0.tgz", "integrity": "sha1-QAKofoUMv8n52XBrYPymE6MzbpA=" }, - "damerau-levenshtein": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", - "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -1450,26 +1221,18 @@ } }, "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "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": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "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" - }, - "dependencies": { - "type-detect": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", - "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", - "dev": true - } + "type-detect": "^4.0.0" } }, "deep-extend": { @@ -1537,12 +1300,6 @@ "version": "https://github.com/overleaf/diff-match-patch/archive/89805f9c671a77a263fc53461acd62aa7498f688.tar.gz", "integrity": "sha512-rX+9ry8tosctHzJfYG9Vjpof6wTYYA/oFHnzpv6O1vkUd+5dTc9LpZCTUv+FK8i4grpITxY8BYSk8A3u4anwJQ==" }, - "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", @@ -1611,9 +1368,9 @@ } }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "encodeurl": { @@ -1629,6 +1386,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", @@ -1644,22 +1410,24 @@ } }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "object-inspect": "^1.10.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" } }, "es-to-primitive": { @@ -1691,71 +1459,167 @@ "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" + } + } } }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "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": { - "type-fest": "^0.8.1" + "color-name": "~1.1.4" } }, - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "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==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "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 + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "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==" }, "ms": { "version": "2.1.2", @@ -1763,48 +1627,41 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "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==", - "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" + } } } }, "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-config-standard-jsx": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", - "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", - "dev": true - }, - "eslint-config-standard-react": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-react/-/eslint-config-standard-react-9.2.0.tgz", - "integrity": "sha512-u+KRP2uCtthZ/W4DlLWCC59GZNV/y9k9yicWWammgTs/Omh8ZUUPF3EnYm81MAcbkYQq2Wg0oxutAhi/FQ8mIw==", - "dev": true, - "requires": { - "eslint-config-standard-jsx": "^8.0.0" - } - }, "eslint-import-resolver-node": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", - "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -1812,64 +1669,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": { - "find-up": { - "version": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "requires": { - "locate-path": "^2.0.0" + "ms": "^2.1.1" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "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": { @@ -1880,134 +1715,77 @@ "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - } } }, "eslint-plugin-import": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", - "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", + "version": "2.23.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz", + "integrity": "sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==", "dev": true, "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", - "contains-path": "^0.1.0", + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.1", + "find-up": "^2.0.0", "has": "^1.0.3", + "is-core-module": "^2.4.0", "minimatch": "^3.0.4", - "object.values": "^1.1.0", - "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" + "object.values": "^1.1.3", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.9.0" }, "dependencies": { "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "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" } }, - "find-up": { - "version": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "version": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "requires": { "p-try": "^1.0.0" } }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, "requires": { - "p-limit": "^1.1.0" + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "pify": { - "version": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, - "eslint-plugin-jsx-a11y": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz", - "integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.5", - "aria-query": "^3.0.0", - "array-includes": "^3.0.3", - "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.2", - "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^7.0.2", - "has": "^1.0.3", - "jsx-ast-utils": "^2.2.1" - } - }, "eslint-plugin-mocha": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz", - "integrity": "sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-8.2.0.tgz", + "integrity": "sha512-8oOR47Ejt+YJPNQzedbiklDqS1zurEaNrxXpRs+Uk4DMDPVmKNagShFeUaYsfvWP55AhI+P1non5QZAHV6K78A==", "dev": true, "requires": { - "eslint-utils": "^2.0.0", - "ramda": "^0.27.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - } + "eslint-utils": "^2.1.0", + "ramda": "^0.27.1" } }, "eslint-plugin-node": { @@ -2024,15 +1802,6 @@ "semver": "^6.1.0" }, "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, "ignore": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", @@ -2056,57 +1825,20 @@ "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "dev": true }, - "eslint-plugin-react": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz", - "integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.2.3", - "object.entries": "^1.1.1", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.15.1", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.2", - "xregexp": "^4.3.0" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - } - } - }, - "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" @@ -2119,20 +1851,26 @@ "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true } } @@ -2144,31 +1882,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", @@ -2242,17 +1977,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", @@ -2285,22 +2009,13 @@ "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.0.tgz", "integrity": "sha1-PlzoKTQJz6pxd6cbnKhOGx5vJe8=" }, - "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": { @@ -2332,12 +2047,12 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^2.0.0" } }, "findit2": { @@ -2352,45 +2067,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": { @@ -2431,13 +2119,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "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", @@ -2525,12 +2206,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", @@ -2562,10 +2254,13 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } }, "google-auth-library": { "version": "7.0.4", @@ -2617,9 +2312,9 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "growl": { @@ -2661,22 +2356,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": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "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": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "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", @@ -2828,12 +2512,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "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", @@ -2853,143 +2531,6 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "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": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "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 - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "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 - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "rxjs": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", - "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "internal-slot": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz", - "integrity": "sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g==", - "dev": true, - "requires": { - "es-abstract": "^1.17.0-next.1", - "has": "^1.0.3", - "side-channel": "^1.0.2" - } - }, "ioredis": { "version": "4.27.1", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.27.1.tgz", @@ -3038,6 +2579,12 @@ "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": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -3047,6 +2594,15 @@ "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", @@ -3058,6 +2614,15 @@ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "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", @@ -3084,12 +2649,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", @@ -3102,12 +2679,12 @@ "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2" } }, "is-stream": { @@ -3177,12 +2754,6 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", @@ -3191,6 +2762,12 @@ "bignumber.js": "^9.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", @@ -3212,6 +2789,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3223,16 +2809,6 @@ "verror": "1.10.0" } }, - "jsx-ast-utils": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", - "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "object.assign": "^4.1.0" - } - }, "just-extend": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", @@ -3259,42 +2835,42 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "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": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "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": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "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==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^3.0.0", + "p-locate": "^2.0.0", "path-exists": "^3.0.0" } }, @@ -3308,6 +2884,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", @@ -3324,22 +2906,16 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "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": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "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": { @@ -3427,78 +3003,11 @@ } } }, - "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": "sha1-akAhj9x64V/HbD0PPmdsRlOIYD4=", - "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": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "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": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "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": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha1-mntxz7fTYaGU6lVSQckvdGjVvyg=" }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3514,24 +3023,6 @@ } } }, - "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", @@ -3563,29 +3054,6 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, - "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", @@ -3609,12 +3077,6 @@ "mime-db": "1.43.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", @@ -3623,6 +3085,11 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -3646,13 +3113,6 @@ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - } } }, "mocha": { @@ -3688,17 +3148,10 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -3709,22 +3162,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" } @@ -3732,8 +3173,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", @@ -3752,12 +3192,6 @@ } } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3797,8 +3231,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "js-yaml": { "version": "4.0.0", @@ -3824,15 +3257,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", @@ -3848,26 +3272,6 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "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": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3876,47 +3280,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 } } }, @@ -3949,12 +3312,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "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", @@ -4019,12 +3376,6 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "nise": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", @@ -4195,9 +3546,9 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, "object-keys": { @@ -4207,51 +3558,26 @@ "dev": true }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.entries": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz", - "integrity": "sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "object.fromentries": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", - "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "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": { @@ -4275,32 +3601,23 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.1.tgz", - "integrity": "sha512-ZpZpjcJeugQfWsfyQlshVoowIIQ1qBGSVll4rfDq6JJVO//fesjoX808hXWfBjY+ROZgpKDI5TRSRBSoJiZ8eg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "optional-require": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "os-homedir": { @@ -4323,34 +3640,24 @@ } }, "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": "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" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true }, "p-map": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4366,12 +3673,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": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "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": { @@ -4387,23 +3695,18 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "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": { @@ -4417,22 +3720,28 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "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": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "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", @@ -4458,48 +3767,32 @@ "find-up": "^2.1.0" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, "requires": { "p-try": "^1.0.0" } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, + } + } + }, + "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" + }, + "dependencies": { + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "requires": { - "p-limit": "^1.1.0" + "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": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true } } }, @@ -4530,14 +3823,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" - } - }, "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", @@ -4546,583 +3831,17 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "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.1", - "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-9.0.1.tgz", - "integrity": "sha512-KZT65QTosSAqBBqmrC+RpXbsMRe7Os2YSR9cAfFbDlyPAopzA/S5bioiZ3rpziNQNSJaOxmtXSx07EQ+o2Dlug==", - "dev": true, - "requires": { - "@typescript-eslint/parser": "^1.10.2", - "common-tags": "^1.4.0", - "core-js": "^3.1.4", - "dlv": "^1.1.0", - "eslint": "^5.0.0", - "indent-string": "^4.0.0", - "lodash.merge": "^4.6.0", - "loglevel-colored-level-prefix": "^1.0.0", - "prettier": "^1.7.0", - "pretty-format": "^23.0.1", - "require-relative": "^0.8.7", - "typescript": "^3.2.1", - "vue-eslint-parser": "^2.0.2" - }, - "dependencies": { - "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": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "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": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "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 - }, - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "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": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "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": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "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": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "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": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "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": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "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": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "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 - }, - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "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": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "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": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "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": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "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": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } - } - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -5132,24 +3851,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": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - } - } - }, "pretty-ms": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", @@ -5177,17 +3878,6 @@ "tdigest": "^0.1.1" } }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, "protobufjs": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", @@ -5258,16 +3948,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 }, "randombytes": { @@ -5335,11 +4019,6 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5347,75 +4026,34 @@ } } }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "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": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "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" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, "requires": { "p-try": "^1.0.0" } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true } } }, @@ -5456,26 +4094,10 @@ "redis-errors": "^1.0.0" } }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "request": { @@ -5528,6 +4150,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "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", @@ -5559,18 +4187,6 @@ "integrity": "sha1-rW8wwTvs15cBDEaK+ndcDAprR/o=", "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": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", - "dev": true - }, "resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", @@ -5585,16 +4201,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", @@ -5628,21 +4234,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.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -5746,18 +4337,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": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "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": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "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": { @@ -5765,16 +4356,6 @@ "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", "integrity": "sha1-YQhZ994ye1h+/r9QH7QxF/mv8zc=" }, - "side-channel": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz", - "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==", - "dev": true, - "requires": { - "es-abstract": "^1.17.0-next.1", - "object-inspect": "^1.7.0" - } - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -5819,14 +4400,21 @@ } }, "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" + }, + "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 + } } }, "snakecase-keys": { @@ -5862,9 +4450,9 @@ } }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -5872,15 +4460,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -5888,9 +4476,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": { @@ -5953,70 +4541,33 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "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==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "string.prototype.matchall": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz", - "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "has-symbols": "^1.0.1", - "internal-slot": "^1.0.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2" + "emoji-regex": "^8.0.0", + "strip-ansi": "^6.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" - } - }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" + "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": { @@ -6028,12 +4579,12 @@ } }, "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" + "ansi-regex": "^5.0.0" } }, "strip-bom": { @@ -6063,15 +4614,30 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.1.tgz", + "integrity": "sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + } } }, "tar": { @@ -6151,21 +4717,6 @@ "integrity": "sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A==", "dev": true }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-no-case": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", @@ -6210,11 +4761,16 @@ "punycode": "^2.1.1" } }, - "tslib": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", - "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==", - "dev": true + "tsconfig-paths": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "dev": true, + "requires": { + "json5": "^2.2.0", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } }, "tunnel-agent": { "version": "0.6.0", @@ -6230,24 +4786,24 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "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": "1.0.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", - "integrity": "sha512-f9Uv6ezcpvCQjJU0Zqbg+65qdcszv3qUQsZfjdRbWiZ7AMenrX1u0lNk9EoWWX6e1F+NULyg27mtdeZ5WhpljA==", + "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.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "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": { @@ -6259,11 +4815,25 @@ "mime-types": "~2.1.24" } }, - "typescript": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", - "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", - "dev": true + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + } + } }, "underscore": { "version": "1.6.0", @@ -6299,9 +4869,9 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "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": { @@ -6329,99 +4899,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": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "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": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "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 - } - } - }, "when": { "version": "3.7.8", "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=" }, "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": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "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", @@ -6468,14 +4971,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" + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "wrappy": { @@ -6483,30 +4985,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - }, - "dependencies": { - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - } - } - }, - "xregexp": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz", - "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==", - "dev": true, - "requires": { - "@babel/runtime-corejs3": "^7.8.3" - } - }, "y18n": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.6.tgz", @@ -6519,40 +4997,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": { - "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", @@ -6564,20 +5027,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/document-updater/package.json b/services/document-updater/package.json index b033ddedfb..c46eb73c60 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -13,9 +13,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", @@ -34,27 +35,21 @@ "requestretry": "^4.1.2" }, "devDependencies": { - "babel-eslint": "^10.1.0", - "chai": "^3.5.0", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", "cluster-key-slot": "^1.0.5", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-config-standard": "^14.1.0", - "eslint-config-standard-jsx": "^8.1.0", - "eslint-config-standard-react": "^9.2.0", - "eslint-plugin-chai-expect": "^2.1.0", - "eslint-plugin-chai-friendly": "^0.5.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-mocha": "^6.3.0", - "eslint-plugin-node": "^11.0.0", + "eslint": "^7.21.0", + "eslint-config-prettier": "^8.1.0", + "eslint-config-standard": "^16.0.2", + "eslint-plugin-chai-expect": "^2.2.0", + "eslint-plugin-chai-friendly": "^0.6.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.19.0", - "eslint-plugin-standard": "^4.0.1", "mocha": "^8.3.2", - "prettier": "^2.0.0", - "prettier-eslint-cli": "^5.0.0", + "prettier": "^2.2.1", "sandboxed-module": "^2.0.4", "sinon": "^9.0.2", "timekeeper": "^2.0.0" From c532376e216a719107d33a1c74bfecccd31d9f9e Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:04:42 +0100 Subject: [PATCH 06/11] [misc] run format_fix and lint:fix --- services/document-updater/app.js | 30 +- .../app/js/DeleteQueueManager.js | 115 ++- services/document-updater/app/js/DiffCodec.js | 6 +- .../app/js/DispatchManager.js | 8 +- .../app/js/DocumentManager.js | 793 +++++++++--------- services/document-updater/app/js/Errors.js | 2 +- .../document-updater/app/js/HistoryManager.js | 82 +- .../app/js/HistoryRedisManager.js | 2 +- .../document-updater/app/js/HttpController.js | 92 +- .../document-updater/app/js/LockManager.js | 104 +-- .../app/js/LoggerSerializers.js | 8 +- .../app/js/PersistenceManager.js | 16 +- .../document-updater/app/js/ProjectFlusher.js | 60 +- .../app/js/ProjectHistoryRedisManager.js | 22 +- .../document-updater/app/js/ProjectManager.js | 33 +- .../document-updater/app/js/RangesManager.js | 6 +- .../document-updater/app/js/RangesTracker.js | 28 +- .../app/js/RateLimitManager.js | 6 +- .../app/js/RealTimeRedisManager.js | 4 +- .../document-updater/app/js/RedisManager.js | 472 ++++++----- services/document-updater/app/js/ShareJsDB.js | 2 +- .../app/js/ShareJsUpdateManager.js | 4 +- .../app/js/SnapshotManager.js | 4 +- .../document-updater/app/js/UpdateKeys.js | 2 +- .../document-updater/app/js/UpdateManager.js | 305 +++---- services/document-updater/app/js/mongodb.js | 2 +- .../document-updater/app/js/sharejs/count.js | 2 +- .../app/js/sharejs/helpers.js | 124 +-- .../app/js/sharejs/json-api.js | 2 +- .../document-updater/app/js/sharejs/json.js | 8 +- .../document-updater/app/js/sharejs/model.js | 49 +- .../app/js/sharejs/server/model.js | 49 +- .../document-updater/app/js/sharejs/simple.js | 2 +- .../app/js/sharejs/text-api.js | 4 +- .../app/js/sharejs/text-composable-api.js | 4 +- .../app/js/sharejs/text-composable.js | 2 +- .../app/js/sharejs/text-tp2-api.js | 4 +- .../app/js/sharejs/text-tp2.js | 4 +- .../document-updater/app/js/sharejs/text.js | 12 +- .../app/js/sharejs/types/count.js | 2 +- .../app/js/sharejs/types/helpers.js | 124 +-- .../app/js/sharejs/types/json-api.js | 2 +- .../app/js/sharejs/types/json.js | 8 +- .../app/js/sharejs/types/model.js | 49 +- .../app/js/sharejs/types/simple.js | 2 +- .../app/js/sharejs/types/text-api.js | 4 +- .../js/sharejs/types/text-composable-api.js | 4 +- .../app/js/sharejs/types/text-composable.js | 2 +- .../app/js/sharejs/types/text-tp2-api.js | 4 +- .../app/js/sharejs/types/text-tp2.js | 4 +- .../app/js/sharejs/types/text.js | 14 +- .../config/settings.defaults.js | 40 +- services/document-updater/expire_docops.js | 2 +- .../js/ApplyingUpdatesToADocTests.js | 136 +-- .../ApplyingUpdatesToProjectStructureTests.js | 76 +- .../acceptance/js/DeletingADocumentTests.js | 18 +- .../acceptance/js/DeletingAProjectTests.js | 54 +- .../acceptance/js/FlushingAProjectTests.js | 36 +- .../test/acceptance/js/FlushingDocsTests.js | 20 +- .../acceptance/js/GettingADocumentTests.js | 26 +- .../acceptance/js/GettingProjectDocsTests.js | 20 +- .../test/acceptance/js/RangesTests.js | 176 ++-- .../acceptance/js/SettingADocumentTests.js | 46 +- .../test/acceptance/js/SizeCheckTests.js | 18 +- .../acceptance/js/helpers/DocUpdaterApp.js | 4 +- .../acceptance/js/helpers/DocUpdaterClient.js | 20 +- .../js/helpers/MockProjectHistoryApi.js | 6 +- .../js/helpers/MockTrackChangesApi.js | 8 +- .../test/acceptance/js/helpers/MockWebApi.js | 8 +- .../js/test_blpop_failover.js | 18 +- .../js/test_pubsub_failover.js | 14 +- services/document-updater/test/setup.js | 10 +- .../document-updater/test/stress/js/run.js | 27 +- .../test/unit/js/DiffCodec/DiffCodecTests.js | 12 +- .../DispatchManager/DispatchManagerTests.js | 16 +- .../DocumentManager/DocumentManagerTests.js | 24 +- .../js/HistoryManager/HistoryManagerTests.js | 28 +- .../HistoryRedisManagerTests.js | 14 +- .../js/HttpController/HttpControllerTests.js | 80 +- .../unit/js/LockManager/CheckingTheLock.js | 6 +- .../unit/js/LockManager/ReleasingTheLock.js | 14 +- .../test/unit/js/LockManager/getLockTests.js | 6 +- .../test/unit/js/LockManager/tryLockTests.js | 36 +- .../PersistenceManagerTests.js | 24 +- .../ProjectHistoryRedisManagerTests.js | 26 +- .../flushAndDeleteProjectTests.js | 16 +- .../js/ProjectManager/flushProjectTests.js | 14 +- .../js/ProjectManager/getProjectDocsTests.js | 18 +- .../js/ProjectManager/updateProjectTests.js | 34 +- .../js/RangesManager/RangesManagerTests.js | 158 ++-- .../js/RateLimitManager/RateLimitManager.js | 16 +- .../RealTimeRedisManagerTests.js | 28 +- .../unit/js/RedisManager/RedisManagerTests.js | 54 +- .../unit/js/ShareJS/TextTransformTests.js | 4 +- .../test/unit/js/ShareJsDB/ShareJsDBTests.js | 8 +- .../ShareJsUpdateManagerTests.js | 32 +- .../js/UpdateManager/UpdateManagerTests.js | 40 +- 97 files changed, 2113 insertions(+), 2071 deletions(-) diff --git a/services/document-updater/app.js b/services/document-updater/app.js index 553ab9403b..c724b74d33 100644 --- a/services/document-updater/app.js +++ b/services/document-updater/app.js @@ -114,7 +114,7 @@ const pubsubClient = require('@overleaf/redis-wrapper').createClient( Settings.redis.pubsub ) app.get('/health_check/redis', (req, res, next) => { - pubsubClient.healthCheck((error) => { + pubsubClient.healthCheck(error => { if (error) { logger.err({ err: error }, 'failed redis health check') return res.sendStatus(500) @@ -128,7 +128,7 @@ const docUpdaterRedisClient = require('@overleaf/redis-wrapper').createClient( Settings.redis.documentupdater ) app.get('/health_check/redis_cluster', (req, res, next) => { - docUpdaterRedisClient.healthCheck((error) => { + docUpdaterRedisClient.healthCheck(error => { if (error) { logger.err({ err: error }, 'failed redis cluster health check') return res.sendStatus(500) @@ -141,32 +141,32 @@ app.get('/health_check/redis_cluster', (req, res, next) => { app.get('/health_check', (req, res, next) => { async.series( [ - (cb) => { - pubsubClient.healthCheck((error) => { + cb => { + pubsubClient.healthCheck(error => { if (error) { logger.err({ err: error }, 'failed redis health check') } cb(error) }) }, - (cb) => { - docUpdaterRedisClient.healthCheck((error) => { + cb => { + docUpdaterRedisClient.healthCheck(error => { if (error) { logger.err({ err: error }, 'failed redis cluster health check') } cb(error) }) }, - (cb) => { - mongodb.healthCheck((error) => { + cb => { + mongodb.healthCheck(error => { if (error) { logger.err({ err: error }, 'failed mongo health check') } cb(error) }) - } + }, ], - (error) => { + error => { if (error) { return res.sendStatus(500) } else { @@ -189,7 +189,7 @@ app.use((error, req, res, next) => { } }) -const shutdownCleanly = (signal) => () => { +const shutdownCleanly = signal => () => { logger.log({ signal }, 'received interrupt, cleaning up') Settings.shuttingDown = true setTimeout(() => { @@ -198,8 +198,8 @@ const shutdownCleanly = (signal) => () => { }, 10000) } -const watchForEvent = (eventName) => { - docUpdaterRedisClient.on(eventName, (e) => { +const watchForEvent = eventName => { + docUpdaterRedisClient.on(eventName, e => { console.log(`redis event: ${eventName} ${e}`) // eslint-disable-line no-console }) } @@ -236,7 +236,7 @@ if (!module.parent) { } }) }) - .catch((err) => { + .catch(err => { logger.fatal({ err }, 'Cannot connect to mongo. Exiting.') process.exit(1) }) @@ -251,7 +251,7 @@ for (const signal of [ 'SIGUSR1', 'SIGUSR2', 'SIGTERM', - 'SIGABRT' + 'SIGABRT', ]) { process.on(signal, shutdownCleanly(signal)) } diff --git a/services/document-updater/app/js/DeleteQueueManager.js b/services/document-updater/app/js/DeleteQueueManager.js index 36466f8b10..492f8d3360 100644 --- a/services/document-updater/app/js/DeleteQueueManager.js +++ b/services/document-updater/app/js/DeleteQueueManager.js @@ -43,44 +43,44 @@ module.exports = DeleteQueueManager = { let count = 0 const flushProjectIfNotModified = (project_id, flushTimestamp, cb) => - ProjectManager.getProjectDocsTimestamps(project_id, function ( - err, - timestamps - ) { - if (err != null) { - return callback(err) - } - if (timestamps.length === 0) { - logger.log( - { project_id }, - 'skipping flush of queued project - no timestamps' - ) - return cb() - } - // are any of the timestamps newer than the time the project was flushed? - for (const timestamp of Array.from(timestamps)) { - if (timestamp > flushTimestamp) { - metrics.inc('queued-delete-skipped') - logger.debug( - { project_id, timestamps, flushTimestamp }, - 'found newer timestamp, will skip delete' + ProjectManager.getProjectDocsTimestamps( + project_id, + function (err, timestamps) { + if (err != null) { + return callback(err) + } + if (timestamps.length === 0) { + logger.log( + { project_id }, + 'skipping flush of queued project - no timestamps' ) return cb() } - } - logger.log({ project_id, flushTimestamp }, 'flushing queued project') - return ProjectManager.flushAndDeleteProjectWithLocks( - project_id, - { skip_history_flush: false }, - function (err) { - if (err != null) { - logger.err({ project_id, err }, 'error flushing queued project') + // are any of the timestamps newer than the time the project was flushed? + for (const timestamp of Array.from(timestamps)) { + if (timestamp > flushTimestamp) { + metrics.inc('queued-delete-skipped') + logger.debug( + { project_id, timestamps, flushTimestamp }, + 'found newer timestamp, will skip delete' + ) + return cb() } - metrics.inc('queued-delete-completed') - return cb(null, true) } - ) - }) + logger.log({ project_id, flushTimestamp }, 'flushing queued project') + return ProjectManager.flushAndDeleteProjectWithLocks( + project_id, + { skip_history_flush: false }, + function (err) { + if (err != null) { + logger.err({ project_id, err }, 'error flushing queued project') + } + metrics.inc('queued-delete-completed') + return cb(null, true) + } + ) + } + ) var flushNextProject = function () { const now = Date.now() @@ -92,30 +92,29 @@ module.exports = DeleteQueueManager = { logger.log('hit count limit on flushing old projects') return callback(null, count) } - return RedisManager.getNextProjectToFlushAndDelete(cutoffTime, function ( - err, - project_id, - flushTimestamp, - queueLength - ) { - if (err != null) { - return callback(err) - } - if (project_id == null) { - return callback(null, count) - } - logger.log({ project_id, queueLength }, 'flushing queued project') - metrics.globalGauge('queued-flush-backlog', queueLength) - return flushProjectIfNotModified(project_id, flushTimestamp, function ( - err, - flushed - ) { - if (flushed) { - count++ + return RedisManager.getNextProjectToFlushAndDelete( + cutoffTime, + function (err, project_id, flushTimestamp, queueLength) { + if (err != null) { + return callback(err) } - return flushNextProject() - }) - }) + if (project_id == null) { + return callback(null, count) + } + logger.log({ project_id, queueLength }, 'flushing queued project') + metrics.globalGauge('queued-flush-backlog', queueLength) + return flushProjectIfNotModified( + project_id, + flushTimestamp, + function (err, flushed) { + if (flushed) { + count++ + } + return flushNextProject() + } + ) + } + ) } return flushNextProject() @@ -133,12 +132,12 @@ module.exports = DeleteQueueManager = { { timeout: 1000, min_delete_age: 3 * 60 * 1000, - limit: 1000 // high value, to ensure we always flush enough projects + limit: 1000, // high value, to ensure we always flush enough projects }, (err, flushed) => setTimeout(doFlush, flushed > 10 ? SHORT_DELAY : LONG_DELAY) ) } return doFlush() - } + }, } diff --git a/services/document-updater/app/js/DiffCodec.js b/services/document-updater/app/js/DiffCodec.js index 59b7dee67b..5c017f0d4e 100644 --- a/services/document-updater/app/js/DiffCodec.js +++ b/services/document-updater/app/js/DiffCodec.js @@ -21,13 +21,13 @@ module.exports = { if (type === this.ADDED) { ops.push({ i: content, - p: position + p: position, }) position += content.length } else if (type === this.REMOVED) { ops.push({ d: content, - p: position + p: position, }) } else if (type === this.UNCHANGED) { position += content.length @@ -36,5 +36,5 @@ module.exports = { } } callback(null, ops) - } + }, } diff --git a/services/document-updater/app/js/DispatchManager.js b/services/document-updater/app/js/DispatchManager.js index e94e6cde0e..d567fade2e 100644 --- a/services/document-updater/app/js/DispatchManager.js +++ b/services/document-updater/app/js/DispatchManager.js @@ -57,7 +57,7 @@ module.exports = DispatchManager = { Keys.splitProjectIdAndDocId(doc_key) ) // Dispatch this in the background - const backgroundTask = (cb) => + const backgroundTask = cb => UpdateManager.processOutstandingUpdatesWithLock( project_id, doc_id, @@ -91,7 +91,7 @@ module.exports = DispatchManager = { if (Settings.shuttingDown) { return } - return worker._waitForUpdateThenDispatchWorker((error) => { + return worker._waitForUpdateThenDispatchWorker(error => { if (error != null) { logger.error({ err: error }, 'Error in worker process') throw error @@ -99,7 +99,7 @@ module.exports = DispatchManager = { return worker.run() } }) - } + }, } return worker @@ -110,5 +110,5 @@ module.exports = DispatchManager = { _.times(number, function (shardNumber) { return DispatchManager.createDispatcher(RateLimiter, shardNumber).run() }) - } + }, } diff --git a/services/document-updater/app/js/DocumentManager.js b/services/document-updater/app/js/DocumentManager.js index b6c4510f9f..a79d4aa187 100644 --- a/services/document-updater/app/js/DocumentManager.js +++ b/services/document-updater/app/js/DocumentManager.js @@ -47,94 +47,102 @@ module.exports = DocumentManager = { return _callback(...Array.from(args || [])) } - return RedisManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId, - unflushedTime - ) { - if (error != null) { - return callback(error) - } - if (lines == null || version == null) { - logger.log( - { project_id, doc_id }, - 'doc not in redis so getting from persistence API' - ) - return PersistenceManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId, - projectHistoryType - ) { - if (error != null) { - return callback(error) - } + return RedisManager.getDoc( + project_id, + doc_id, + function ( + error, + lines, + version, + ranges, + pathname, + projectHistoryId, + unflushedTime + ) { + if (error != null) { + return callback(error) + } + if (lines == null || version == null) { logger.log( - { - project_id, - doc_id, + { project_id, doc_id }, + 'doc not in redis so getting from persistence API' + ) + return PersistenceManager.getDoc( + project_id, + doc_id, + function ( + error, lines, version, + ranges, pathname, projectHistoryId, projectHistoryType - }, - 'got doc from persistence API' - ) - return RedisManager.putDocInMemory( - project_id, - doc_id, - lines, - version, - ranges, - pathname, - projectHistoryId, - function (error) { + ) { if (error != null) { return callback(error) } - return RedisManager.setHistoryType( + logger.log( + { + project_id, + doc_id, + lines, + version, + pathname, + projectHistoryId, + projectHistoryType, + }, + 'got doc from persistence API' + ) + return RedisManager.putDocInMemory( + project_id, doc_id, - projectHistoryType, + lines, + version, + ranges, + pathname, + projectHistoryId, function (error) { if (error != null) { return callback(error) } - return callback( - null, - lines, - version, - ranges || {}, - pathname, - projectHistoryId, - null, - false + return RedisManager.setHistoryType( + doc_id, + projectHistoryType, + function (error) { + if (error != null) { + return callback(error) + } + return callback( + null, + lines, + version, + ranges || {}, + pathname, + projectHistoryId, + null, + false + ) + } ) } ) } ) - }) - } else { - return callback( - null, - lines, - version, - ranges, - pathname, - projectHistoryId, - unflushedTime, - true - ) + } else { + return callback( + null, + lines, + version, + ranges, + pathname, + projectHistoryId, + unflushedTime, + true + ) + } } - }) + ) }, getDocAndRecentOps(project_id, doc_id, fromVersion, _callback) { @@ -155,49 +163,46 @@ module.exports = DocumentManager = { return _callback(...Array.from(args || [])) } - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId - ) { - if (error != null) { - return callback(error) - } - if (fromVersion === -1) { - return callback( - null, - lines, - version, - [], - ranges, - pathname, - projectHistoryId - ) - } else { - return RedisManager.getPreviousDocOps( - doc_id, - fromVersion, - version, - function (error, ops) { - if (error != null) { - return callback(error) + return DocumentManager.getDoc( + project_id, + doc_id, + function (error, lines, version, ranges, pathname, projectHistoryId) { + if (error != null) { + return callback(error) + } + if (fromVersion === -1) { + return callback( + null, + lines, + version, + [], + ranges, + pathname, + projectHistoryId + ) + } else { + return RedisManager.getPreviousDocOps( + doc_id, + fromVersion, + version, + function (error, ops) { + if (error != null) { + return callback(error) + } + return callback( + null, + lines, + version, + ops, + ranges, + pathname, + projectHistoryId + ) } - return callback( - null, - lines, - version, - ops, - ranges, - pathname, - projectHistoryId - ) - } - ) + ) + } } - }) + ) }, setDoc(project_id, doc_id, newLines, source, user_id, undoing, _callback) { @@ -215,95 +220,107 @@ module.exports = DocumentManager = { } const UpdateManager = require('./UpdateManager') - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - oldLines, - version, - ranges, - pathname, - projectHistoryId, - unflushedTime, - alreadyLoaded - ) { - if (error != null) { - return callback(error) - } - - if (oldLines != null && oldLines.length > 0 && oldLines[0].text != null) { - logger.log( - { doc_id, project_id, oldLines, newLines }, - 'document is JSON so not updating' - ) - return callback(null) - } - - logger.log( - { doc_id, project_id, oldLines, newLines }, - 'setting a document via http' - ) - return DiffCodec.diffAsShareJsOp(oldLines, newLines, function ( + return DocumentManager.getDoc( + project_id, + doc_id, + function ( error, - op + oldLines, + version, + ranges, + pathname, + projectHistoryId, + unflushedTime, + alreadyLoaded ) { if (error != null) { return callback(error) } - if (undoing) { - for (const o of Array.from(op || [])) { - o.u = true - } // Turn on undo flag for each op for track changes - } - const update = { - doc: doc_id, - op, - v: version, - meta: { - type: 'external', - source, - user_id - } - } - return UpdateManager.applyUpdate(project_id, doc_id, update, function ( - error - ) { - if (error != null) { - return callback(error) - } - // If the document was loaded already, then someone has it open - // in a project, and the usual flushing mechanism will happen. - // Otherwise we should remove it immediately since nothing else - // is using it. - if (alreadyLoaded) { - return DocumentManager.flushDocIfLoaded( - project_id, - doc_id, - function (error) { - if (error != null) { - return callback(error) - } - return callback(null) - } - ) - } else { - return DocumentManager.flushAndDeleteDoc( - project_id, - doc_id, - {}, - function (error) { - // There is no harm in flushing project history if the previous - // call failed and sometimes it is required - HistoryManager.flushProjectChangesAsync(project_id) + if ( + oldLines != null && + oldLines.length > 0 && + oldLines[0].text != null + ) { + logger.log( + { doc_id, project_id, oldLines, newLines }, + 'document is JSON so not updating' + ) + return callback(null) + } + + logger.log( + { doc_id, project_id, oldLines, newLines }, + 'setting a document via http' + ) + return DiffCodec.diffAsShareJsOp( + oldLines, + newLines, + function (error, op) { + if (error != null) { + return callback(error) + } + if (undoing) { + for (const o of Array.from(op || [])) { + o.u = true + } // Turn on undo flag for each op for track changes + } + const update = { + doc: doc_id, + op, + v: version, + meta: { + type: 'external', + source, + user_id, + }, + } + return UpdateManager.applyUpdate( + project_id, + doc_id, + update, + function (error) { if (error != null) { return callback(error) } - return callback(null) + // If the document was loaded already, then someone has it open + // in a project, and the usual flushing mechanism will happen. + // Otherwise we should remove it immediately since nothing else + // is using it. + if (alreadyLoaded) { + return DocumentManager.flushDocIfLoaded( + project_id, + doc_id, + function (error) { + if (error != null) { + return callback(error) + } + return callback(null) + } + ) + } else { + return DocumentManager.flushAndDeleteDoc( + project_id, + doc_id, + {}, + function (error) { + // There is no harm in flushing project history if the previous + // call failed and sometimes it is required + HistoryManager.flushProjectChangesAsync(project_id) + + if (error != null) { + return callback(error) + } + return callback(null) + } + ) + } } ) } - }) - }) - }) + ) + } + ) }, flushDocIfLoaded(project_id, doc_id, _callback) { @@ -315,42 +332,49 @@ module.exports = DocumentManager = { timer.done() return _callback(...Array.from(args || [])) } - return RedisManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId, - unflushedTime, - lastUpdatedAt, - lastUpdatedBy - ) { - if (error != null) { - return callback(error) - } - if (lines == null || version == null) { - logger.log({ project_id, doc_id }, 'doc is not loaded so not flushing') - return callback(null) // TODO: return a flag to bail out, as we go on to remove doc from memory? - } else { - logger.log({ project_id, doc_id, version }, 'flushing doc') - return PersistenceManager.setDoc( - project_id, - doc_id, - lines, - version, - ranges, - lastUpdatedAt, - lastUpdatedBy, - function (error) { - if (error != null) { - return callback(error) + return RedisManager.getDoc( + project_id, + doc_id, + function ( + error, + lines, + version, + ranges, + pathname, + projectHistoryId, + unflushedTime, + lastUpdatedAt, + lastUpdatedBy + ) { + if (error != null) { + return callback(error) + } + if (lines == null || version == null) { + logger.log( + { project_id, doc_id }, + 'doc is not loaded so not flushing' + ) + return callback(null) // TODO: return a flag to bail out, as we go on to remove doc from memory? + } else { + logger.log({ project_id, doc_id, version }, 'flushing doc') + return PersistenceManager.setDoc( + project_id, + doc_id, + lines, + version, + ranges, + lastUpdatedAt, + lastUpdatedBy, + function (error) { + if (error != null) { + return callback(error) + } + return RedisManager.clearUnflushedTime(doc_id, callback) } - return RedisManager.clearUnflushedTime(doc_id, callback) - } - ) + ) + } } - }) + ) }, flushAndDeleteDoc(project_id, doc_id, options, _callback) { @@ -360,32 +384,36 @@ module.exports = DocumentManager = { return _callback(...Array.from(args || [])) } - return DocumentManager.flushDocIfLoaded(project_id, doc_id, function ( - error - ) { - if (error != null) { - if (options.ignoreFlushErrors) { - logger.warn( - { project_id, doc_id, err: error }, - 'ignoring flush error while deleting document' - ) - } else { - return callback(error) - } - } - - // Flush in the background since it requires a http request - HistoryManager.flushDocChangesAsync(project_id, doc_id) - - return RedisManager.removeDocFromMemory(project_id, doc_id, function ( - error - ) { + return DocumentManager.flushDocIfLoaded( + project_id, + doc_id, + function (error) { if (error != null) { - return callback(error) + if (options.ignoreFlushErrors) { + logger.warn( + { project_id, doc_id, err: error }, + 'ignoring flush error while deleting document' + ) + } else { + return callback(error) + } } - return callback(null) - }) - }) + + // Flush in the background since it requires a http request + HistoryManager.flushDocChangesAsync(project_id, doc_id) + + return RedisManager.removeDocFromMemory( + project_id, + doc_id, + function (error) { + if (error != null) { + return callback(error) + } + return callback(null) + } + ) + } + ) }, acceptChanges(project_id, doc_id, change_ids, _callback) { @@ -401,44 +429,44 @@ module.exports = DocumentManager = { return _callback(...Array.from(args || [])) } - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges - ) { - if (error != null) { - return callback(error) - } - if (lines == null || version == null) { - return callback( - new Errors.NotFoundError(`document not found: ${doc_id}`) - ) - } - return RangesManager.acceptChanges(change_ids, ranges, function ( - error, - new_ranges - ) { + return DocumentManager.getDoc( + project_id, + doc_id, + function (error, lines, version, ranges) { if (error != null) { return callback(error) } - return RedisManager.updateDocument( - project_id, - doc_id, - lines, - version, - [], - new_ranges, - {}, - function (error) { + if (lines == null || version == null) { + return callback( + new Errors.NotFoundError(`document not found: ${doc_id}`) + ) + } + return RangesManager.acceptChanges( + change_ids, + ranges, + function (error, new_ranges) { if (error != null) { return callback(error) } - return callback() + return RedisManager.updateDocument( + project_id, + doc_id, + lines, + version, + [], + new_ranges, + {}, + function (error) { + if (error != null) { + return callback(error) + } + return callback() + } + ) } ) - }) - }) + } + ) }, deleteComment(project_id, doc_id, comment_id, _callback) { @@ -451,44 +479,44 @@ module.exports = DocumentManager = { return _callback(...Array.from(args || [])) } - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges - ) { - if (error != null) { - return callback(error) - } - if (lines == null || version == null) { - return callback( - new Errors.NotFoundError(`document not found: ${doc_id}`) - ) - } - return RangesManager.deleteComment(comment_id, ranges, function ( - error, - new_ranges - ) { + return DocumentManager.getDoc( + project_id, + doc_id, + function (error, lines, version, ranges) { if (error != null) { return callback(error) } - return RedisManager.updateDocument( - project_id, - doc_id, - lines, - version, - [], - new_ranges, - {}, - function (error) { + if (lines == null || version == null) { + return callback( + new Errors.NotFoundError(`document not found: ${doc_id}`) + ) + } + return RangesManager.deleteComment( + comment_id, + ranges, + function (error, new_ranges) { if (error != null) { return callback(error) } - return callback() + return RedisManager.updateDocument( + project_id, + doc_id, + lines, + version, + [], + new_ranges, + {}, + function (error) { + if (error != null) { + return callback(error) + } + return callback() + } + ) } ) - }) - }) + } + ) }, renameDoc(project_id, doc_id, user_id, update, projectHistoryId, _callback) { @@ -515,73 +543,94 @@ module.exports = DocumentManager = { if (callback == null) { callback = function (error, doc) {} } - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId, - unflushedTime, - alreadyLoaded - ) { - if (error != null) { - return callback(error) - } - // if doc was already loaded see if it needs to be flushed - if ( - alreadyLoaded && - unflushedTime != null && - Date.now() - unflushedTime > MAX_UNFLUSHED_AGE + return DocumentManager.getDoc( + project_id, + doc_id, + function ( + error, + lines, + version, + ranges, + pathname, + projectHistoryId, + unflushedTime, + alreadyLoaded ) { - return DocumentManager.flushDocIfLoaded(project_id, doc_id, function ( - error + if (error != null) { + return callback(error) + } + // if doc was already loaded see if it needs to be flushed + if ( + alreadyLoaded && + unflushedTime != null && + Date.now() - unflushedTime > MAX_UNFLUSHED_AGE ) { - if (error != null) { - return callback(error) - } + return DocumentManager.flushDocIfLoaded( + project_id, + doc_id, + function (error) { + if (error != null) { + return callback(error) + } + return callback(null, lines, version) + } + ) + } else { return callback(null, lines, version) - }) - } else { - return callback(null, lines, version) + } } - }) + ) }, resyncDocContents(project_id, doc_id, callback) { logger.log({ project_id, doc_id }, 'start resyncing doc contents') - return RedisManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId - ) { - if (error != null) { - return callback(error) - } + return RedisManager.getDoc( + project_id, + doc_id, + function (error, lines, version, ranges, pathname, projectHistoryId) { + if (error != null) { + return callback(error) + } - if (lines == null || version == null) { - logger.log( - { project_id, doc_id }, - 'resyncing doc contents - not found in redis - retrieving from web' - ) - return PersistenceManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId - ) { - if (error != null) { - logger.error( - { project_id, doc_id, getDocError: error }, - 'resyncing doc contents - error retrieving from web' - ) - return callback(error) - } + if (lines == null || version == null) { + logger.log( + { project_id, doc_id }, + 'resyncing doc contents - not found in redis - retrieving from web' + ) + return PersistenceManager.getDoc( + project_id, + doc_id, + function ( + error, + lines, + version, + ranges, + pathname, + projectHistoryId + ) { + if (error != null) { + logger.error( + { project_id, doc_id, getDocError: error }, + 'resyncing doc contents - error retrieving from web' + ) + return callback(error) + } + return ProjectHistoryRedisManager.queueResyncDocContent( + project_id, + projectHistoryId, + doc_id, + lines, + version, + pathname, + callback + ) + } + ) + } else { + logger.log( + { project_id, doc_id }, + 'resyncing doc contents - doc in redis - will queue in redis' + ) return ProjectHistoryRedisManager.queueResyncDocContent( project_id, projectHistoryId, @@ -591,23 +640,9 @@ module.exports = DocumentManager = { pathname, callback ) - }) - } else { - logger.log( - { project_id, doc_id }, - 'resyncing doc contents - doc in redis - will queue in redis' - ) - return ProjectHistoryRedisManager.queueResyncDocContent( - project_id, - projectHistoryId, - doc_id, - lines, - version, - pathname, - callback - ) + } } - }) + ) }, getDocWithLock(project_id, doc_id, callback) { @@ -769,5 +804,5 @@ module.exports = DocumentManager = { doc_id, callback ) - } + }, } diff --git a/services/document-updater/app/js/Errors.js b/services/document-updater/app/js/Errors.js index c67c2c8422..78afd925bf 100644 --- a/services/document-updater/app/js/Errors.js +++ b/services/document-updater/app/js/Errors.js @@ -41,5 +41,5 @@ module.exports = Errors = { NotFoundError, OpRangeNotAvailableError, ProjectStateChangedError, - DeleteMismatchError + DeleteMismatchError, } diff --git a/services/document-updater/app/js/HistoryManager.js b/services/document-updater/app/js/HistoryManager.js index 4b7de3f5af..107e81d979 100644 --- a/services/document-updater/app/js/HistoryManager.js +++ b/services/document-updater/app/js/HistoryManager.js @@ -32,44 +32,44 @@ module.exports = HistoryManager = { ) return } - return RedisManager.getHistoryType(doc_id, function ( - err, - projectHistoryType - ) { - if (err != null) { - logger.warn({ err, doc_id }, 'error getting history type') + return RedisManager.getHistoryType( + doc_id, + function (err, projectHistoryType) { + if (err != null) { + logger.warn({ err, doc_id }, 'error getting history type') + } + // if there's an error continue and flush to track-changes for safety + if ( + Settings.disableDoubleFlush && + projectHistoryType === 'project-history' + ) { + return logger.debug( + { doc_id, projectHistoryType }, + 'skipping track-changes flush' + ) + } else { + metrics.inc('history-flush', 1, { status: 'track-changes' }) + const url = `${Settings.apis.trackchanges.url}/project/${project_id}/doc/${doc_id}/flush` + logger.log( + { project_id, doc_id, url, projectHistoryType }, + 'flushing doc in track changes api' + ) + return request.post(url, function (error, res, body) { + if (error != null) { + return logger.error( + { error, doc_id, project_id }, + 'track changes doc to track changes api' + ) + } else if (res.statusCode < 200 && res.statusCode >= 300) { + return logger.error( + { doc_id, project_id }, + `track changes api returned a failure status code: ${res.statusCode}` + ) + } + }) + } } - // if there's an error continue and flush to track-changes for safety - if ( - Settings.disableDoubleFlush && - projectHistoryType === 'project-history' - ) { - return logger.debug( - { doc_id, projectHistoryType }, - 'skipping track-changes flush' - ) - } else { - metrics.inc('history-flush', 1, { status: 'track-changes' }) - const url = `${Settings.apis.trackchanges.url}/project/${project_id}/doc/${doc_id}/flush` - logger.log( - { project_id, doc_id, url, projectHistoryType }, - 'flushing doc in track changes api' - ) - return request.post(url, function (error, res, body) { - if (error != null) { - return logger.error( - { error, doc_id, project_id }, - 'track changes doc to track changes api' - ) - } else if (res.statusCode < 200 && res.statusCode >= 300) { - return logger.error( - { doc_id, project_id }, - `track changes api returned a failure status code: ${res.statusCode}` - ) - } - }) - } - }) + ) }, // flush changes in the background @@ -77,7 +77,7 @@ module.exports = HistoryManager = { if ( !__guard__( Settings.apis != null ? Settings.apis.project_history : undefined, - (x) => x.enabled + x => x.enabled ) ) { return @@ -97,7 +97,7 @@ module.exports = HistoryManager = { if ( !__guard__( Settings.apis != null ? Settings.apis.project_history : undefined, - (x) => x.enabled + x => x.enabled ) ) { return callback() @@ -157,7 +157,7 @@ module.exports = HistoryManager = { if ( __guard__( Settings.apis != null ? Settings.apis.project_history : undefined, - (x) => x.enabled + x => x.enabled ) ) { if ( @@ -253,7 +253,7 @@ module.exports = HistoryManager = { ) } ) - } + }, } function __guard__(value, transform) { diff --git a/services/document-updater/app/js/HistoryRedisManager.js b/services/document-updater/app/js/HistoryRedisManager.js index bd7b3672f4..1979b89013 100644 --- a/services/document-updater/app/js/HistoryRedisManager.js +++ b/services/document-updater/app/js/HistoryRedisManager.js @@ -41,5 +41,5 @@ module.exports = HistoryRedisManager = { return callback() } ) - } + }, } diff --git a/services/document-updater/app/js/HttpController.js b/services/document-updater/app/js/HttpController.js index 9959a84b07..6bffb6ec4a 100644 --- a/services/document-updater/app/js/HttpController.js +++ b/services/document-updater/app/js/HttpController.js @@ -24,7 +24,7 @@ module.exports = { updateProject, resyncProjectHistory, flushAllProjects, - flushQueuedProjects + flushQueuedProjects, } function getDoc(req, res, next) { @@ -59,7 +59,7 @@ function getDoc(req, res, next) { version, ops, ranges, - pathname + pathname, }) } ) @@ -104,7 +104,7 @@ function getProjectDocsAndFlushIfOld(req, res, next) { logger.log( { projectId, - result: result.map((doc) => `${doc._id}:${doc.v}`) + result: result.map(doc => `${doc._id}:${doc.v}`), }, 'got docs via http' ) @@ -118,7 +118,7 @@ function clearProjectState(req, res, next) { const projectId = req.params.project_id const timer = new Metrics.Timer('http.clearProjectState') logger.log({ projectId }, 'clearing project state via http') - ProjectManager.clearProjectState(projectId, (error) => { + ProjectManager.clearProjectState(projectId, error => { timer.done() if (error) { next(error) @@ -152,7 +152,7 @@ function setDoc(req, res, next) { source, userId, undoing, - (error) => { + error => { timer.done() if (error) { return next(error) @@ -168,7 +168,7 @@ function flushDocIfLoaded(req, res, next) { const projectId = req.params.project_id logger.log({ projectId, docId }, 'flushing doc via http') const timer = new Metrics.Timer('http.flushDoc') - DocumentManager.flushDocIfLoadedWithLock(projectId, docId, (error) => { + DocumentManager.flushDocIfLoadedWithLock(projectId, docId, error => { timer.done() if (error) { return next(error) @@ -188,7 +188,7 @@ function deleteDoc(req, res, next) { projectId, docId, { ignoreFlushErrors }, - (error) => { + error => { timer.done() // There is no harm in flushing project history if the previous call // failed and sometimes it is required @@ -207,7 +207,7 @@ function flushProject(req, res, next) { const projectId = req.params.project_id logger.log({ projectId }, 'flushing project via http') const timer = new Metrics.Timer('http.flushProject') - ProjectManager.flushProjectWithLocks(projectId, (error) => { + ProjectManager.flushProjectWithLocks(projectId, error => { timer.done() if (error) { return next(error) @@ -228,7 +228,7 @@ function deleteProject(req, res, next) { options.skip_history_flush = true } // don't flush history when realtime shuts down if (req.query.background) { - ProjectManager.queueFlushAndDeleteProject(projectId, (error) => { + ProjectManager.queueFlushAndDeleteProject(projectId, error => { if (error) { return next(error) } @@ -237,18 +237,14 @@ function deleteProject(req, res, next) { }) // No Content } else { const timer = new Metrics.Timer('http.deleteProject') - ProjectManager.flushAndDeleteProjectWithLocks( - projectId, - options, - (error) => { - timer.done() - if (error) { - return next(error) - } - logger.log({ projectId }, 'deleted project via http') - res.sendStatus(204) // No Content + ProjectManager.flushAndDeleteProjectWithLocks(projectId, options, error => { + timer.done() + if (error) { + return next(error) } - ) + logger.log({ projectId }, 'deleted project via http') + res.sendStatus(204) // No Content + }) } } @@ -261,7 +257,7 @@ function deleteMultipleProjects(req, res, next) { logger.log({ projectId }, 'queue delete of project via http') ProjectManager.queueFlushAndDeleteProject(projectId, cb) }, - (error) => { + error => { if (error) { return next(error) } @@ -281,45 +277,35 @@ function acceptChanges(req, res, next) { `accepting ${changeIds.length} changes via http` ) const timer = new Metrics.Timer('http.acceptChanges') - DocumentManager.acceptChangesWithLock( - projectId, - docId, - changeIds, - (error) => { - timer.done() - if (error) { - return next(error) - } - logger.log( - { projectId, docId }, - `accepted ${changeIds.length} changes via http` - ) - res.sendStatus(204) // No Content + DocumentManager.acceptChangesWithLock(projectId, docId, changeIds, error => { + timer.done() + if (error) { + return next(error) } - ) + logger.log( + { projectId, docId }, + `accepted ${changeIds.length} changes via http` + ) + res.sendStatus(204) // No Content + }) } function deleteComment(req, res, next) { const { project_id: projectId, doc_id: docId, - comment_id: commentId + comment_id: commentId, } = req.params logger.log({ projectId, docId, commentId }, 'deleting comment via http') const timer = new Metrics.Timer('http.deleteComment') - DocumentManager.deleteCommentWithLock( - projectId, - docId, - commentId, - (error) => { - timer.done() - if (error) { - return next(error) - } - logger.log({ projectId, docId, commentId }, 'deleted comment via http') - res.sendStatus(204) // No Content + DocumentManager.deleteCommentWithLock(projectId, docId, commentId, error => { + timer.done() + if (error) { + return next(error) } - ) + logger.log({ projectId, docId, commentId }, 'deleted comment via http') + res.sendStatus(204) // No Content + }) } function updateProject(req, res, next) { @@ -333,7 +319,7 @@ function updateProject(req, res, next) { userId, updates, version, - (error) => { + error => { timer.done() if (error) { return next(error) @@ -357,7 +343,7 @@ function resyncProjectHistory(req, res, next) { projectHistoryId, docs, files, - (error) => { + error => { if (error) { return next(error) } @@ -372,7 +358,7 @@ function flushAllProjects(req, res, next) { const options = { limit: req.query.limit || 1000, concurrency: req.query.concurrency || 5, - dryRun: req.query.dryRun || false + dryRun: req.query.dryRun || false, } ProjectFlusher.flushAllProjects(options, (err, projectIds) => { if (err) { @@ -389,7 +375,7 @@ function flushQueuedProjects(req, res, next) { const options = { limit: req.query.limit || 1000, timeout: 5 * 60 * 1000, - min_delete_age: req.query.min_delete_age || 5 * 60 * 1000 + min_delete_age: req.query.min_delete_age || 5 * 60 * 1000, } DeleteQueueManager.flushAndDeleteOldProjects(options, (err, flushed) => { if (err) { diff --git a/services/document-updater/app/js/LockManager.js b/services/document-updater/app/js/LockManager.js index c23379d811..70447bad3f 100644 --- a/services/document-updater/app/js/LockManager.js +++ b/services/document-updater/app/js/LockManager.js @@ -54,36 +54,41 @@ module.exports = LockManager = { const lockValue = LockManager.randomLock() const key = keys.blockingKey({ doc_id }) const profile = new Profiler('tryLock', { doc_id, key, lockValue }) - return rclient.set(key, lockValue, 'EX', this.LOCK_TTL, 'NX', function ( - err, - gotLock - ) { - if (err != null) { - return callback(err) - } - if (gotLock === 'OK') { - metrics.inc('doc-not-blocking') - const timeTaken = profile.log('got lock').end() - if (timeTaken > MAX_REDIS_REQUEST_LENGTH) { - // took too long, so try to free the lock - return LockManager.releaseLock(doc_id, lockValue, function ( - err, - result - ) { - if (err != null) { - return callback(err) - } // error freeing lock - return callback(null, false) - }) // tell caller they didn't get the lock - } else { - return callback(null, true, lockValue) + return rclient.set( + key, + lockValue, + 'EX', + this.LOCK_TTL, + 'NX', + function (err, gotLock) { + if (err != null) { + return callback(err) + } + if (gotLock === 'OK') { + metrics.inc('doc-not-blocking') + const timeTaken = profile.log('got lock').end() + if (timeTaken > MAX_REDIS_REQUEST_LENGTH) { + // took too long, so try to free the lock + return LockManager.releaseLock( + doc_id, + lockValue, + function (err, result) { + if (err != null) { + return callback(err) + } // error freeing lock + return callback(null, false) + } + ) // tell caller they didn't get the lock + } else { + return callback(null, true, lockValue) + } + } else { + metrics.inc('doc-blocking') + profile.log('doc is locked').end() + return callback(null, false) } - } else { - metrics.inc('doc-blocking') - profile.log('doc is locked').end() - return callback(null, false) } - }) + ) }, getLock(doc_id, callback) { @@ -145,25 +150,28 @@ module.exports = LockManager = { releaseLock(doc_id, lockValue, callback) { const key = keys.blockingKey({ doc_id }) const profile = new Profiler('releaseLock', { doc_id, key, lockValue }) - return rclient.eval(LockManager.unlockScript, 1, key, lockValue, function ( - err, - result - ) { - if (err != null) { - return callback(err) - } else if (result != null && result !== 1) { - // successful unlock should release exactly one key - profile.log('unlockScript:expired-lock').end() - logger.error( - { doc_id, key, lockValue, redis_err: err, redis_result: result }, - 'unlocking error' - ) - metrics.inc('unlock-error') - return callback(new Error('tried to release timed out lock')) - } else { - profile.log('unlockScript:ok').end() - return callback(null, result) + return rclient.eval( + LockManager.unlockScript, + 1, + key, + lockValue, + function (err, result) { + if (err != null) { + return callback(err) + } else if (result != null && result !== 1) { + // successful unlock should release exactly one key + profile.log('unlockScript:expired-lock').end() + logger.error( + { doc_id, key, lockValue, redis_err: err, redis_result: result }, + 'unlocking error' + ) + metrics.inc('unlock-error') + return callback(new Error('tried to release timed out lock')) + } else { + profile.log('unlockScript:ok').end() + return callback(null, result) + } } - }) - } + ) + }, } diff --git a/services/document-updater/app/js/LoggerSerializers.js b/services/document-updater/app/js/LoggerSerializers.js index b2c015f078..ac9605e757 100644 --- a/services/document-updater/app/js/LoggerSerializers.js +++ b/services/document-updater/app/js/LoggerSerializers.js @@ -25,19 +25,19 @@ const showUpdateLength = function (update) { const copy = _.cloneDeep(update) copy.op.forEach(function (element, index) { if ( - __guard__(element != null ? element.i : undefined, (x) => x.length) != + __guard__(element != null ? element.i : undefined, x => x.length) != null ) { copy.op[index].i = element.i.length } if ( - __guard__(element != null ? element.d : undefined, (x1) => x1.length) != + __guard__(element != null ? element.d : undefined, x1 => x1.length) != null ) { copy.op[index].d = element.d.length } if ( - __guard__(element != null ? element.c : undefined, (x2) => x2.length) != + __guard__(element != null ? element.c : undefined, x2 => x2.length) != null ) { return (copy.op[index].c = element.c.length) @@ -57,7 +57,7 @@ module.exports = { docLines: showLength, newDocLines: showLength, ranges: showLength, - update: showUpdateLength + update: showUpdateLength, } function __guard__(value, transform) { diff --git a/services/document-updater/app/js/PersistenceManager.js b/services/document-updater/app/js/PersistenceManager.js index 664d36a3c7..d7df831683 100644 --- a/services/document-updater/app/js/PersistenceManager.js +++ b/services/document-updater/app/js/PersistenceManager.js @@ -21,7 +21,7 @@ const Metrics = require('./Metrics') const logger = require('logger-sharelatex') const request = require('requestretry').defaults({ maxAttempts: 2, - retryDelay: 10 + retryDelay: 10, }) // We have to be quick with HTTP calls because we're holding a lock that @@ -75,15 +75,15 @@ module.exports = PersistenceManager = { url: `${Settings.apis.web.url}${urlPath}`, method: 'GET', headers: { - accept: 'application/json' + accept: 'application/json', }, auth: { user: Settings.apis.web.user, pass: Settings.apis.web.pass, - sendImmediately: true + sendImmediately: true, }, jar: false, - timeout: MAX_HTTP_REQUEST_LENGTH + timeout: MAX_HTTP_REQUEST_LENGTH, }, function (error, res, body) { updateMetric('getDoc', error, res) @@ -164,15 +164,15 @@ module.exports = PersistenceManager = { ranges, version, lastUpdatedBy, - lastUpdatedAt + lastUpdatedAt, }, auth: { user: Settings.apis.web.user, pass: Settings.apis.web.pass, - sendImmediately: true + sendImmediately: true, }, jar: false, - timeout: MAX_HTTP_REQUEST_LENGTH + timeout: MAX_HTTP_REQUEST_LENGTH, }, function (error, res, body) { updateMetric('setDoc', error, res) @@ -196,5 +196,5 @@ module.exports = PersistenceManager = { } } ) - } + }, } diff --git a/services/document-updater/app/js/ProjectFlusher.js b/services/document-updater/app/js/ProjectFlusher.js index 704600fbc3..12f885eb3c 100644 --- a/services/document-updater/app/js/ProjectFlusher.js +++ b/services/document-updater/app/js/ProjectFlusher.js @@ -45,27 +45,31 @@ var ProjectFlusher = { var doIteration = ( cb // avoid hitting redis too hard ) => - node.scan(cursor, 'MATCH', pattern, 'COUNT', batchSize, function ( - error, - reply - ) { - let keys - if (error != null) { - return callback(error) + node.scan( + cursor, + 'MATCH', + pattern, + 'COUNT', + batchSize, + function (error, reply) { + let keys + if (error != null) { + return callback(error) + } + ;[cursor, keys] = Array.from(reply) + for (const key of Array.from(keys)) { + keySet[key] = true + } + keys = Object.keys(keySet) + const noResults = cursor === '0' // redis returns string results not numeric + const limitReached = limit != null && keys.length >= limit + if (noResults || limitReached) { + return callback(null, keys) + } else { + return setTimeout(doIteration, 10) + } } - ;[cursor, keys] = Array.from(reply) - for (const key of Array.from(keys)) { - keySet[key] = true - } - keys = Object.keys(keySet) - const noResults = cursor === '0' // redis returns string results not numeric - const limitReached = limit != null && keys.length >= limit - if (noResults || limitReached) { - return callback(null, keys) - } else { - return setTimeout(doIteration, 10) - } - }) + ) return doIteration() }, @@ -97,12 +101,14 @@ var ProjectFlusher = { if (options.dryRun) { return callback(null, project_ids) } - const jobs = _.map(project_ids, (project_id) => (cb) => - ProjectManager.flushAndDeleteProjectWithLocks( - project_id, - { background: true }, - cb - ) + const jobs = _.map( + project_ids, + project_id => cb => + ProjectManager.flushAndDeleteProjectWithLocks( + project_id, + { background: true }, + cb + ) ) return async.parallelLimit( async.reflectAll(jobs), @@ -123,7 +129,7 @@ var ProjectFlusher = { ) } ) - } + }, } module.exports = ProjectFlusher diff --git a/services/document-updater/app/js/ProjectHistoryRedisManager.js b/services/document-updater/app/js/ProjectHistoryRedisManager.js index 3d8b0cd95a..45e98238f4 100644 --- a/services/document-updater/app/js/ProjectHistoryRedisManager.js +++ b/services/document-updater/app/js/ProjectHistoryRedisManager.js @@ -17,7 +17,7 @@ let ProjectHistoryRedisManager const Settings = require('@overleaf/settings') const projectHistoryKeys = __guard__( Settings.redis != null ? Settings.redis.project_history : undefined, - (x) => x.key_schema + x => x.key_schema ) const rclient = require('@overleaf/redis-wrapper').createClient( Settings.redis.project_history @@ -70,10 +70,10 @@ module.exports = ProjectHistoryRedisManager = { new_pathname: projectUpdate.newPathname, meta: { user_id, - ts: new Date() + ts: new Date(), }, version: projectUpdate.version, - projectHistoryId + projectHistoryId, } projectUpdate[entity_type] = entity_id @@ -104,10 +104,10 @@ module.exports = ProjectHistoryRedisManager = { url: projectUpdate.url, meta: { user_id, - ts: new Date() + ts: new Date(), }, version: projectUpdate.version, - projectHistoryId + projectHistoryId, } projectUpdate[entity_type] = entitiy_id @@ -132,8 +132,8 @@ module.exports = ProjectHistoryRedisManager = { resyncProjectStructure: { docs, files }, projectHistoryId, meta: { - ts: new Date() - } + ts: new Date(), + }, } const jsonUpdate = JSON.stringify(projectUpdate) return ProjectHistoryRedisManager.queueOps(project_id, jsonUpdate, callback) @@ -155,18 +155,18 @@ module.exports = ProjectHistoryRedisManager = { const projectUpdate = { resyncDocContent: { content: lines.join('\n'), - version + version, }, projectHistoryId, path: pathname, doc: doc_id, meta: { - ts: new Date() - } + ts: new Date(), + }, } const jsonUpdate = JSON.stringify(projectUpdate) return ProjectHistoryRedisManager.queueOps(project_id, jsonUpdate, callback) - } + }, } function __guard__(value, transform) { diff --git a/services/document-updater/app/js/ProjectManager.js b/services/document-updater/app/js/ProjectManager.js index 07284a692a..20f79f3d08 100644 --- a/services/document-updater/app/js/ProjectManager.js +++ b/services/document-updater/app/js/ProjectManager.js @@ -14,7 +14,7 @@ module.exports = { getProjectDocsTimestamps, getProjectDocsAndFlushIfOld, clearProjectState, - updateProjectWithLocks + updateProjectWithLocks, } function flushProjectWithLocks(projectId, _callback) { @@ -29,8 +29,8 @@ function flushProjectWithLocks(projectId, _callback) { return callback(error) } const errors = [] - const jobs = docIds.map((docId) => (callback) => { - DocumentManager.flushDocIfLoadedWithLock(projectId, docId, (error) => { + const jobs = docIds.map(docId => callback => { + DocumentManager.flushDocIfLoadedWithLock(projectId, docId, error => { if (error instanceof Errors.NotFoundError) { logger.warn( { err: error, projectId, docId }, @@ -72,19 +72,14 @@ function flushAndDeleteProjectWithLocks(projectId, options, _callback) { return callback(error) } const errors = [] - const jobs = docIds.map((docId) => (callback) => { - DocumentManager.flushAndDeleteDocWithLock( - projectId, - docId, - {}, - (error) => { - if (error) { - logger.error({ err: error, projectId, docId }, 'error deleting doc') - errors.push(error) - } - callback() + const jobs = docIds.map(docId => callback => { + DocumentManager.flushAndDeleteDocWithLock(projectId, docId, {}, error => { + if (error) { + logger.error({ err: error, projectId, docId }, 'error deleting doc') + errors.push(error) } - ) + callback() + }) }) logger.log({ projectId, docIds }, 'deleting docs') @@ -93,7 +88,7 @@ function flushAndDeleteProjectWithLocks(projectId, options, _callback) { // history is completely flushed because the project may be // deleted in web after this call completes, and so further // attempts to flush would fail after that. - HistoryManager.flushProjectChanges(projectId, options, (error) => { + HistoryManager.flushProjectChanges(projectId, options, error => { if (errors.length > 0) { callback(new Error('Errors deleting docs. See log for details')) } else if (error) { @@ -107,7 +102,7 @@ function flushAndDeleteProjectWithLocks(projectId, options, _callback) { } function queueFlushAndDeleteProject(projectId, callback) { - RedisManager.queueFlushAndDeleteProject(projectId, (error) => { + RedisManager.queueFlushAndDeleteProject(projectId, error => { if (error) { logger.error( { projectId, error }, @@ -176,7 +171,7 @@ function getProjectDocsAndFlushIfOld( return callback(error) } // get the doc lines from redis - const jobs = docIds.map((docId) => (cb) => { + const jobs = docIds.map(docId => cb => { DocumentManager.getDocAndFlushIfOldWithLock( projectId, docId, @@ -288,7 +283,7 @@ function updateProjectWithLocks( } } - async.eachSeries(updates, handleUpdate, (error) => { + async.eachSeries(updates, handleUpdate, error => { if (error) { return callback(error) } diff --git a/services/document-updater/app/js/RangesManager.js b/services/document-updater/app/js/RangesManager.js index 636efcb5a6..0de39134de 100644 --- a/services/document-updater/app/js/RangesManager.js +++ b/services/document-updater/app/js/RangesManager.js @@ -42,7 +42,7 @@ module.exports = RangesManager = { for (const op of Array.from(update.op)) { try { rangesTracker.applyOp(op, { - user_id: update.meta != null ? update.meta.user_id : undefined + user_id: update.meta != null ? update.meta.user_id : undefined, }) } catch (error1) { error = error1 @@ -86,7 +86,7 @@ module.exports = RangesManager = { response.changes != null ? response.changes.length : undefined, commentsCount: response.comments != null ? response.comments.length : undefined, - rangesWereCollapsed + rangesWereCollapsed, }, 'applied updates to ranges' ) @@ -159,5 +159,5 @@ module.exports = RangesManager = { } } return count - } + }, } diff --git a/services/document-updater/app/js/RangesTracker.js b/services/document-updater/app/js/RangesTracker.js index 5991ee2993..2cc8869d99 100644 --- a/services/document-updater/app/js/RangesTracker.js +++ b/services/document-updater/app/js/RangesTracker.js @@ -120,7 +120,7 @@ const load = function () { if (comment == null) { return } - this.comments = this.comments.filter((c) => c.id !== comment_id) + this.comments = this.comments.filter(c => c.id !== comment_id) return this._markAsDirty(comment, 'comment', 'removed') } @@ -257,7 +257,7 @@ const load = function () { if (metadata == null) { metadata = {} } - return Array.from(ops).map((op) => this.applyOp(op, metadata)) + return Array.from(ops).map(op => this.applyOp(op, metadata)) } addComment(op, metadata) { @@ -274,9 +274,9 @@ const load = function () { // Copy because we'll modify in place c: op.c, p: op.p, - t: op.t + t: op.t, }, - metadata + metadata, }) ) this._markAsDirty(comment, 'comment', 'added') @@ -488,9 +488,9 @@ const load = function () { const after_change = { op: { i: after_content, - p: change_start + offset + op_length + p: change_start + offset + op_length, }, - metadata: {} + metadata: {}, } for (const key in change.metadata) { const value = change.metadata[key] @@ -606,7 +606,7 @@ const load = function () { delete_removed_start, delete_removed_start + delete_removed_length ), - p: delete_removed_start + p: delete_removed_start, } if (modification.d.length > 0) { op_modifications.push(modification) @@ -643,7 +643,7 @@ const load = function () { // Copy rather than modify because we still need to apply it to comments op = { p: op.p, - d: this._applyOpModifications(op.d, op_modifications) + d: this._applyOpModifications(op.d, op_modifications), } for (change of Array.from(remove_changes)) { @@ -678,7 +678,7 @@ const load = function () { moved_changes = moved_changes.concat(results.moved_changes) for (change of Array.from(results.remove_changes)) { this._removeChange(change) - moved_changes = moved_changes.filter((c) => c !== change) + moved_changes = moved_changes.filter(c => c !== change) } } @@ -695,7 +695,7 @@ const load = function () { const change = { id: this.newId(), op: this._clone(op), // Don't take a reference to the existing op since we'll modify this in place with future changes - metadata: this._clone(metadata) + metadata: this._clone(metadata), } this.changes.push(change) @@ -717,7 +717,7 @@ const load = function () { } _removeChange(change) { - this.changes = this.changes.filter((c) => c.id !== change.id) + this.changes = this.changes.filter(c => c.id !== change.id) return this._markAsDirty(change, 'change', 'removed') } @@ -813,13 +813,13 @@ const load = function () { comment: { moved: {}, removed: {}, - added: {} + added: {}, }, change: { moved: {}, removed: {}, - added: {} - } + added: {}, + }, }) } diff --git a/services/document-updater/app/js/RateLimitManager.js b/services/document-updater/app/js/RateLimitManager.js index 9b699235b7..48e9b0b8f1 100644 --- a/services/document-updater/app/js/RateLimitManager.js +++ b/services/document-updater/app/js/RateLimitManager.js @@ -47,7 +47,7 @@ module.exports = RateLimiter = class RateLimiter { } this.ActiveWorkerCount++ Metrics.gauge('processingUpdates', this.ActiveWorkerCount) - return task((err) => { + return task(err => { this.ActiveWorkerCount-- Metrics.gauge('processingUpdates', this.ActiveWorkerCount) return callback(err) @@ -65,11 +65,11 @@ module.exports = RateLimiter = class RateLimiter { logger.log( { active: this.ActiveWorkerCount, - currentLimit: Math.ceil(this.CurrentWorkerLimit) + currentLimit: Math.ceil(this.CurrentWorkerLimit), }, 'hit rate limit' ) - return this._trackAndRun(task, (err) => { + return this._trackAndRun(task, err => { if (err == null) { this._adjustLimitUp() } // don't increment rate limit if there was an error diff --git a/services/document-updater/app/js/RealTimeRedisManager.js b/services/document-updater/app/js/RealTimeRedisManager.js index 298fb26940..af359ef227 100644 --- a/services/document-updater/app/js/RealTimeRedisManager.js +++ b/services/document-updater/app/js/RealTimeRedisManager.js @@ -45,7 +45,7 @@ module.exports = RealTimeRedisManager = { for (jsonUpdate of Array.from(jsonUpdates)) { // record metric for each update removed from queue metrics.summary('redis.pendingUpdates', jsonUpdate.length, { - status: 'pop' + status: 'pop', }) } const updates = [] @@ -83,5 +83,5 @@ module.exports = RealTimeRedisManager = { } else { return pubsubClient.publish('applied-ops', blob) } - } + }, } diff --git a/services/document-updater/app/js/RedisManager.js b/services/document-updater/app/js/RedisManager.js index 59eb10e332..11ff1f8fcc 100644 --- a/services/document-updater/app/js/RedisManager.js +++ b/services/document-updater/app/js/RedisManager.js @@ -92,7 +92,7 @@ module.exports = RedisManager = { return callback(error) } // update docsInProject set before writing doc contents - rclient.sadd(keys.docsInProject({ project_id }), doc_id, (error) => { + rclient.sadd(keys.docsInProject({ project_id }), doc_id, error => { if (error) return callback(error) rclient.mset( @@ -103,7 +103,7 @@ module.exports = RedisManager = { [keys.docHash({ doc_id })]: docHash, [keys.ranges({ doc_id })]: ranges, [keys.pathname({ doc_id })]: pathname, - [keys.projectHistoryId({ doc_id })]: projectHistoryId + [keys.projectHistoryId({ doc_id })]: projectHistoryId, }, callback ) @@ -203,7 +203,7 @@ module.exports = RedisManager = { keys.projectHistoryId({ doc_id }), keys.unflushedTime({ doc_id }), keys.lastUpdatedAt({ doc_id }), - keys.lastUpdatedBy({ doc_id }) + keys.lastUpdatedBy({ doc_id }), ] rclient.mget(...collectKeys, (error, ...rest) => { let [ @@ -216,7 +216,7 @@ module.exports = RedisManager = { projectHistoryId, unflushedTime, lastUpdatedAt, - lastUpdatedBy + lastUpdatedBy, ] = Array.from(rest[0]) const timeSpan = timer.done() if (error != null) { @@ -244,7 +244,7 @@ module.exports = RedisManager = { doc_project_id, computedHash, storedHash, - docLines + docLines, }, 'hash mismatch on retrieved document' ) @@ -325,62 +325,64 @@ module.exports = RedisManager = { if (error != null) { return callback(error) } - return rclient.get(keys.docVersion({ doc_id }), function ( - error, - version - ) { - if (error != null) { - return callback(error) - } - version = parseInt(version, 10) - const first_version_in_redis = version - length - - if (start < first_version_in_redis || end > version) { - error = new Errors.OpRangeNotAvailableError( - 'doc ops range is not loaded in redis' - ) - logger.warn( - { err: error, doc_id, length, version, start, end }, - 'doc ops range is not loaded in redis' - ) - return callback(error) - } - - start = start - first_version_in_redis - if (end > -1) { - end = end - first_version_in_redis - } - - if (isNaN(start) || isNaN(end)) { - error = new Error('inconsistent version or lengths') - logger.error( - { err: error, doc_id, length, version, start, end }, - 'inconsistent version or length' - ) - return callback(error) - } - - return rclient.lrange(keys.docOps({ doc_id }), start, end, function ( - error, - jsonOps - ) { - let ops + return rclient.get( + keys.docVersion({ doc_id }), + function (error, version) { if (error != null) { return callback(error) } - try { - ops = jsonOps.map((jsonOp) => JSON.parse(jsonOp)) - } catch (e) { - return callback(e) - } - const timeSpan = timer.done() - if (timeSpan > MAX_REDIS_REQUEST_LENGTH) { - error = new Error('redis getPreviousDocOps exceeded timeout') + version = parseInt(version, 10) + const first_version_in_redis = version - length + + if (start < first_version_in_redis || end > version) { + error = new Errors.OpRangeNotAvailableError( + 'doc ops range is not loaded in redis' + ) + logger.warn( + { err: error, doc_id, length, version, start, end }, + 'doc ops range is not loaded in redis' + ) return callback(error) } - return callback(null, ops) - }) - }) + + start = start - first_version_in_redis + if (end > -1) { + end = end - first_version_in_redis + } + + if (isNaN(start) || isNaN(end)) { + error = new Error('inconsistent version or lengths') + logger.error( + { err: error, doc_id, length, version, start, end }, + 'inconsistent version or length' + ) + return callback(error) + } + + return rclient.lrange( + keys.docOps({ doc_id }), + start, + end, + function (error, jsonOps) { + let ops + if (error != null) { + return callback(error) + } + try { + ops = jsonOps.map(jsonOp => JSON.parse(jsonOp)) + } catch (e) { + return callback(e) + } + const timeSpan = timer.done() + if (timeSpan > MAX_REDIS_REQUEST_LENGTH) { + error = new Error('redis getPreviousDocOps exceeded timeout') + return callback(error) + } + return callback(null, ops) + } + ) + } + ) }) }, @@ -388,15 +390,15 @@ module.exports = RedisManager = { if (callback == null) { callback = function (error, projectHistoryType) {} } - return rclient.get(keys.projectHistoryType({ doc_id }), function ( - error, - projectHistoryType - ) { - if (error != null) { - return callback(error) + return rclient.get( + keys.projectHistoryType({ doc_id }), + function (error, projectHistoryType) { + if (error != null) { + return callback(error) + } + return callback(null, projectHistoryType) } - return callback(null, projectHistoryType) - }) + ) }, setHistoryType(doc_id, projectHistoryType, callback) { @@ -428,192 +430,198 @@ module.exports = RedisManager = { if (callback == null) { callback = function (error) {} } - return RedisManager.getDocVersion(doc_id, function ( - error, - currentVersion, - projectHistoryType - ) { - if (error != null) { - return callback(error) - } - if (currentVersion + appliedOps.length !== newVersion) { - error = new Error(`Version mismatch. '${doc_id}' is corrupted.`) - logger.error( - { - err: error, - doc_id, - currentVersion, - newVersion, - opsLength: appliedOps.length - }, - 'version mismatch' - ) - return callback(error) - } - - const jsonOps = appliedOps.map((op) => JSON.stringify(op)) - for (const op of Array.from(jsonOps)) { - if (op.indexOf('\u0000') !== -1) { - error = new Error('null bytes found in jsonOps') - // this check was added to catch memory corruption in JSON.stringify - logger.error({ err: error, doc_id, jsonOps }, error.message) - return callback(error) - } - } - - const newDocLines = JSON.stringify(docLines) - if (newDocLines.indexOf('\u0000') !== -1) { - error = new Error('null bytes found in doc lines') - // this check was added to catch memory corruption in JSON.stringify - logger.error({ err: error, doc_id, newDocLines }, error.message) - return callback(error) - } - // Do a cheap size check on the serialized blob. - if (newDocLines.length > Settings.max_doc_length) { - const err = new Error('blocking doc update: doc is too large') - const docSize = newDocLines.length - logger.error({ project_id, doc_id, err, docSize }, err.message) - return callback(err) - } - const newHash = RedisManager._computeHash(newDocLines) - - const opVersions = appliedOps.map((op) => (op != null ? op.v : undefined)) - logger.log( - { doc_id, version: newVersion, hash: newHash, op_versions: opVersions }, - 'updating doc in redis' - ) - // record bytes sent to redis in update - metrics.summary('redis.docLines', newDocLines.length, { - status: 'update' - }) - return RedisManager._serializeRanges(ranges, function (error, ranges) { + return RedisManager.getDocVersion( + doc_id, + function (error, currentVersion, projectHistoryType) { if (error != null) { - logger.error({ err: error, doc_id }, error.message) return callback(error) } - if (ranges != null && ranges.indexOf('\u0000') !== -1) { - error = new Error('null bytes found in ranges') - // this check was added to catch memory corruption in JSON.stringify - logger.error({ err: error, doc_id, ranges }, error.message) + if (currentVersion + appliedOps.length !== newVersion) { + error = new Error(`Version mismatch. '${doc_id}' is corrupted.`) + logger.error( + { + err: error, + doc_id, + currentVersion, + newVersion, + opsLength: appliedOps.length, + }, + 'version mismatch' + ) return callback(error) } - const multi = rclient.multi() - multi.mset({ - [keys.docLines({ doc_id })]: newDocLines, - [keys.docVersion({ doc_id })]: newVersion, - [keys.docHash({ doc_id })]: newHash, - [keys.ranges({ doc_id })]: ranges, - [keys.lastUpdatedAt({ doc_id })]: Date.now(), - [keys.lastUpdatedBy({ doc_id })]: updateMeta && updateMeta.user_id - }) - multi.ltrim( - keys.docOps({ doc_id }), - -RedisManager.DOC_OPS_MAX_LENGTH, - -1 - ) // index 3 - // push the ops last so we can get the lengths at fixed index position 7 - if (jsonOps.length > 0) { - multi.rpush(keys.docOps({ doc_id }), ...Array.from(jsonOps)) // index 5 - // expire must come after rpush since before it will be a no-op if the list is empty - multi.expire(keys.docOps({ doc_id }), RedisManager.DOC_OPS_TTL) // index 6 - if (projectHistoryType === 'project-history') { - metrics.inc('history-queue', 1, { status: 'skip-track-changes' }) - logger.log( - { doc_id }, - 'skipping push of uncompressed ops for project using project-history' - ) - } else { - // project is using old track-changes history service - metrics.inc('history-queue', 1, { status: 'track-changes' }) - multi.rpush( - historyKeys.uncompressedHistoryOps({ doc_id }), - ...Array.from(jsonOps) - ) // index 7 - } - // Set the unflushed timestamp to the current time if the doc - // hasn't been modified before (the content in mongo has been - // valid up to this point). Otherwise leave it alone ("NX" flag). - multi.set(keys.unflushedTime({ doc_id }), Date.now(), 'NX') - } - return multi.exec(function (error, result) { - let docUpdateCount - if (error != null) { + + const jsonOps = appliedOps.map(op => JSON.stringify(op)) + for (const op of Array.from(jsonOps)) { + if (op.indexOf('\u0000') !== -1) { + error = new Error('null bytes found in jsonOps') + // this check was added to catch memory corruption in JSON.stringify + logger.error({ err: error, doc_id, jsonOps }, error.message) return callback(error) } + } - if (projectHistoryType === 'project-history') { - docUpdateCount = undefined // only using project history, don't bother with track-changes - } else { - // project is using old track-changes history service - docUpdateCount = result[4] - } + const newDocLines = JSON.stringify(docLines) + if (newDocLines.indexOf('\u0000') !== -1) { + error = new Error('null bytes found in doc lines') + // this check was added to catch memory corruption in JSON.stringify + logger.error({ err: error, doc_id, newDocLines }, error.message) + return callback(error) + } + // Do a cheap size check on the serialized blob. + if (newDocLines.length > Settings.max_doc_length) { + const err = new Error('blocking doc update: doc is too large') + const docSize = newDocLines.length + logger.error({ project_id, doc_id, err, docSize }, err.message) + return callback(err) + } + const newHash = RedisManager._computeHash(newDocLines) - if ( - jsonOps.length > 0 && - __guard__( - Settings.apis != null ? Settings.apis.project_history : undefined, - (x) => x.enabled - ) - ) { - metrics.inc('history-queue', 1, { status: 'project-history' }) - return ProjectHistoryRedisManager.queueOps( - project_id, - ...Array.from(jsonOps), - (error, projectUpdateCount) => - callback(null, docUpdateCount, projectUpdateCount) - ) - } else { - return callback(null, docUpdateCount) - } + const opVersions = appliedOps.map(op => (op != null ? op.v : undefined)) + logger.log( + { + doc_id, + version: newVersion, + hash: newHash, + op_versions: opVersions, + }, + 'updating doc in redis' + ) + // record bytes sent to redis in update + metrics.summary('redis.docLines', newDocLines.length, { + status: 'update', }) - }) - }) + return RedisManager._serializeRanges(ranges, function (error, ranges) { + if (error != null) { + logger.error({ err: error, doc_id }, error.message) + return callback(error) + } + if (ranges != null && ranges.indexOf('\u0000') !== -1) { + error = new Error('null bytes found in ranges') + // this check was added to catch memory corruption in JSON.stringify + logger.error({ err: error, doc_id, ranges }, error.message) + return callback(error) + } + const multi = rclient.multi() + multi.mset({ + [keys.docLines({ doc_id })]: newDocLines, + [keys.docVersion({ doc_id })]: newVersion, + [keys.docHash({ doc_id })]: newHash, + [keys.ranges({ doc_id })]: ranges, + [keys.lastUpdatedAt({ doc_id })]: Date.now(), + [keys.lastUpdatedBy({ doc_id })]: updateMeta && updateMeta.user_id, + }) + multi.ltrim( + keys.docOps({ doc_id }), + -RedisManager.DOC_OPS_MAX_LENGTH, + -1 + ) // index 3 + // push the ops last so we can get the lengths at fixed index position 7 + if (jsonOps.length > 0) { + multi.rpush(keys.docOps({ doc_id }), ...Array.from(jsonOps)) // index 5 + // expire must come after rpush since before it will be a no-op if the list is empty + multi.expire(keys.docOps({ doc_id }), RedisManager.DOC_OPS_TTL) // index 6 + if (projectHistoryType === 'project-history') { + metrics.inc('history-queue', 1, { status: 'skip-track-changes' }) + logger.log( + { doc_id }, + 'skipping push of uncompressed ops for project using project-history' + ) + } else { + // project is using old track-changes history service + metrics.inc('history-queue', 1, { status: 'track-changes' }) + multi.rpush( + historyKeys.uncompressedHistoryOps({ doc_id }), + ...Array.from(jsonOps) + ) // index 7 + } + // Set the unflushed timestamp to the current time if the doc + // hasn't been modified before (the content in mongo has been + // valid up to this point). Otherwise leave it alone ("NX" flag). + multi.set(keys.unflushedTime({ doc_id }), Date.now(), 'NX') + } + return multi.exec(function (error, result) { + let docUpdateCount + if (error != null) { + return callback(error) + } + + if (projectHistoryType === 'project-history') { + docUpdateCount = undefined // only using project history, don't bother with track-changes + } else { + // project is using old track-changes history service + docUpdateCount = result[4] + } + + if ( + jsonOps.length > 0 && + __guard__( + Settings.apis != null + ? Settings.apis.project_history + : undefined, + x => x.enabled + ) + ) { + metrics.inc('history-queue', 1, { status: 'project-history' }) + return ProjectHistoryRedisManager.queueOps( + project_id, + ...Array.from(jsonOps), + (error, projectUpdateCount) => + callback(null, docUpdateCount, projectUpdateCount) + ) + } else { + return callback(null, docUpdateCount) + } + }) + }) + } + ) }, renameDoc(project_id, doc_id, user_id, update, projectHistoryId, callback) { if (callback == null) { callback = function (error) {} } - return RedisManager.getDoc(project_id, doc_id, function ( - error, - lines, - version - ) { - if (error != null) { - return callback(error) - } + return RedisManager.getDoc( + project_id, + doc_id, + function (error, lines, version) { + if (error != null) { + return callback(error) + } - if (lines != null && version != null) { - return rclient.set( - keys.pathname({ doc_id }), - update.newPathname, - function (error) { - if (error != null) { - return callback(error) + if (lines != null && version != null) { + return rclient.set( + keys.pathname({ doc_id }), + update.newPathname, + function (error) { + if (error != null) { + return callback(error) + } + return ProjectHistoryRedisManager.queueRenameEntity( + project_id, + projectHistoryId, + 'doc', + doc_id, + user_id, + update, + callback + ) } - return ProjectHistoryRedisManager.queueRenameEntity( - project_id, - projectHistoryId, - 'doc', - doc_id, - user_id, - update, - callback - ) - } - ) - } else { - return ProjectHistoryRedisManager.queueRenameEntity( - project_id, - projectHistoryId, - 'doc', - doc_id, - user_id, - update, - callback - ) + ) + } else { + return ProjectHistoryRedisManager.queueRenameEntity( + project_id, + projectHistoryId, + 'doc', + doc_id, + user_id, + update, + callback + ) + } } - }) + ) }, clearUnflushedTime(doc_id, callback) { @@ -726,7 +734,7 @@ module.exports = RedisManager = { // note: must specify 'utf8' encoding explicitly, as the default is // binary in node < v5 return crypto.createHash('sha1').update(docLines, 'utf8').digest('hex') - } + }, } function __guard__(value, transform) { diff --git a/services/document-updater/app/js/ShareJsDB.js b/services/document-updater/app/js/ShareJsDB.js index 2339eefab6..65e234d085 100644 --- a/services/document-updater/app/js/ShareJsDB.js +++ b/services/document-updater/app/js/ShareJsDB.js @@ -70,7 +70,7 @@ module.exports = ShareJsDB = class ShareJsDB { return callback(null, { snapshot: this.lines.join('\n'), v: parseInt(this.version, 10), - type: 'text' + type: 'text', }) } } diff --git a/services/document-updater/app/js/ShareJsUpdateManager.js b/services/document-updater/app/js/ShareJsUpdateManager.js index 19bfee9ea4..79b92dfb79 100644 --- a/services/document-updater/app/js/ShareJsUpdateManager.js +++ b/services/document-updater/app/js/ShareJsUpdateManager.js @@ -35,7 +35,7 @@ module.exports = ShareJsUpdateManager = { const db = new ShareJsDB(project_id, doc_id, lines, version) const model = new ShareJsModel(db, { maxDocLength: Settings.max_doc_length, - maximumAge: MAX_AGE_OF_OP + maximumAge: MAX_AGE_OF_OP, }) model.db = db return model @@ -141,5 +141,5 @@ module.exports = ShareJsUpdateManager = { .update('blob ' + content.length + '\x00') .update(content, 'utf8') .digest('hex') - } + }, } diff --git a/services/document-updater/app/js/SnapshotManager.js b/services/document-updater/app/js/SnapshotManager.js index ec7b31315c..3fd87b4540 100644 --- a/services/document-updater/app/js/SnapshotManager.js +++ b/services/document-updater/app/js/SnapshotManager.js @@ -38,7 +38,7 @@ module.exports = SnapshotManager = { lines, pathname, ranges: SnapshotManager.jsonRangesToMongo(ranges), - ts: new Date() + ts: new Date(), }, callback ) @@ -83,5 +83,5 @@ module.exports = SnapshotManager = { } catch (error) { return data } - } + }, } diff --git a/services/document-updater/app/js/UpdateKeys.js b/services/document-updater/app/js/UpdateKeys.js index 8710272cfb..67e85e65c9 100644 --- a/services/document-updater/app/js/UpdateKeys.js +++ b/services/document-updater/app/js/UpdateKeys.js @@ -9,5 +9,5 @@ module.exports = { }, splitProjectIdAndDocId(project_and_doc_id) { return project_and_doc_id.split(':') - } + }, } diff --git a/services/document-updater/app/js/UpdateManager.js b/services/document-updater/app/js/UpdateManager.js index 999994d556..bf30db74b7 100644 --- a/services/document-updater/app/js/UpdateManager.js +++ b/services/document-updater/app/js/UpdateManager.js @@ -37,15 +37,17 @@ module.exports = UpdateManager = { callback = function (error) {} } const timer = new Metrics.Timer('updateManager.processOutstandingUpdates') - return UpdateManager.fetchAndApplyUpdates(project_id, doc_id, function ( - error - ) { - timer.done() - if (error != null) { - return callback(error) + return UpdateManager.fetchAndApplyUpdates( + project_id, + doc_id, + function (error) { + timer.done() + if (error != null) { + return callback(error) + } + return callback() } - return callback() - }) + ) }, processOutstandingUpdatesWithLock(project_id, doc_id, callback) { @@ -54,7 +56,7 @@ module.exports = UpdateManager = { } const profile = new Profiler('processOutstandingUpdatesWithLock', { project_id, - doc_id + doc_id, }) return LockManager.tryLock(doc_id, (error, gotLock, lockValue) => { if (error != null) { @@ -77,7 +79,7 @@ module.exports = UpdateManager = { ) } profile.log('processOutstandingUpdates') - return LockManager.releaseLock(doc_id, lockValue, (error) => { + return LockManager.releaseLock(doc_id, lockValue, error => { if (error != null) { return callback(error) } @@ -155,7 +157,7 @@ module.exports = UpdateManager = { RealTimeRedisManager.sendData({ project_id, doc_id, - error: error.message || error + error: error.message || error, }) profile.log('sendData') } @@ -166,128 +168,125 @@ module.exports = UpdateManager = { var profile = new Profiler('applyUpdate', { project_id, doc_id }) UpdateManager._sanitizeUpdate(update) profile.log('sanitizeUpdate') - return DocumentManager.getDoc(project_id, doc_id, function ( - error, - lines, - version, - ranges, - pathname, - projectHistoryId - ) { - profile.log('getDoc') - if (error != null) { - return callback(error) - } - if (lines == null || version == null) { - return callback( - new Errors.NotFoundError(`document not found: ${doc_id}`) - ) - } - const previousVersion = version - return ShareJsUpdateManager.applyUpdate( - project_id, - doc_id, - update, - lines, - version, - function (error, updatedDocLines, version, appliedOps) { - profile.log('sharejs.applyUpdate') - if (error != null) { - return callback(error) - } - return RangesManager.applyUpdate( - project_id, - doc_id, - ranges, - appliedOps, - updatedDocLines, - function (error, new_ranges, ranges_were_collapsed) { - UpdateManager._addProjectHistoryMetadataToOps( - appliedOps, - pathname, - projectHistoryId, - lines - ) - profile.log('RangesManager.applyUpdate') - if (error != null) { - return callback(error) - } - return RedisManager.updateDocument( - project_id, - doc_id, - updatedDocLines, - version, - appliedOps, - new_ranges, - update.meta, - function (error, doc_ops_length, project_ops_length) { - profile.log('RedisManager.updateDocument') - if (error != null) { - return callback(error) - } - return HistoryManager.recordAndFlushHistoryOps( - project_id, - doc_id, - appliedOps, - doc_ops_length, - project_ops_length, - function (error) { - profile.log('recordAndFlushHistoryOps') - if (error != null) { - return callback(error) - } - if (ranges_were_collapsed) { - logger.log( - { + return DocumentManager.getDoc( + project_id, + doc_id, + function (error, lines, version, ranges, pathname, projectHistoryId) { + profile.log('getDoc') + if (error != null) { + return callback(error) + } + if (lines == null || version == null) { + return callback( + new Errors.NotFoundError(`document not found: ${doc_id}`) + ) + } + const previousVersion = version + return ShareJsUpdateManager.applyUpdate( + project_id, + doc_id, + update, + lines, + version, + function (error, updatedDocLines, version, appliedOps) { + profile.log('sharejs.applyUpdate') + if (error != null) { + return callback(error) + } + return RangesManager.applyUpdate( + project_id, + doc_id, + ranges, + appliedOps, + updatedDocLines, + function (error, new_ranges, ranges_were_collapsed) { + UpdateManager._addProjectHistoryMetadataToOps( + appliedOps, + pathname, + projectHistoryId, + lines + ) + profile.log('RangesManager.applyUpdate') + if (error != null) { + return callback(error) + } + return RedisManager.updateDocument( + project_id, + doc_id, + updatedDocLines, + version, + appliedOps, + new_ranges, + update.meta, + function (error, doc_ops_length, project_ops_length) { + profile.log('RedisManager.updateDocument') + if (error != null) { + return callback(error) + } + return HistoryManager.recordAndFlushHistoryOps( + project_id, + doc_id, + appliedOps, + doc_ops_length, + project_ops_length, + function (error) { + profile.log('recordAndFlushHistoryOps') + if (error != null) { + return callback(error) + } + if (ranges_were_collapsed) { + logger.log( + { + project_id, + doc_id, + previousVersion, + lines, + ranges, + update, + }, + 'update collapsed some ranges, snapshotting previous content' + ) + // Do this last, since it's a mongo call, and so potentially longest running + // If it overruns the lock, it's ok, since all of our redis work is done + return SnapshotManager.recordSnapshot( project_id, doc_id, previousVersion, + pathname, lines, ranges, - update - }, - 'update collapsed some ranges, snapshotting previous content' - ) - // Do this last, since it's a mongo call, and so potentially longest running - // If it overruns the lock, it's ok, since all of our redis work is done - return SnapshotManager.recordSnapshot( - project_id, - doc_id, - previousVersion, - pathname, - lines, - ranges, - function (error) { - if (error != null) { - logger.error( - { - err: error, - project_id, - doc_id, - version, - lines, - ranges - }, - 'error recording snapshot' - ) - return callback(error) - } else { - return callback() + function (error) { + if (error != null) { + logger.error( + { + err: error, + project_id, + doc_id, + version, + lines, + ranges, + }, + 'error recording snapshot' + ) + return callback(error) + } else { + return callback() + } } - } - ) - } else { - return callback() + ) + } else { + return callback() + } } - } - ) - } - ) - } - ) - } - ) - }) + ) + } + ) + } + ) + } + ) + } + ) }, lockUpdatesAndDo(method, project_id, doc_id, ...rest) { @@ -313,32 +312,38 @@ module.exports = UpdateManager = { ) } profile.log('processOutstandingUpdates') - return method(project_id, doc_id, ...Array.from(args), function ( - error, - ...response_args - ) { - if (error != null) { - return UpdateManager._handleErrorInsideLock( + return method( + project_id, + doc_id, + ...Array.from(args), + function (error, ...response_args) { + if (error != null) { + return UpdateManager._handleErrorInsideLock( + doc_id, + lockValue, + error, + callback + ) + } + profile.log('method') + return LockManager.releaseLock( doc_id, lockValue, - error, - callback + function (error) { + if (error != null) { + return callback(error) + } + profile.log('releaseLock').end() + callback(null, ...Array.from(response_args)) + // We held the lock for a while so updates might have queued up + return UpdateManager.continueProcessingUpdatesWithLock( + project_id, + doc_id + ) + } ) } - profile.log('method') - return LockManager.releaseLock(doc_id, lockValue, function (error) { - if (error != null) { - return callback(error) - } - profile.log('releaseLock').end() - callback(null, ...Array.from(response_args)) - // We held the lock for a while so updates might have queued up - return UpdateManager.continueProcessingUpdatesWithLock( - project_id, - doc_id - ) - }) - }) + ) } ) }) @@ -348,7 +353,7 @@ module.exports = UpdateManager = { if (callback == null) { callback = function (error) {} } - return LockManager.releaseLock(doc_id, lockValue, (lock_error) => + return LockManager.releaseLock(doc_id, lockValue, lock_error => callback(original_error) ) }, @@ -408,5 +413,5 @@ module.exports = UpdateManager = { return result })() }) - } + }, } diff --git a/services/document-updater/app/js/mongodb.js b/services/document-updater/app/js/mongodb.js index 115d0adcb7..b265e99426 100644 --- a/services/document-updater/app/js/mongodb.js +++ b/services/document-updater/app/js/mongodb.js @@ -33,5 +33,5 @@ module.exports = { db, ObjectId, healthCheck: require('util').callbackify(healthCheck), - waitForDb + waitForDb, } diff --git a/services/document-updater/app/js/sharejs/count.js b/services/document-updater/app/js/sharejs/count.js index 8d8477caf4..246f6b7985 100644 --- a/services/document-updater/app/js/sharejs/count.js +++ b/services/document-updater/app/js/sharejs/count.js @@ -34,4 +34,4 @@ exports.compose = function (op1, op2) { return [op1[0], op1[1] + op2[1]] } -exports.generateRandomOp = (doc) => [[doc, 1], doc + 1] +exports.generateRandomOp = doc => [[doc, 1], doc + 1] diff --git a/services/document-updater/app/js/sharejs/helpers.js b/services/document-updater/app/js/sharejs/helpers.js index 1d7b268e17..b1ab3c2a26 100644 --- a/services/document-updater/app/js/sharejs/helpers.js +++ b/services/document-updater/app/js/sharejs/helpers.js @@ -31,80 +31,84 @@ exports._bt = bootstrapTransform = function ( } // Transforms rightOp by leftOp. Returns ['rightOp', clientOp'] - type.transformX = type.transformX = transformX = function (leftOp, rightOp) { - checkValidOp(leftOp) - checkValidOp(rightOp) + type.transformX = + type.transformX = + transformX = + function (leftOp, rightOp) { + checkValidOp(leftOp) + checkValidOp(rightOp) - const newRightOp = [] + const newRightOp = [] - for (let rightComponent of Array.from(rightOp)) { - // Generate newLeftOp by composing leftOp by rightComponent - const newLeftOp = [] + for (let rightComponent of Array.from(rightOp)) { + // Generate newLeftOp by composing leftOp by rightComponent + const newLeftOp = [] - let k = 0 - while (k < leftOp.length) { - var l - const nextC = [] - transformComponentX(leftOp[k], rightComponent, newLeftOp, nextC) - k++ + let k = 0 + while (k < leftOp.length) { + var l + const nextC = [] + transformComponentX(leftOp[k], rightComponent, newLeftOp, nextC) + k++ - if (nextC.length === 1) { - rightComponent = nextC[0] - } else if (nextC.length === 0) { - for (l of Array.from(leftOp.slice(k))) { - append(newLeftOp, l) + if (nextC.length === 1) { + rightComponent = nextC[0] + } else if (nextC.length === 0) { + for (l of Array.from(leftOp.slice(k))) { + append(newLeftOp, l) + } + rightComponent = null + break + } else { + // Recurse. + const [l_, r_] = Array.from(transformX(leftOp.slice(k), nextC)) + for (l of Array.from(l_)) { + append(newLeftOp, l) + } + for (const r of Array.from(r_)) { + append(newRightOp, r) + } + rightComponent = null + break + } } - rightComponent = null - break - } else { - // Recurse. - const [l_, r_] = Array.from(transformX(leftOp.slice(k), nextC)) - for (l of Array.from(l_)) { - append(newLeftOp, l) + + if (rightComponent != null) { + append(newRightOp, rightComponent) } - for (const r of Array.from(r_)) { - append(newRightOp, r) - } - rightComponent = null - break + leftOp = newLeftOp } - } - if (rightComponent != null) { - append(newRightOp, rightComponent) + return [leftOp, newRightOp] } - leftOp = newLeftOp - } - - return [leftOp, newRightOp] - } // Transforms op with specified type ('left' or 'right') by otherOp. - return (type.transform = type.transform = function (op, otherOp, type) { - let _ - if (type !== 'left' && type !== 'right') { - throw new Error("type must be 'left' or 'right'") - } + return (type.transform = type.transform = + function (op, otherOp, type) { + let _ + if (type !== 'left' && type !== 'right') { + throw new Error("type must be 'left' or 'right'") + } - if (otherOp.length === 0) { - return op - } + if (otherOp.length === 0) { + return op + } - // TODO: Benchmark with and without this line. I _think_ it'll make a big difference...? - if (op.length === 1 && otherOp.length === 1) { - return transformComponent([], op[0], otherOp[0], type) - } + // TODO: Benchmark with and without this line. I _think_ it'll make a big difference...? + if (op.length === 1 && otherOp.length === 1) { + return transformComponent([], op[0], otherOp[0], type) + } - if (type === 'left') { - let left - ;[left, _] = Array.from(transformX(op, otherOp)) - return left - } else { - let right - ;[_, right] = Array.from(transformX(otherOp, op)) - return right - } - }) + if (type === 'left') { + let left + ;[left, _] = Array.from(transformX(op, otherOp)) + return left + } else { + let right + ;[_, right] = Array.from(transformX(otherOp, op)) + return right + } + }) } if (typeof WEB === 'undefined') { diff --git a/services/document-updater/app/js/sharejs/json-api.js b/services/document-updater/app/js/sharejs/json-api.js index a8db564fdf..f429f2b397 100644 --- a/services/document-updater/app/js/sharejs/json-api.js +++ b/services/document-updater/app/js/sharejs/json-api.js @@ -353,5 +353,5 @@ json.api = { return result })() }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/json.js b/services/document-updater/app/js/sharejs/json.js index fa9b030a82..14c3cbb519 100644 --- a/services/document-updater/app/js/sharejs/json.js +++ b/services/document-updater/app/js/sharejs/json.js @@ -59,12 +59,12 @@ json.invertComponent = function (c) { return c_ } -json.invert = (op) => - Array.from(op.slice().reverse()).map((c) => json.invertComponent(c)) +json.invert = op => + Array.from(op.slice().reverse()).map(c => json.invertComponent(c)) json.checkValidOp = function (op) {} -const isArray = (o) => Object.prototype.toString.call(o) === '[object Array]' +const isArray = o => Object.prototype.toString.call(o) === '[object Array]' json.checkList = function (elem) { if (!isArray(elem)) { throw new Error('Referenced element not a list') @@ -264,7 +264,7 @@ json.normalize = function (op) { // hax, copied from test/types/json. Apparently this is still the fastest way to deep clone an object, assuming // we have browser support for JSON. // http://jsperf.com/cloning-an-object/12 -var clone = (o) => JSON.parse(JSON.stringify(o)) +var clone = o => JSON.parse(JSON.stringify(o)) json.commonPath = function (p1, p2) { p1 = p1.slice() diff --git a/services/document-updater/app/js/sharejs/model.js b/services/document-updater/app/js/sharejs/model.js index 69d258738e..3b881c8d16 100644 --- a/services/document-updater/app/js/sharejs/model.js +++ b/services/document-updater/app/js/sharejs/model.js @@ -27,7 +27,7 @@ const { EventEmitter } = require('events') const queue = require('./syncqueue') const types = require('../types') -const isArray = (o) => Object.prototype.toString.call(o) === '[object Array]' +const isArray = o => Object.prototype.toString.call(o) === '[object Array]' // This constructor creates a new Model object. There will be one model object // per server context. @@ -225,7 +225,7 @@ module.exports = Model = function (db, options) { return callback(error) } - __guardMethod__(options.stats, 'writeOp', (o) => o.writeOp()) + __guardMethod__(options.stats, 'writeOp', o => o.writeOp()) // This is needed when we emit the 'change' event, below. const oldSnapshot = doc.snapshot @@ -303,7 +303,7 @@ module.exports = Model = function (db, options) { // Version of the snapshot thats in the database committedVersion: committedVersion != null ? committedVersion : data.v, snapshotWriteLock: false, - dbMeta + dbMeta, } doc.opQueue = makeOpQueue(docName, doc) @@ -352,9 +352,7 @@ module.exports = Model = function (db, options) { const load = function (docName, callback) { if (docs[docName]) { // The document is already loaded. Return immediately. - __guardMethod__(options.stats, 'cacheHit', (o) => - o.cacheHit('getSnapshot') - ) + __guardMethod__(options.stats, 'cacheHit', o => o.cacheHit('getSnapshot')) return callback(null, docs[docName]) } @@ -370,7 +368,7 @@ module.exports = Model = function (db, options) { return callbacks.push(callback) } - __guardMethod__(options.stats, 'cacheMiss', (o1) => + __guardMethod__(options.stats, 'cacheMiss', o1 => o1.cacheMiss('getSnapshot') ) @@ -447,20 +445,21 @@ module.exports = Model = function (db, options) { ) { let reapTimer clearTimeout(doc.reapTimer) - return (doc.reapTimer = reapTimer = setTimeout( - () => - tryWriteSnapshot(docName, function () { - // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're - // in the middle of applying an operation, don't reap. - if ( - docs[docName].reapTimer === reapTimer && - doc.opQueue.busy === false - ) { - return delete docs[docName] - } - }), - options.reapTime - )) + return (doc.reapTimer = reapTimer = + setTimeout( + () => + tryWriteSnapshot(docName, function () { + // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're + // in the middle of applying an operation, don't reap. + if ( + docs[docName].reapTimer === reapTimer && + doc.opQueue.busy === false + ) { + return delete docs[docName] + } + }), + options.reapTime + )) } }) } @@ -490,7 +489,7 @@ module.exports = Model = function (db, options) { doc.snapshotWriteLock = true - __guardMethod__(options.stats, 'writeSnapshot', (o) => o.writeSnapshot()) + __guardMethod__(options.stats, 'writeSnapshot', o => o.writeSnapshot()) const writeSnapshot = (db != null ? db.writeSnapshot : undefined) || @@ -501,7 +500,7 @@ module.exports = Model = function (db, options) { meta: doc.meta, snapshot: doc.snapshot, // The database doesn't know about object types. - type: doc.type.name + type: doc.type.name, } // Commit snapshot. @@ -551,7 +550,7 @@ module.exports = Model = function (db, options) { snapshot: type.create(), type: type.name, meta: meta || {}, - v: 0 + v: 0, } const done = function (error, dbMeta) { @@ -864,7 +863,7 @@ module.exports = Model = function (db, options) { // Close the database connection. This is needed so nodejs can shut down cleanly. this.closeDb = function () { - __guardMethod__(db, 'close', (o) => o.close()) + __guardMethod__(db, 'close', o => o.close()) return (db = null) } } diff --git a/services/document-updater/app/js/sharejs/server/model.js b/services/document-updater/app/js/sharejs/server/model.js index 5bed90faa3..7b065ea20a 100644 --- a/services/document-updater/app/js/sharejs/server/model.js +++ b/services/document-updater/app/js/sharejs/server/model.js @@ -27,7 +27,7 @@ const { EventEmitter } = require('events') const queue = require('./syncqueue') const types = require('../types') -const isArray = (o) => Object.prototype.toString.call(o) === '[object Array]' +const isArray = o => Object.prototype.toString.call(o) === '[object Array]' // This constructor creates a new Model object. There will be one model object // per server context. @@ -232,7 +232,7 @@ module.exports = Model = function (db, options) { return callback(error) } - __guardMethod__(options.stats, 'writeOp', (o) => o.writeOp()) + __guardMethod__(options.stats, 'writeOp', o => o.writeOp()) // This is needed when we emit the 'change' event, below. const oldSnapshot = doc.snapshot @@ -310,7 +310,7 @@ module.exports = Model = function (db, options) { // Version of the snapshot thats in the database committedVersion: committedVersion != null ? committedVersion : data.v, snapshotWriteLock: false, - dbMeta + dbMeta, } doc.opQueue = makeOpQueue(docName, doc) @@ -359,9 +359,7 @@ module.exports = Model = function (db, options) { const load = function (docName, callback) { if (docs[docName]) { // The document is already loaded. Return immediately. - __guardMethod__(options.stats, 'cacheHit', (o) => - o.cacheHit('getSnapshot') - ) + __guardMethod__(options.stats, 'cacheHit', o => o.cacheHit('getSnapshot')) return callback(null, docs[docName]) } @@ -377,7 +375,7 @@ module.exports = Model = function (db, options) { return callbacks.push(callback) } - __guardMethod__(options.stats, 'cacheMiss', (o1) => + __guardMethod__(options.stats, 'cacheMiss', o1 => o1.cacheMiss('getSnapshot') ) @@ -454,20 +452,21 @@ module.exports = Model = function (db, options) { ) { let reapTimer clearTimeout(doc.reapTimer) - return (doc.reapTimer = reapTimer = setTimeout( - () => - tryWriteSnapshot(docName, function () { - // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're - // in the middle of applying an operation, don't reap. - if ( - docs[docName].reapTimer === reapTimer && - doc.opQueue.busy === false - ) { - return delete docs[docName] - } - }), - options.reapTime - )) + return (doc.reapTimer = reapTimer = + setTimeout( + () => + tryWriteSnapshot(docName, function () { + // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're + // in the middle of applying an operation, don't reap. + if ( + docs[docName].reapTimer === reapTimer && + doc.opQueue.busy === false + ) { + return delete docs[docName] + } + }), + options.reapTime + )) } }) } @@ -497,7 +496,7 @@ module.exports = Model = function (db, options) { doc.snapshotWriteLock = true - __guardMethod__(options.stats, 'writeSnapshot', (o) => o.writeSnapshot()) + __guardMethod__(options.stats, 'writeSnapshot', o => o.writeSnapshot()) const writeSnapshot = (db != null ? db.writeSnapshot : undefined) || @@ -508,7 +507,7 @@ module.exports = Model = function (db, options) { meta: doc.meta, snapshot: doc.snapshot, // The database doesn't know about object types. - type: doc.type.name + type: doc.type.name, } // Commit snapshot. @@ -558,7 +557,7 @@ module.exports = Model = function (db, options) { snapshot: type.create(), type: type.name, meta: meta || {}, - v: 0 + v: 0, } const done = function (error, dbMeta) { @@ -871,7 +870,7 @@ module.exports = Model = function (db, options) { // Close the database connection. This is needed so nodejs can shut down cleanly. this.closeDb = function () { - __guardMethod__(db, 'close', (o) => o.close()) + __guardMethod__(db, 'close', o => o.close()) return (db = null) } } diff --git a/services/document-updater/app/js/sharejs/simple.js b/services/document-updater/app/js/sharejs/simple.js index 781cdc0293..41f7eed285 100644 --- a/services/document-updater/app/js/sharejs/simple.js +++ b/services/document-updater/app/js/sharejs/simple.js @@ -50,5 +50,5 @@ module.exports = { } return { position: pos, text: op1.text } - } + }, } diff --git a/services/document-updater/app/js/sharejs/text-api.js b/services/document-updater/app/js/sharejs/text-api.js index d30f009cdb..aa2beef446 100644 --- a/services/document-updater/app/js/sharejs/text-api.js +++ b/services/document-updater/app/js/sharejs/text-api.js @@ -42,11 +42,11 @@ text.api = { _register() { return this.on('remoteop', function (op) { - return Array.from(op).map((component) => + return Array.from(op).map(component => component.i !== undefined ? this.emit('insert', component.p, component.i) : this.emit('delete', component.p, component.d) ) }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/text-composable-api.js b/services/document-updater/app/js/sharejs/text-composable-api.js index 9b237ce91b..122e119ae4 100644 --- a/services/document-updater/app/js/sharejs/text-composable-api.js +++ b/services/document-updater/app/js/sharejs/text-composable-api.js @@ -44,7 +44,7 @@ type.api = { const op = type.normalize([ pos, { d: this.snapshot.slice(pos, pos + length) }, - this.snapshot.length - pos - length + this.snapshot.length - pos - length, ]) this.submitOp(op, callback) @@ -70,7 +70,7 @@ type.api = { return result })() }) - } + }, } // We don't increment pos, because the position // specified is after the delete has happened. diff --git a/services/document-updater/app/js/sharejs/text-composable.js b/services/document-updater/app/js/sharejs/text-composable.js index 6898589908..58c4df2b28 100644 --- a/services/document-updater/app/js/sharejs/text-composable.js +++ b/services/document-updater/app/js/sharejs/text-composable.js @@ -74,7 +74,7 @@ const checkOp = function (op) { // Makes a function for appending components to a given op. // Exported for the randomOpGenerator. -exports._makeAppend = makeAppend = (op) => +exports._makeAppend = makeAppend = op => function (component) { if (component === 0 || component.i === '' || component.d === '') { } else if (op.length === 0) { diff --git a/services/document-updater/app/js/sharejs/text-tp2-api.js b/services/document-updater/app/js/sharejs/text-tp2-api.js index 3ab7ef1cb5..8ffbd60c50 100644 --- a/services/document-updater/app/js/sharejs/text-tp2-api.js +++ b/services/document-updater/app/js/sharejs/text-tp2-api.js @@ -49,7 +49,7 @@ type.api = { // Flatten a document into a string getText() { const strings = Array.from(this.snapshot.data).filter( - (elem) => typeof elem === 'string' + elem => typeof elem === 'string' ) return strings.join('') }, @@ -129,5 +129,5 @@ type.api = { } } }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/text-tp2.js b/services/document-updater/app/js/sharejs/text-tp2.js index f1e3c97dd6..67a70439c7 100644 --- a/services/document-updater/app/js/sharejs/text-tp2.js +++ b/services/document-updater/app/js/sharejs/text-tp2.js @@ -65,7 +65,7 @@ var type = { } return doc - } + }, } const checkOp = function (op) { @@ -346,7 +346,7 @@ const transformer = function (op, otherOp, goForwards, side) { // transform - insert skips over inserted parts if (side === 'left') { // The left insert should go first. - while (__guard__(peek(), (x) => x.i) !== undefined) { + while (__guard__(peek(), x => x.i) !== undefined) { append(newOp, take()) } } diff --git a/services/document-updater/app/js/sharejs/text.js b/services/document-updater/app/js/sharejs/text.js index 34886b597d..54f7094c45 100644 --- a/services/document-updater/app/js/sharejs/text.js +++ b/services/document-updater/app/js/sharejs/text.js @@ -110,7 +110,7 @@ text._append = append = function (newOp, c) { ) { return (newOp[newOp.length - 1] = { i: strInject(last.i, c.p - last.p, c.i), - p: last.p + p: last.p, }) } else if ( last.d != null && @@ -120,7 +120,7 @@ text._append = append = function (newOp, c) { ) { return (newOp[newOp.length - 1] = { d: strInject(c.d, last.p - c.p, last.d), - p: c.p + p: c.p, }) } else { return newOp.push(c) @@ -142,7 +142,7 @@ text.compose = function (op1, op2) { // Attempt to compress the op components together 'as much as possible'. // This implementation preserves order and preserves create/delete pairs. -text.compress = (op) => text.compose([], op) +text.compress = op => text.compose([], op) text.normalize = function (op) { const newOp = [] @@ -216,7 +216,7 @@ text._tc = transformComponent = function (dest, c, otherC, side) { if (c.i != null) { append(dest, { i: c.i, - p: transformPosition(c.p, otherC, side === 'right') + p: transformPosition(c.p, otherC, side === 'right'), }) } else { // Delete @@ -286,8 +286,8 @@ const invertComponent = function (c) { // No need to use append for invert, because the components won't be able to // cancel with one another. -text.invert = (op) => - Array.from(op.slice().reverse()).map((c) => invertComponent(c)) +text.invert = op => + Array.from(op.slice().reverse()).map(c => invertComponent(c)) if (typeof WEB !== 'undefined' && WEB !== null) { if (!exports.types) { diff --git a/services/document-updater/app/js/sharejs/types/count.js b/services/document-updater/app/js/sharejs/types/count.js index 8d8477caf4..246f6b7985 100644 --- a/services/document-updater/app/js/sharejs/types/count.js +++ b/services/document-updater/app/js/sharejs/types/count.js @@ -34,4 +34,4 @@ exports.compose = function (op1, op2) { return [op1[0], op1[1] + op2[1]] } -exports.generateRandomOp = (doc) => [[doc, 1], doc + 1] +exports.generateRandomOp = doc => [[doc, 1], doc + 1] diff --git a/services/document-updater/app/js/sharejs/types/helpers.js b/services/document-updater/app/js/sharejs/types/helpers.js index 1d7b268e17..b1ab3c2a26 100644 --- a/services/document-updater/app/js/sharejs/types/helpers.js +++ b/services/document-updater/app/js/sharejs/types/helpers.js @@ -31,80 +31,84 @@ exports._bt = bootstrapTransform = function ( } // Transforms rightOp by leftOp. Returns ['rightOp', clientOp'] - type.transformX = type.transformX = transformX = function (leftOp, rightOp) { - checkValidOp(leftOp) - checkValidOp(rightOp) + type.transformX = + type.transformX = + transformX = + function (leftOp, rightOp) { + checkValidOp(leftOp) + checkValidOp(rightOp) - const newRightOp = [] + const newRightOp = [] - for (let rightComponent of Array.from(rightOp)) { - // Generate newLeftOp by composing leftOp by rightComponent - const newLeftOp = [] + for (let rightComponent of Array.from(rightOp)) { + // Generate newLeftOp by composing leftOp by rightComponent + const newLeftOp = [] - let k = 0 - while (k < leftOp.length) { - var l - const nextC = [] - transformComponentX(leftOp[k], rightComponent, newLeftOp, nextC) - k++ + let k = 0 + while (k < leftOp.length) { + var l + const nextC = [] + transformComponentX(leftOp[k], rightComponent, newLeftOp, nextC) + k++ - if (nextC.length === 1) { - rightComponent = nextC[0] - } else if (nextC.length === 0) { - for (l of Array.from(leftOp.slice(k))) { - append(newLeftOp, l) + if (nextC.length === 1) { + rightComponent = nextC[0] + } else if (nextC.length === 0) { + for (l of Array.from(leftOp.slice(k))) { + append(newLeftOp, l) + } + rightComponent = null + break + } else { + // Recurse. + const [l_, r_] = Array.from(transformX(leftOp.slice(k), nextC)) + for (l of Array.from(l_)) { + append(newLeftOp, l) + } + for (const r of Array.from(r_)) { + append(newRightOp, r) + } + rightComponent = null + break + } } - rightComponent = null - break - } else { - // Recurse. - const [l_, r_] = Array.from(transformX(leftOp.slice(k), nextC)) - for (l of Array.from(l_)) { - append(newLeftOp, l) + + if (rightComponent != null) { + append(newRightOp, rightComponent) } - for (const r of Array.from(r_)) { - append(newRightOp, r) - } - rightComponent = null - break + leftOp = newLeftOp } - } - if (rightComponent != null) { - append(newRightOp, rightComponent) + return [leftOp, newRightOp] } - leftOp = newLeftOp - } - - return [leftOp, newRightOp] - } // Transforms op with specified type ('left' or 'right') by otherOp. - return (type.transform = type.transform = function (op, otherOp, type) { - let _ - if (type !== 'left' && type !== 'right') { - throw new Error("type must be 'left' or 'right'") - } + return (type.transform = type.transform = + function (op, otherOp, type) { + let _ + if (type !== 'left' && type !== 'right') { + throw new Error("type must be 'left' or 'right'") + } - if (otherOp.length === 0) { - return op - } + if (otherOp.length === 0) { + return op + } - // TODO: Benchmark with and without this line. I _think_ it'll make a big difference...? - if (op.length === 1 && otherOp.length === 1) { - return transformComponent([], op[0], otherOp[0], type) - } + // TODO: Benchmark with and without this line. I _think_ it'll make a big difference...? + if (op.length === 1 && otherOp.length === 1) { + return transformComponent([], op[0], otherOp[0], type) + } - if (type === 'left') { - let left - ;[left, _] = Array.from(transformX(op, otherOp)) - return left - } else { - let right - ;[_, right] = Array.from(transformX(otherOp, op)) - return right - } - }) + if (type === 'left') { + let left + ;[left, _] = Array.from(transformX(op, otherOp)) + return left + } else { + let right + ;[_, right] = Array.from(transformX(otherOp, op)) + return right + } + }) } if (typeof WEB === 'undefined') { diff --git a/services/document-updater/app/js/sharejs/types/json-api.js b/services/document-updater/app/js/sharejs/types/json-api.js index a8db564fdf..f429f2b397 100644 --- a/services/document-updater/app/js/sharejs/types/json-api.js +++ b/services/document-updater/app/js/sharejs/types/json-api.js @@ -353,5 +353,5 @@ json.api = { return result })() }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/types/json.js b/services/document-updater/app/js/sharejs/types/json.js index fa9b030a82..14c3cbb519 100644 --- a/services/document-updater/app/js/sharejs/types/json.js +++ b/services/document-updater/app/js/sharejs/types/json.js @@ -59,12 +59,12 @@ json.invertComponent = function (c) { return c_ } -json.invert = (op) => - Array.from(op.slice().reverse()).map((c) => json.invertComponent(c)) +json.invert = op => + Array.from(op.slice().reverse()).map(c => json.invertComponent(c)) json.checkValidOp = function (op) {} -const isArray = (o) => Object.prototype.toString.call(o) === '[object Array]' +const isArray = o => Object.prototype.toString.call(o) === '[object Array]' json.checkList = function (elem) { if (!isArray(elem)) { throw new Error('Referenced element not a list') @@ -264,7 +264,7 @@ json.normalize = function (op) { // hax, copied from test/types/json. Apparently this is still the fastest way to deep clone an object, assuming // we have browser support for JSON. // http://jsperf.com/cloning-an-object/12 -var clone = (o) => JSON.parse(JSON.stringify(o)) +var clone = o => JSON.parse(JSON.stringify(o)) json.commonPath = function (p1, p2) { p1 = p1.slice() diff --git a/services/document-updater/app/js/sharejs/types/model.js b/services/document-updater/app/js/sharejs/types/model.js index 69d258738e..3b881c8d16 100644 --- a/services/document-updater/app/js/sharejs/types/model.js +++ b/services/document-updater/app/js/sharejs/types/model.js @@ -27,7 +27,7 @@ const { EventEmitter } = require('events') const queue = require('./syncqueue') const types = require('../types') -const isArray = (o) => Object.prototype.toString.call(o) === '[object Array]' +const isArray = o => Object.prototype.toString.call(o) === '[object Array]' // This constructor creates a new Model object. There will be one model object // per server context. @@ -225,7 +225,7 @@ module.exports = Model = function (db, options) { return callback(error) } - __guardMethod__(options.stats, 'writeOp', (o) => o.writeOp()) + __guardMethod__(options.stats, 'writeOp', o => o.writeOp()) // This is needed when we emit the 'change' event, below. const oldSnapshot = doc.snapshot @@ -303,7 +303,7 @@ module.exports = Model = function (db, options) { // Version of the snapshot thats in the database committedVersion: committedVersion != null ? committedVersion : data.v, snapshotWriteLock: false, - dbMeta + dbMeta, } doc.opQueue = makeOpQueue(docName, doc) @@ -352,9 +352,7 @@ module.exports = Model = function (db, options) { const load = function (docName, callback) { if (docs[docName]) { // The document is already loaded. Return immediately. - __guardMethod__(options.stats, 'cacheHit', (o) => - o.cacheHit('getSnapshot') - ) + __guardMethod__(options.stats, 'cacheHit', o => o.cacheHit('getSnapshot')) return callback(null, docs[docName]) } @@ -370,7 +368,7 @@ module.exports = Model = function (db, options) { return callbacks.push(callback) } - __guardMethod__(options.stats, 'cacheMiss', (o1) => + __guardMethod__(options.stats, 'cacheMiss', o1 => o1.cacheMiss('getSnapshot') ) @@ -447,20 +445,21 @@ module.exports = Model = function (db, options) { ) { let reapTimer clearTimeout(doc.reapTimer) - return (doc.reapTimer = reapTimer = setTimeout( - () => - tryWriteSnapshot(docName, function () { - // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're - // in the middle of applying an operation, don't reap. - if ( - docs[docName].reapTimer === reapTimer && - doc.opQueue.busy === false - ) { - return delete docs[docName] - } - }), - options.reapTime - )) + return (doc.reapTimer = reapTimer = + setTimeout( + () => + tryWriteSnapshot(docName, function () { + // If the reaping timeout has been refreshed while we're writing the snapshot, or if we're + // in the middle of applying an operation, don't reap. + if ( + docs[docName].reapTimer === reapTimer && + doc.opQueue.busy === false + ) { + return delete docs[docName] + } + }), + options.reapTime + )) } }) } @@ -490,7 +489,7 @@ module.exports = Model = function (db, options) { doc.snapshotWriteLock = true - __guardMethod__(options.stats, 'writeSnapshot', (o) => o.writeSnapshot()) + __guardMethod__(options.stats, 'writeSnapshot', o => o.writeSnapshot()) const writeSnapshot = (db != null ? db.writeSnapshot : undefined) || @@ -501,7 +500,7 @@ module.exports = Model = function (db, options) { meta: doc.meta, snapshot: doc.snapshot, // The database doesn't know about object types. - type: doc.type.name + type: doc.type.name, } // Commit snapshot. @@ -551,7 +550,7 @@ module.exports = Model = function (db, options) { snapshot: type.create(), type: type.name, meta: meta || {}, - v: 0 + v: 0, } const done = function (error, dbMeta) { @@ -864,7 +863,7 @@ module.exports = Model = function (db, options) { // Close the database connection. This is needed so nodejs can shut down cleanly. this.closeDb = function () { - __guardMethod__(db, 'close', (o) => o.close()) + __guardMethod__(db, 'close', o => o.close()) return (db = null) } } diff --git a/services/document-updater/app/js/sharejs/types/simple.js b/services/document-updater/app/js/sharejs/types/simple.js index 781cdc0293..41f7eed285 100644 --- a/services/document-updater/app/js/sharejs/types/simple.js +++ b/services/document-updater/app/js/sharejs/types/simple.js @@ -50,5 +50,5 @@ module.exports = { } return { position: pos, text: op1.text } - } + }, } diff --git a/services/document-updater/app/js/sharejs/types/text-api.js b/services/document-updater/app/js/sharejs/types/text-api.js index d30f009cdb..aa2beef446 100644 --- a/services/document-updater/app/js/sharejs/types/text-api.js +++ b/services/document-updater/app/js/sharejs/types/text-api.js @@ -42,11 +42,11 @@ text.api = { _register() { return this.on('remoteop', function (op) { - return Array.from(op).map((component) => + return Array.from(op).map(component => component.i !== undefined ? this.emit('insert', component.p, component.i) : this.emit('delete', component.p, component.d) ) }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/types/text-composable-api.js b/services/document-updater/app/js/sharejs/types/text-composable-api.js index 9b237ce91b..122e119ae4 100644 --- a/services/document-updater/app/js/sharejs/types/text-composable-api.js +++ b/services/document-updater/app/js/sharejs/types/text-composable-api.js @@ -44,7 +44,7 @@ type.api = { const op = type.normalize([ pos, { d: this.snapshot.slice(pos, pos + length) }, - this.snapshot.length - pos - length + this.snapshot.length - pos - length, ]) this.submitOp(op, callback) @@ -70,7 +70,7 @@ type.api = { return result })() }) - } + }, } // We don't increment pos, because the position // specified is after the delete has happened. diff --git a/services/document-updater/app/js/sharejs/types/text-composable.js b/services/document-updater/app/js/sharejs/types/text-composable.js index 34246a5f51..ce0f3ac226 100644 --- a/services/document-updater/app/js/sharejs/types/text-composable.js +++ b/services/document-updater/app/js/sharejs/types/text-composable.js @@ -75,7 +75,7 @@ const checkOp = function (op) { // Makes a function for appending components to a given op. // Exported for the randomOpGenerator. -moduleExport._makeAppend = makeAppend = (op) => +moduleExport._makeAppend = makeAppend = op => function (component) { if (component === 0 || component.i === '' || component.d === '') { } else if (op.length === 0) { diff --git a/services/document-updater/app/js/sharejs/types/text-tp2-api.js b/services/document-updater/app/js/sharejs/types/text-tp2-api.js index 3ab7ef1cb5..8ffbd60c50 100644 --- a/services/document-updater/app/js/sharejs/types/text-tp2-api.js +++ b/services/document-updater/app/js/sharejs/types/text-tp2-api.js @@ -49,7 +49,7 @@ type.api = { // Flatten a document into a string getText() { const strings = Array.from(this.snapshot.data).filter( - (elem) => typeof elem === 'string' + elem => typeof elem === 'string' ) return strings.join('') }, @@ -129,5 +129,5 @@ type.api = { } } }) - } + }, } diff --git a/services/document-updater/app/js/sharejs/types/text-tp2.js b/services/document-updater/app/js/sharejs/types/text-tp2.js index f1e3c97dd6..67a70439c7 100644 --- a/services/document-updater/app/js/sharejs/types/text-tp2.js +++ b/services/document-updater/app/js/sharejs/types/text-tp2.js @@ -65,7 +65,7 @@ var type = { } return doc - } + }, } const checkOp = function (op) { @@ -346,7 +346,7 @@ const transformer = function (op, otherOp, goForwards, side) { // transform - insert skips over inserted parts if (side === 'left') { // The left insert should go first. - while (__guard__(peek(), (x) => x.i) !== undefined) { + while (__guard__(peek(), x => x.i) !== undefined) { append(newOp, take()) } } diff --git a/services/document-updater/app/js/sharejs/types/text.js b/services/document-updater/app/js/sharejs/types/text.js index 530d4c4987..bbbe36e0f6 100644 --- a/services/document-updater/app/js/sharejs/types/text.js +++ b/services/document-updater/app/js/sharejs/types/text.js @@ -124,7 +124,7 @@ text._append = append = function (newOp, c) { ) { return (newOp[newOp.length - 1] = { i: strInject(last.i, c.p - last.p, c.i), - p: last.p + p: last.p, }) } else if ( last.d != null && @@ -134,7 +134,7 @@ text._append = append = function (newOp, c) { ) { return (newOp[newOp.length - 1] = { d: strInject(c.d, last.p - c.p, last.d), - p: c.p + p: c.p, }) } else { return newOp.push(c) @@ -156,7 +156,7 @@ text.compose = function (op1, op2) { // Attempt to compress the op components together 'as much as possible'. // This implementation preserves order and preserves create/delete pairs. -text.compress = (op) => text.compose([], op) +text.compress = op => text.compose([], op) text.normalize = function (op) { const newOp = [] @@ -235,7 +235,7 @@ text._tc = transformComponent = function (dest, c, otherC, side) { if (c.i != null) { append(dest, { i: c.i, - p: transformPosition(c.p, otherC, side === 'right') + p: transformPosition(c.p, otherC, side === 'right'), }) } else if (c.d != null) { // Delete @@ -305,7 +305,7 @@ text._tc = transformComponent = function (dest, c, otherC, side) { append(dest, { c: c.c, p: transformPosition(c.p, otherC, true), - t: c.t + t: c.t, }) } } else if (otherC.d != null) { @@ -362,8 +362,8 @@ const invertComponent = function (c) { // No need to use append for invert, because the components won't be able to // cancel with one another. -text.invert = (op) => - Array.from(op.slice().reverse()).map((c) => invertComponent(c)) +text.invert = op => + Array.from(op.slice().reverse()).map(c => invertComponent(c)) if (typeof WEB !== 'undefined' && WEB !== null) { if (!exports.types) { diff --git a/services/document-updater/config/settings.defaults.js b/services/document-updater/config/settings.defaults.js index f9c5f54921..d98eb9e265 100755 --- a/services/document-updater/config/settings.defaults.js +++ b/services/document-updater/config/settings.defaults.js @@ -2,8 +2,8 @@ module.exports = { internal: { documentupdater: { host: process.env.LISTEN_ADDRESS || 'localhost', - port: 3003 - } + port: 3003, + }, }, apis: { @@ -12,15 +12,15 @@ module.exports = { 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', }, trackchanges: { - url: `http://${process.env.TRACK_CHANGES_HOST || 'localhost'}:3015` + url: `http://${process.env.TRACK_CHANGES_HOST || 'localhost'}:3015`, }, project_history: { enabled: true, - url: `http://${process.env.PROJECT_HISTORY_HOST || 'localhost'}:3054` - } + url: `http://${process.env.PROJECT_HISTORY_HOST || 'localhost'}:3054`, + }, }, redis: { @@ -32,7 +32,7 @@ module.exports = { process.env.PUBSUB_REDIS_PASSWORD || process.env.REDIS_PASSWORD || '', maxRetriesPerRequest: parseInt( process.env.REDIS_MAX_RETRIES_PER_REQUEST || '20' - ) + ), }, history: { @@ -50,8 +50,8 @@ module.exports = { }, docsWithHistoryOps({ project_id: projectId }) { return `DocsWithHistoryOps:{${projectId}}` - } - } + }, + }, }, project_history: { @@ -74,8 +74,8 @@ module.exports = { }, projectHistoryFirstOpTimestamp({ project_id: projectId }) { return `ProjectHistory:FirstOpTimestamp:{${projectId}}` - } - } + }, + }, }, lock: { @@ -90,8 +90,8 @@ module.exports = { key_schema: { blockingKey({ doc_id: docId }) { return `Blocking:{${docId}}` - } - } + }, + }, }, documentupdater: { @@ -159,9 +159,9 @@ module.exports = { }, flushAndDeleteQueue() { return 'DocUpdaterFlushAndDeleteQueue' - } - } - } + }, + }, + }, }, max_doc_length: 2 * 1024 * 1024, // 2mb @@ -173,15 +173,15 @@ module.exports = { mongo: { options: { useUnifiedTopology: - (process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true' + (process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true', }, url: process.env.MONGO_CONNECTION_STRING || - `mongodb://${process.env.MONGO_HOST || '127.0.0.1'}/sharelatex` + `mongodb://${process.env.MONGO_HOST || '127.0.0.1'}/sharelatex`, }, sentry: { - dsn: process.env.SENTRY_DSN + dsn: process.env.SENTRY_DSN, }, publishOnIndividualChannels: @@ -191,5 +191,5 @@ module.exports = { smoothingOffset: process.env.SMOOTHING_OFFSET || 1000, // milliseconds - disableDoubleFlush: process.env.DISABLE_DOUBLE_FLUSH || false // don't flush track-changes for projects using project-history + disableDoubleFlush: process.env.DISABLE_DOUBLE_FLUSH || false, // don't flush track-changes for projects using project-history } diff --git a/services/document-updater/expire_docops.js b/services/document-updater/expire_docops.js index b9fafb072d..c3b2b80706 100644 --- a/services/document-updater/expire_docops.js +++ b/services/document-updater/expire_docops.js @@ -39,7 +39,7 @@ const getKeys = function (pattern, callback) { return async.concatSeries(nodes, doKeyLookupForNode, callback) } -const expireDocOps = (callback) => +const expireDocOps = callback => // eslint-disable-next-line handle-callback-err getKeys(keys.docOps({ doc_id: '*' }), (error, keys) => async.mapSeries( diff --git a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js index 4c069008bc..ec14300d21 100644 --- a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js +++ b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js @@ -42,10 +42,10 @@ describe('Applying updates to a doc', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: this.version + v: this.version, } this.result = ['one', 'one and a half', 'two', 'three'] return DocUpdaterApp.ensureRunning(done) @@ -55,19 +55,19 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon.spy(MockWebApi, 'getDocument') this.startTime = Date.now() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -144,7 +144,7 @@ describe('Applying updates to a doc', function () { it('should set the first op timestamp', function (done) { rclient_project_history.get( ProjectHistoryKeys.projectHistoryFirstOpTimestamp({ - project_id: this.project_id + project_id: this.project_id, }), (error, result) => { if (error != null) { @@ -167,7 +167,7 @@ describe('Applying updates to a doc', function () { this.project_id, this.doc_id, this.second_update, - (error) => { + error => { if (error != null) { throw error } @@ -180,7 +180,7 @@ describe('Applying updates to a doc', function () { return it('should not change the first op timestamp', function (done) { rclient_project_history.get( ProjectHistoryKeys.projectHistoryFirstOpTimestamp({ - project_id: this.project_id + project_id: this.project_id, }), (error, result) => { if (error != null) { @@ -199,14 +199,14 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) - DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, (error) => { + DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, error => { if (error != null) { throw error } @@ -215,7 +215,7 @@ describe('Applying updates to a doc', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -284,15 +284,15 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, version: this.version, - projectHistoryType: 'project-history' + projectHistoryType: 'project-history', }) - DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, (error) => { + DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, error => { if (error != null) { throw error } @@ -301,7 +301,7 @@ describe('Applying updates to a doc', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -360,12 +360,12 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) const lines = ['', '', ''] MockWebApi.insertDoc(this.project_id, this.doc_id, { lines, - version: 0 + version: 0, }) this.updates = [ { doc_id: this.doc_id, v: 0, op: [{ i: 'h', p: 0 }] }, @@ -378,7 +378,7 @@ describe('Applying updates to a doc', function () { { doc_id: this.doc_id, v: 7, op: [{ i: 'o', p: 7 }] }, { doc_id: this.doc_id, v: 8, op: [{ i: 'r', p: 8 }] }, { doc_id: this.doc_id, v: 9, op: [{ i: 'l', p: 9 }] }, - { doc_id: this.doc_id, v: 10, op: [{ i: 'd', p: 10 }] } + { doc_id: this.doc_id, v: 10, op: [{ i: 'd', p: 10 }] }, ] this.my_result = ['hello world', '', ''] return done() @@ -388,8 +388,8 @@ describe('Applying updates to a doc', function () { let update const actions = [] for (update of Array.from(this.updates.slice(0, 6))) { - ;((update) => { - return actions.push((callback) => + ;(update => { + return actions.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, @@ -399,12 +399,12 @@ describe('Applying updates to a doc', function () { ) })(update) } - actions.push((callback) => + actions.push(callback => DocUpdaterClient.deleteDoc(this.project_id, this.doc_id, callback) ) for (update of Array.from(this.updates.slice(6))) { - ;((update) => { - return actions.push((callback) => + ;(update => { + return actions.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, @@ -415,7 +415,7 @@ describe('Applying updates to a doc', function () { })(update) } - async.series(actions, (error) => { + async.series(actions, error => { if (error != null) { throw error } @@ -437,7 +437,7 @@ describe('Applying updates to a doc', function () { 0, -1, (error, updates) => { - updates = Array.from(updates).map((u) => JSON.parse(u)) + updates = Array.from(updates).map(u => JSON.parse(u)) for (let i = 0; i < this.updates.length; i++) { const appliedUpdate = this.updates[i] appliedUpdate.op.should.deep.equal(updates[i].op) @@ -462,7 +462,7 @@ describe('Applying updates to a doc', function () { 0, -1, (error, updates) => { - updates = Array.from(updates).map((u) => JSON.parse(u)) + updates = Array.from(updates).map(u => JSON.parse(u)) for (let i = 0; i < this.updates.length; i++) { const appliedUpdate = this.updates[i] appliedUpdate.op.should.deep.equal(updates[i].op) @@ -478,12 +478,12 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) const lines = ['', '', ''] MockWebApi.insertDoc(this.project_id, this.doc_id, { lines, - version: 0 + version: 0, }) this.updates = [ { doc_id: this.doc_id, v: 0, op: [{ i: 'h', p: 0 }] }, @@ -491,7 +491,7 @@ describe('Applying updates to a doc', function () { { doc_id: this.doc_id, v: 2, op: [{ i: 'l', p: 2 }] }, { doc_id: this.doc_id, v: 3, op: [{ i: 'l', p: 3 }] }, { doc_id: this.doc_id, v: 4, op: [{ i: 'o', p: 4 }] }, - { doc_id: this.doc_id, v: 0, op: [{ i: 'world', p: 1 }] } + { doc_id: this.doc_id, v: 0, op: [{ i: 'world', p: 1 }] }, ] this.my_result = ['hello', 'world', ''] return done() @@ -501,8 +501,8 @@ describe('Applying updates to a doc', function () { let update const actions = [] for (update of Array.from(this.updates.slice(0, 5))) { - ;((update) => { - return actions.push((callback) => + ;(update => { + return actions.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, @@ -512,12 +512,12 @@ describe('Applying updates to a doc', function () { ) })(update) } - actions.push((callback) => + actions.push(callback => DocUpdaterClient.deleteDoc(this.project_id, this.doc_id, callback) ) for (update of Array.from(this.updates.slice(5))) { - ;((update) => { - return actions.push((callback) => + ;(update => { + return actions.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, @@ -528,7 +528,7 @@ describe('Applying updates to a doc', function () { })(update) } - async.series(actions, (error) => { + async.series(actions, error => { if (error != null) { throw error } @@ -550,16 +550,16 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) this.broken_update = { doc_id: this.doc_id, v: this.version, - op: [{ d: 'not the correct content', p: 0 }] + op: [{ d: 'not the correct content', p: 0 }], } MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) DocUpdaterClient.subscribeToAppliedOps( @@ -570,7 +570,7 @@ describe('Applying updates to a doc', function () { this.project_id, this.doc_id, this.broken_update, - (error) => { + error => { if (error != null) { throw error } @@ -599,7 +599,7 @@ describe('Applying updates to a doc', function () { return JSON.parse(message).should.deep.include({ project_id: this.project_id, doc_id: this.doc_id, - error: 'Delete component does not match' + error: 'Delete component does not match', }) }) }) @@ -608,7 +608,7 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) const updates = [] for (let v = 0; v <= 199; v++) { @@ -616,7 +616,7 @@ describe('Applying updates to a doc', function () { updates.push({ doc_id: this.doc_id, op: [{ i: v.toString(), p: 0 }], - v + v, }) } @@ -624,14 +624,14 @@ describe('Applying updates to a doc', function () { MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: 0 + version: 0, }) // Send updates in chunks to causes multiple flushes const actions = [] for (let i = 0; i <= 19; i++) { - ;((i) => { - return actions.push((cb) => { + ;(i => { + return actions.push(cb => { return DocUpdaterClient.sendUpdates( this.project_id, this.doc_id, @@ -641,7 +641,7 @@ describe('Applying updates to a doc', function () { }) })(i) } - async.series(actions, (error) => { + async.series(actions, error => { if (error != null) { throw error } @@ -663,22 +663,22 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { - lines: this.lines + lines: this.lines, }) const update = { doc: this.doc_id, op: this.update.op, - v: 0 + v: 0, } DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, update, - (error) => { + error => { if (error != null) { throw error } @@ -705,11 +705,11 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) DocUpdaterClient.subscribeToAppliedOps( @@ -725,15 +725,15 @@ describe('Applying updates to a doc', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], v: this.version, meta: { - source: 'ikHceq3yfAdQYzBo4-xZ' - } + source: 'ikHceq3yfAdQYzBo4-xZ', + }, }, - (error) => { + error => { if (error != null) { throw error } @@ -746,16 +746,16 @@ describe('Applying updates to a doc', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], v: this.version, dupIfSource: ['ikHceq3yfAdQYzBo4-xZ'], meta: { - source: 'ikHceq3yfAdQYzBo4-xZ' - } + source: 'ikHceq3yfAdQYzBo4-xZ', + }, }, - (error) => { + error => { if (error != null) { throw error } @@ -795,12 +795,12 @@ describe('Applying updates to a doc', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) this.non_existing = { doc_id: this.doc_id, v: this.version, - op: [{ d: 'content', p: 0 }] + op: [{ d: 'content', p: 0 }], } DocUpdaterClient.subscribeToAppliedOps( @@ -811,7 +811,7 @@ describe('Applying updates to a doc', function () { this.project_id, this.doc_id, this.non_existing, - (error) => { + error => { if (error != null) { throw error } @@ -840,7 +840,7 @@ describe('Applying updates to a doc', function () { return JSON.parse(message).should.deep.include({ project_id: this.project_id, doc_id: this.doc_id, - error: `doc not not found: /project/${this.project_id}/doc/${this.doc_id}` + error: `doc not not found: /project/${this.project_id}/doc/${this.doc_id}`, }) }) }) diff --git a/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js b/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js index ea4cc7b0ee..6d4fc3c019 100644 --- a/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js +++ b/services/document-updater/test/acceptance/js/ApplyingUpdatesToProjectStructureTests.js @@ -23,10 +23,10 @@ describe("Applying updates to a project's structure", function () { type: 'rename-file', id: DocUpdaterClient.randomId(), pathname: '/file-path', - newPathname: '/new-file-path' + newPathname: '/new-file-path', } this.updates = [this.fileUpdate] - DocUpdaterApp.ensureRunning((error) => { + DocUpdaterApp.ensureRunning(error => { if (error) { return done(error) } @@ -35,7 +35,7 @@ describe("Applying updates to a project's structure", function () { this.user_id, this.updates, this.version, - (error) => { + error => { if (error) { return done(error) } @@ -75,7 +75,7 @@ describe("Applying updates to a project's structure", function () { type: 'rename-doc', id: DocUpdaterClient.randomId(), pathname: '/doc-path', - newPathname: '/new-doc-path' + newPathname: '/new-doc-path', } this.updates = [this.update] }) @@ -88,7 +88,7 @@ describe("Applying updates to a project's structure", function () { this.user_id, this.updates, this.version, - (error) => { + error => { if (error) { return done(error) } @@ -125,28 +125,24 @@ describe("Applying updates to a project's structure", function () { before(function (done) { this.project_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.update.id, {}) - DocUpdaterClient.preloadDoc( - this.project_id, - this.update.id, - (error) => { - if (error) { - return done(error) - } - sinon.spy(MockWebApi, 'getDocument') - DocUpdaterClient.sendProjectUpdate( - this.project_id, - this.user_id, - this.updates, - this.version, - (error) => { - if (error) { - return done(error) - } - setTimeout(done, 200) - } - ) + DocUpdaterClient.preloadDoc(this.project_id, this.update.id, error => { + if (error) { + return done(error) } - ) + sinon.spy(MockWebApi, 'getDocument') + DocUpdaterClient.sendProjectUpdate( + this.project_id, + this.user_id, + this.updates, + this.version, + error => { + if (error) { + return done(error) + } + setTimeout(done, 200) + } + ) + }) }) after(function () { @@ -198,31 +194,31 @@ describe("Applying updates to a project's structure", function () { type: 'rename-doc', id: DocUpdaterClient.randomId(), pathname: '/doc-path0', - newPathname: '/new-doc-path0' + newPathname: '/new-doc-path0', } this.docUpdate1 = { type: 'rename-doc', id: DocUpdaterClient.randomId(), pathname: '/doc-path1', - newPathname: '/new-doc-path1' + newPathname: '/new-doc-path1', } this.fileUpdate0 = { type: 'rename-file', id: DocUpdaterClient.randomId(), pathname: '/file-path0', - newPathname: '/new-file-path0' + newPathname: '/new-file-path0', } this.fileUpdate1 = { type: 'rename-file', id: DocUpdaterClient.randomId(), pathname: '/file-path1', - newPathname: '/new-file-path1' + newPathname: '/new-file-path1', } this.updates = [ this.docUpdate0, this.docUpdate1, this.fileUpdate0, - this.fileUpdate1 + this.fileUpdate1, ] }) @@ -234,7 +230,7 @@ describe("Applying updates to a project's structure", function () { this.user_id, this.updates, this.version, - (error) => { + error => { if (error) { return done(error) } @@ -299,7 +295,7 @@ describe("Applying updates to a project's structure", function () { type: 'add-file', id: DocUpdaterClient.randomId(), pathname: '/file-path', - url: 'filestore.example.com' + url: 'filestore.example.com', } this.updates = [this.fileUpdate] DocUpdaterClient.sendProjectUpdate( @@ -307,7 +303,7 @@ describe("Applying updates to a project's structure", function () { this.user_id, this.updates, this.version, - (error) => { + error => { if (error) { return done(error) } @@ -347,7 +343,7 @@ describe("Applying updates to a project's structure", function () { type: 'add-doc', id: DocUpdaterClient.randomId(), pathname: '/file-path', - docLines: 'a\nb' + docLines: 'a\nb', } this.updates = [this.docUpdate] DocUpdaterClient.sendProjectUpdate( @@ -355,7 +351,7 @@ describe("Applying updates to a project's structure", function () { this.user_id, this.updates, this.version, - (error) => { + error => { if (error) { return done(error) } @@ -401,7 +397,7 @@ describe("Applying updates to a project's structure", function () { type: 'add-doc', id: DocUpdaterClient.randomId(), pathname: '/file-' + v, - docLines: 'a\nb' + docLines: 'a\nb', }) } @@ -424,7 +420,7 @@ describe("Applying updates to a project's structure", function () { userId, updates.slice(250), this.version1, - (error) => { + error => { if (error) { return done(error) } @@ -460,7 +456,7 @@ describe("Applying updates to a project's structure", function () { type: 'add-doc', id: DocUpdaterClient.randomId(), pathname: '/file-' + v, - docLines: 'a\nb' + docLines: 'a\nb', }) } @@ -483,7 +479,7 @@ describe("Applying updates to a project's structure", function () { userId, updates.slice(10), this.version1, - (error) => { + error => { if (error) { return done(error) } diff --git a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js index 4051d4f5a4..5647c55d83 100644 --- a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js @@ -26,10 +26,10 @@ describe('Deleting a document', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: this.version + v: this.version, } this.result = ['one', 'one and a half', 'two', 'three'] @@ -47,19 +47,19 @@ describe('Deleting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon.spy(MockWebApi, 'setDocument') sinon.spy(MockWebApi, 'getDocument') MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -67,7 +67,7 @@ describe('Deleting a document', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -133,10 +133,10 @@ describe('Deleting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { - lines: this.lines + lines: this.lines, }) sinon.spy(MockWebApi, 'setDocument') sinon.spy(MockWebApi, 'getDocument') diff --git a/services/document-updater/test/acceptance/js/DeletingAProjectTests.js b/services/document-updater/test/acceptance/js/DeletingAProjectTests.js index b07ffae0f5..e9ffeb8806 100644 --- a/services/document-updater/test/acceptance/js/DeletingAProjectTests.js +++ b/services/document-updater/test/acceptance/js/DeletingAProjectTests.js @@ -33,12 +33,12 @@ describe('Deleting a project', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: 0 + v: 0, }, - updatedLines: ['one', 'one and a half', 'two', 'three'] + updatedLines: ['one', 'one and a half', 'two', 'three'], }, { id: (doc_id1 = DocUpdaterClient.randomId()), @@ -48,18 +48,18 @@ describe('Deleting a project', function () { op: [ { i: 'four and a half\n', - p: 5 - } + p: 5, + }, ], - v: 0 + v: 0, }, - updatedLines: ['four', 'four and a half', 'five', 'six'] - } + updatedLines: ['four', 'four and a half', 'five', 'six'], + }, ] for (const doc of Array.from(this.docs)) { MockWebApi.insertDoc(this.project_id, doc.id, { lines: doc.lines, - version: doc.update.v + version: doc.update.v, }) } @@ -73,12 +73,12 @@ describe('Deleting a project', function () { sinon.spy(MockProjectHistoryApi, 'flushProject') return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { return DocUpdaterClient.preloadDoc( this.project_id, doc.id, - (error) => { + error => { if (error != null) { return callback(error) } @@ -86,7 +86,7 @@ describe('Deleting a project', function () { this.project_id, doc.id, doc.update, - (error) => { + error => { return callback(error) } ) @@ -94,7 +94,7 @@ describe('Deleting a project', function () { ) } }), - (error) => { + error => { if (error != null) { throw error } @@ -122,7 +122,7 @@ describe('Deleting a project', function () { }) it('should send each document to the web api', function () { - return Array.from(this.docs).map((doc) => + return Array.from(this.docs).map(doc => MockWebApi.setDocument .calledWith(this.project_id, doc.id, doc.updatedLines) .should.equal(true) @@ -132,8 +132,8 @@ describe('Deleting a project', function () { it('should need to reload the docs if read again', function (done) { sinon.spy(MockWebApi, 'getDocument') return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { MockWebApi.getDocument .calledWith(this.project_id, doc.id) .should.equal(false) @@ -157,7 +157,7 @@ describe('Deleting a project', function () { }) it('should flush each doc in track changes', function () { - return Array.from(this.docs).map((doc) => + return Array.from(this.docs).map(doc => MockTrackChangesApi.flushDoc.calledWith(doc.id).should.equal(true) ) }) @@ -176,8 +176,8 @@ describe('Deleting a project', function () { sinon.spy(MockProjectHistoryApi, 'flushProject') return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { return DocUpdaterClient.preloadDoc( this.project_id, doc.id, @@ -185,7 +185,7 @@ describe('Deleting a project', function () { ) } }), - (error) => { + error => { if (error != null) { throw error } @@ -232,8 +232,8 @@ describe('Deleting a project', function () { sinon.spy(MockProjectHistoryApi, 'flushProject') return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { return DocUpdaterClient.preloadDoc( this.project_id, doc.id, @@ -241,7 +241,7 @@ describe('Deleting a project', function () { ) } }), - (error) => { + error => { if (error != null) { throw error } @@ -273,7 +273,7 @@ describe('Deleting a project', function () { }) it('should send each document to the web api', function () { - return Array.from(this.docs).map((doc) => + return Array.from(this.docs).map(doc => MockWebApi.setDocument .calledWith(this.project_id, doc.id, doc.updatedLines) .should.equal(true) @@ -281,7 +281,7 @@ describe('Deleting a project', function () { }) it('should flush each doc in track changes', function () { - return Array.from(this.docs).map((doc) => + return Array.from(this.docs).map(doc => MockTrackChangesApi.flushDoc.calledWith(doc.id).should.equal(true) ) }) diff --git a/services/document-updater/test/acceptance/js/FlushingAProjectTests.js b/services/document-updater/test/acceptance/js/FlushingAProjectTests.js index 4f4abc2730..0d7a46a990 100644 --- a/services/document-updater/test/acceptance/js/FlushingAProjectTests.js +++ b/services/document-updater/test/acceptance/js/FlushingAProjectTests.js @@ -31,12 +31,12 @@ describe('Flushing a project', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: 0 + v: 0, }, - updatedLines: ['one', 'one and a half', 'two', 'three'] + updatedLines: ['one', 'one and a half', 'two', 'three'], }, { id: (doc_id1 = DocUpdaterClient.randomId()), @@ -46,18 +46,18 @@ describe('Flushing a project', function () { op: [ { i: 'four and a half\n', - p: 5 - } + p: 5, + }, ], - v: 0 + v: 0, }, - updatedLines: ['four', 'four and a half', 'five', 'six'] - } + updatedLines: ['four', 'four and a half', 'five', 'six'], + }, ] for (const doc of Array.from(this.docs)) { MockWebApi.insertDoc(this.project_id, doc.id, { lines: doc.lines, - version: doc.update.v + version: doc.update.v, }) } return DocUpdaterApp.ensureRunning(done) @@ -68,12 +68,12 @@ describe('Flushing a project', function () { sinon.spy(MockWebApi, 'setDocument') return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { return DocUpdaterClient.preloadDoc( this.project_id, doc.id, - (error) => { + error => { if (error != null) { return callback(error) } @@ -81,7 +81,7 @@ describe('Flushing a project', function () { this.project_id, doc.id, doc.update, - (error) => { + error => { return callback(error) } ) @@ -89,7 +89,7 @@ describe('Flushing a project', function () { ) } }), - (error) => { + error => { if (error != null) { throw error } @@ -115,7 +115,7 @@ describe('Flushing a project', function () { }) it('should send each document to the web api', function () { - return Array.from(this.docs).map((doc) => + return Array.from(this.docs).map(doc => MockWebApi.setDocument .calledWith(this.project_id, doc.id, doc.updatedLines) .should.equal(true) @@ -124,8 +124,8 @@ describe('Flushing a project', function () { return it('should update the lines in the doc updater', function (done) { return async.series( - this.docs.map((doc) => { - return (callback) => { + this.docs.map(doc => { + return callback => { return DocUpdaterClient.getDoc( this.project_id, doc.id, diff --git a/services/document-updater/test/acceptance/js/FlushingDocsTests.js b/services/document-updater/test/acceptance/js/FlushingDocsTests.js index 5eac9fa2f3..fdb82dc40d 100644 --- a/services/document-updater/test/acceptance/js/FlushingDocsTests.js +++ b/services/document-updater/test/acceptance/js/FlushingDocsTests.js @@ -31,10 +31,10 @@ describe('Flushing a doc to Mongo', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: this.version + v: this.version, } this.result = ['one', 'one and a half', 'two', 'three'] return DocUpdaterApp.ensureRunning(done) @@ -44,19 +44,19 @@ describe('Flushing a doc to Mongo', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon.spy(MockWebApi, 'setDocument') MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.sendUpdates( this.project_id, this.doc_id, [this.update], - (error) => { + error => { if (error != null) { throw error } @@ -90,10 +90,10 @@ describe('Flushing a doc to Mongo', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { - lines: this.lines + lines: this.lines, }) sinon.spy(MockWebApi, 'setDocument') return DocUpdaterClient.flushDoc(this.project_id, this.doc_id, done) @@ -112,11 +112,11 @@ describe('Flushing a doc to Mongo', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) let t = 30000 sinon diff --git a/services/document-updater/test/acceptance/js/GettingADocumentTests.js b/services/document-updater/test/acceptance/js/GettingADocumentTests.js index 50dc35059c..b6acd9ebfb 100644 --- a/services/document-updater/test/acceptance/js/GettingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/GettingADocumentTests.js @@ -29,13 +29,13 @@ describe('Getting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon.spy(MockWebApi, 'getDocument') MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.getDoc( @@ -71,17 +71,17 @@ describe('Getting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -115,23 +115,23 @@ describe('Getting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { - lines: (this.lines = ['one', 'two', 'three']) + lines: (this.lines = ['one', 'two', 'three']), }) - this.updates = __range__(0, 199, true).map((v) => ({ + this.updates = __range__(0, 199, true).map(v => ({ doc_id: this.doc_id, op: [{ i: v.toString(), p: 0 }], - v + v, })) return DocUpdaterClient.sendUpdates( this.project_id, this.doc_id, this.updates, - (error) => { + error => { if (error != null) { throw error } @@ -191,7 +191,7 @@ describe('Getting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) return DocUpdaterClient.getDoc( this.project_id, @@ -212,7 +212,7 @@ describe('Getting a document', function () { before(function (done) { ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon .stub(MockWebApi, 'getDocument') @@ -246,7 +246,7 @@ describe('Getting a document', function () { this.timeout = 10000 ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) sinon .stub(MockWebApi, 'getDocument') diff --git a/services/document-updater/test/acceptance/js/GettingProjectDocsTests.js b/services/document-updater/test/acceptance/js/GettingProjectDocsTests.js index b32ccb0837..7d72d8161c 100644 --- a/services/document-updater/test/acceptance/js/GettingProjectDocsTests.js +++ b/services/document-updater/test/acceptance/js/GettingProjectDocsTests.js @@ -30,17 +30,17 @@ describe('Getting documents for project', function () { this.projectStateHash = DocUpdaterClient.randomId() ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -67,17 +67,17 @@ describe('Getting documents for project', function () { this.projectStateHash = DocUpdaterClient.randomId() ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -110,7 +110,7 @@ describe('Getting documents for project', function () { return it('should return the documents', function () { return this.returnedDocs.should.deep.equal([ - { _id: this.doc_id, lines: this.lines, v: this.version } + { _id: this.doc_id, lines: this.lines, v: this.version }, ]) }) }) @@ -120,17 +120,17 @@ describe('Getting documents for project', function () { this.projectStateHash = DocUpdaterClient.randomId() ;[this.project_id, this.doc_id] = Array.from([ DocUpdaterClient.randomId(), - DocUpdaterClient.randomId() + DocUpdaterClient.randomId(), ]) MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/document-updater/test/acceptance/js/RangesTests.js b/services/document-updater/test/acceptance/js/RangesTests.js index 7034436440..0275bab1fb 100644 --- a/services/document-updater/test/acceptance/js/RangesTests.js +++ b/services/document-updater/test/acceptance/js/RangesTests.js @@ -32,36 +32,36 @@ describe('Ranges', function () { this.id_seed = '587357bd35e64f6157' this.doc = { id: DocUpdaterClient.randomId(), - lines: ['aaa'] + lines: ['aaa'], } this.updates = [ { doc: this.doc.id, op: [{ i: '123', p: 1 }], v: 0, - meta: { user_id: this.user_id } + meta: { user_id: this.user_id }, }, { doc: this.doc.id, op: [{ i: '456', p: 5 }], v: 1, - meta: { user_id: this.user_id, tc: this.id_seed } + meta: { user_id: this.user_id, tc: this.id_seed }, }, { doc: this.doc.id, op: [{ d: '12', p: 1 }], v: 2, - meta: { user_id: this.user_id } - } + meta: { user_id: this.user_id }, + }, ] MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) const jobs = [] for (const update of Array.from(this.updates)) { - ;((update) => { - return jobs.push((callback) => + ;(update => { + return jobs.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc.id, @@ -72,18 +72,18 @@ describe('Ranges', function () { })(update) } - return DocUpdaterApp.ensureRunning((error) => { + return DocUpdaterApp.ensureRunning(error => { if (error != null) { throw error } return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } - return async.series(jobs, (error) => { + return async.series(jobs, error => { if (error != null) { throw error } @@ -119,25 +119,25 @@ describe('Ranges', function () { this.user_id = DocUpdaterClient.randomId() this.doc = { id: DocUpdaterClient.randomId(), - lines: ['foo bar baz'] + lines: ['foo bar baz'], } this.updates = [ { doc: this.doc.id, op: [ - { c: 'bar', p: 4, t: (this.tid = DocUpdaterClient.randomId()) } + { c: 'bar', p: 4, t: (this.tid = DocUpdaterClient.randomId()) }, ], - v: 0 - } + v: 0, + }, ] MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) const jobs = [] for (const update of Array.from(this.updates)) { - ;((update) => { - return jobs.push((callback) => + ;(update => { + return jobs.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc.id, @@ -150,11 +150,11 @@ describe('Ranges', function () { return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } - return async.series(jobs, (error) => { + return async.series(jobs, error => { if (error != null) { throw error } @@ -188,31 +188,31 @@ describe('Ranges', function () { this.user_id = DocUpdaterClient.randomId() this.doc = { id: DocUpdaterClient.randomId(), - lines: ['foo bar baz'] + lines: ['foo bar baz'], } this.updates = [ { doc: this.doc.id, op: [{ i: 'ABC', p: 3 }], v: 0, - meta: { user_id: this.user_id } + meta: { user_id: this.user_id }, }, { doc: this.doc.id, op: [ - { c: 'bar', p: 4, t: (this.tid = DocUpdaterClient.randomId()) } + { c: 'bar', p: 4, t: (this.tid = DocUpdaterClient.randomId()) }, ], - v: 0 - } + v: 0, + }, ] MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) const jobs = [] for (const update of Array.from(this.updates)) { - ;((update) => { - return jobs.push((callback) => + ;(update => { + return jobs.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc.id, @@ -225,11 +225,11 @@ describe('Ranges', function () { return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } - return async.series(jobs, (error) => { + return async.series(jobs, error => { if (error != null) { throw error } @@ -265,13 +265,13 @@ describe('Ranges', function () { this.id_seed = '587357bd35e64f6157' this.doc = { id: DocUpdaterClient.randomId(), - lines: ['a123aa'] + lines: ['a123aa'], } this.update = { doc: this.doc.id, op: [{ i: '456', p: 5 }], v: 0, - meta: { user_id: this.user_id, tc: this.id_seed } + meta: { user_id: this.user_id, tc: this.id_seed }, } MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, @@ -282,16 +282,16 @@ describe('Ranges', function () { op: { i: '123', p: 1 }, metadata: { user_id: this.user_id, - ts: new Date() - } - } - ] - } + ts: new Date(), + }, + }, + ], + }, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } @@ -299,7 +299,7 @@ describe('Ranges', function () { this.project_id, this.doc.id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -327,25 +327,21 @@ describe('Ranges', function () { }) return it('should flush the ranges to the persistence layer again', function (done) { - return DocUpdaterClient.flushDoc( - this.project_id, - this.doc.id, - (error) => { - if (error != null) { - throw error - } - return MockWebApi.getDocument( - this.project_id, - this.doc.id, - (error, doc) => { - const { changes } = doc.ranges - changes[0].op.should.deep.equal({ i: '123', p: 1 }) - changes[1].op.should.deep.equal({ i: '456', p: 5 }) - return done() - } - ) + return DocUpdaterClient.flushDoc(this.project_id, this.doc.id, error => { + if (error != null) { + throw error } - ) + return MockWebApi.getDocument( + this.project_id, + this.doc.id, + (error, doc) => { + const { changes } = doc.ranges + changes[0].op.should.deep.equal({ i: '123', p: 1 }) + changes[1].op.should.deep.equal({ i: '456', p: 5 }) + return done() + } + ) + }) }) }) @@ -356,22 +352,22 @@ describe('Ranges', function () { this.id_seed = '587357bd35e64f6157' this.doc = { id: DocUpdaterClient.randomId(), - lines: ['aaa'] + lines: ['aaa'], } this.update = { doc: this.doc.id, op: [{ i: '456', p: 1 }], v: 0, - meta: { user_id: this.user_id, tc: this.id_seed } + meta: { user_id: this.user_id, tc: this.id_seed }, } MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } @@ -379,7 +375,7 @@ describe('Ranges', function () { this.project_id, this.doc.id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -411,7 +407,7 @@ describe('Ranges', function () { this.project_id, this.doc.id, this.id_seed + '000001', - (error) => { + error => { if (error != null) { throw error } @@ -437,21 +433,21 @@ describe('Ranges', function () { this.user_id = DocUpdaterClient.randomId() this.doc = { id: DocUpdaterClient.randomId(), - lines: ['foo bar'] + lines: ['foo bar'], } this.update = { doc: this.doc.id, op: [{ c: 'bar', p: 4, t: (this.tid = DocUpdaterClient.randomId()) }], - v: 0 + v: 0, } MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } @@ -459,7 +455,7 @@ describe('Ranges', function () { this.project_id, this.doc.id, this.update, - (error) => { + error => { if (error != null) { throw error } @@ -518,7 +514,7 @@ describe('Ranges', function () { this.id_seed = DocUpdaterClient.randomId() this.doc = { id: DocUpdaterClient.randomId(), - lines: ['aaa'] + lines: ['aaa'], } this.i = new Array(3 * 1024 * 1024).join('a') this.updates = [ @@ -526,17 +522,17 @@ describe('Ranges', function () { doc: this.doc.id, op: [{ i: this.i, p: 1 }], v: 0, - meta: { user_id: this.user_id, tc: this.id_seed } - } + meta: { user_id: this.user_id, tc: this.id_seed }, + }, ] MockWebApi.insertDoc(this.project_id, this.doc.id, { lines: this.doc.lines, - version: 0 + version: 0, }) const jobs = [] for (const update of Array.from(this.updates)) { - ;((update) => { - return jobs.push((callback) => + ;(update => { + return jobs.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc.id, @@ -549,11 +545,11 @@ describe('Ranges', function () { return DocUpdaterClient.preloadDoc( this.project_id, this.doc.id, - (error) => { + error => { if (error != null) { throw error } - return async.series(jobs, (error) => { + return async.series(jobs, error => { if (error != null) { throw error } @@ -593,34 +589,34 @@ describe('Ranges', function () { op: { c: 'a', p: 5, - tid: (this.tid = DocUpdaterClient.randomId()) + tid: (this.tid = DocUpdaterClient.randomId()), }, metadata: { user_id: this.user_id, - ts: new Date() - } - } - ] - } + ts: new Date(), + }, + }, + ], + }, }) this.updates = [ { doc: this.doc_id, op: [{ d: 'foo ', p: 0 }], v: 0, - meta: { user_id: this.user_id } + meta: { user_id: this.user_id }, }, { doc: this.doc_id, op: [{ d: 'bar ', p: 0 }], v: 1, - meta: { user_id: this.user_id } - } + meta: { user_id: this.user_id }, + }, ] const jobs = [] for (const update of Array.from(this.updates)) { - ;((update) => { - return jobs.push((callback) => + ;(update => { + return jobs.push(callback => DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, @@ -633,7 +629,7 @@ describe('Ranges', function () { return DocUpdaterClient.preloadDoc( this.project_id, this.doc_id, - (error) => { + error => { if (error != null) { throw error } @@ -669,7 +665,7 @@ describe('Ranges', function () { db.docSnapshots .find({ project_id: ObjectId(this.project_id), - doc_id: ObjectId(this.doc_id) + doc_id: ObjectId(this.doc_id), }) .toArray((error, docSnapshots) => { if (error != null) { @@ -681,7 +677,7 @@ describe('Ranges', function () { expect(docSnapshots[0].ranges.comments[0].op).to.deep.equal({ c: 'a', p: 1, - tid: this.tid + tid: this.tid, }) return done() }) diff --git a/services/document-updater/test/acceptance/js/SettingADocumentTests.js b/services/document-updater/test/acceptance/js/SettingADocumentTests.js index 60d46dcdec..05955df5b0 100644 --- a/services/document-updater/test/acceptance/js/SettingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/SettingADocumentTests.js @@ -21,10 +21,10 @@ describe('Setting a document', function () { op: [ { i: 'one and a half\n', - p: 4 - } + p: 4, + }, ], - v: this.version + v: this.version, } this.result = ['one', 'one and a half', 'two', 'three'] this.newLines = ['these', 'are', 'the', 'new', 'lines'] @@ -49,9 +49,9 @@ describe('Setting a document', function () { this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) - DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, (error) => { + DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, error => { if (error) { throw error } @@ -59,7 +59,7 @@ describe('Setting a document', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error) { throw error } @@ -149,7 +149,7 @@ describe('Setting a document', function () { this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) DocUpdaterClient.setDocLines( this.project_id, @@ -212,23 +212,23 @@ describe('Setting a document', function () { { desc: 'when the updated doc is too large for the body parser', size: Settings.maxJsonRequestSize, - expectedStatusCode: 413 + expectedStatusCode: 413, }, { desc: 'when the updated doc is larger than the HTTP controller limit', size: Settings.max_doc_length, - expectedStatusCode: 406 - } + expectedStatusCode: 406, + }, ] - DOC_TOO_LARGE_TEST_CASES.forEach((testCase) => { + DOC_TOO_LARGE_TEST_CASES.forEach(testCase => { describe(testCase.desc, function () { before(function (done) { this.project_id = DocUpdaterClient.randomId() this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) this.newLines = [] while (JSON.stringify(this.newLines).length <= testCase.size) { @@ -281,7 +281,7 @@ describe('Setting a document', function () { this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) this.newLines = [] @@ -333,14 +333,14 @@ describe('Setting a document', function () { op: [ { d: 'one and a half\n', - p: 4 - } + p: 4, + }, ], meta: { tc: this.id_seed, - user_id: this.user_id + user_id: this.user_id, }, - v: this.version + v: this.version, } }) @@ -350,9 +350,9 @@ describe('Setting a document', function () { this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) - DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, (error) => { + DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, error => { if (error) { throw error } @@ -360,7 +360,7 @@ describe('Setting a document', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error) { throw error } @@ -413,9 +413,9 @@ describe('Setting a document', function () { this.doc_id = DocUpdaterClient.randomId() MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - version: this.version + version: this.version, }) - DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, (error) => { + DocUpdaterClient.preloadDoc(this.project_id, this.doc_id, error => { if (error) { throw error } @@ -423,7 +423,7 @@ describe('Setting a document', function () { this.project_id, this.doc_id, this.update, - (error) => { + error => { if (error) { throw error } diff --git a/services/document-updater/test/acceptance/js/SizeCheckTests.js b/services/document-updater/test/acceptance/js/SizeCheckTests.js index ed893884be..6267df3b1a 100644 --- a/services/document-updater/test/acceptance/js/SizeCheckTests.js +++ b/services/document-updater/test/acceptance/js/SizeCheckTests.js @@ -16,10 +16,10 @@ describe('SizeChecks', function () { op: [ { i: 'insert some more lines that will bring it above the limit\n', - p: 42 - } + p: 42, + }, ], - v: this.version + v: this.version, } this.project_id = DocUpdaterClient.randomId() this.doc_id = DocUpdaterClient.randomId() @@ -30,7 +30,7 @@ describe('SizeChecks', function () { this.lines = ['0123456789'.repeat(Settings.max_doc_length / 10 + 1)] MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - v: this.version + v: this.version, }) }) @@ -47,13 +47,13 @@ describe('SizeChecks', function () { const update = { doc: this.doc_id, op: this.update.op, - v: this.version + v: this.version, } DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, update, - (error) => { + error => { if (error != null) { throw error } @@ -77,7 +77,7 @@ describe('SizeChecks', function () { this.lines = ['0123456789'.repeat(Settings.max_doc_length / 10 - 1)] MockWebApi.insertDoc(this.project_id, this.doc_id, { lines: this.lines, - v: this.version + v: this.version, }) }) @@ -98,13 +98,13 @@ describe('SizeChecks', function () { const update = { doc: this.doc_id, op: this.update.op, - v: this.version + v: this.version, } DocUpdaterClient.sendUpdate( this.project_id, this.doc_id, update, - (error) => { + error => { if (error != null) { throw error } diff --git a/services/document-updater/test/acceptance/js/helpers/DocUpdaterApp.js b/services/document-updater/test/acceptance/js/helpers/DocUpdaterApp.js index 8d53e69118..270f4ca0c6 100644 --- a/services/document-updater/test/acceptance/js/helpers/DocUpdaterApp.js +++ b/services/document-updater/test/acceptance/js/helpers/DocUpdaterApp.js @@ -31,7 +31,7 @@ module.exports = { this.initing = true this.callbacks.push(callback) waitForDb().then(() => { - return app.listen(3003, 'localhost', (error) => { + return app.listen(3003, 'localhost', error => { if (error != null) { throw error } @@ -45,5 +45,5 @@ module.exports = { })() }) }) - } + }, } diff --git a/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js b/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js index ee356d3bf7..71e7915c0f 100644 --- a/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js +++ b/services/document-updater/test/acceptance/js/helpers/DocUpdaterClient.js @@ -40,12 +40,12 @@ module.exports = DocUpdaterClient = { rclient.rpush( keys.pendingUpdates({ doc_id: docId }), JSON.stringify(update), - (error) => { + error => { if (error) { return callback(error) } const docKey = `${projectId}:${docId}` - rclient.sadd('DocsWithPendingUpdates', docKey, (error) => { + rclient.sadd('DocsWithPendingUpdates', docKey, error => { if (error) { return callback(error) } @@ -61,14 +61,14 @@ module.exports = DocUpdaterClient = { }, sendUpdates(projectId, docId, updates, callback) { - DocUpdaterClient.preloadDoc(projectId, docId, (error) => { + DocUpdaterClient.preloadDoc(projectId, docId, error => { if (error) { return callback(error) } - const jobs = updates.map((update) => (callback) => { + const jobs = updates.map(update => callback => { DocUpdaterClient.sendUpdate(projectId, docId, update, callback) }) - async.series(jobs, (err) => { + async.series(jobs, err => { if (err) { return callback(err) } @@ -80,7 +80,7 @@ module.exports = DocUpdaterClient = { waitForPendingUpdates(projectId, docId, callback) { async.retry( { times: 30, interval: 100 }, - (cb) => + cb => rclient.llen(keys.pendingUpdates({ doc_id: docId }), (err, length) => { if (err) { return cb(err) @@ -138,8 +138,8 @@ module.exports = DocUpdaterClient = { lines, source, user_id: userId, - undoing - } + undoing, + }, }, (error, res, body) => callback(error, res, body) ) @@ -204,9 +204,9 @@ module.exports = DocUpdaterClient = { request.post( { url: `http://localhost:3003/project/${projectId}`, - json: { userId, updates, version } + json: { userId, updates, version }, }, (error, res, body) => callback(error, res, body) ) - } + }, } diff --git a/services/document-updater/test/acceptance/js/helpers/MockProjectHistoryApi.js b/services/document-updater/test/acceptance/js/helpers/MockProjectHistoryApi.js index 6d72c77baf..513475da3d 100644 --- a/services/document-updater/test/acceptance/js/helpers/MockProjectHistoryApi.js +++ b/services/document-updater/test/acceptance/js/helpers/MockProjectHistoryApi.js @@ -24,7 +24,7 @@ module.exports = MockProjectHistoryApi = { run() { app.post('/project/:project_id/flush', (req, res, next) => { - return this.flushProject(req.params.project_id, (error) => { + return this.flushProject(req.params.project_id, error => { if (error != null) { return res.sendStatus(500) } else { @@ -33,12 +33,12 @@ module.exports = MockProjectHistoryApi = { }) }) - return app.listen(3054, (error) => { + return app.listen(3054, error => { if (error != null) { throw error } }) - } + }, } MockProjectHistoryApi.run() diff --git a/services/document-updater/test/acceptance/js/helpers/MockTrackChangesApi.js b/services/document-updater/test/acceptance/js/helpers/MockTrackChangesApi.js index 319a02b7ca..eb66b2b3b5 100644 --- a/services/document-updater/test/acceptance/js/helpers/MockTrackChangesApi.js +++ b/services/document-updater/test/acceptance/js/helpers/MockTrackChangesApi.js @@ -24,7 +24,7 @@ module.exports = MockTrackChangesApi = { run() { app.post('/project/:project_id/doc/:doc_id/flush', (req, res, next) => { - return this.flushDoc(req.params.doc_id, (error) => { + return this.flushDoc(req.params.doc_id, error => { if (error != null) { return res.sendStatus(500) } else { @@ -34,16 +34,16 @@ module.exports = MockTrackChangesApi = { }) return app - .listen(3015, (error) => { + .listen(3015, error => { if (error != null) { throw error } }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockTrackChangesApi:', error.message) return process.exit(1) }) - } + }, } MockTrackChangesApi.run() diff --git a/services/document-updater/test/acceptance/js/helpers/MockWebApi.js b/services/document-updater/test/acceptance/js/helpers/MockWebApi.js index fc6bd49e27..818895fcba 100644 --- a/services/document-updater/test/acceptance/js/helpers/MockWebApi.js +++ b/services/document-updater/test/acceptance/js/helpers/MockWebApi.js @@ -96,7 +96,7 @@ module.exports = MockWebApi = { req.body.ranges, req.body.lastUpdatedAt, req.body.lastUpdatedBy, - (error) => { + error => { if (error != null) { return res.sendStatus(500) } else { @@ -108,16 +108,16 @@ module.exports = MockWebApi = { ) return app - .listen(3000, (error) => { + .listen(3000, error => { if (error != null) { throw error } }) - .on('error', (error) => { + .on('error', error => { console.error('error starting MockWebApi:', error.message) return process.exit(1) }) - } + }, } MockWebApi.run() diff --git a/services/document-updater/test/cluster_failover/js/test_blpop_failover.js b/services/document-updater/test/cluster_failover/js/test_blpop_failover.js index e3f52f6339..b6a83e3b34 100644 --- a/services/document-updater/test/cluster_failover/js/test_blpop_failover.js +++ b/services/document-updater/test/cluster_failover/js/test_blpop_failover.js @@ -4,18 +4,18 @@ const rclient1 = redis.createClient({ cluster: [ { port: '7000', - host: 'localhost' - } - ] + host: 'localhost', + }, + ], }) const rclient2 = redis.createClient({ cluster: [ { port: '7000', - host: 'localhost' - } - ] + host: 'localhost', + }, + ], }) let counter = 0 @@ -23,7 +23,7 @@ const sendPing = function (cb) { if (cb == null) { cb = function () {} } - return rclient1.rpush('test-blpop', counter, (error) => { + return rclient1.rpush('test-blpop', counter, error => { if (error != null) { console.error('[SENDING ERROR]', error.message) } @@ -35,7 +35,7 @@ const sendPing = function (cb) { } let previous = null -const listenForPing = (cb) => +const listenForPing = cb => rclient2.blpop('test-blpop', 200, (error, result) => { if (error != null) { return cb(error) @@ -57,7 +57,7 @@ const listenForPing = (cb) => const PING_DELAY = 100 ;(sendPings = () => sendPing(() => setTimeout(sendPings, PING_DELAY)))() ;(listenInBackground = () => - listenForPing((error) => { + listenForPing(error => { if (error) { console.error('[RECEIVING ERROR]', error.message) } diff --git a/services/document-updater/test/cluster_failover/js/test_pubsub_failover.js b/services/document-updater/test/cluster_failover/js/test_pubsub_failover.js index 3da52be287..44ad70c6ec 100644 --- a/services/document-updater/test/cluster_failover/js/test_pubsub_failover.js +++ b/services/document-updater/test/cluster_failover/js/test_pubsub_failover.js @@ -4,18 +4,18 @@ const rclient1 = redis.createClient({ cluster: [ { port: '7000', - host: 'localhost' - } - ] + host: 'localhost', + }, + ], }) const rclient2 = redis.createClient({ cluster: [ { port: '7000', - host: 'localhost' - } - ] + host: 'localhost', + }, + ], }) let counter = 0 @@ -23,7 +23,7 @@ const sendPing = function (cb) { if (cb == null) { cb = function () {} } - return rclient1.publish('test-pubsub', counter, (error) => { + return rclient1.publish('test-pubsub', counter, error => { if (error) { console.error('[SENDING ERROR]', error.message) } diff --git a/services/document-updater/test/setup.js b/services/document-updater/test/setup.js index 0fb9848427..0212544400 100644 --- a/services/document-updater/test/setup.js +++ b/services/document-updater/test/setup.js @@ -13,16 +13,16 @@ const stubs = { log: 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, Math, console, process } + globals: { Buffer, JSON, Math, console, process }, }) // Mocha hooks @@ -33,5 +33,5 @@ exports.mochaHooks = { afterEach() { sandbox.reset() - } + }, } diff --git a/services/document-updater/test/stress/js/run.js b/services/document-updater/test/stress/js/run.js index da78735a95..8b0a9f353b 100644 --- a/services/document-updater/test/stress/js/run.js +++ b/services/document-updater/test/stress/js/run.js @@ -31,7 +31,7 @@ const transform = function (op1, op2) { if (op2.p < op1.p) { return { p: op1.p + op2.i.length, - i: op1.i + i: op1.i, } } else { return op1 @@ -61,7 +61,7 @@ class StressTestClient { conflicts: 0, local_updates: 0, remote_updates: 0, - max_delay: 0 + max_delay: 0, } DocUpdaterClient.subscribeToAppliedOps((channel, update) => { @@ -81,7 +81,7 @@ class StressTestClient { this.content = insert(this.content, this.pos, data) this.inflight_op = { i: data, - p: this.pos++ + p: this.pos++, } this.resendUpdate() return (this.inflight_op_sent = Date.now()) @@ -94,9 +94,9 @@ class StressTestClient { op: [this.inflight_op], v: this.version, meta: { - source: this.client_id + source: this.client_id, }, - dupIfSource: [this.client_id] + dupIfSource: [this.client_id], }) return (this.update_timer = setTimeout(() => { console.log( @@ -277,7 +277,7 @@ const checkDocument = function (project_id, doc_id, clients, callback) { if (callback == null) { callback = function (error) {} } - const jobs = clients.map((client) => (cb) => client.check(cb)) + const jobs = clients.map(client => cb => client.check(cb)) return async.parallel(jobs, callback) } @@ -304,7 +304,7 @@ const printSummary = function (doc_id, clients) { local_updates: 0, remote_updates: 0, conflicts: 0, - max_delay: 0 + max_delay: 0, }) ) } @@ -326,7 +326,7 @@ for (const doc_and_project_id of Array.from(process.argv.slice(5))) { [new Array(CLIENT_COUNT + 2).join('a')], null, null, - (error) => { + error => { if (error != null) { throw error } @@ -360,22 +360,23 @@ for (const doc_and_project_id of Array.from(process.argv.slice(5))) { content, pos, version, - updateDelay: UPDATE_DELAY + updateDelay: UPDATE_DELAY, }) return clients.push(client) })(pos) } return (runBatch = function () { - const jobs = clients.map((client) => (cb) => - client.runForNUpdates(SAMPLE_INTERVAL / UPDATE_DELAY, cb) + const jobs = clients.map( + client => cb => + client.runForNUpdates(SAMPLE_INTERVAL / UPDATE_DELAY, cb) ) - return async.parallel(jobs, (error) => { + return async.parallel(jobs, error => { if (error != null) { throw error } printSummary(doc_id, clients) - return checkDocument(project_id, doc_id, clients, (error) => { + return checkDocument(project_id, doc_id, clients, error => { if (error != null) { throw error } diff --git a/services/document-updater/test/unit/js/DiffCodec/DiffCodecTests.js b/services/document-updater/test/unit/js/DiffCodec/DiffCodecTests.js index d498d6b45c..4f8b188c15 100644 --- a/services/document-updater/test/unit/js/DiffCodec/DiffCodecTests.js +++ b/services/document-updater/test/unit/js/DiffCodec/DiffCodecTests.js @@ -32,8 +32,8 @@ describe('DiffCodec', function () { expect(ops).to.deep.equal([ { i: 'beautiful ', - p: 6 - } + p: 6, + }, ]) return done() } @@ -49,7 +49,7 @@ describe('DiffCodec', function () { (error, ops) => { expect(ops).to.deep.equal([ { i: 'tall ', p: 4 }, - { i: 'red ', p: 29 } + { i: 'red ', p: 29 }, ]) return done() } @@ -66,8 +66,8 @@ describe('DiffCodec', function () { expect(ops).to.deep.equal([ { d: 'beautiful ', - p: 6 - } + p: 6, + }, ]) return done() } @@ -83,7 +83,7 @@ describe('DiffCodec', function () { (error, ops) => { expect(ops).to.deep.equal([ { d: 'tall ', p: 4 }, - { d: 'red ', p: 24 } + { d: 'red ', p: 24 }, ]) return done() } diff --git a/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js b/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js index d4cb72b89d..4e17d58fff 100644 --- a/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js +++ b/services/document-updater/test/unit/js/DispatchManager/DispatchManagerTests.js @@ -25,8 +25,8 @@ describe('DispatchManager', function () { './UpdateManager': (this.UpdateManager = {}), '@overleaf/settings': (this.settings = { redis: { - documentupdater: {} - } + documentupdater: {}, + }, }), '@overleaf/redis-wrapper': (this.redis = {}), './RateLimitManager': {}, @@ -40,15 +40,15 @@ describe('DispatchManager', function () { } Timer.initClass() return Timer - })()) - }) - } + })()), + }), + }, }) this.callback = sinon.stub() return (this.RateLimiter = { run(task, cb) { return task(cb) - } + }, }) }) // run task without rate limit @@ -144,7 +144,7 @@ describe('DispatchManager', function () { beforeEach(function (done) { this.client = { auth: sinon.stub(), - blpop: sinon.stub().callsArgWith(2) + blpop: sinon.stub().callsArgWith(2), } this.redis.createClient = sinon.stub().returns(this.client) this.queueShardNumber = 7 @@ -166,7 +166,7 @@ describe('DispatchManager', function () { return describe('run', function () { return it('should call _waitForUpdateThenDispatchWorker until shutting down', function (done) { let callCount = 0 - this.worker._waitForUpdateThenDispatchWorker = (callback) => { + this.worker._waitForUpdateThenDispatchWorker = callback => { if (callback == null) { callback = function (error) {} } diff --git a/services/document-updater/test/unit/js/DocumentManager/DocumentManagerTests.js b/services/document-updater/test/unit/js/DocumentManager/DocumentManagerTests.js index 8ca42df757..bac5ae6a85 100644 --- a/services/document-updater/test/unit/js/DocumentManager/DocumentManagerTests.js +++ b/services/document-updater/test/unit/js/DocumentManager/DocumentManagerTests.js @@ -29,7 +29,7 @@ describe('DocumentManager', function () { './PersistenceManager': (this.PersistenceManager = {}), './HistoryManager': (this.HistoryManager = { flushDocChangesAsync: sinon.stub(), - flushProjectChangesAsync: sinon.stub() + flushProjectChangesAsync: sinon.stub(), }), './Metrics': (this.Metrics = { Timer: (Timer = (function () { @@ -40,14 +40,14 @@ describe('DocumentManager', function () { } Timer.initClass() return Timer - })()) + })()), }), './RealTimeRedisManager': (this.RealTimeRedisManager = {}), './DiffCodec': (this.DiffCodec = {}), './UpdateManager': (this.UpdateManager = {}), './RangesManager': (this.RangesManager = {}), - './Errors': Errors - } + './Errors': Errors, + }, }) this.project_id = 'project-id-123' this.projectHistoryId = 'history-id-123' @@ -123,7 +123,7 @@ describe('DocumentManager', function () { this.project_id, this.doc_id, {}, - (error) => { + error => { error.should.exist this.RedisManager.removeDocFromMemory.called.should.equal(false) return done() @@ -137,7 +137,7 @@ describe('DocumentManager', function () { this.project_id, this.doc_id, { ignoreFlushErrors: true }, - (error) => { + error => { if (error != null) { return done(error) } @@ -484,7 +484,7 @@ describe('DocumentManager', function () { this.afterLines = ['after', 'lines'] this.ops = [ { i: 'foo', p: 4 }, - { d: 'bar', p: 42 } + { d: 'bar', p: 42 }, ] this.DocumentManager.getDoc = sinon .stub() @@ -543,8 +543,8 @@ describe('DocumentManager', function () { meta: { type: 'external', source: this.source, - user_id: this.user_id - } + user_id: this.user_id, + }, }) .should.equal(true) }) @@ -636,7 +636,7 @@ describe('DocumentManager', function () { // Copy ops so we don't interfere with other tests this.ops = [ { i: 'foo', p: 4 }, - { d: 'bar', p: 42 } + { d: 'bar', p: 42 }, ] this.DiffCodec.diffAsShareJsOp = sinon .stub() @@ -653,7 +653,7 @@ describe('DocumentManager', function () { }) return it('should set the undo flag on each op', function () { - return Array.from(this.ops).map((op) => op.u.should.equal(true)) + return Array.from(this.ops).map(op => op.u.should.equal(true)) }) }) }) @@ -666,7 +666,7 @@ describe('DocumentManager', function () { 'mock-change-id-1', 'mock-change-id-2', 'mock-change-id-3', - 'mock-change-id-4' + 'mock-change-id-4', ] this.version = 34 this.lines = ['original', 'lines'] diff --git a/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js b/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js index 5f1529ab0b..988333c9b8 100644 --- a/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js +++ b/services/document-updater/test/unit/js/HistoryManager/HistoryManagerTests.js @@ -25,19 +25,19 @@ describe('HistoryManager', function () { apis: { project_history: { enabled: true, - url: 'http://project_history.example.com' + url: 'http://project_history.example.com', }, trackchanges: { - url: 'http://trackchanges.example.com' - } - } + url: 'http://trackchanges.example.com', + }, + }, }), './DocumentManager': (this.DocumentManager = {}), './HistoryRedisManager': (this.HistoryRedisManager = {}), './RedisManager': (this.RedisManager = {}), './ProjectHistoryRedisManager': (this.ProjectHistoryRedisManager = {}), - './Metrics': (this.metrics = { inc: sinon.stub() }) - } + './Metrics': (this.metrics = { inc: sinon.stub() }), + }, }) this.project_id = 'mock-project-id' this.doc_id = 'mock-doc-id' @@ -118,7 +118,7 @@ describe('HistoryManager', function () { return this.request.post .calledWith({ url: `${this.Settings.apis.project_history.url}/project/${this.project_id}/flush`, - qs: { background: true } + qs: { background: true }, }) .should.equal(true) }) @@ -131,7 +131,7 @@ describe('HistoryManager', function () { .stub() .callsArgWith(1, null, { statusCode: 204 }) return this.HistoryManager.flushProjectChanges(this.project_id, { - background: true + background: true, }) }) @@ -139,7 +139,7 @@ describe('HistoryManager', function () { return this.request.post .calledWith({ url: `${this.Settings.apis.project_history.url}/project/${this.project_id}/flush`, - qs: { background: true } + qs: { background: true }, }) .should.equal(true) }) @@ -149,7 +149,7 @@ describe('HistoryManager', function () { beforeEach(function () { this.request.post = sinon.stub() return this.HistoryManager.flushProjectChanges(this.project_id, { - skip_history_flush: true + skip_history_flush: true, }) }) @@ -372,15 +372,15 @@ describe('HistoryManager', function () { this.docs = [ { doc: this.doc_id, - path: 'main.tex' - } + path: 'main.tex', + }, ] this.files = [ { file: 'mock-file-id', path: 'universe.png', - url: `www.filestore.test/${this.project_id}/mock-file-id` - } + url: `www.filestore.test/${this.project_id}/mock-file-id`, + }, ] this.ProjectHistoryRedisManager.queueResyncProjectStructure = sinon .stub() diff --git a/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js b/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js index 626398fc6b..942884ec58 100644 --- a/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js +++ b/services/document-updater/test/unit/js/HistoryRedisManager/HistoryRedisManagerTests.js @@ -20,7 +20,7 @@ describe('HistoryRedisManager', function () { beforeEach(function () { this.rclient = { auth() {}, - exec: sinon.stub() + exec: sinon.stub(), } this.rclient.multi = () => this.rclient this.HistoryRedisManager = SandboxedModule.require(modulePath, { @@ -35,12 +35,12 @@ describe('HistoryRedisManager', function () { }, docsWithHistoryOps({ project_id }) { return `DocsWithHistoryOps:${project_id}` - } - } - }) - } - } - } + }, + }, + }), + }, + }, + }, }) this.doc_id = 'doc-id-123' this.project_id = 'project-id-123' diff --git a/services/document-updater/test/unit/js/HttpController/HttpControllerTests.js b/services/document-updater/test/unit/js/HttpController/HttpControllerTests.js index 64477eb944..3a926d5e0c 100644 --- a/services/document-updater/test/unit/js/HttpController/HttpControllerTests.js +++ b/services/document-updater/test/unit/js/HttpController/HttpControllerTests.js @@ -9,14 +9,14 @@ describe('HttpController', function () { requires: { './DocumentManager': (this.DocumentManager = {}), './HistoryManager': (this.HistoryManager = { - flushProjectChangesAsync: sinon.stub() + flushProjectChangesAsync: sinon.stub(), }), './ProjectManager': (this.ProjectManager = {}), './ProjectFlusher': { flushAllProjects() {} }, './DeleteQueueManager': (this.DeleteQueueManager = {}), './Metrics': (this.Metrics = {}), - './Errors': Errors - } + './Errors': Errors, + }, }) this.Metrics.Timer = class Timer {} this.Metrics.Timer.prototype.done = sinon.stub() @@ -27,7 +27,7 @@ describe('HttpController', function () { this.res = { send: sinon.stub(), sendStatus: sinon.stub(), - json: sinon.stub() + json: sinon.stub(), } }) @@ -42,10 +42,10 @@ describe('HttpController', function () { this.req = { params: { project_id: this.project_id, - doc_id: this.doc_id + doc_id: this.doc_id, }, query: {}, - body: {} + body: {}, } }) @@ -79,7 +79,7 @@ describe('HttpController', function () { version: this.version, ops: [], ranges: this.ranges, - pathname: this.pathname + pathname: this.pathname, }) .should.equal(true) }) @@ -129,7 +129,7 @@ describe('HttpController', function () { version: this.version, ops: this.ops, ranges: this.ranges, - pathname: this.pathname + pathname: this.pathname, }) .should.equal(true) }) @@ -186,15 +186,15 @@ describe('HttpController', function () { headers: {}, params: { project_id: this.project_id, - doc_id: this.doc_id + doc_id: this.doc_id, }, query: {}, body: { lines: this.lines, source: this.source, user_id: this.user_id, - undoing: (this.undoing = true) - } + undoing: (this.undoing = true), + }, } }) @@ -230,7 +230,7 @@ describe('HttpController', function () { lines: this.lines, source: this.source, userId: this.user_id, - undoing: this.undoing + undoing: this.undoing, }, 'setting doc via http' ) @@ -280,10 +280,10 @@ describe('HttpController', function () { beforeEach(function () { this.req = { params: { - project_id: this.project_id + project_id: this.project_id, }, query: {}, - body: {} + body: {}, } }) @@ -338,10 +338,10 @@ describe('HttpController', function () { this.req = { params: { project_id: this.project_id, - doc_id: this.doc_id + doc_id: this.doc_id, }, query: {}, - body: {} + body: {}, } }) @@ -396,10 +396,10 @@ describe('HttpController', function () { this.req = { params: { project_id: this.project_id, - doc_id: this.doc_id + doc_id: this.doc_id, }, query: {}, - body: {} + body: {}, } }) @@ -414,7 +414,7 @@ describe('HttpController', function () { it('should flush and delete the doc', function () { this.DocumentManager.flushAndDeleteDocWithLock .calledWith(this.project_id, this.doc_id, { - ignoreFlushErrors: false + ignoreFlushErrors: false, }) .should.equal(true) }) @@ -485,10 +485,10 @@ describe('HttpController', function () { beforeEach(function () { this.req = { params: { - project_id: this.project_id + project_id: this.project_id, }, query: {}, - body: {} + body: {}, } }) @@ -560,10 +560,10 @@ describe('HttpController', function () { params: { project_id: this.project_id, doc_id: this.doc_id, - change_id: (this.change_id = 'mock-change-od-1') + change_id: (this.change_id = 'mock-change-od-1'), }, query: {}, - body: {} + body: {}, } }) @@ -605,7 +605,7 @@ describe('HttpController', function () { 'mock-change-od-1', 'mock-change-od-2', 'mock-change-od-3', - 'mock-change-od-4' + 'mock-change-od-4', ] this.req.body = { change_ids: this.change_ids } this.DocumentManager.acceptChangesWithLock = sinon @@ -650,10 +650,10 @@ describe('HttpController', function () { params: { project_id: this.project_id, doc_id: this.doc_id, - comment_id: (this.comment_id = 'mock-comment-id') + comment_id: (this.comment_id = 'mock-comment-id'), }, query: {}, - body: {} + body: {}, } }) @@ -681,7 +681,7 @@ describe('HttpController', function () { { projectId: this.project_id, docId: this.doc_id, - commentId: this.comment_id + commentId: this.comment_id, }, 'deleting comment via http' ) @@ -712,16 +712,16 @@ describe('HttpController', function () { this.state = '01234567890abcdef' this.docs = [ { _id: '1234', lines: 'hello', v: 23 }, - { _id: '4567', lines: 'world', v: 45 } + { _id: '4567', lines: 'world', v: 45 }, ] this.req = { params: { - project_id: this.project_id + project_id: this.project_id, }, query: { - state: this.state + state: this.state, }, - body: {} + body: {}, } }) @@ -817,16 +817,16 @@ describe('HttpController', function () { type: 'rename-doc', id: 1, pathname: 'thesis.tex', - newPathname: 'book.tex' + newPathname: 'book.tex', }, { type: 'add-doc', id: 2, pathname: 'article.tex', docLines: 'hello' }, { type: 'rename-file', id: 3, pathname: 'apple.png', - newPathname: 'banana.png' + newPathname: 'banana.png', }, - { type: 'add-file', id: 4, url: 'filestore.example.com/4' } + { type: 'add-file', id: 4, url: 'filestore.example.com/4' }, ] this.version = 1234567 this.req = { @@ -835,11 +835,11 @@ describe('HttpController', function () { projectHistoryId: this.projectHistoryId, userId: this.userId, updates: this.updates, - version: this.version + version: this.version, }, params: { - project_id: this.project_id - } + project_id: this.project_id, + }, } }) @@ -895,11 +895,11 @@ describe('HttpController', function () { body: { projectHistoryId: this.projectHistoryId, docs: this.docs, - files: this.files + files: this.files, }, params: { - project_id: this.project_id - } + project_id: this.project_id, + }, } }) diff --git a/services/document-updater/test/unit/js/LockManager/CheckingTheLock.js b/services/document-updater/test/unit/js/LockManager/CheckingTheLock.js index 4f700cc144..034974f805 100644 --- a/services/document-updater/test/unit/js/LockManager/CheckingTheLock.js +++ b/services/document-updater/test/unit/js/LockManager/CheckingTheLock.js @@ -29,9 +29,9 @@ describe('LockManager - checking the lock', function () { createClient() { return { auth() {}, - exists: existsStub + exists: existsStub, } - } + }, }, './Metrics': { inc() {} }, './Profiler': (Profiler = (function () { @@ -43,7 +43,7 @@ describe('LockManager - checking the lock', function () { } Profiler.initClass() return Profiler - })()) + })()), } const LockManager = SandboxedModule.require(modulePath, { requires: mocks }) diff --git a/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js b/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js index 177869d0db..47ad907a6b 100644 --- a/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js +++ b/services/document-updater/test/unit/js/LockManager/ReleasingTheLock.js @@ -24,11 +24,11 @@ describe('LockManager - releasing the lock', function () { let Profiler this.client = { auth() {}, - eval: sinon.stub() + eval: sinon.stub(), } const mocks = { '@overleaf/redis-wrapper': { - createClient: () => this.client + createClient: () => this.client, }, '@overleaf/settings': { redis: { @@ -36,10 +36,10 @@ describe('LockManager - releasing the lock', function () { key_schema: { blockingKey({ doc_id }) { return `Blocking:${doc_id}` - } - } - } - } + }, + }, + }, + }, }, './Metrics': { inc() {} }, './Profiler': (Profiler = (function () { @@ -51,7 +51,7 @@ describe('LockManager - releasing the lock', function () { } Profiler.initClass() return Profiler - })()) + })()), } this.LockManager = SandboxedModule.require(modulePath, { requires: mocks }) this.lockValue = 'lock-value-stub' diff --git a/services/document-updater/test/unit/js/LockManager/getLockTests.js b/services/document-updater/test/unit/js/LockManager/getLockTests.js index 0b938c3753..d1ba5cf728 100644 --- a/services/document-updater/test/unit/js/LockManager/getLockTests.js +++ b/services/document-updater/test/unit/js/LockManager/getLockTests.js @@ -26,7 +26,7 @@ describe('LockManager - getting the lock', function () { '@overleaf/redis-wrapper': { createClient: () => { return { auth() {} } - } + }, }, './Metrics': { inc() {} }, './Profiler': (Profiler = (function () { @@ -38,8 +38,8 @@ describe('LockManager - getting the lock', function () { } Profiler.initClass() return Profiler - })()) - } + })()), + }, }) this.callback = sinon.stub() return (this.doc_id = 'doc-id-123') diff --git a/services/document-updater/test/unit/js/LockManager/tryLockTests.js b/services/document-updater/test/unit/js/LockManager/tryLockTests.js index ef92b50214..210307d51b 100644 --- a/services/document-updater/test/unit/js/LockManager/tryLockTests.js +++ b/services/document-updater/test/unit/js/LockManager/tryLockTests.js @@ -24,9 +24,9 @@ describe('LockManager - trying the lock', function () { createClient: () => { return { auth() {}, - set: (this.set = sinon.stub()) + set: (this.set = sinon.stub()), } - } + }, }, './Metrics': { inc() {} }, '@overleaf/settings': { @@ -35,22 +35,26 @@ describe('LockManager - trying the lock', function () { key_schema: { blockingKey({ doc_id }) { return `Blocking:${doc_id}` + }, + }, + }, + }, + }, + './Profiler': + (this.Profiler = Profiler = + (function () { + Profiler = class Profiler { + static initClass() { + this.prototype.log = sinon + .stub() + .returns({ end: sinon.stub() }) + this.prototype.end = sinon.stub() } } - } - } - }, - './Profiler': (this.Profiler = Profiler = (function () { - Profiler = class Profiler { - static initClass() { - this.prototype.log = sinon.stub().returns({ end: sinon.stub() }) - this.prototype.end = sinon.stub() - } - } - Profiler.initClass() - return Profiler - })()) - } + Profiler.initClass() + return Profiler + })()), + }, }) this.callback = sinon.stub() diff --git a/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js b/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js index a9137175b6..cc669481f7 100644 --- a/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js +++ b/services/document-updater/test/unit/js/PersistenceManager/PersistenceManagerTests.js @@ -34,10 +34,10 @@ describe('PersistenceManager', function () { Timer.initClass() return Timer })()), - inc: sinon.stub() + inc: sinon.stub(), }), - './Errors': Errors - } + './Errors': Errors, + }, }) this.project_id = 'project-id-123' this.projectHistoryId = 'history-id-123' @@ -53,8 +53,8 @@ describe('PersistenceManager', function () { web: { url: (this.url = 'www.example.com'), user: (this.user = 'sharelatex'), - pass: (this.pass = 'password') - } + pass: (this.pass = 'password'), + }, }) }) @@ -65,7 +65,7 @@ describe('PersistenceManager', function () { version: this.version, ranges: this.ranges, pathname: this.pathname, - projectHistoryId: this.projectHistoryId + projectHistoryId: this.projectHistoryId, }) }) @@ -90,15 +90,15 @@ describe('PersistenceManager', function () { url: `${this.url}/project/${this.project_id}/doc/${this.doc_id}`, method: 'GET', headers: { - accept: 'application/json' + accept: 'application/json', }, auth: { user: this.user, pass: this.pass, - sendImmediately: true + sendImmediately: true, }, jar: false, - timeout: 5000 + timeout: 5000, }) .should.equal(true) }) @@ -309,16 +309,16 @@ describe('PersistenceManager', function () { version: this.version, ranges: this.ranges, lastUpdatedAt: this.lastUpdatedAt, - lastUpdatedBy: this.lastUpdatedBy + lastUpdatedBy: this.lastUpdatedBy, }, method: 'POST', auth: { user: this.user, pass: this.pass, - sendImmediately: true + sendImmediately: true, }, jar: false, - timeout: 5000 + timeout: 5000, }) .should.equal(true) }) diff --git a/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js b/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js index 8e20214e88..941d6b2008 100644 --- a/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js +++ b/services/document-updater/test/unit/js/ProjectHistoryRedisManager/ProjectHistoryRedisManagerTests.js @@ -37,16 +37,16 @@ describe('ProjectHistoryRedisManager', function () { }, projectHistoryFirstOpTimestamp({ project_id }) { return `ProjectHistory:FirstOpTimestamp:${project_id}` - } - } - } - } + }, + }, + }, + }, }), '@overleaf/redis-wrapper': { - createClient: () => this.rclient + createClient: () => this.rclient, }, - './Metrics': (this.metrics = { summary: sinon.stub() }) - } + './Metrics': (this.metrics = { summary: sinon.stub() }), + }, } )) }) @@ -97,7 +97,7 @@ describe('ProjectHistoryRedisManager', function () { this.rawUpdate = { pathname: (this.pathname = '/old'), newPathname: (this.newPathname = '/new'), - version: (this.version = 2) + version: (this.version = 2), } this.ProjectHistoryRedisManager.queueOps = sinon.stub() @@ -118,11 +118,11 @@ describe('ProjectHistoryRedisManager', function () { new_pathname: this.newPathname, meta: { user_id: this.user_id, - ts: new Date() + ts: new Date(), }, version: this.version, projectHistoryId: this.projectHistoryId, - file: this.file_id + file: this.file_id, } return this.ProjectHistoryRedisManager.queueOps @@ -144,7 +144,7 @@ describe('ProjectHistoryRedisManager', function () { pathname: (this.pathname = '/old'), docLines: (this.docLines = 'a\nb'), version: (this.version = 2), - url: (this.url = 'filestore.example.com') + url: (this.url = 'filestore.example.com'), } this.ProjectHistoryRedisManager.queueOps = sinon.stub() @@ -166,11 +166,11 @@ describe('ProjectHistoryRedisManager', function () { url: this.url, meta: { user_id: this.user_id, - ts: new Date() + ts: new Date(), }, version: this.version, projectHistoryId: this.projectHistoryId, - doc: this.doc_id + doc: this.doc_id, } return this.ProjectHistoryRedisManager.queueOps diff --git a/services/document-updater/test/unit/js/ProjectManager/flushAndDeleteProjectTests.js b/services/document-updater/test/unit/js/ProjectManager/flushAndDeleteProjectTests.js index d8342c0cff..da4013a534 100644 --- a/services/document-updater/test/unit/js/ProjectManager/flushAndDeleteProjectTests.js +++ b/services/document-updater/test/unit/js/ProjectManager/flushAndDeleteProjectTests.js @@ -25,7 +25,7 @@ describe('ProjectManager - flushAndDeleteProject', function () { './ProjectHistoryRedisManager': (this.ProjectHistoryRedisManager = {}), './DocumentManager': (this.DocumentManager = {}), './HistoryManager': (this.HistoryManager = { - flushProjectChanges: sinon.stub().callsArg(2) + flushProjectChanges: sinon.stub().callsArg(2), }), './Metrics': (this.Metrics = { Timer: (Timer = (function () { @@ -36,9 +36,9 @@ describe('ProjectManager - flushAndDeleteProject', function () { } Timer.initClass() return Timer - })()) - }) - } + })()), + }), + }, }) this.project_id = 'project-id-123' return (this.callback = sinon.stub()) @@ -54,7 +54,7 @@ describe('ProjectManager - flushAndDeleteProject', function () { return this.ProjectManager.flushAndDeleteProjectWithLocks( this.project_id, {}, - (error) => { + error => { this.callback(error) return done() } @@ -68,7 +68,7 @@ describe('ProjectManager - flushAndDeleteProject', function () { }) it('should delete each doc in the project', function () { - return Array.from(this.doc_ids).map((doc_id) => + return Array.from(this.doc_ids).map(doc_id => this.DocumentManager.flushAndDeleteDocWithLock .calledWith(this.project_id, doc_id, {}) .should.equal(true) @@ -110,7 +110,7 @@ describe('ProjectManager - flushAndDeleteProject', function () { return this.ProjectManager.flushAndDeleteProjectWithLocks( this.project_id, {}, - (error) => { + error => { this.callback(error) return done() } @@ -118,7 +118,7 @@ describe('ProjectManager - flushAndDeleteProject', function () { }) it('should still flush each doc in the project', function () { - return Array.from(this.doc_ids).map((doc_id) => + return Array.from(this.doc_ids).map(doc_id => this.DocumentManager.flushAndDeleteDocWithLock .calledWith(this.project_id, doc_id, {}) .should.equal(true) diff --git a/services/document-updater/test/unit/js/ProjectManager/flushProjectTests.js b/services/document-updater/test/unit/js/ProjectManager/flushProjectTests.js index 70ae03e861..d607840494 100644 --- a/services/document-updater/test/unit/js/ProjectManager/flushProjectTests.js +++ b/services/document-updater/test/unit/js/ProjectManager/flushProjectTests.js @@ -36,9 +36,9 @@ describe('ProjectManager - flushProject', function () { } Timer.initClass() return Timer - })()) - }) - } + })()), + }), + }, }) this.project_id = 'project-id-123' return (this.callback = sinon.stub()) @@ -53,7 +53,7 @@ describe('ProjectManager - flushProject', function () { this.DocumentManager.flushDocIfLoadedWithLock = sinon.stub().callsArg(2) return this.ProjectManager.flushProjectWithLocks( this.project_id, - (error) => { + error => { this.callback(error) return done() } @@ -67,7 +67,7 @@ describe('ProjectManager - flushProject', function () { }) it('should flush each doc in the project', function () { - return Array.from(this.doc_ids).map((doc_id) => + return Array.from(this.doc_ids).map(doc_id => this.DocumentManager.flushDocIfLoadedWithLock .calledWith(this.project_id, doc_id) .should.equal(true) @@ -105,7 +105,7 @@ describe('ProjectManager - flushProject', function () { ) return this.ProjectManager.flushProjectWithLocks( this.project_id, - (error) => { + error => { this.callback(error) return done() } @@ -113,7 +113,7 @@ describe('ProjectManager - flushProject', function () { }) it('should still flush each doc in the project', function () { - return Array.from(this.doc_ids).map((doc_id) => + return Array.from(this.doc_ids).map(doc_id => this.DocumentManager.flushDocIfLoadedWithLock .calledWith(this.project_id, doc_id) .should.equal(true) diff --git a/services/document-updater/test/unit/js/ProjectManager/getProjectDocsTests.js b/services/document-updater/test/unit/js/ProjectManager/getProjectDocsTests.js index 467a190168..7bd2c27aa2 100644 --- a/services/document-updater/test/unit/js/ProjectManager/getProjectDocsTests.js +++ b/services/document-updater/test/unit/js/ProjectManager/getProjectDocsTests.js @@ -33,10 +33,10 @@ describe('ProjectManager - getProjectDocsAndFlushIfOld', function () { } Timer.initClass() return Timer - })()) + })()), }), - './Errors': Errors - } + './Errors': Errors, + }, }) this.project_id = 'project-id-123' this.callback = sinon.stub() @@ -49,24 +49,24 @@ describe('ProjectManager - getProjectDocsAndFlushIfOld', function () { this.doc_lines = [ ['aaa', 'aaa'], ['bbb', 'bbb'], - ['ccc', 'ccc'] + ['ccc', 'ccc'], ] this.docs = [ { _id: this.doc_ids[0], lines: this.doc_lines[0], - v: this.doc_versions[0] + v: this.doc_versions[0], }, { _id: this.doc_ids[1], lines: this.doc_lines[1], - v: this.doc_versions[1] + v: this.doc_versions[1], }, { _id: this.doc_ids[2], lines: this.doc_lines[2], - v: this.doc_versions[2] - } + v: this.doc_versions[2], + }, ] this.RedisManager.checkOrSetProjectState = sinon .stub() @@ -200,7 +200,7 @@ describe('ProjectManager - getProjectDocsAndFlushIfOld', function () { return describe('clearing the project state with clearProjectState', function () { beforeEach(function (done) { this.RedisManager.clearProjectState = sinon.stub().callsArg(1) - return this.ProjectManager.clearProjectState(this.project_id, (error) => { + return this.ProjectManager.clearProjectState(this.project_id, error => { this.callback(error) return done() }) diff --git a/services/document-updater/test/unit/js/ProjectManager/updateProjectTests.js b/services/document-updater/test/unit/js/ProjectManager/updateProjectTests.js index 896517679c..ffc1257fe0 100644 --- a/services/document-updater/test/unit/js/ProjectManager/updateProjectTests.js +++ b/services/document-updater/test/unit/js/ProjectManager/updateProjectTests.js @@ -8,17 +8,17 @@ describe('ProjectManager', function () { this.RedisManager = {} this.ProjectHistoryRedisManager = { queueRenameEntity: sinon.stub().yields(), - queueAddEntity: sinon.stub().yields() + queueAddEntity: sinon.stub().yields(), } this.DocumentManager = { - renameDocWithLock: sinon.stub().yields() + renameDocWithLock: sinon.stub().yields(), } this.HistoryManager = { flushProjectChangesAsync: sinon.stub(), - shouldFlushHistoryOps: sinon.stub().returns(false) + shouldFlushHistoryOps: sinon.stub().returns(false), } this.Metrics = { - Timer: class Timer {} + Timer: class Timer {}, } this.Metrics.Timer.prototype.done = sinon.stub() @@ -28,8 +28,8 @@ describe('ProjectManager', function () { './ProjectHistoryRedisManager': this.ProjectHistoryRedisManager, './DocumentManager': this.DocumentManager, './HistoryManager': this.HistoryManager, - './Metrics': this.Metrics - } + './Metrics': this.Metrics, + }, }) this.project_id = 'project-id-123' @@ -46,24 +46,24 @@ describe('ProjectManager', function () { type: 'rename-doc', id: 1, pathname: 'foo', - newPathname: 'foo' + newPathname: 'foo', } this.secondDocUpdate = { type: 'rename-doc', id: 2, pathname: 'bar', - newPathname: 'bar2' + newPathname: 'bar2', } this.firstFileUpdate = { type: 'rename-file', id: 2, pathname: 'bar', - newPathname: 'bar2' + newPathname: 'bar2', } this.updates = [ this.firstDocUpdate, this.secondDocUpdate, - this.firstFileUpdate + this.firstFileUpdate, ] }) @@ -81,7 +81,7 @@ describe('ProjectManager', function () { it('should rename the docs in the updates', function () { const firstDocUpdateWithVersion = _.extend({}, this.firstDocUpdate, { - version: `${this.version}.0` + version: `${this.version}.0`, }) const secondDocUpdateWithVersion = _.extend( {}, @@ -201,28 +201,28 @@ describe('ProjectManager', function () { this.firstDocUpdate = { type: 'add-doc', id: 1, - docLines: 'a\nb' + docLines: 'a\nb', } this.secondDocUpdate = { type: 'add-doc', id: 2, - docLines: 'a\nb' + docLines: 'a\nb', } this.firstFileUpdate = { type: 'add-file', id: 3, - url: 'filestore.example.com/2' + url: 'filestore.example.com/2', } this.secondFileUpdate = { type: 'add-file', id: 4, - url: 'filestore.example.com/3' + url: 'filestore.example.com/3', } this.updates = [ this.firstDocUpdate, this.secondDocUpdate, this.firstFileUpdate, - this.secondFileUpdate + this.secondFileUpdate, ] }) @@ -240,7 +240,7 @@ describe('ProjectManager', function () { it('should add the docs in the updates', function () { const firstDocUpdateWithVersion = _.extend({}, this.firstDocUpdate, { - version: `${this.version}.0` + version: `${this.version}.0`, }) const secondDocUpdateWithVersion = _.extend( {}, diff --git a/services/document-updater/test/unit/js/RangesManager/RangesManagerTests.js b/services/document-updater/test/unit/js/RangesManager/RangesManagerTests.js index c857153888..6fbad0557a 100644 --- a/services/document-updater/test/unit/js/RangesManager/RangesManagerTests.js +++ b/services/document-updater/test/unit/js/RangesManager/RangesManagerTests.js @@ -32,39 +32,39 @@ describe('RangesManager', function () { this.updates = [ { meta: { - user_id: this.user_id + user_id: this.user_id, }, op: [ { i: 'two ', - p: 4 - } - ] - } + p: 4, + }, + ], + }, ] this.entries = { comments: [ { op: { c: 'three ', - p: 4 + p: 4, }, metadata: { - user_id: this.user_id - } - } + user_id: this.user_id, + }, + }, ], changes: [ { op: { i: 'five', - p: 15 + p: 15, }, metadata: { - user_id: this.user_id - } - } - ] + user_id: this.user_id, + }, + }, + ], } return (this.newDocLines = ['one two three four five']) }) // old is "one three four five" @@ -90,11 +90,11 @@ describe('RangesManager', function () { expect(ranges_were_collapsed).to.equal(false) entries.comments[0].op.should.deep.equal({ c: 'three ', - p: 8 + p: 8, }) return entries.changes[0].op.should.deep.equal({ i: 'five', - p: 19 + p: 19, }) }) }) @@ -149,16 +149,16 @@ describe('RangesManager', function () { this.updates = [ { meta: { - user_id: this.user_id + user_id: this.user_id, }, op: [ { c: 'one', p: 0, - t: 'thread-id-1' - } - ] - } + t: 'thread-id-1', + }, + ], + }, ] this.entries = { comments: [ @@ -166,24 +166,24 @@ describe('RangesManager', function () { op: { c: 'three ', p: 4, - t: 'thread-id-2' + t: 'thread-id-2', }, metadata: { - user_id: this.user_id - } + user_id: this.user_id, + }, }, { op: { c: 'four ', p: 10, - t: 'thread-id-3' + t: 'thread-id-3', }, metadata: { - user_id: this.user_id - } - } + user_id: this.user_id, + }, + }, ], - changes: [] + changes: [], } return this.RangesManager.applyUpdate( this.project_id, @@ -212,38 +212,38 @@ describe('RangesManager', function () { { meta: { user_id: this.user_id, - tc: 'track-changes-id-yes' + tc: 'track-changes-id-yes', }, op: [ { i: 'one ', - p: 0 - } - ] - } + p: 0, + }, + ], + }, ] this.entries = { changes: [ { op: { i: 'three', - p: 4 + p: 4, }, metadata: { - user_id: this.user_id - } + user_id: this.user_id, + }, }, { op: { i: 'four', - p: 10 + p: 10, }, metadata: { - user_id: this.user_id - } - } + user_id: this.user_id, + }, + }, ], - comments: [] + comments: [], } this.newDocLines = ['one two three four'] return this.RangesManager.applyUpdate( @@ -272,15 +272,15 @@ describe('RangesManager', function () { this.updates = [ { meta: { - user_id: this.user_id + user_id: this.user_id, }, op: [ { c: "doesn't match", - p: 0 - } - ] - } + p: 0, + }, + ], + }, ] return this.RangesManager.applyUpdate( this.project_id, @@ -308,16 +308,16 @@ describe('RangesManager', function () { this.updates = [ { meta: { - user_id: this.user_id + user_id: this.user_id, }, op: [ { d: 'one', p: 0, - t: 'thread-id-1' - } - ] - } + t: 'thread-id-1', + }, + ], + }, ] this.entries = { comments: [ @@ -325,14 +325,14 @@ describe('RangesManager', function () { op: { c: 'n', p: 1, - t: 'thread-id-2' + t: 'thread-id-2', }, metadata: { - user_id: this.user_id - } - } + user_id: this.user_id, + }, + }, ], - changes: [] + changes: [], } return this.RangesManager.applyUpdate( this.project_id, @@ -360,8 +360,8 @@ describe('RangesManager', function () { requires: { './RangesTracker': (this.RangesTracker = SandboxedModule.require( '../../../../app/js/RangesTracker.js' - )) - } + )), + }, }) this.ranges = { @@ -371,38 +371,38 @@ describe('RangesManager', function () { id: 'a1', op: { i: 'lorem', - p: 0 - } + p: 0, + }, }, { id: 'a2', op: { i: 'ipsum', - p: 10 - } + p: 10, + }, }, { id: 'a3', op: { i: 'dolor', - p: 20 - } + p: 20, + }, }, { id: 'a4', op: { i: 'sit', - p: 30 - } + p: 30, + }, }, { id: 'a5', op: { i: 'amet', - p: 40 - } - } - ] + p: 40, + }, + }, + ], } return (this.removeChangeIdsSpy = sinon.spy( this.RangesTracker.prototype, @@ -438,7 +438,7 @@ describe('RangesManager', function () { it('should remove the change', function () { return expect( this.rangesResponse.changes.find( - (change) => change.id === this.ranges.changes[1].id + change => change.id === this.ranges.changes[1].id ) ).to.be.undefined }) @@ -450,10 +450,10 @@ describe('RangesManager', function () { }) return it('should not touch other changes', function () { - return [0, 2, 3, 4].map((i) => + return [0, 2, 3, 4].map(i => expect( this.rangesResponse.changes.find( - (change) => change.id === this.ranges.changes[i].id + change => change.id === this.ranges.changes[i].id ) ).to.deep.equal(this.ranges.changes[i]) ) @@ -465,7 +465,7 @@ describe('RangesManager', function () { this.change_ids = [ this.ranges.changes[1].id, this.ranges.changes[3].id, - this.ranges.changes[4].id + this.ranges.changes[4].id, ] return this.RangesManager.acceptChanges( this.change_ids, @@ -491,10 +491,10 @@ describe('RangesManager', function () { it('should remove the changes', function () { return [1, 3, 4].map( - (i) => + i => expect( this.rangesResponse.changes.find( - (change) => change.id === this.ranges.changes[1].id + change => change.id === this.ranges.changes[1].id ) ).to.be.undefined ) @@ -507,10 +507,10 @@ describe('RangesManager', function () { }) return it('should not touch other changes', function () { - return [0, 2].map((i) => + return [0, 2].map(i => expect( this.rangesResponse.changes.find( - (change) => change.id === this.ranges.changes[i].id + change => change.id === this.ranges.changes[i].id ) ).to.deep.equal(this.ranges.changes[i]) ) diff --git a/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js b/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js index 6c488c4c29..09c4ebac52 100644 --- a/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js +++ b/services/document-updater/test/unit/js/RateLimitManager/RateLimitManager.js @@ -31,9 +31,9 @@ describe('RateLimitManager', function () { Timer.initClass() return Timer })()), - gauge: sinon.stub() - }) - } + gauge: sinon.stub(), + }), + }, }) this.callback = sinon.stub() return (this.RateLimiter = new this.RateLimitManager(1)) @@ -63,18 +63,18 @@ describe('RateLimitManager', function () { beforeEach(function (done) { this.task = sinon.stub() this.finalTask = sinon.stub() - const task = (cb) => { + const task = cb => { this.task() return setTimeout(cb, 100) } - const finalTask = (cb) => { + const finalTask = cb => { this.finalTask() return setTimeout(cb, 100) } this.RateLimiter.run(task, this.callback) this.RateLimiter.run(task, this.callback) this.RateLimiter.run(task, this.callback) - return this.RateLimiter.run(finalTask, (err) => { + return this.RateLimiter.run(finalTask, err => { this.callback(err) return done() }) @@ -101,14 +101,14 @@ describe('RateLimitManager', function () { beforeEach(function (done) { this.task = sinon.stub() this.finalTask = sinon.stub() - const finalTask = (cb) => { + const finalTask = cb => { this.finalTask() return setTimeout(cb, 100) } this.RateLimiter.run(this.task, this.callback) this.RateLimiter.run(this.task, this.callback) this.RateLimiter.run(this.task, this.callback) - return this.RateLimiter.run(finalTask, (err) => { + return this.RateLimiter.run(finalTask, err => { this.callback(err) return done() }) diff --git a/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js b/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js index c05ede76df..b0672bc088 100644 --- a/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js +++ b/services/document-updater/test/unit/js/RealTimeRedisManager/RealTimeRedisManagerTests.js @@ -19,15 +19,15 @@ describe('RealTimeRedisManager', function () { beforeEach(function () { this.rclient = { auth() {}, - exec: sinon.stub() + exec: sinon.stub(), } this.rclient.multi = () => this.rclient this.pubsubClient = { publish: sinon.stub() } this.RealTimeRedisManager = SandboxedModule.require(modulePath, { requires: { '@overleaf/redis-wrapper': { - createClient: (config) => - config.name === 'pubsub' ? this.pubsubClient : this.rclient + createClient: config => + config.name === 'pubsub' ? this.pubsubClient : this.rclient, }, '@overleaf/settings': { redis: { @@ -35,23 +35,23 @@ describe('RealTimeRedisManager', function () { key_schema: { pendingUpdates({ doc_id }) { return `PendingUpdates:${doc_id}` - } - } + }, + }, }), pubsub: { - name: 'pubsub' - } - } + name: 'pubsub', + }, + }, }, crypto: (this.crypto = { randomBytes: sinon .stub() .withArgs(4) - .returns(Buffer.from([0x1, 0x2, 0x3, 0x4])) + .returns(Buffer.from([0x1, 0x2, 0x3, 0x4])), }), os: (this.os = { hostname: sinon.stub().returns('somehost') }), - './Metrics': (this.metrics = { summary: sinon.stub() }) - } + './Metrics': (this.metrics = { summary: sinon.stub() }), + }, }) this.doc_id = 'doc-id-123' @@ -69,9 +69,9 @@ describe('RealTimeRedisManager', function () { beforeEach(function () { this.updates = [ { op: [{ i: 'foo', p: 4 }] }, - { op: [{ i: 'foo', p: 4 }] } + { op: [{ i: 'foo', p: 4 }] }, ] - this.jsonUpdates = this.updates.map((update) => JSON.stringify(update)) + this.jsonUpdates = this.updates.map(update => JSON.stringify(update)) this.rclient.exec = sinon .stub() .callsArgWith(0, null, [this.jsonUpdates]) @@ -102,7 +102,7 @@ describe('RealTimeRedisManager', function () { beforeEach(function () { this.jsonUpdates = [ JSON.stringify({ op: [{ i: 'foo', p: 4 }] }), - 'broken json' + 'broken json', ] this.rclient.exec = sinon .stub() diff --git a/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js b/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js index 7679d217a3..67ea6c7972 100644 --- a/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js +++ b/services/document-updater/test/unit/js/RedisManager/RedisManagerTests.js @@ -30,7 +30,7 @@ describe('RedisManager', function () { '@overleaf/settings': (this.settings = { documentupdater: { logHashErrors: { write: true, read: true } }, apis: { - project_history: { enabled: true } + project_history: { enabled: true }, }, redis: { documentupdater: { @@ -82,8 +82,8 @@ describe('RedisManager', function () { }, lastUpdatedAt({ doc_id }) { return `lastUpdatedAt:${doc_id}` - } - } + }, + }, }, history: { key_schema: { @@ -92,13 +92,13 @@ describe('RedisManager', function () { }, docsWithHistoryOps({ project_id }) { return `DocsWithHistoryOps:${project_id}` - } - } - } - } + }, + }, + }, + }, }), '@overleaf/redis-wrapper': { - createClient: () => this.rclient + createClient: () => this.rclient, }, './Metrics': (this.metrics = { inc: sinon.stub(), @@ -112,10 +112,10 @@ describe('RedisManager', function () { const timeSpan = new Date() - this.start return timeSpan } - }) + }), }), - './Errors': Errors - } + './Errors': Errors, + }, }) this.doc_id = 'doc-id-123' @@ -151,7 +151,7 @@ describe('RedisManager', function () { this.json_ranges, this.pathname, this.projectHistoryId.toString(), - this.unflushed_time + this.unflushed_time, ]) }) @@ -212,7 +212,7 @@ describe('RedisManager', function () { this.version, this.badHash, this.project_id, - this.json_ranges + this.json_ranges, ]) return this.RedisManager.getDoc( this.project_id, @@ -244,7 +244,7 @@ describe('RedisManager', function () { this.another_project_id, this.json_ranges, this.pathname, - this.unflushed_time + this.unflushed_time, ]) } @@ -278,7 +278,7 @@ describe('RedisManager', function () { this.another_project_id, this.json_ranges, this.pathname, - this.unflushed_time + this.unflushed_time, ]) return this.RedisManager.getDoc( this.project_id, @@ -304,7 +304,7 @@ describe('RedisManager', function () { this.start = 50 this.end = 60 this.ops = [{ mock: 'op-1' }, { mock: 'op-2' }] - this.jsonOps = this.ops.map((op) => JSON.stringify(op)) + this.jsonOps = this.ops.map(op => JSON.stringify(op)) this.rclient.llen = sinon.stub().callsArgWith(1, null, this.length) this.rclient.get = sinon .stub() @@ -353,7 +353,7 @@ describe('RedisManager', function () { this.start = 50 this.end = -1 this.ops = [{ mock: 'op-1' }, { mock: 'op-2' }] - this.jsonOps = this.ops.map((op) => JSON.stringify(op)) + this.jsonOps = this.ops.map(op => JSON.stringify(op)) this.rclient.llen = sinon.stub().callsArgWith(1, null, this.length) this.rclient.get = sinon .stub() @@ -390,7 +390,7 @@ describe('RedisManager', function () { this.start = 20 this.end = -1 this.ops = [{ mock: 'op-1' }, { mock: 'op-2' }] - this.jsonOps = this.ops.map((op) => JSON.stringify(op)) + this.jsonOps = this.ops.map(op => JSON.stringify(op)) this.rclient.llen = sinon.stub().callsArgWith(1, null, this.length) this.rclient.get = sinon .stub() @@ -423,7 +423,7 @@ describe('RedisManager', function () { this.start = 50 this.end = 60 this.ops = [{ mock: 'op-1' }, { mock: 'op-2' }] - this.jsonOps = this.ops.map((op) => JSON.stringify(op)) + this.jsonOps = this.ops.map(op => JSON.stringify(op)) this.rclient.llen = sinon.stub().callsArgWith(1, null, this.length) this.rclient.get = sinon .stub() @@ -483,7 +483,7 @@ describe('RedisManager', function () { null, this.doc_update_list_length, null, - null + null, ]) return (this.ProjectHistoryRedisManager.queueOps = sinon .stub() @@ -529,7 +529,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: JSON.stringify(this.ranges), [`lastUpdatedAt:${this.doc_id}`]: Date.now(), - [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id' + [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id', }) .should.equal(true) }) @@ -728,7 +728,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: JSON.stringify(this.ranges), [`lastUpdatedAt:${this.doc_id}`]: Date.now(), - [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id' + [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id', }) .should.equal(true) }) @@ -759,7 +759,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: null, [`lastUpdatedAt:${this.doc_id}`]: Date.now(), - [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id' + [`lastUpdatedBy:${this.doc_id}`]: 'last-author-fake-id', }) .should.equal(true) }) @@ -856,7 +856,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: JSON.stringify(this.ranges), [`lastUpdatedAt:${this.doc_id}`]: Date.now(), - [`lastUpdatedBy:${this.doc_id}`]: undefined + [`lastUpdatedBy:${this.doc_id}`]: undefined, }) .should.equal(true) }) @@ -900,7 +900,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: JSON.stringify(this.ranges), [`Pathname:${this.doc_id}`]: this.pathname, - [`ProjectHistoryId:${this.doc_id}`]: this.projectHistoryId + [`ProjectHistoryId:${this.doc_id}`]: this.projectHistoryId, }) .should.equal(true) }) @@ -939,7 +939,7 @@ describe('RedisManager', function () { [`DocHash:${this.doc_id}`]: this.hash, [`Ranges:${this.doc_id}`]: null, [`Pathname:${this.doc_id}`]: this.pathname, - [`ProjectHistoryId:${this.doc_id}`]: this.projectHistoryId + [`ProjectHistoryId:${this.doc_id}`]: this.projectHistoryId, }) .should.equal(true) }) @@ -1070,7 +1070,7 @@ describe('RedisManager', function () { return (this.update = { id: this.doc_id, pathname: (this.pathname = 'pathname'), - newPathname: (this.newPathname = 'new-pathname') + newPathname: (this.newPathname = 'new-pathname'), }) }) diff --git a/services/document-updater/test/unit/js/ShareJS/TextTransformTests.js b/services/document-updater/test/unit/js/ShareJS/TextTransformTests.js index a5e3a8599a..0946a78442 100644 --- a/services/document-updater/test/unit/js/ShareJS/TextTransformTests.js +++ b/services/document-updater/test/unit/js/ShareJS/TextTransformTests.js @@ -105,7 +105,7 @@ describe('ShareJS text type', function () { text._tc(dest, { d: 'foo', p: 3 }, { i: 'bar', p: 4 }) return dest.should.deep.equal([ { d: 'f', p: 3 }, - { d: 'oo', p: 6 } + { d: 'oo', p: 6 }, ]) }) }) @@ -418,7 +418,7 @@ describe('ShareJS text type', function () { op1_t, op2_t, rt12_comments: rt12.comments, - rt21_comments: rt21.comments + rt21_comments: rt21.comments, }, 'Comments are not consistent' ) diff --git a/services/document-updater/test/unit/js/ShareJsDB/ShareJsDBTests.js b/services/document-updater/test/unit/js/ShareJsDB/ShareJsDBTests.js index 1b4e4422a6..4ac16a8fe7 100644 --- a/services/document-updater/test/unit/js/ShareJsDB/ShareJsDBTests.js +++ b/services/document-updater/test/unit/js/ShareJsDB/ShareJsDBTests.js @@ -25,8 +25,8 @@ describe('ShareJsDB', function () { this.ShareJsDB = SandboxedModule.require(modulePath, { requires: { './RedisManager': (this.RedisManager = {}), - './Errors': Errors - } + './Errors': Errors, + }, }) this.version = 42 @@ -130,14 +130,14 @@ describe('ShareJsDB', function () { this.opData = { op: { p: 20, t: 'foo' }, meta: { source: 'bar' }, - v: this.version + v: this.version, } return this.db.writeOp(this.doc_key, this.opData, this.callback) }) it('should write into appliedOps', function () { return expect(this.db.appliedOps[this.doc_key]).to.deep.equal([ - this.opData + this.opData, ]) }) diff --git a/services/document-updater/test/unit/js/ShareJsUpdateManager/ShareJsUpdateManagerTests.js b/services/document-updater/test/unit/js/ShareJsUpdateManager/ShareJsUpdateManagerTests.js index d6e9700bff..6fea29287f 100644 --- a/services/document-updater/test/unit/js/ShareJsUpdateManager/ShareJsUpdateManagerTests.js +++ b/services/document-updater/test/unit/js/ShareJsUpdateManager/ShareJsUpdateManagerTests.js @@ -31,14 +31,14 @@ describe('ShareJsUpdateManager', function () { '@overleaf/redis-wrapper': { createClient: () => { return (this.rclient = { auth() {} }) - } + }, }, './RealTimeRedisManager': (this.RealTimeRedisManager = {}), - './Metrics': (this.metrics = { inc: sinon.stub() }) + './Metrics': (this.metrics = { inc: sinon.stub() }), }, globals: { - clearTimeout: (this.clearTimeout = sinon.stub()) - } + clearTimeout: (this.clearTimeout = sinon.stub()), + }, })) }) @@ -58,8 +58,8 @@ describe('ShareJsUpdateManager', function () { applyOp: sinon.stub().callsArg(2), getSnapshot: sinon.stub(), db: { - appliedOps: {} - } + appliedOps: {}, + }, } this.ShareJsUpdateManager.getNewShareJsModel = sinon .stub() @@ -74,11 +74,10 @@ describe('ShareJsUpdateManager', function () { beforeEach(function (done) { this.model.getSnapshot.callsArgWith(1, null, { snapshot: this.updatedDocLines.join('\n'), - v: this.version + v: this.version, }) - this.model.db.appliedOps[ - `${this.project_id}:${this.doc_id}` - ] = this.appliedOps = ['mock-ops'] + this.model.db.appliedOps[`${this.project_id}:${this.doc_id}`] = + this.appliedOps = ['mock-ops'] return this.ShareJsUpdateManager.applyUpdate( this.project_id, this.doc_id, @@ -172,11 +171,10 @@ describe('ShareJsUpdateManager', function () { this.error = new Error('invalid hash') this.model.getSnapshot.callsArgWith(1, null, { snapshot: 'unexpected content', - v: this.version + v: this.version, }) - this.model.db.appliedOps[ - `${this.project_id}:${this.doc_id}` - ] = this.appliedOps = ['mock-ops'] + this.model.db.appliedOps[`${this.project_id}:${this.doc_id}`] = + this.appliedOps = ['mock-ops'] return this.ShareJsUpdateManager.applyUpdate( this.project_id, this.doc_id, @@ -203,7 +201,7 @@ describe('ShareJsUpdateManager', function () { this.model = { on: (event, callback) => { return (this.callback = callback) - } + }, } sinon.spy(this.model, 'on') return this.ShareJsUpdateManager._listenForOps(this.model) @@ -217,7 +215,7 @@ describe('ShareJsUpdateManager', function () { beforeEach(function () { this.opData = { op: { t: 'foo', p: 1 }, - meta: { source: 'bar' } + meta: { source: 'bar' }, } this.RealTimeRedisManager.sendData = sinon.stub() return this.callback(`${this.project_id}:${this.doc_id}`, this.opData) @@ -228,7 +226,7 @@ describe('ShareJsUpdateManager', function () { .calledWith({ project_id: this.project_id, doc_id: this.doc_id, - op: this.opData + op: this.opData, }) .should.equal(true) }) diff --git a/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js b/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js index 907fac3d12..2f23de7f68 100644 --- a/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js +++ b/services/document-updater/test/unit/js/UpdateManager/UpdateManagerTests.js @@ -38,7 +38,7 @@ describe('UpdateManager', function () { } Timer.initClass() return Timer - })()) + })()), }), '@overleaf/settings': (this.Settings = {}), './DocumentManager': (this.DocumentManager = {}), @@ -53,8 +53,8 @@ describe('UpdateManager', function () { } Profiler.initClass() return Profiler - })()) - } + })()), + }, })) }) @@ -272,7 +272,7 @@ describe('UpdateManager', function () { }) it('should apply the updates', function () { - return Array.from(this.updates).map((update) => + return Array.from(this.updates).map(update => this.UpdateManager.applyUpdate .calledWith(this.project_id, this.doc_id, update) .should.equal(true) @@ -320,7 +320,7 @@ describe('UpdateManager', function () { this.updated_ranges = { entries: 'updated', comments: 'updated' } this.appliedOps = [ { v: 42, op: 'mock-op-42' }, - { v: 45, op: 'mock-op-45' } + { v: 45, op: 'mock-op-45' }, ] this.doc_ops_length = sinon.stub() this.project_ops_length = sinon.stub() @@ -465,7 +465,7 @@ describe('UpdateManager', function () { .calledWith({ project_id: this.project_id, doc_id: this.doc_id, - error: this.error.message + error: this.error.message, }) .should.equal(true) }) @@ -512,17 +512,17 @@ describe('UpdateManager', function () { v: 42, op: [ { i: 'foo', p: 4 }, - { i: 'bar', p: 6 } - ] + { i: 'bar', p: 6 }, + ], }, { v: 45, op: [ { d: 'qux', p: 4 }, - { i: 'bazbaz', p: 14 } - ] + { i: 'bazbaz', p: 14 }, + ], }, - { v: 49, op: [{ i: 'penguin', p: 18 }] } + { v: 49, op: [{ i: 'penguin', p: 18 }] }, ] this.UpdateManager._addProjectHistoryMetadataToOps( appliedOps, @@ -536,24 +536,24 @@ describe('UpdateManager', function () { v: 42, op: [ { i: 'foo', p: 4 }, - { i: 'bar', p: 6 } + { i: 'bar', p: 6 }, ], meta: { pathname: this.pathname, - doc_length: 14 - } + doc_length: 14, + }, }, { projectHistoryId: this.projectHistoryId, v: 45, op: [ { d: 'qux', p: 4 }, - { i: 'bazbaz', p: 14 } + { i: 'bazbaz', p: 14 }, ], meta: { pathname: this.pathname, - doc_length: 20 - } // 14 + 'foo' + 'bar' + doc_length: 20, + }, // 14 + 'foo' + 'bar' }, { projectHistoryId: this.projectHistoryId, @@ -561,9 +561,9 @@ describe('UpdateManager', function () { op: [{ i: 'penguin', p: 18 }], meta: { pathname: this.pathname, - doc_length: 23 - } // 14 - 'qux' + 'bazbaz' - } + doc_length: 23, + }, // 14 - 'qux' + 'bazbaz' + }, ]) }) }) From e8697f7f976b9df03d62ae1b7eb05462dc2ce5b5 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:21:07 +0100 Subject: [PATCH 07/11] [misc] temporary override a few new/changed eslint rules --- services/document-updater/.eslintrc | 15 ++++++++++++++- services/document-updater/app/js/sharejs/model.js | 1 - .../app/js/sharejs/server/model.js | 1 - .../app/js/sharejs/types/model.js | 1 - 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/services/document-updater/.eslintrc b/services/document-updater/.eslintrc index 1c14f50efe..a97661b15f 100644 --- a/services/document-updater/.eslintrc +++ b/services/document-updater/.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", diff --git a/services/document-updater/app/js/sharejs/model.js b/services/document-updater/app/js/sharejs/model.js index 3b881c8d16..aebcd8d549 100644 --- a/services/document-updater/app/js/sharejs/model.js +++ b/services/document-updater/app/js/sharejs/model.js @@ -1,7 +1,6 @@ /* eslint-disable no-console, no-return-assign, - standard/no-callback-literal, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. diff --git a/services/document-updater/app/js/sharejs/server/model.js b/services/document-updater/app/js/sharejs/server/model.js index 7b065ea20a..a5682f71e3 100644 --- a/services/document-updater/app/js/sharejs/server/model.js +++ b/services/document-updater/app/js/sharejs/server/model.js @@ -1,7 +1,6 @@ /* eslint-disable no-console, no-return-assign, - standard/no-callback-literal, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. diff --git a/services/document-updater/app/js/sharejs/types/model.js b/services/document-updater/app/js/sharejs/types/model.js index 3b881c8d16..aebcd8d549 100644 --- a/services/document-updater/app/js/sharejs/types/model.js +++ b/services/document-updater/app/js/sharejs/types/model.js @@ -1,7 +1,6 @@ /* eslint-disable no-console, no-return-assign, - standard/no-callback-literal, */ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. From 40aafa27e0e15faab62aef961acc597b155a1181 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:26:30 +0100 Subject: [PATCH 08/11] [misc] upgrade node version to latest v12 LTS version 12.22.3 --- services/document-updater/.nvmrc | 2 +- services/document-updater/Dockerfile | 2 +- services/document-updater/buildscript.txt | 2 +- services/document-updater/docker-compose.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/document-updater/.nvmrc b/services/document-updater/.nvmrc index e68b860383..5a80a7e912 100644 --- a/services/document-updater/.nvmrc +++ b/services/document-updater/.nvmrc @@ -1 +1 @@ -12.21.0 +12.22.3 diff --git a/services/document-updater/Dockerfile b/services/document-updater/Dockerfile index 4f417a2a4b..6b286376dc 100644 --- a/services/document-updater/Dockerfile +++ b/services/document-updater/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/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index b75d1c1e34..339a3c847f 100644 --- a/services/document-updater/buildscript.txt +++ b/services/document-updater/buildscript.txt @@ -3,6 +3,6 @@ document-updater --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/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml index 6a1c097a30..e3c720c9cd 100644 --- a/services/document-updater/docker-compose.yml +++ b/services/document-updater/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 1184f8f5b67af8e60e97b9251403033e615b5633 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:35:32 +0100 Subject: [PATCH 09/11] [misc] fix chai assertions .equal.false -> .equals(false) --- .../test/acceptance/js/DeletingADocumentTests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js index 5647c55d83..84c7300383 100644 --- a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js @@ -103,7 +103,7 @@ describe('Deleting a document', function () { }) it('should need to reload the doc if read again', function (done) { - MockWebApi.getDocument.called.should.equal.false + MockWebApi.getDocument.called.should.equals(false) return DocUpdaterClient.getDoc( this.project_id, this.doc_id, @@ -164,7 +164,7 @@ describe('Deleting a document', function () { }) it('should need to reload the doc if read again', function (done) { - MockWebApi.getDocument.called.should.equal.false + MockWebApi.getDocument.called.should.equals(false) return DocUpdaterClient.getDoc( this.project_id, this.doc_id, From bf8224e2a06477fb25197557075f0b937424f6d8 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 12:51:06 +0100 Subject: [PATCH 10/11] [misc] ApplyingUpdatesToADocTests: adhere to stricter chai assertions --- .../test/acceptance/js/ApplyingUpdatesToADocTests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js index ec14300d21..5ae6f4eabd 100644 --- a/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js +++ b/services/document-updater/test/acceptance/js/ApplyingUpdatesToADocTests.js @@ -150,6 +150,7 @@ describe('Applying updates to a doc', function () { if (error != null) { throw error } + result = parseInt(result, 10) result.should.be.within(this.startTime, Date.now()) this.firstOpTimestamp = result return done() @@ -186,6 +187,7 @@ describe('Applying updates to a doc', function () { if (error != null) { throw error } + result = parseInt(result, 10) result.should.equal(this.firstOpTimestamp) return done() } From 29cea1743b535651442942151082f2e99a5b0335 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 13 Jul 2021 13:12:34 +0100 Subject: [PATCH 11/11] [misc] DeletingADocumentTests: fix behavior checks The preloading setup does an initial getDocument request to web-api. --- .../test/acceptance/js/DeletingADocumentTests.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js index 84c7300383..9fa53d8052 100644 --- a/services/document-updater/test/acceptance/js/DeletingADocumentTests.js +++ b/services/document-updater/test/acceptance/js/DeletingADocumentTests.js @@ -103,6 +103,7 @@ describe('Deleting a document', function () { }) it('should need to reload the doc if read again', function (done) { + MockWebApi.getDocument.resetHistory() MockWebApi.getDocument.called.should.equals(false) return DocUpdaterClient.getDoc( this.project_id,