mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #7986 from overleaf/jpa-eslint-8
[misc] upgrade eslint packages to the latest version everywhere GitOrigin-RevId: f1480d4a171acef82fb26c4aa54be3a6088b0ab3
This commit is contained in:
parent
81b935e317
commit
f0bd6dda23
145 changed files with 1023 additions and 1207 deletions
|
@ -76,7 +76,7 @@ class AccessTokenEncryptor {
|
||||||
logger.err({ err }, 'error getting Fn key')
|
logger.err({ err }, 'error getting Fn key')
|
||||||
return callback(err)
|
return callback(err)
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line node/no-deprecated-api
|
// eslint-disable-next-line n/no-deprecated-api
|
||||||
const decipher = crypto.createDecipher(ALGORITHM, key)
|
const decipher = crypto.createDecipher(ALGORITHM, key)
|
||||||
const dec =
|
const dec =
|
||||||
decipher.update(cipherText, 'base64', 'utf8') + decipher.final('utf8')
|
decipher.update(cipherText, 'base64', 'utf8') + decipher.final('utf8')
|
||||||
|
|
|
@ -79,7 +79,7 @@ describe('GcsPersistorTests', function () {
|
||||||
|
|
||||||
Stream = {
|
Stream = {
|
||||||
pipeline: sinon.stub().yields(),
|
pipeline: sinon.stub().yields(),
|
||||||
Transform: Transform,
|
Transform,
|
||||||
}
|
}
|
||||||
|
|
||||||
GcsFile = {
|
GcsFile = {
|
||||||
|
@ -222,7 +222,7 @@ describe('GcsPersistorTests', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stores the bucket and key in the error', function () {
|
it('stores the bucket and key in the error', function () {
|
||||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
expect(error.info).to.include({ bucketName: bucket, key })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ describe('GcsPersistorTests', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stores the bucket and key in the error', function () {
|
it('stores the bucket and key in the error', function () {
|
||||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
expect(error.info).to.include({ bucketName: bucket, key })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -66,7 +66,7 @@ describe('S3PersistorTests', function () {
|
||||||
|
|
||||||
Stream = {
|
Stream = {
|
||||||
pipeline: sinon.stub().yields(),
|
pipeline: sinon.stub().yields(),
|
||||||
Transform: Transform,
|
Transform,
|
||||||
}
|
}
|
||||||
|
|
||||||
EmptyPromise = {
|
EmptyPromise = {
|
||||||
|
@ -306,7 +306,7 @@ describe('S3PersistorTests', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stores the bucket and key in the error', function () {
|
it('stores the bucket and key in the error', function () {
|
||||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
expect(error.info).to.include({ bucketName: bucket, key })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ describe('S3PersistorTests', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stores the bucket and key in the error', function () {
|
it('stores the bucket and key in the error', function () {
|
||||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
expect(error.info).to.include({ bucketName: bucket, key })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ describe('S3PersistorTests', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('stores the bucket and key in the error', function () {
|
it('stores the bucket and key in the error', function () {
|
||||||
expect(error.info).to.include({ bucketName: bucket, key: key })
|
expect(error.info).to.include({ bucketName: bucket, key })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -52,7 +52,7 @@ describe('index', function () {
|
||||||
ioredis: this.ioredis,
|
ioredis: this.ioredis,
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
process: process,
|
process,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return (this.auth_pass = '1234 pass')
|
return (this.auth_pass = '1234 pass')
|
||||||
|
|
1805
package-lock.json
generated
1805
package-lock.json
generated
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -2,16 +2,16 @@
|
||||||
"name": "overleaf",
|
"name": "overleaf",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.21.0",
|
"eslint": "^8.15.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-config-standard": "^16.0.2",
|
"eslint-config-standard": "^17.0.0",
|
||||||
"eslint-plugin-chai-expect": "^2.2.0",
|
"eslint-plugin-chai-expect": "^3.0.0",
|
||||||
"eslint-plugin-chai-friendly": "^0.6.0",
|
"eslint-plugin-chai-friendly": "^0.7.2",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-mocha": "^8.0.0",
|
"eslint-plugin-mocha": "^10.0.4",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "^3.1.2",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
"patch-package": "^6.4.7",
|
"patch-package": "^6.4.7",
|
||||||
"prettier": "2.5.1"
|
"prettier": "2.5.1"
|
||||||
},
|
},
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
"services/filestore",
|
"services/filestore",
|
||||||
"services/github-sync",
|
"services/github-sync",
|
||||||
"services/history-v1",
|
"services/history-v1",
|
||||||
|
"services/idp",
|
||||||
"services/k8s-debugger",
|
"services/k8s-debugger",
|
||||||
"services/notifications",
|
"services/notifications",
|
||||||
"services/project-archiver",
|
"services/project-archiver",
|
||||||
|
|
|
@ -81,7 +81,7 @@ module.exports = CommandRunner = {
|
||||||
err.code = code
|
err.code = code
|
||||||
return callback(err)
|
return callback(err)
|
||||||
} else {
|
} else {
|
||||||
return callback(null, { stdout: stdout })
|
return callback(null, { stdout })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
no-undef,
|
no-undef,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
camelcase,
|
camelcase,
|
||||||
no-cond-assign,
|
no-cond-assign,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -32,8 +32,8 @@ class FSStream extends Stream {
|
||||||
end = Math.min(end, this.length)
|
end = Math.min(end, this.length)
|
||||||
// keep a cache of previous reads with {begin,end,buffer} values
|
// keep a cache of previous reads with {begin,end,buffer} values
|
||||||
const result = {
|
const result = {
|
||||||
begin: begin,
|
begin,
|
||||||
end: end,
|
end,
|
||||||
buffer: Buffer.alloc(end - begin, 0),
|
buffer: Buffer.alloc(end - begin, 0),
|
||||||
}
|
}
|
||||||
this.cachedBytes.push(result)
|
this.cachedBytes.push(result)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-console,
|
no-console,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
node/no-callback-literal,
|
n/no-callback-literal,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-console,
|
no-console,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
node/no-callback-literal,
|
n/no-callback-literal,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
no-console,
|
no-console,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
node/no-callback-literal,
|
n/no-callback-literal,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -57,7 +57,7 @@ describe('FileController', function () {
|
||||||
'./FileHandler': FileHandler,
|
'./FileHandler': FileHandler,
|
||||||
'./PersistorManager': PersistorManager,
|
'./PersistorManager': PersistorManager,
|
||||||
'./Errors': Errors,
|
'./Errors': Errors,
|
||||||
stream: stream,
|
stream,
|
||||||
'@overleaf/settings': settings,
|
'@overleaf/settings': settings,
|
||||||
'@overleaf/metrics': {
|
'@overleaf/metrics': {
|
||||||
inc() {},
|
inc() {},
|
||||||
|
@ -67,8 +67,8 @@ describe('FileController', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
req = {
|
req = {
|
||||||
key: key,
|
key,
|
||||||
bucket: bucket,
|
bucket,
|
||||||
project_id: projectId,
|
project_id: projectId,
|
||||||
query: {},
|
query: {},
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -83,7 +83,7 @@ describe('FileHandler', function () {
|
||||||
'./ImageOptimiser': ImageOptimiser,
|
'./ImageOptimiser': ImageOptimiser,
|
||||||
'@overleaf/settings': Settings,
|
'@overleaf/settings': Settings,
|
||||||
'@overleaf/object-persistor': ObjectPersistor,
|
'@overleaf/object-persistor': ObjectPersistor,
|
||||||
fs: fs,
|
fs,
|
||||||
},
|
},
|
||||||
globals: { console },
|
globals: { console },
|
||||||
})
|
})
|
||||||
|
|
|
@ -255,7 +255,7 @@ module.exports = Router = {
|
||||||
function (err, ...args) {
|
function (err, ...args) {
|
||||||
if (err) {
|
if (err) {
|
||||||
Router._handleError(callback, err, client, 'joinProject', {
|
Router._handleError(callback, err, client, 'joinProject', {
|
||||||
project_id: project_id,
|
project_id,
|
||||||
user_id: user._id,
|
user_id: user._id,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -150,7 +150,7 @@ exports.XMLHttpRequest = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
method: method,
|
method,
|
||||||
url: url.toString(),
|
url: url.toString(),
|
||||||
async: typeof async !== 'boolean' ? true : async,
|
async: typeof async !== 'boolean' ? true : async,
|
||||||
user: user || null,
|
user: user || null,
|
||||||
|
@ -346,11 +346,11 @@ exports.XMLHttpRequest = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
host: host,
|
host,
|
||||||
port: port,
|
port,
|
||||||
path: uri,
|
path: uri,
|
||||||
method: settings.method,
|
method: settings.method,
|
||||||
headers: headers,
|
headers,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset error flag
|
// Reset error flag
|
||||||
|
|
|
@ -260,8 +260,8 @@ module.exports = PackManager = {
|
||||||
pack: { $each: newUpdates },
|
pack: { $each: newUpdates },
|
||||||
},
|
},
|
||||||
$inc: {
|
$inc: {
|
||||||
n: n,
|
n,
|
||||||
sz: sz,
|
sz,
|
||||||
},
|
},
|
||||||
$set: {
|
$set: {
|
||||||
'meta.end_ts': last.meta.end_ts,
|
'meta.end_ts': last.meta.end_ts,
|
||||||
|
|
|
@ -219,6 +219,16 @@
|
||||||
// - web/scripts/ukamf/package.json
|
// - web/scripts/ukamf/package.json
|
||||||
"import/no-extraneous-dependencies": ["error", {"packageDir": [".", "scripts/ukamf"]}]
|
"import/no-extraneous-dependencies": ["error", {"packageDir": [".", "scripts/ukamf"]}]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["scripts/learn/checkSanitize/*.js"],
|
||||||
|
"rules": {
|
||||||
|
// The checkSanitize script is used in the dev-env only.
|
||||||
|
"import/no-extraneous-dependencies": ["error", {
|
||||||
|
"devDependencies": true,
|
||||||
|
"packageDir": [".", "../../"]
|
||||||
|
}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ if (!module.parent) {
|
||||||
|
|
||||||
// handle SIGTERM for graceful shutdown in kubernetes
|
// handle SIGTERM for graceful shutdown in kubernetes
|
||||||
process.on('SIGTERM', function (signal) {
|
process.on('SIGTERM', function (signal) {
|
||||||
logger.warn({ signal: signal }, 'received signal, shutting down')
|
logger.warn({ signal }, 'received signal, shutting down')
|
||||||
Settings.shuttingDown = true
|
Settings.shuttingDown = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ const AuthenticationController = {
|
||||||
if (!adminDomains.find(domain => email.endsWith(`@${domain}`))) {
|
if (!adminDomains.find(domain => email.endsWith(`@${domain}`))) {
|
||||||
return next(
|
return next(
|
||||||
new OError('[ValidateAdmin] Admin user with invalid email domain', {
|
new OError('[ValidateAdmin] Admin user with invalid email domain', {
|
||||||
email: email,
|
email,
|
||||||
userId: user._id,
|
userId: user._id,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -44,7 +44,7 @@ async function removeUserFromProject(projectId, userId) {
|
||||||
await Project.updateOne(
|
await Project.updateOne(
|
||||||
{ _id: projectId },
|
{ _id: projectId },
|
||||||
{
|
{
|
||||||
$set: { archived: archived },
|
$set: { archived },
|
||||||
$pull: {
|
$pull: {
|
||||||
collaberator_refs: userId,
|
collaberator_refs: userId,
|
||||||
readOnly_refs: userId,
|
readOnly_refs: userId,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -876,7 +876,7 @@ const ClsiManager = {
|
||||||
compileGroup: options.compileGroup,
|
compileGroup: options.compileGroup,
|
||||||
enablePdfCaching:
|
enablePdfCaching:
|
||||||
(Settings.enablePdfCaching && options.enablePdfCaching) || false,
|
(Settings.enablePdfCaching && options.enablePdfCaching) || false,
|
||||||
flags: flags,
|
flags,
|
||||||
metricsMethod: options.compileGroup,
|
metricsMethod: options.compileGroup,
|
||||||
},
|
},
|
||||||
rootResourcePath,
|
rootResourcePath,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +92,7 @@ module.exports = CompileController = {
|
||||||
Metrics.inc('compile-error')
|
Metrics.inc('compile-error')
|
||||||
return next(error)
|
return next(error)
|
||||||
}
|
}
|
||||||
Metrics.inc('compile-status', 1, { status: status })
|
Metrics.inc('compile-status', 1, { status })
|
||||||
res.json({
|
res.json({
|
||||||
status,
|
status,
|
||||||
outputFiles,
|
outputFiles,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-dupe-keys,
|
no-dupe-keys,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
|
|
|
@ -34,7 +34,7 @@ function handleGeneric400Error(req, res, statusCode, message, info = {}) {
|
||||||
case 'html':
|
case 'html':
|
||||||
return res.render('general/400', {
|
return res.render('general/400', {
|
||||||
title: 'Client Error',
|
title: 'Client Error',
|
||||||
message: message,
|
message,
|
||||||
})
|
})
|
||||||
case 'json':
|
case 'json':
|
||||||
return renderJSONError(res, message, info)
|
return renderJSONError(res, message, info)
|
||||||
|
@ -86,7 +86,7 @@ module.exports = HttpErrorHandler = {
|
||||||
case 'html':
|
case 'html':
|
||||||
return res.render('general/400', {
|
return res.render('general/400', {
|
||||||
title: 'Client Error',
|
title: 'Client Error',
|
||||||
message: message,
|
message,
|
||||||
})
|
})
|
||||||
case 'json':
|
case 'json':
|
||||||
return renderJSONError(res, message, info)
|
return renderJSONError(res, message, info)
|
||||||
|
@ -125,7 +125,7 @@ module.exports = HttpErrorHandler = {
|
||||||
case 'html':
|
case 'html':
|
||||||
return res.render('general/400', {
|
return res.render('general/400', {
|
||||||
title: 'Client Error',
|
title: 'Client Error',
|
||||||
message: message,
|
message,
|
||||||
})
|
})
|
||||||
case 'json':
|
case 'json':
|
||||||
return renderJSONError(res, message, info)
|
return renderJSONError(res, message, info)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -86,7 +86,7 @@ module.exports = InactiveProjectManager = {
|
||||||
function (err) {
|
function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.err(
|
logger.err(
|
||||||
{ project_id: project._id, err: err },
|
{ project_id: project._id, err },
|
||||||
'unable to deactivate project'
|
'unable to deactivate project'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ function makeAffiliationRequest(options, callback) {
|
||||||
message: 'error getting affiliations from v1',
|
message: 'error getting affiliations from v1',
|
||||||
info: {
|
info: {
|
||||||
status: response.statusCode,
|
status: response.statusCode,
|
||||||
body: body,
|
body,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-cond-assign,
|
no-cond-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -203,7 +203,7 @@ function tpdsFileLimit(userId) {
|
||||||
callback = function () {}
|
callback = function () {}
|
||||||
}
|
}
|
||||||
const messageOpts = {
|
const messageOpts = {
|
||||||
projectName: projectName,
|
projectName,
|
||||||
}
|
}
|
||||||
NotificationsHandler.createNotification(
|
NotificationsHandler.createNotification(
|
||||||
userId,
|
userId,
|
||||||
|
|
|
@ -14,7 +14,7 @@ function generateAndEmailResetToken(email, callback) {
|
||||||
if (user.email !== email) {
|
if (user.email !== email) {
|
||||||
return callback(null, 'secondary')
|
return callback(null, 'secondary')
|
||||||
}
|
}
|
||||||
const data = { user_id: user._id.toString(), email: email }
|
const data = { user_id: user._id.toString(), email }
|
||||||
OneTimeTokenHandler.getNewToken('password', data, (err, token) => {
|
OneTimeTokenHandler.getNewToken('password', data, (err, token) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(err)
|
return callback(err)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1055,7 +1055,7 @@ const ProjectController = {
|
||||||
last_name: user.last_name,
|
last_name: user.last_name,
|
||||||
referal_id: user.referal_id,
|
referal_id: user.referal_id,
|
||||||
signUpDate: user.signUpDate,
|
signUpDate: user.signUpDate,
|
||||||
allowedFreeTrial: allowedFreeTrial,
|
allowedFreeTrial,
|
||||||
featureSwitches: user.featureSwitches,
|
featureSwitches: user.featureSwitches,
|
||||||
features: user.features,
|
features: user.features,
|
||||||
refProviders: _.mapValues(user.refProviders, Boolean),
|
refProviders: _.mapValues(user.refProviders, Boolean),
|
||||||
|
|
|
@ -126,7 +126,7 @@ async function archiveProject(projectId, userId) {
|
||||||
|
|
||||||
await Project.updateOne(
|
await Project.updateOne(
|
||||||
{ _id: projectId },
|
{ _id: projectId },
|
||||||
{ $set: { archived: archived }, $pull: { trashed: ObjectId(userId) } }
|
{ $set: { archived }, $pull: { trashed: ObjectId(userId) } }
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.warn({ err }, 'problem archiving project')
|
logger.warn({ err }, 'problem archiving project')
|
||||||
|
@ -147,10 +147,7 @@ async function unarchiveProject(projectId, userId) {
|
||||||
'UNARCHIVE'
|
'UNARCHIVE'
|
||||||
)
|
)
|
||||||
|
|
||||||
await Project.updateOne(
|
await Project.updateOne({ _id: projectId }, { $set: { archived } })
|
||||||
{ _id: projectId },
|
|
||||||
{ $set: { archived: archived } }
|
|
||||||
)
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.warn({ err }, 'problem unarchiving project')
|
logger.warn({ err }, 'problem unarchiving project')
|
||||||
throw err
|
throw err
|
||||||
|
@ -174,7 +171,7 @@ async function trashProject(projectId, userId) {
|
||||||
{ _id: projectId },
|
{ _id: projectId },
|
||||||
{
|
{
|
||||||
$addToSet: { trashed: ObjectId(userId) },
|
$addToSet: { trashed: ObjectId(userId) },
|
||||||
$set: { archived: archived },
|
$set: { archived },
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
no-useless-escape,
|
no-useless-escape,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len
|
max-len
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -132,7 +132,7 @@ function updateSubscription(user, planCode, couponCode, callback) {
|
||||||
const timeframe = changeAtTermEnd ? 'term_end' : 'now'
|
const timeframe = changeAtTermEnd ? 'term_end' : 'now'
|
||||||
RecurlyClient.changeSubscriptionByUuid(
|
RecurlyClient.changeSubscriptionByUuid(
|
||||||
subscription.recurlySubscription_id,
|
subscription.recurlySubscription_id,
|
||||||
{ planCode: planCode, timeframe: timeframe },
|
{ planCode, timeframe },
|
||||||
function (error, subscriptionChange) {
|
function (error, subscriptionChange) {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
return cb(error)
|
return cb(error)
|
||||||
|
|
|
@ -192,7 +192,7 @@ async function createDeletedSubscription(subscription, deleterData) {
|
||||||
deleterId: deleterData.id,
|
deleterId: deleterData.id,
|
||||||
deleterIpAddress: deleterData.ip,
|
deleterIpAddress: deleterData.ip,
|
||||||
},
|
},
|
||||||
subscription: subscription,
|
subscription,
|
||||||
}
|
}
|
||||||
const options = { upsert: true, new: true, setDefaultsOnInsert: true }
|
const options = { upsert: true, new: true, setDefaultsOnInsert: true }
|
||||||
await DeletedSubscription.findOneAndUpdate(filter, data, options).exec()
|
await DeletedSubscription.findOneAndUpdate(filter, data, options).exec()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
@ -155,7 +155,7 @@ module.exports = V1SubscriptionManager = {
|
||||||
message: 'error from v1',
|
message: 'error from v1',
|
||||||
info: {
|
info: {
|
||||||
status: response.statusCode,
|
status: response.statusCode,
|
||||||
body: body,
|
body,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -141,7 +141,7 @@ async function createNewUser(attributes, options = {}) {
|
||||||
const UserCreator = {
|
const UserCreator = {
|
||||||
createNewUser: util.callbackify(createNewUser),
|
createNewUser: util.callbackify(createNewUser),
|
||||||
promises: {
|
promises: {
|
||||||
createNewUser: createNewUser,
|
createNewUser,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ module.exports = {
|
||||||
expireDeletedUsersAfterDuration: callbackify(expireDeletedUsersAfterDuration),
|
expireDeletedUsersAfterDuration: callbackify(expireDeletedUsersAfterDuration),
|
||||||
|
|
||||||
promises: {
|
promises: {
|
||||||
deleteUser: deleteUser,
|
deleteUser,
|
||||||
deleteMongoUser: deleteMongoUser,
|
deleteMongoUser,
|
||||||
expireDeletedUser: expireDeletedUser,
|
expireDeletedUser,
|
||||||
ensureCanDeleteUser: ensureCanDeleteUser,
|
ensureCanDeleteUser,
|
||||||
expireDeletedUsersAfterDuration: expireDeletedUsersAfterDuration,
|
expireDeletedUsersAfterDuration,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ async function _createDeletedUser(user, options) {
|
||||||
await DeletedUser.updateOne(
|
await DeletedUser.updateOne(
|
||||||
{ 'deleterData.deletedUserId': user._id },
|
{ 'deleterData.deletedUserId': user._id },
|
||||||
{
|
{
|
||||||
user: user,
|
user,
|
||||||
deleterData: {
|
deleterData: {
|
||||||
deletedAt: new Date(),
|
deletedAt: new Date(),
|
||||||
deleterId: options.deleterUser ? options.deleterUser._id : undefined,
|
deleterId: options.deleterUser ? options.deleterUser._id : undefined,
|
||||||
|
|
|
@ -193,7 +193,7 @@ const UserEmailsController = {
|
||||||
if (err) {
|
if (err) {
|
||||||
return UserEmailsController._handleEmailError(err, req, res, next)
|
return UserEmailsController._handleEmailError(err, req, res, next)
|
||||||
}
|
}
|
||||||
SessionManager.setInSessionUser(req.session, { email: email })
|
SessionManager.setInSessionUser(req.session, { email })
|
||||||
const user = SessionManager.getSessionUser(req.session)
|
const user = SessionManager.getSessionUser(req.session)
|
||||||
UserSessionsManager.revokeAllUserSessions(
|
UserSessionsManager.revokeAllUserSessions(
|
||||||
user,
|
user,
|
||||||
|
|
|
@ -131,7 +131,7 @@ async function settingsPage(req, res) {
|
||||||
reconfirmedViaSAML,
|
reconfirmedViaSAML,
|
||||||
reconfirmationRemoveEmail,
|
reconfirmationRemoveEmail,
|
||||||
samlBeta: req.session.samlBeta,
|
samlBeta: req.session.samlBeta,
|
||||||
ssoError: ssoError,
|
ssoError,
|
||||||
thirdPartyIds: UserPagesController._restructureThirdPartyIds(user),
|
thirdPartyIds: UserPagesController._restructureThirdPartyIds(user),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -69,7 +69,7 @@ const V1Api = {
|
||||||
return callback(
|
return callback(
|
||||||
new Errors.V1ConnectionError({
|
new Errors.V1ConnectionError({
|
||||||
message: 'error from V1 API',
|
message: 'error from V1 API',
|
||||||
info: { status: response.statusCode, body: body },
|
info: { status: response.statusCode, body },
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -21,8 +21,8 @@ function checkValidationToken(req) {
|
||||||
} else {
|
} else {
|
||||||
logger.error(
|
logger.error(
|
||||||
{
|
{
|
||||||
sessionToken: sessionToken,
|
sessionToken,
|
||||||
clientToken: clientToken,
|
clientToken,
|
||||||
},
|
},
|
||||||
'session token validation failed'
|
'session token validation failed'
|
||||||
)
|
)
|
||||||
|
|
|
@ -156,7 +156,7 @@ export function ChatProvider({ children }) {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'ERROR',
|
type: 'ERROR',
|
||||||
error: error,
|
error,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ export function ChatProvider({ children }) {
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'ERROR',
|
type: 'ERROR',
|
||||||
error: error,
|
error,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,7 @@ function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const classes = classNames('btn', 'btn-full-height', {
|
const classes = classNames('btn', 'btn-full-height', {
|
||||||
active: trackChangesIsOpen && !disabled,
|
active: trackChangesIsOpen && !disabled,
|
||||||
disabled: disabled,
|
disabled,
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -97,7 +97,7 @@ document.querySelectorAll('[data-ol-purchase-group-plan]').forEach(el =>
|
||||||
eventTracking.sendMB('groups-modal-click', {
|
eventTracking.sendMB('groups-modal-click', {
|
||||||
plan: planCode,
|
plan: planCode,
|
||||||
users: size,
|
users: size,
|
||||||
currency: currency,
|
currency,
|
||||||
type: usage,
|
type: usage,
|
||||||
})
|
})
|
||||||
const url = new URL('/user/subscription/new', window.origin)
|
const url = new URL('/user/subscription/new', window.origin)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-dupe-class-members,
|
no-dupe-class-members,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
|
|
|
@ -401,7 +401,7 @@ export default HistoryManager = (function () {
|
||||||
if (currentUpdate != null) {
|
if (currentUpdate != null) {
|
||||||
for (const pathname of currentUpdate.pathnames) {
|
for (const pathname of currentUpdate.pathnames) {
|
||||||
filesWithOps.push({
|
filesWithOps.push({
|
||||||
pathname: pathname,
|
pathname,
|
||||||
operation: 'edited',
|
operation: 'edited',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,7 +11,7 @@ App.directive('addCommentEntry', () => ({
|
||||||
link(scope, element, attrs) {
|
link(scope, element, attrs) {
|
||||||
scope.state = {
|
scope.state = {
|
||||||
isAdding: false,
|
isAdding: false,
|
||||||
content: content,
|
content,
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.$on('comment:start_adding', () => scope.startNewComment())
|
scope.$on('comment:start_adding', () => scope.startNewComment())
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -36,14 +36,14 @@ class Adapter {
|
||||||
|
|
||||||
async markExecuted(name) {
|
async markExecuted(name) {
|
||||||
return db.migrations.insertOne({
|
return db.migrations.insertOne({
|
||||||
name: name,
|
name,
|
||||||
migratedAt: new Date(),
|
migratedAt: new Date(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async unmarkExecuted(name) {
|
async unmarkExecuted(name) {
|
||||||
return db.migrations.deleteOne({
|
return db.migrations.deleteOne({
|
||||||
name: name,
|
name,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -237,21 +237,11 @@
|
||||||
"cypress": "^9.5.1",
|
"cypress": "^9.5.1",
|
||||||
"es6-promise": "^4.2.8",
|
"es6-promise": "^4.2.8",
|
||||||
"escodegen": "^2.0.0",
|
"escodegen": "^2.0.0",
|
||||||
"eslint": "^8.9.0",
|
|
||||||
"eslint-config-prettier": "^8.3.0",
|
|
||||||
"eslint-config-standard": "^16.0.3",
|
|
||||||
"eslint-config-standard-jsx": "^11.0.0-0",
|
"eslint-config-standard-jsx": "^11.0.0-0",
|
||||||
"eslint-plugin-chai-expect": "^2.2.0",
|
|
||||||
"eslint-plugin-chai-friendly": "^0.7.2",
|
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.12.1",
|
||||||
"eslint-plugin-import": "^2.25.3",
|
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||||
"eslint-plugin-mocha": "^9.0.0",
|
|
||||||
"eslint-plugin-node": "^11.1.0",
|
|
||||||
"eslint-plugin-promise": "^6.0.0",
|
|
||||||
"eslint-plugin-react": "^7.27.0",
|
"eslint-plugin-react": "^7.27.0",
|
||||||
"eslint-plugin-react-hooks": "^4.3.0",
|
"eslint-plugin-react-hooks": "^4.3.0",
|
||||||
"eslint-plugin-standard": "^5.0.0",
|
|
||||||
"expose-loader": "^3.1.0",
|
"expose-loader": "^3.1.0",
|
||||||
"fetch-mock": "^9.10.2",
|
"fetch-mock": "^9.10.2",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
|
@ -280,7 +270,6 @@
|
||||||
"nodemon": "^2.0.6",
|
"nodemon": "^2.0.6",
|
||||||
"pirates": "^4.0.1",
|
"pirates": "^4.0.1",
|
||||||
"postcss-loader": "^6.2.1",
|
"postcss-loader": "^6.2.1",
|
||||||
"prettier": "2.5.1",
|
|
||||||
"requirejs": "^2.3.6",
|
"requirejs": "^2.3.6",
|
||||||
"samlp": "^3.4.1",
|
"samlp": "^3.4.1",
|
||||||
"sandboxed-module": "https://github.com/overleaf/node-sandboxed-module/archive/cafa2d60f17ce75cc023e6f296eb8de79d92d35d.tar.gz",
|
"sandboxed-module": "https://github.com/overleaf/node-sandboxed-module/archive/cafa2d60f17ce75cc023e6f296eb8de79d92d35d.tar.gz",
|
||||||
|
|
|
@ -56,7 +56,7 @@ async function setArchived(collection, project) {
|
||||||
return collection.updateOne(
|
return collection.updateOne(
|
||||||
{ _id: project._id },
|
{ _id: project._id },
|
||||||
{
|
{
|
||||||
$set: { archived: archived },
|
$set: { archived },
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
camelcase,
|
camelcase,
|
||||||
max-len,
|
max-len,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
node/no-deprecated-api,
|
n/no-deprecated-api,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,14 +8,14 @@ describe('mongoose', function () {
|
||||||
const email = 'wombat@potato.net'
|
const email = 'wombat@potato.net'
|
||||||
|
|
||||||
it('allows the creation of a user', async function () {
|
it('allows the creation of a user', async function () {
|
||||||
await expect(User.create({ email: email })).to.be.fulfilled
|
await expect(User.create({ email })).to.be.fulfilled
|
||||||
await expect(User.findOne({ email: email })).to.eventually.exist
|
await expect(User.findOne({ email })).to.eventually.exist
|
||||||
})
|
})
|
||||||
|
|
||||||
it('does not allow the creation of multiple users with the same email', async function () {
|
it('does not allow the creation of multiple users with the same email', async function () {
|
||||||
await expect(User.create({ email: email })).to.be.fulfilled
|
await expect(User.create({ email })).to.be.fulfilled
|
||||||
await expect(User.create({ email: email })).to.be.rejected
|
await expect(User.create({ email })).to.be.rejected
|
||||||
await expect(User.countDocuments({ email: email })).to.eventually.equal(1)
|
await expect(User.countDocuments({ email })).to.eventually.equal(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('formats assignedAt as Date', async function () {
|
it('formats assignedAt as Date', async function () {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
camelcase,
|
camelcase,
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
max-len,
|
max-len,
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable
|
/* eslint-disable
|
||||||
node/handle-callback-err,
|
n/handle-callback-err,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
// TODO: This file was created by bulk-decaffeinate.
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
|
|
|
@ -25,7 +25,7 @@ const _expect204 = (err, response) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const _createTag = (user, name, callback) => {
|
const _createTag = (user, name, callback) => {
|
||||||
user.request.post({ url: `/tag`, json: { name: name } }, callback)
|
user.request.post({ url: `/tag`, json: { name } }, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
const _createTags = (user, tagNames, callback) => {
|
const _createTags = (user, tagNames, callback) => {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue