mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #99 from overleaf/jpa-redis-wrapper-rewrite
[misc] bump @overleaf/redis-wrapper to version 2.0.0
This commit is contained in:
commit
5fc1e49660
7 changed files with 24 additions and 66 deletions
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
let LockManager
|
let LockManager
|
||||||
const Settings = require('settings-sharelatex')
|
const Settings = require('settings-sharelatex')
|
||||||
const redis = require('redis-sharelatex')
|
const redis = require('@overleaf/redis-wrapper')
|
||||||
const rclient = redis.createClient(Settings.redis.lock)
|
const rclient = redis.createClient(Settings.redis.lock)
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
let RedisManager
|
let RedisManager
|
||||||
const Settings = require('settings-sharelatex')
|
const Settings = require('settings-sharelatex')
|
||||||
const redis = require('redis-sharelatex')
|
const redis = require('@overleaf/redis-wrapper')
|
||||||
const rclient = redis.createClient(Settings.redis.history)
|
const rclient = redis.createClient(Settings.redis.history)
|
||||||
const Keys = Settings.redis.history.key_schema
|
const Keys = Settings.redis.history.key_schema
|
||||||
const async = require('async')
|
const async = require('async')
|
||||||
|
|
75
services/track-changes/package-lock.json
generated
75
services/track-changes/package-lock.json
generated
|
@ -906,9 +906,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@overleaf/o-error": {
|
"@overleaf/o-error": {
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@overleaf/o-error/-/o-error-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@overleaf/o-error/-/o-error-3.1.0.tgz",
|
||||||
"integrity": "sha512-LsM2s6Iy9G97ktPo0ys4VxtI/m3ahc1ZHwjo5XnhXtjeIkkkVAehsrcRRoV/yWepPjymB0oZonhcfojpjYR/tg=="
|
"integrity": "sha512-TWJ80ozJ1LeugGTJyGQSPEuTkZ9LqZD7/ndLE6azKa03SU/mKV/FINcfk8atpVil8iv1hHQwzYZc35klplpMpQ=="
|
||||||
|
},
|
||||||
|
"@overleaf/redis-wrapper": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@overleaf/redis-wrapper/-/redis-wrapper-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-lREuhDPNgmKyOmL1g6onfRzDLWOG/POsE4Vd7ZzLnKDYt9SbOIujtx3CxI2qtQAKBYHf/hfyrbtyX3Ib2yTvYA==",
|
||||||
|
"requires": {
|
||||||
|
"ioredis": "~4.17.3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@protobufjs/aspromise": {
|
"@protobufjs/aspromise": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
|
@ -3924,12 +3932,12 @@
|
||||||
"lodash.defaults": {
|
"lodash.defaults": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
|
||||||
"integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="
|
"integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
|
||||||
},
|
},
|
||||||
"lodash.flatten": {
|
"lodash.flatten": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
|
||||||
"integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g=="
|
"integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
|
||||||
},
|
},
|
||||||
"lodash.get": {
|
"lodash.get": {
|
||||||
"version": "4.4.2",
|
"version": "4.4.2",
|
||||||
|
@ -4254,11 +4262,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
"integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q=="
|
"integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q=="
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
|
||||||
"version": "0.3.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
|
|
||||||
"integrity": "sha512-8OCq0De/h9ZxseqzCH8Kw/Filf5pF/vMI6+BH7Lu0jXz2pqYCjTAQRolSxRIi+Ax+oCCjlxoJMP0YQ4XlrQNHg=="
|
|
||||||
},
|
|
||||||
"mocha": {
|
"mocha": {
|
||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
|
||||||
|
@ -5613,11 +5616,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
||||||
"integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw=="
|
"integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw=="
|
||||||
},
|
},
|
||||||
"q": {
|
|
||||||
"version": "0.9.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/q/-/q-0.9.2.tgz",
|
|
||||||
"integrity": "sha512-ZOxMuWPMJnsUdYhuQ9glpZwKhB4cm8ubYFy1nNCY8TkSAuZun5fd8jCDTlf2ykWnK8x9HGn1stNtLeG179DebQ=="
|
|
||||||
},
|
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.7.0",
|
"version": "6.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
||||||
|
@ -5748,59 +5746,16 @@
|
||||||
"redis-errors": {
|
"redis-errors": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
|
||||||
"integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="
|
"integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60="
|
||||||
},
|
},
|
||||||
"redis-parser": {
|
"redis-parser": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz",
|
||||||
"integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==",
|
"integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"redis-errors": "^1.0.0"
|
"redis-errors": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redis-sentinel": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/redis-sentinel/-/redis-sentinel-0.1.1.tgz",
|
|
||||||
"integrity": "sha512-cKtLSUzDsKmsB50J1eIV/SH11DSMiHgsm/gDPRCU5lXz5OyTSuLKWg9oc8d5n74kZwtAyRkfJP0x8vYXvlPjFQ==",
|
|
||||||
"requires": {
|
|
||||||
"q": "0.9.2",
|
|
||||||
"redis": "0.11.x"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"redis": {
|
|
||||||
"version": "0.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/redis/-/redis-0.11.0.tgz",
|
|
||||||
"integrity": "sha512-wkgzIZ9HuxJ6Sul1IW/6FG13Ecv6q8kmdHb5xo09Hu6bgWzz5qsnM06SVMpDxFNbyApaRjy8CwnmVaRMMhAMWg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"redis-sharelatex": {
|
|
||||||
"version": "1.0.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/redis-sharelatex/-/redis-sharelatex-1.0.13.tgz",
|
|
||||||
"integrity": "sha512-sAQNofqfcMlIxzxNJF1qUspJKDM1VuuIOrGZQX9nb5JtcJ5cusa5sc+Oyb51eymPV5mZGWT3u07tKtv4jdXVIg==",
|
|
||||||
"requires": {
|
|
||||||
"async": "^2.5.0",
|
|
||||||
"coffee-script": "1.8.0",
|
|
||||||
"ioredis": "~4.17.3",
|
|
||||||
"redis-sentinel": "0.1.1",
|
|
||||||
"underscore": "1.7.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"coffee-script": {
|
|
||||||
"version": "1.8.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.8.0.tgz",
|
|
||||||
"integrity": "sha512-EvLTMcu9vR6G1yfnz75yrISvhq1eBPC+pZbQhHzTiC5vXgpYIrArxQc5tB+SYfBi3souVdSZ4AZzYxI72oLXUw==",
|
|
||||||
"requires": {
|
|
||||||
"mkdirp": "~0.3.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"underscore": {
|
|
||||||
"version": "1.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
|
|
||||||
"integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.3",
|
"version": "0.13.3",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
"format:fix": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --write"
|
"format:fix": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --write"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@overleaf/o-error": "^3.1.0",
|
||||||
|
"@overleaf/redis-wrapper": "^2.0.0",
|
||||||
"JSONStream": "^1.3.5",
|
"JSONStream": "^1.3.5",
|
||||||
"async": "^2.6.3",
|
"async": "^2.6.3",
|
||||||
"aws-sdk": "^2.643.0",
|
"aws-sdk": "^2.643.0",
|
||||||
|
@ -32,7 +34,6 @@
|
||||||
"mongo-uri": "^0.1.2",
|
"mongo-uri": "^0.1.2",
|
||||||
"mongodb": "^3.6.0",
|
"mongodb": "^3.6.0",
|
||||||
"redis": "~0.10.1",
|
"redis": "~0.10.1",
|
||||||
"redis-sharelatex": "^1.0.13",
|
|
||||||
"request": "~2.88.2",
|
"request": "~2.88.2",
|
||||||
"requestretry": "^4.1.0",
|
"requestretry": "^4.1.0",
|
||||||
"s3-streams": "^0.4.0",
|
"s3-streams": "^0.4.0",
|
||||||
|
|
|
@ -17,7 +17,9 @@ const async = require('async')
|
||||||
const zlib = require('zlib')
|
const zlib = require('zlib')
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
const Settings = require('settings-sharelatex')
|
const Settings = require('settings-sharelatex')
|
||||||
const rclient = require('redis-sharelatex').createClient(Settings.redis.history) // Only works locally for now
|
const rclient = require('@overleaf/redis-wrapper').createClient(
|
||||||
|
Settings.redis.history
|
||||||
|
) // Only works locally for now
|
||||||
const Keys = Settings.redis.history.key_schema
|
const Keys = Settings.redis.history.key_schema
|
||||||
const { db, ObjectId } = require('../../../../app/js/mongodb')
|
const { db, ObjectId } = require('../../../../app/js/mongodb')
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe('LockManager', function () {
|
||||||
}
|
}
|
||||||
this.LockManager = SandboxedModule.require(modulePath, {
|
this.LockManager = SandboxedModule.require(modulePath, {
|
||||||
requires: {
|
requires: {
|
||||||
'redis-sharelatex': {
|
'@overleaf/redis-wrapper': {
|
||||||
createClient: () => {
|
createClient: () => {
|
||||||
return (this.rclient = { auth: sinon.stub() })
|
return (this.rclient = { auth: sinon.stub() })
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ describe('RedisManager', function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
this.RedisManager = SandboxedModule.require(modulePath, {
|
this.RedisManager = SandboxedModule.require(modulePath, {
|
||||||
requires: {
|
requires: {
|
||||||
'redis-sharelatex': {
|
'@overleaf/redis-wrapper': {
|
||||||
createClient: () => {
|
createClient: () => {
|
||||||
return (this.rclient = {
|
return (this.rclient = {
|
||||||
auth: sinon.stub(),
|
auth: sinon.stub(),
|
||||||
|
|
Loading…
Reference in a new issue