mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4101 from overleaf/ae-settings-module
Migrate from `settings-sharelatex` to `@overleaf/settings` GitOrigin-RevId: 9a298ba26382180c1351683c5fddc9004418c1e6
This commit is contained in:
parent
d7e9e14f6c
commit
5e773ce950
242 changed files with 251 additions and 276 deletions
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
const metrics = require('@overleaf/metrics')
|
||||
metrics.initialize(process.env.METRICS_APP_NAME || 'web')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const PlansLocator = require('./app/src/Features/Subscription/PlansLocator')
|
||||
logger.initialize(process.env.METRICS_APP_NAME || 'web')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const Metrics = require('../../infrastructure/Metrics')
|
||||
const Queues = require('../../infrastructure/Queues')
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const httpProxy = require('express-http-proxy')
|
||||
const URL = require('url')
|
||||
|
|
|
@ -5,7 +5,7 @@ const UserUpdater = require('../User/UserUpdater')
|
|||
const Metrics = require('@overleaf/metrics')
|
||||
const logger = require('logger-sharelatex')
|
||||
const querystring = require('querystring')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const basicAuth = require('basic-auth-connect')
|
||||
const crypto = require('crypto')
|
||||
const UserHandler = require('../User/UserHandler')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const { User } = require('../../models/User')
|
||||
const { db, ObjectId } = require('../../infrastructure/mongodb')
|
||||
const bcrypt = require('bcrypt')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const BetaProgramHandler = require('./BetaProgramHandler')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const OError = require('@overleaf/o-error')
|
||||
const url = require('url')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const V1Api = require('../V1/V1Api')
|
||||
const sanitizeHtml = require('sanitize-html')
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
let CaptchaMiddleware
|
||||
const request = require('request')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = CaptchaMiddleware = {
|
||||
validateCaptcha(action) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
let ChatApiHandler
|
||||
const OError = require('@overleaf/o-error')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = ChatApiHandler = {
|
||||
_apiRequest(opts, callback) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
let CollaboratorsEmailHandler
|
||||
const { Project } = require('../../models/Project')
|
||||
const EmailHandler = require('../Email/EmailHandler')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = CollaboratorsEmailHandler = {
|
||||
_buildInviteUrl(project, invite) {
|
||||
|
|
|
@ -20,7 +20,7 @@ const UserGetter = require('../User/UserGetter')
|
|||
const CollaboratorsGetter = require('./CollaboratorsGetter')
|
||||
const CollaboratorsInviteHandler = require('./CollaboratorsInviteHandler')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const EmailHelper = require('../Helpers/EmailHelper')
|
||||
const EditorRealTimeController = require('../Editor/EditorRealTimeController')
|
||||
const AnalyticsManager = require('../Analytics/AnalyticsManager')
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
let rclient_secondary
|
||||
const OError = require('@overleaf/o-error')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const request = require('request').defaults({ timeout: 30 * 1000 })
|
||||
const RedisWrapper = require('../../infrastructure/RedisWrapper')
|
||||
const rclient = RedisWrapper.client('clsi_cookie')
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
let ClsiFormatChecker
|
||||
const _ = require('lodash')
|
||||
const async = require('async')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = ClsiFormatChecker = {
|
||||
checkRecoursesForProblems(resources, callback) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const async = require('async')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const request = require('request')
|
||||
const ProjectGetter = require('../Project/ProjectGetter')
|
||||
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let ClsiStateManager
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const crypto = require('crypto')
|
||||
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
|
||||
|
|
|
@ -22,7 +22,7 @@ const ClsiManager = require('./ClsiManager')
|
|||
const logger = require('logger-sharelatex')
|
||||
const request = require('request')
|
||||
const sanitize = require('sanitizer')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const RateLimiter = require('../../infrastructure/RateLimiter')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let CompileManager
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const RedisWrapper = require('../../infrastructure/RedisWrapper')
|
||||
const rclient = RedisWrapper.client('clsi_recently_compiled')
|
||||
const ProjectGetter = require('../Project/ProjectGetter')
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
let ContactManager
|
||||
const OError = require('@overleaf/o-error')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = ContactManager = {
|
||||
getContactIds(user_id, options, callback) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const ContactController = require('./ContactController')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
function contactsAuthenticationMiddleware() {
|
||||
if (!Settings.allowAnonymousReadAndWriteSharing) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
const request = require('request').defaults({ jar: false })
|
||||
const OError = require('@overleaf/o-error')
|
||||
const logger = require('logger-sharelatex')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const request = require('request').defaults({ timeout: 30 * 100 })
|
||||
const OError = require('@overleaf/o-error')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const _ = require('underscore')
|
||||
const async = require('async')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let EditorRealTimeController
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const Metrics = require('@overleaf/metrics')
|
||||
const RedisWrapper = require('../../infrastructure/RedisWrapper')
|
||||
const rclient = RedisWrapper.client('pubsub')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const _ = require('underscore')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const moment = require('moment')
|
||||
const EmailMessageHelper = require('./EmailMessageHelper')
|
||||
const StringHelper = require('../Helpers/StringHelper')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { callbackify } = require('util')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const EmailBuilder = require('./EmailBuilder')
|
||||
const EmailSender = require('./EmailSender')
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { callbackify } = require('util')
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const nodemailer = require('nodemailer')
|
||||
const sesTransport = require('nodemailer-ses-transport')
|
||||
const mandrillTransport = require('nodemailer-mandrill-transport')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const _ = require('underscore')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = _.template(`\
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const OError = require('@overleaf/o-error')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
// Error class for legacy errors so they inherit OError while staying
|
||||
// backward-compatible (can be instantiated with string as argument instead
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
function renderJSONError(res, message, info = {}) {
|
||||
if (info.message) {
|
||||
|
|
|
@ -21,11 +21,11 @@ const ProjectLocator = require('../Project/ProjectLocator')
|
|||
const ProjectRootDocManager = require('../Project/ProjectRootDocManager')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const logger = require('logger-sharelatex')
|
||||
let settings = require('settings-sharelatex')
|
||||
let settings = require('@overleaf/settings')
|
||||
const async = require('async')
|
||||
let request = require('request')
|
||||
request = request.defaults()
|
||||
settings = require('settings-sharelatex')
|
||||
settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = ExportsHandler = self = {
|
||||
exportProject(export_params, callback) {
|
||||
|
|
|
@ -2,7 +2,7 @@ const _ = require('underscore')
|
|||
const logger = require('logger-sharelatex')
|
||||
const fs = require('fs')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Async = require('async')
|
||||
const FileHashManager = require('./FileHashManager')
|
||||
const { File } = require('../../models/File')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const RedisWrapper = require('../../infrastructure/RedisWrapper')
|
||||
const rclient = RedisWrapper.client('health_check')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { ObjectId } = require('mongodb')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
const EXISTING_UI = { newLogsUI: false, subvariant: null }
|
||||
const NEW_UI_WITH_POPUP = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const { URL } = require('url')
|
||||
|
||||
function getSafeRedirectPath(value) {
|
||||
|
|
|
@ -3,7 +3,7 @@ const OError = require('@overleaf/o-error')
|
|||
const async = require('async')
|
||||
const logger = require('logger-sharelatex')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const Errors = require('../Errors/Errors')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { callbackify } = require('util')
|
||||
const request = require('request-promise-native')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let RestoreManager
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const Path = require('path')
|
||||
const FileWriter = require('../../infrastructure/FileWriter')
|
||||
const FileSystemImportManager = require('../Uploads/FileSystemImportManager')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const OError = require('@overleaf/o-error')
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const request = require('request')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
let InstitutionsFeatures
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const PlansLocator = require('../Subscription/PlansLocator')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = InstitutionsFeatures = {
|
||||
getInstitutionsFeatures(userId, callback) {
|
||||
|
|
|
@ -16,7 +16,7 @@ let LinkedFilesController
|
|||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const EditorController = require('../Editor/EditorController')
|
||||
const ProjectLocator = require('../Project/ProjectLocator')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const _ = require('underscore')
|
||||
const LinkedFilesHandler = require('./LinkedFilesHandler')
|
||||
|
|
|
@ -20,7 +20,7 @@ const DocstoreManager = require('../Docstore/DocstoreManager')
|
|||
const DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
|
||||
const FileStoreHandler = require('../FileStore/FileStoreHandler')
|
||||
const _ = require('underscore')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const LinkedFilesHandler = require('./LinkedFilesHandler')
|
||||
const {
|
||||
BadDataError,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
let ProjectOutputFileAgent
|
||||
const AuthorizationManager = require('../Authorization/AuthorizationManager')
|
||||
const ProjectGetter = require('../Project/ProjectGetter')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const CompileManager = require('../Compile/CompileManager')
|
||||
const ClsiManager = require('../Compile/ClsiManager')
|
||||
const ProjectFileAgent = require('./ProjectFileAgent')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { callbackify } = require('util')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const crypto = require('crypto')
|
||||
const Mailchimp = require('mailchimp-api-v3')
|
||||
const OError = require('@overleaf/o-error')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const NotificationsHandler = require('./NotificationsHandler')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
function dropboxDuplicateProjectNames(userId) {
|
||||
return {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const request = require('request')
|
||||
const logger = require('logger-sharelatex')
|
||||
const _ = require('lodash')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const UserAuditLogHandler = require('../User/UserAuditLogHandler')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
|
||||
|
|
|
@ -17,7 +17,7 @@ const TagsHandler = require('../Tags/TagsHandler')
|
|||
const SubscriptionLocator = require('../Subscription/SubscriptionLocator')
|
||||
const NotificationsHandler = require('../Notifications/NotificationsHandler')
|
||||
const LimitationsManager = require('../Subscription/LimitationsManager')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const AuthorizationManager = require('../Authorization/AuthorizationManager')
|
||||
const InactiveProjectManager = require('../InactiveData/InactiveProjectManager')
|
||||
const ProjectUpdateHandler = require('./ProjectUpdateHandler')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const logger = require('logger-sharelatex')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const { Project } = require('../../models/Project')
|
||||
const { Folder } = require('../../models/Folder')
|
||||
|
|
|
@ -8,7 +8,7 @@ const PublicAccessLevels = require('../Authorization/PublicAccessLevels')
|
|||
const Errors = require('../Errors/Errors')
|
||||
const TokenGenerator = require('../TokenGenerator/TokenGenerator')
|
||||
const ProjectHelper = require('./ProjectHelper')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { callbackify } = require('util')
|
||||
|
||||
const MAX_PROJECT_NAME_LENGTH = 150
|
||||
|
|
|
@ -4,7 +4,7 @@ const _ = require('underscore')
|
|||
const logger = require('logger-sharelatex')
|
||||
const path = require('path')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const CooldownManager = require('../Cooldown/CooldownManager')
|
||||
const Errors = require('../Errors/Errors')
|
||||
|
|
|
@ -2,7 +2,7 @@ const _ = require('lodash')
|
|||
const OError = require('@overleaf/o-error')
|
||||
const async = require('async')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const Path = require('path')
|
||||
const fs = require('fs')
|
||||
const { Doc } = require('../../models/Doc')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { ObjectId } = require('mongodb')
|
||||
const _ = require('lodash')
|
||||
const { promisify } = require('util')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
const ENGINE_TO_COMPILER_MAP = {
|
||||
latex_dvipdf: 'latex',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
const { Project } = require('../../models/Project')
|
||||
const ProjectDetailsHandler = require('./ProjectDetailsHandler')
|
||||
const logger = require('logger-sharelatex')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const HistoryManager = require('../History/HistoryManager')
|
||||
const ProjectEntityUpdateHandler = require('./ProjectEntityUpdateHandler')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { Project } = require('../../models/Project')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
|
||||
const safeCompilers = ['xelatex', 'pdflatex', 'latex', 'lualatex']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const _ = require('underscore')
|
||||
const { User } = require('../../models/User')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
let ReferalFeatures
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
let ReferencesController
|
||||
const logger = require('logger-sharelatex')
|
||||
const ReferencesHandler = require('./ReferencesHandler')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const EditorRealTimeController = require('../Editor/EditorRealTimeController')
|
||||
|
||||
module.exports = ReferencesController = {
|
||||
|
|
|
@ -16,7 +16,7 @@ let ReferencesHandler
|
|||
const OError = require('@overleaf/o-error')
|
||||
const logger = require('logger-sharelatex')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Features = require('../../infrastructure/Features')
|
||||
const ProjectGetter = require('../Project/ProjectGetter')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
|
|
|
@ -2,7 +2,7 @@ const RateLimiter = require('../../infrastructure/RateLimiter')
|
|||
const logger = require('logger-sharelatex')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const LoginRateLimiter = require('./LoginRateLimiter')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
/*
|
||||
Do not allow more than opts.maxRequests from a single client in
|
||||
|
|
|
@ -19,7 +19,7 @@ const metrics = require('@overleaf/metrics')
|
|||
const logger = require('logger-sharelatex')
|
||||
const _ = require('underscore')
|
||||
const DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const TpdsUpdateSender = require('../ThirdPartyDataStore/TpdsUpdateSender')
|
||||
const TpdsProjectFlusher = require('../ThirdPartyDataStore/TpdsProjectFlusher')
|
||||
const EditorRealTimeController = require('../Editor/EditorRealTimeController')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const request = require('request')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const request = require('request')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const OError = require('@overleaf/o-error')
|
||||
|
||||
const TIMEOUT = 10 * 1000
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const UserGetter = require('../User/UserGetter')
|
||||
const UserUpdater = require('../User/UserUpdater')
|
||||
const AnalyticsManager = require('../Analytics/AnalyticsManager')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const _ = require('lodash')
|
||||
const crypto = require('crypto')
|
||||
const OError = require('@overleaf/o-error')
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
let UniversityController
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = UniversityController = {
|
||||
getPage(req, res, next) {
|
||||
|
|
|
@ -4,7 +4,7 @@ const PlansLocator = require('./PlansLocator')
|
|||
const _ = require('lodash')
|
||||
const SubscriptionLocator = require('./SubscriptionLocator')
|
||||
const UserFeaturesUpdater = require('./UserFeaturesUpdater')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const ReferalFeatures = require('../Referal/ReferalFeatures')
|
||||
const V1SubscriptionManager = require('./V1SubscriptionManager')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const fs = require('fs')
|
||||
const Path = require('path')
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ const logger = require('logger-sharelatex')
|
|||
const ProjectGetter = require('../Project/ProjectGetter')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const SubscriptionLocator = require('./SubscriptionLocator')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const CollaboratorsGetter = require('../Collaborators/CollaboratorsGetter')
|
||||
const CollaboratorsInvitesHandler = require('../Collaborators/CollaboratorsInviteHandler')
|
||||
const V1SubscriptionManager = require('./V1SubscriptionManager')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
function ensurePlansAreSetupCorrectly() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const recurly = require('recurly')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const { callbackify } = require('util')
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
|
|
|
@ -19,7 +19,7 @@ const OError = require('@overleaf/o-error')
|
|||
const querystring = require('querystring')
|
||||
const crypto = require('crypto')
|
||||
const request = require('request')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const xml2js = require('xml2js')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Async = require('async')
|
||||
|
|
|
@ -4,7 +4,7 @@ const PlansLocator = require('./PlansLocator')
|
|||
const SubscriptionViewModelBuilder = require('./SubscriptionViewModelBuilder')
|
||||
const LimitationsManager = require('./LimitationsManager')
|
||||
const RecurlyWrapper = require('./RecurlyWrapper')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const GeoIpLookup = require('../../infrastructure/GeoIpLookup')
|
||||
const FeaturesUpdater = require('./FeaturesUpdater')
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const dateformat = require('dateformat')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
const currenySymbols = {
|
||||
EUR: '€',
|
||||
|
|
|
@ -24,7 +24,7 @@ const LimitationsManager = require('./LimitationsManager')
|
|||
const logger = require('logger-sharelatex')
|
||||
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
|
||||
const EmailHandler = require('../Email/EmailHandler')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
|
||||
const UserMembershipViewModel = require('../UserMembership/UserMembershipViewModel')
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ const SubscriptionController = require('./SubscriptionController')
|
|||
const SubscriptionGroupController = require('./SubscriptionGroupController')
|
||||
const TeamInvitesController = require('./TeamInvitesController')
|
||||
const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, privateApiRouter, publicApiRouter) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const RecurlyWrapper = require('./RecurlyWrapper')
|
||||
const PlansLocator = require('./PlansLocator')
|
||||
const SubscriptionFormatters = require('./SubscriptionFormatters')
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const TeamInvitesHandler = require('./TeamInvitesHandler')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
|
|
|
@ -3,7 +3,7 @@ const logger = require('logger-sharelatex')
|
|||
const crypto = require('crypto')
|
||||
const async = require('async')
|
||||
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { ObjectId } = require('mongodb')
|
||||
|
||||
const { Subscription } = require('../../models/Subscription')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
let V1SubscriptionManager
|
||||
const UserGetter = require('../User/UserGetter')
|
||||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { V1ConnectionError, NotFoundError } = require('../Errors/Errors')
|
||||
|
||||
module.exports = V1SubscriptionManager = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const SystemMessageManager = require('./SystemMessageManager')
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ const util = require('util')
|
|||
const logger = require('logger-sharelatex')
|
||||
const request = require('request')
|
||||
const requestPromise = require('request-promise-native')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const uuid = require('uuid')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const _ = require('underscore')
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const request = require('request-promise-native')
|
||||
|
||||
async function getQueues(userId) {
|
||||
|
|
|
@ -5,7 +5,7 @@ const logger = require('logger-sharelatex')
|
|||
const metrics = require('@overleaf/metrics')
|
||||
const path = require('path')
|
||||
const request = require('request-promise-native')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
|
||||
const CollaboratorsGetter = require('../Collaborators/CollaboratorsGetter')
|
||||
.promises
|
||||
|
|
|
@ -2,7 +2,7 @@ const AuthenticationController = require('../Authentication/AuthenticationContro
|
|||
const TokenAccessHandler = require('./TokenAccessHandler')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const logger = require('logger-sharelatex')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const { expressify } = require('../../util/promises')
|
||||
const AuthorizationManager = require('../Authorization/AuthorizationManager')
|
||||
|
|
|
@ -2,7 +2,7 @@ const { Project } = require('../../models/Project')
|
|||
const PublicAccessLevels = require('../Authorization/PublicAccessLevels')
|
||||
const PrivilegeLevels = require('../Authorization/PrivilegeLevels')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const V1Api = require('../V1/V1Api')
|
||||
const crypto = require('crypto')
|
||||
|
|
|
@ -19,7 +19,7 @@ const fs = require('fs')
|
|||
const Path = require('path')
|
||||
const fse = require('fs-extra')
|
||||
const yauzl = require('yauzl')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const {
|
||||
InvalidZipFileError,
|
||||
EmptyZipFileError,
|
||||
|
|
|
@ -2,7 +2,7 @@ const fs = require('fs')
|
|||
const Path = require('path')
|
||||
const isUtf8 = require('utf-8-validate')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
const FileTypeManager = {
|
||||
TEXT_EXTENSIONS: Settings.textExtensions.map(ext => `.${ext}`),
|
||||
|
|
|
@ -19,7 +19,7 @@ const Path = require('path')
|
|||
const FileSystemImportManager = require('./FileSystemImportManager')
|
||||
const ProjectUploadManager = require('./ProjectUploadManager')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const { InvalidZipFileError } = require('./ArchiveErrors')
|
||||
const multer = require('multer')
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ const AuthorizationMiddleware = require('../Authorization/AuthorizationMiddlewar
|
|||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const ProjectUploadController = require('./ProjectUploadController')
|
||||
const RateLimiterMiddleware = require('../Security/RateLimiterMiddleware')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
module.exports = {
|
||||
apply(webRouter, apiRouter) {
|
||||
|
|
|
@ -6,7 +6,7 @@ const Errors = require('../Errors/Errors')
|
|||
const _ = require('lodash')
|
||||
const logger = require('logger-sharelatex')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { User } = require(`${APP_ROOT}/models/User`)
|
||||
const { promisifyAll } = require(`${APP_ROOT}/util/promises`)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const EmailHelper = require('../Helpers/EmailHelper')
|
||||
const EmailHandler = require('../Email/EmailHandler')
|
||||
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const Errors = require('../Errors/Errors')
|
||||
const UserUpdater = require('./UserUpdater')
|
||||
const UserGetter = require('./UserGetter')
|
||||
|
|
|
@ -3,7 +3,7 @@ const { db } = require('../../infrastructure/mongodb')
|
|||
const metrics = require('@overleaf/metrics')
|
||||
const logger = require('logger-sharelatex')
|
||||
const moment = require('moment')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
const {
|
||||
promises: InstitutionsAPIPromises,
|
||||
|
|
|
@ -2,7 +2,7 @@ const UserGetter = require('./UserGetter')
|
|||
const OError = require('@overleaf/o-error')
|
||||
const UserSessionsManager = require('./UserSessionsManager')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const AuthenticationController = require('../Authentication/AuthenticationController')
|
||||
const _ = require('lodash')
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const crypto = require('crypto')
|
|||
const EmailHandler = require('../Email/EmailHandler')
|
||||
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
|
||||
const Analytics = require('../Analytics/AnalyticsManager')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const EmailHelper = require('../Helpers/EmailHelper')
|
||||
|
||||
const UserRegistrationHandler = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const OError = require('@overleaf/o-error')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
const Async = require('async')
|
||||
const _ = require('underscore')
|
||||
|
|
|
@ -11,7 +11,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 Errors = require('../Errors/Errors')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
let V1Handler
|
||||
const OError = require('@overleaf/o-error')
|
||||
const V1Api = require('./V1Api')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
module.exports = V1Handler = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const logger = require('logger-sharelatex')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const querystring = require('querystring')
|
||||
const _ = require('lodash')
|
||||
const Url = require('url')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const _ = require('lodash')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const fs = require('fs')
|
||||
|
||||
const publicRegistrationModuleAvailable = fs.existsSync(
|
||||
|
|
|
@ -15,7 +15,7 @@ const OError = require('@overleaf/o-error')
|
|||
const logger = require('logger-sharelatex')
|
||||
const uuid = require('uuid')
|
||||
const _ = require('underscore')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
const request = require('request')
|
||||
const { Transform, pipeline } = require('stream')
|
||||
const { FileTooLargeError } = require('../Features/Errors/Errors')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const request = require('request')
|
||||
const settings = require('settings-sharelatex')
|
||||
const settings = require('@overleaf/settings')
|
||||
const _ = require('underscore')
|
||||
const logger = require('logger-sharelatex')
|
||||
const URL = require('url')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { callbackify, promisify } = require('util')
|
||||
const JWT = require('jsonwebtoken')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const Settings = require('@overleaf/settings')
|
||||
|
||||
const jwtSign = promisify(JWT.sign)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue