Changes to support converted features

GitOrigin-RevId: 5f46cbf77c6f814820231b9cbfab9906dab6270d
This commit is contained in:
Andrew Rumble 2024-10-10 11:30:28 +01:00 committed by Copybot
parent 2bfb55a305
commit ad9c0446e2
3 changed files with 38 additions and 43 deletions

View file

@ -6,13 +6,10 @@ import metrics from '@overleaf/metrics'
import Settings from '@overleaf/settings' import Settings from '@overleaf/settings'
import logger from '@overleaf/logger' import logger from '@overleaf/logger'
import PlansLocator from './app/src/Features/Subscription/PlansLocator.js' import PlansLocator from './app/src/Features/Subscription/PlansLocator.js'
import SiteAdminHandler from './app/src/infrastructure/SiteAdminHandler.mjs' import SiteAdminHandler from './app/src/infrastructure/SiteAdminHandler.js'
import http from 'node:http' import http from 'node:http'
import https from 'node:https' import https from 'node:https'
import * as Serializers from './app/src/infrastructure/LoggerSerializers.js'
import * as Serializers from './app/src/infrastructure/LoggerSerializers.mjs'
import Server from './app/src/infrastructure/Server.mjs' import Server from './app/src/infrastructure/Server.mjs'
import QueueWorkers from './app/src/infrastructure/QueueWorkers.js' import QueueWorkers from './app/src/infrastructure/QueueWorkers.js'
import mongodb from './app/src/infrastructure/mongodb.js' import mongodb from './app/src/infrastructure/mongodb.js'

View file

@ -20,7 +20,7 @@ import cookieParser from 'cookie-parser'
import bearerTokenMiddleware from 'express-bearer-token' import bearerTokenMiddleware from 'express-bearer-token'
import passport from 'passport' import passport from 'passport'
import { Strategy as LocalStrategy } from 'passport-local' import { Strategy as LocalStrategy } from 'passport-local'
import ReferalConnect from '../Features/Referal/ReferalConnect.js' import ReferalConnect from '../Features/Referal/ReferalConnect.mjs'
import RedirectManager from './RedirectManager.js' import RedirectManager from './RedirectManager.js'
import translations from './Translations.js' import translations from './Translations.js'
import Views from './Views.js' import Views from './Views.js'

View file

@ -2,39 +2,39 @@ import AdminController from './Features/ServerAdmin/AdminController.js'
import ErrorController from './Features/Errors/ErrorController.js' import ErrorController from './Features/Errors/ErrorController.js'
import Features from './infrastructure/Features.js' import Features from './infrastructure/Features.js'
import ProjectController from './Features/Project/ProjectController.js' import ProjectController from './Features/Project/ProjectController.js'
import ProjectApiController from './Features/Project/ProjectApiController.js' import ProjectApiController from './Features/Project/ProjectApiController.mjs'
import ProjectListController from './Features/Project/ProjectListController.js' import ProjectListController from './Features/Project/ProjectListController.mjs'
import SpellingController from './Features/Spelling/SpellingController.js' import SpellingController from './Features/Spelling/SpellingController.mjs'
import EditorRouter from './Features/Editor/EditorRouter.js' import EditorRouter from './Features/Editor/EditorRouter.mjs'
import Settings from '@overleaf/settings' import Settings from '@overleaf/settings'
import TpdsController from './Features/ThirdPartyDataStore/TpdsController.js' import TpdsController from './Features/ThirdPartyDataStore/TpdsController.mjs'
import SubscriptionRouter from './Features/Subscription/SubscriptionRouter.js' import SubscriptionRouter from './Features/Subscription/SubscriptionRouter.mjs'
import UploadsRouter from './Features/Uploads/UploadsRouter.js' import UploadsRouter from './Features/Uploads/UploadsRouter.mjs'
import metrics from '@overleaf/metrics' import metrics from '@overleaf/metrics'
import ReferalController from './Features/Referal/ReferalController.js' import ReferalController from './Features/Referal/ReferalController.mjs'
import AuthenticationController from './Features/Authentication/AuthenticationController.js' import AuthenticationController from './Features/Authentication/AuthenticationController.js'
import PermissionsController from './Features/Authorization/PermissionsController.js' import PermissionsController from './Features/Authorization/PermissionsController.js'
import SessionManager from './Features/Authentication/SessionManager.js' import SessionManager from './Features/Authentication/SessionManager.js'
import TagsController from './Features/Tags/TagsController.js' import TagsController from './Features/Tags/TagsController.mjs'
import NotificationsController from './Features/Notifications/NotificationsController.js' import NotificationsController from './Features/Notifications/NotificationsController.mjs'
import CollaboratorsRouter from './Features/Collaborators/CollaboratorsRouter.js' import CollaboratorsRouter from './Features/Collaborators/CollaboratorsRouter.mjs'
import UserInfoController from './Features/User/UserInfoController.js' import UserInfoController from './Features/User/UserInfoController.js'
import UserController from './Features/User/UserController.js' import UserController from './Features/User/UserController.js'
import UserEmailsController from './Features/User/UserEmailsController.js' import UserEmailsController from './Features/User/UserEmailsController.js'
import UserPagesController from './Features/User/UserPagesController.js' import UserPagesController from './Features/User/UserPagesController.mjs'
import TutorialController from './Features/Tutorial/TutorialController.js' import TutorialController from './Features/Tutorial/TutorialController.mjs'
import DocumentController from './Features/Documents/DocumentController.js' import DocumentController from './Features/Documents/DocumentController.mjs'
import CompileManager from './Features/Compile/CompileManager.js' import CompileManager from './Features/Compile/CompileManager.js'
import CompileController from './Features/Compile/CompileController.js' import CompileController from './Features/Compile/CompileController.js'
import ClsiCookieManagerFactory from './Features/Compile/ClsiCookieManager.js' import ClsiCookieManagerFactory from './Features/Compile/ClsiCookieManager.js'
import HealthCheckController from './Features/HealthCheck/HealthCheckController.js' import HealthCheckController from './Features/HealthCheck/HealthCheckController.mjs'
import ProjectDownloadsController from './Features/Downloads/ProjectDownloadsController.js' import ProjectDownloadsController from './Features/Downloads/ProjectDownloadsController.mjs'
import FileStoreController from './Features/FileStore/FileStoreController.js' import FileStoreController from './Features/FileStore/FileStoreController.mjs'
import DocumentUpdaterController from './Features/DocumentUpdater/DocumentUpdaterController.js' import DocumentUpdaterController from './Features/DocumentUpdater/DocumentUpdaterController.mjs'
import HistoryController from './Features/History/HistoryController.js' import HistoryController from './Features/History/HistoryController.js'
import ExportsController from './Features/Exports/ExportsController.js' import ExportsController from './Features/Exports/ExportsController.mjs'
import PasswordResetRouter from './Features/PasswordReset/PasswordResetRouter.js' import PasswordResetRouter from './Features/PasswordReset/PasswordResetRouter.mjs'
import StaticPagesRouter from './Features/StaticPages/StaticPagesRouter.js' import StaticPagesRouter from './Features/StaticPages/StaticPagesRouter.mjs'
import ChatController from './Features/Chat/ChatController.js' import ChatController from './Features/Chat/ChatController.js'
import Modules from './infrastructure/Modules.js' import Modules from './infrastructure/Modules.js'
import { import {
@ -43,28 +43,24 @@ import {
overleafLoginRateLimiter, overleafLoginRateLimiter,
} from './infrastructure/RateLimiter.js' } from './infrastructure/RateLimiter.js'
import RateLimiterMiddleware from './Features/Security/RateLimiterMiddleware.js' import RateLimiterMiddleware from './Features/Security/RateLimiterMiddleware.js'
import InactiveProjectController from './Features/InactiveData/InactiveProjectController.js' import InactiveProjectController from './Features/InactiveData/InactiveProjectController.mjs'
import ContactRouter from './Features/Contacts/ContactRouter.js' import ContactRouter from './Features/Contacts/ContactRouter.mjs'
import ReferencesController from './Features/References/ReferencesController.js' import ReferencesController from './Features/References/ReferencesController.mjs'
import AuthorizationMiddleware from './Features/Authorization/AuthorizationMiddleware.js' import AuthorizationMiddleware from './Features/Authorization/AuthorizationMiddleware.js'
import BetaProgramController from './Features/BetaProgram/BetaProgramController.js' import BetaProgramController from './Features/BetaProgram/BetaProgramController.mjs'
import AnalyticsRouter from './Features/Analytics/AnalyticsRouter.js' import AnalyticsRouter from './Features/Analytics/AnalyticsRouter.mjs'
import MetaController from './Features/Metadata/MetaController.js' import MetaController from './Features/Metadata/MetaController.mjs'
import TokenAccessController from './Features/TokenAccess/TokenAccessController.js' import TokenAccessController from './Features/TokenAccess/TokenAccessController.mjs'
import TokenAccessRouter from './Features/TokenAccess/TokenAccessRouter.js' import TokenAccessRouter from './Features/TokenAccess/TokenAccessRouter.mjs'
import LinkedFilesRouter from './Features/LinkedFiles/LinkedFilesRouter.js' import LinkedFilesRouter from './Features/LinkedFiles/LinkedFilesRouter.mjs'
import TemplatesRouter from './Features/Templates/TemplatesRouter.js' import TemplatesRouter from './Features/Templates/TemplatesRouter.js'
import UserMembershipRouter from './Features/UserMembership/UserMembershipRouter.js' import UserMembershipRouter from './Features/UserMembership/UserMembershipRouter.mjs'
import SystemMessageController from './Features/SystemMessages/SystemMessageController.js' import SystemMessageController from './Features/SystemMessages/SystemMessageController.js'
import AnalyticsRegistrationSourceMiddleware from './Features/Analytics/AnalyticsRegistrationSourceMiddleware.js' import AnalyticsRegistrationSourceMiddleware from './Features/Analytics/AnalyticsRegistrationSourceMiddleware.js'
import AnalyticsUTMTrackingMiddleware from './Features/Analytics/AnalyticsUTMTrackingMiddleware.js' import AnalyticsUTMTrackingMiddleware from './Features/Analytics/AnalyticsUTMTrackingMiddleware.mjs'
import CaptchaMiddleware from './Features/Captcha/CaptchaMiddleware.js' import CaptchaMiddleware from './Features/Captcha/CaptchaMiddleware.js'
import { Joi, validate } from './infrastructure/Validation.js' import { Joi, validate } from './infrastructure/Validation.js'
import { import UnsupportedBrowserMiddleware from './infrastructure/UnsupportedBrowserMiddleware.js'
renderUnsupportedBrowserPage,
unsupportedBrowserMiddleware,
} from './infrastructure/UnsupportedBrowserMiddleware.js'
import logger from '@overleaf/logger' import logger from '@overleaf/logger'
import _ from 'lodash' import _ from 'lodash'
import { plainTextResponse } from './infrastructure/Response.js' import { plainTextResponse } from './infrastructure/Response.js'
@ -72,6 +68,8 @@ import PublicAccessLevels from './Features/Authorization/PublicAccessLevels.js'
const ClsiCookieManager = ClsiCookieManagerFactory( const ClsiCookieManager = ClsiCookieManagerFactory(
Settings.apis.clsi != null ? Settings.apis.clsi.backendGroupName : undefined Settings.apis.clsi != null ? Settings.apis.clsi.backendGroupName : undefined
) )
const { renderUnsupportedBrowserPage, unsupportedBrowserMiddleware } =
UnsupportedBrowserMiddleware
const rateLimiters = { const rateLimiters = {
addEmail: new RateLimiter('add-email', { addEmail: new RateLimiter('add-email', {