diff --git a/app/gen-server/ApiServer.ts b/app/gen-server/ApiServer.ts index 915012ad143..b927d62f4a4 100644 --- a/app/gen-server/ApiServer.ts +++ b/app/gen-server/ApiServer.ts @@ -9,7 +9,7 @@ import {FullUser} from 'app/common/LoginSessionAPI'; import {BasicRole} from 'app/common/roles'; import {OrganizationProperties, PermissionDelta} from 'app/common/UserAPI'; import {User} from 'app/gen-server/entity/User'; -import {BillingOptions, HomeDBManager, QueryResult, Scope} from 'app/gen-server/lib/HomeDBManager'; +import {BillingOptions, HomeDBManager, QueryResult, Scope} from 'app/gen-server/lib/homedb/HomeDBManager'; import {getAuthorizedUserId, getUserId, getUserProfiles, RequestWithLogin} from 'app/server/lib/Authorizer'; import {getSessionUser, linkOrgWithEmail} from 'app/server/lib/BrowserSession'; import {expressWrap} from 'app/server/lib/expressWrap'; diff --git a/app/gen-server/lib/Activations.ts b/app/gen-server/lib/Activations.ts index b089efbe408..2648c98b736 100644 --- a/app/gen-server/lib/Activations.ts +++ b/app/gen-server/lib/Activations.ts @@ -1,6 +1,6 @@ import { makeId } from 'app/server/lib/idUtils'; import { Activation } from 'app/gen-server/entity/Activation'; -import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager'; /** * Manage activations. Not much to do currently, there is at most one diff --git a/app/gen-server/lib/DocApiForwarder.ts b/app/gen-server/lib/DocApiForwarder.ts index 3545a63a28d..ed58e03bf22 100644 --- a/app/gen-server/lib/DocApiForwarder.ts +++ b/app/gen-server/lib/DocApiForwarder.ts @@ -5,7 +5,7 @@ import {AbortController} from 'node-abort-controller'; import { ApiError } from 'app/common/ApiError'; import { SHARE_KEY_PREFIX } from 'app/common/gristUrls'; import { removeTrailingSlash } from 'app/common/gutil'; -import { HomeDBManager } from "app/gen-server/lib/HomeDBManager"; +import { HomeDBManager } from "app/gen-server/lib/homedb/HomeDBManager"; import { assertAccess, getOrSetDocAuth, getTransitiveHeaders, RequestWithLogin } from 'app/server/lib/Authorizer'; import { IDocWorkerMap } from "app/server/lib/DocWorkerMap"; import { expressWrap } from "app/server/lib/expressWrap"; diff --git a/app/gen-server/lib/Doom.ts b/app/gen-server/lib/Doom.ts index cbce2587dd6..1d6bc0d6486 100644 --- a/app/gen-server/lib/Doom.ts +++ b/app/gen-server/lib/Doom.ts @@ -1,7 +1,7 @@ import { ApiError } from 'app/common/ApiError'; import { FullUser } from 'app/common/UserAPI'; import { Organization } from 'app/gen-server/entity/Organization'; -import { HomeDBManager, Scope } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager, Scope } from 'app/gen-server/lib/homedb/HomeDBManager'; import { INotifier } from 'app/server/lib/INotifier'; import { scrubUserFromOrg } from 'app/gen-server/lib/scrubUserFromOrg'; import { GristLoginSystem } from 'app/server/lib/GristServer'; diff --git a/app/gen-server/lib/Housekeeper.ts b/app/gen-server/lib/Housekeeper.ts index c40379fe157..c3012bec6b3 100644 --- a/app/gen-server/lib/Housekeeper.ts +++ b/app/gen-server/lib/Housekeeper.ts @@ -7,7 +7,7 @@ import { Document } from 'app/gen-server/entity/Document'; import { Organization } from 'app/gen-server/entity/Organization'; import { Product } from 'app/gen-server/entity/Product'; import { Workspace } from 'app/gen-server/entity/Workspace'; -import { HomeDBManager, Scope } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager, Scope } from 'app/gen-server/lib/homedb/HomeDBManager'; import { fromNow } from 'app/gen-server/sqlUtils'; import { getAuthorizedUserId } from 'app/server/lib/Authorizer'; import { expressWrap } from 'app/server/lib/expressWrap'; diff --git a/app/gen-server/lib/Usage.ts b/app/gen-server/lib/Usage.ts index 865fa2b12eb..9082bdcca95 100644 --- a/app/gen-server/lib/Usage.ts +++ b/app/gen-server/lib/Usage.ts @@ -1,7 +1,7 @@ import {Document} from 'app/gen-server/entity/Document'; import {Organization} from 'app/gen-server/entity/Organization'; import {User} from 'app/gen-server/entity/User'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import log from 'app/server/lib/log'; // Frequency of logging usage information. Not something we need diff --git a/app/gen-server/lib/HomeDBManager.ts b/app/gen-server/lib/homedb/HomeDBManager.ts similarity index 100% rename from app/gen-server/lib/HomeDBManager.ts rename to app/gen-server/lib/homedb/HomeDBManager.ts diff --git a/app/gen-server/lib/homedb/UsersManager.ts b/app/gen-server/lib/homedb/UsersManager.ts index 168665f354a..e070273ac52 100644 --- a/app/gen-server/lib/homedb/UsersManager.ts +++ b/app/gen-server/lib/homedb/UsersManager.ts @@ -17,7 +17,7 @@ import { Group } from 'app/gen-server/entity/Group'; import { Login } from 'app/gen-server/entity/Login'; import { User } from 'app/gen-server/entity/User'; import { appSettings } from 'app/server/lib/AppSettings'; -import { HomeDBManager, PermissionDeltaAnalysis, Scope } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager, PermissionDeltaAnalysis, Scope } from 'app/gen-server/lib/homedb/HomeDBManager'; import { AvailableUsers, GetUserOptions, NonGuestGroup, QueryResult, Resource, RunInTransaction, UserProfileChange } from 'app/gen-server/lib/homedb/Interfaces'; diff --git a/app/server/companion.ts b/app/server/companion.ts index f28475c8092..bad8092ce59 100644 --- a/app/server/companion.ts +++ b/app/server/companion.ts @@ -1,7 +1,7 @@ import { Level, TelemetryContracts } from 'app/common/Telemetry'; import { version } from 'app/common/version'; import { synchronizeProducts } from 'app/gen-server/entity/Product'; -import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager'; import { applyPatch } from 'app/gen-server/lib/TypeORMPatches'; import { getMigrations, getOrCreateConnection, getTypeORMSettings, undoLastMigration, updateDb } from 'app/server/lib/dbUtils'; diff --git a/app/server/lib/AppEndpoint.ts b/app/server/lib/AppEndpoint.ts index b327a4e1fbd..8147bfcf1f8 100644 --- a/app/server/lib/AppEndpoint.ts +++ b/app/server/lib/AppEndpoint.ts @@ -11,7 +11,7 @@ import {LocalPlugin} from "app/common/plugin"; import {TELEMETRY_TEMPLATE_SIGNUP_COOKIE_NAME} from 'app/common/Telemetry'; import {Document as APIDocument, PublicDocWorkerUrlInfo} from 'app/common/UserAPI'; import {Document} from "app/gen-server/entity/Document"; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {assertAccess, getTransitiveHeaders, getUserId, isAnonymousUser, RequestWithLogin} from 'app/server/lib/Authorizer'; import {DocStatus, IDocWorkerMap} from 'app/server/lib/DocWorkerMap'; diff --git a/app/server/lib/Authorizer.ts b/app/server/lib/Authorizer.ts index 6f9a6741253..0386a6d3041 100644 --- a/app/server/lib/Authorizer.ts +++ b/app/server/lib/Authorizer.ts @@ -7,7 +7,7 @@ import {canEdit, canView, getWeakestRole, Role} from 'app/common/roles'; import {UserOptions} from 'app/common/UserAPI'; import {Document} from 'app/gen-server/entity/Document'; import {User} from 'app/gen-server/entity/User'; -import {DocAuthKey, DocAuthResult, HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {DocAuthKey, DocAuthResult, HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {forceSessionChange, getSessionProfiles, getSessionUser, getSignInStatus, linkOrgWithEmail, SessionObj, SessionUserObj, SignInStatus} from 'app/server/lib/BrowserSession'; import {RequestWithOrg} from 'app/server/lib/extractOrg'; diff --git a/app/server/lib/Client.ts b/app/server/lib/Client.ts index 0364ca365ad..ce2a9b0bc6f 100644 --- a/app/server/lib/Client.ts +++ b/app/server/lib/Client.ts @@ -8,7 +8,7 @@ import {TelemetryMetadata} from 'app/common/Telemetry'; import {ANONYMOUS_USER_EMAIL} from 'app/common/UserAPI'; import {normalizeEmail} from 'app/common/emails'; import {User} from 'app/gen-server/entity/User'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {ActiveDoc} from 'app/server/lib/ActiveDoc'; import {Authorizer} from 'app/server/lib/Authorizer'; import {ScopedSession} from 'app/server/lib/BrowserSession'; diff --git a/app/server/lib/DocApi.ts b/app/server/lib/DocApi.ts index 297cafff760..f7d0a946471 100644 --- a/app/server/lib/DocApi.ts +++ b/app/server/lib/DocApi.ts @@ -30,7 +30,7 @@ import {TelemetryMetadataByLevel} from "app/common/Telemetry"; import {WebhookFields} from "app/common/Triggers"; import TriggersTI from 'app/common/Triggers-ti'; import {DocReplacementOptions, DocState, DocStateComparison, DocStates, NEW_DOCUMENT_CODE} from 'app/common/UserAPI'; -import {HomeDBManager, makeDocAuthResult} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager, makeDocAuthResult} from 'app/gen-server/lib/homedb/HomeDBManager'; import * as Types from "app/plugin/DocApiTypes"; import DocApiTypesTI from "app/plugin/DocApiTypes-ti"; import {GristObjCode} from "app/plugin/GristData"; diff --git a/app/server/lib/DocManager.ts b/app/server/lib/DocManager.ts index 437559f857b..f342ab9a459 100644 --- a/app/server/lib/DocManager.ts +++ b/app/server/lib/DocManager.ts @@ -15,7 +15,7 @@ import {Invite} from 'app/common/sharing'; import {tbind} from 'app/common/tbind'; import {TelemetryMetadataByLevel} from 'app/common/Telemetry'; import {NEW_DOCUMENT_CODE} from 'app/common/UserAPI'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {assertAccess, Authorizer, DocAuthorizer, DummyAuthorizer, isSingleUserMode, RequestWithLogin} from 'app/server/lib/Authorizer'; import {Client} from 'app/server/lib/Client'; diff --git a/app/server/lib/DocWorker.ts b/app/server/lib/DocWorker.ts index 7bb8d8e6108..b8f0d608e11 100644 --- a/app/server/lib/DocWorker.ts +++ b/app/server/lib/DocWorker.ts @@ -3,7 +3,7 @@ * In hosted environment, this comprises the functionality of the DocWorker instance type. */ import {isAffirmative} from 'app/common/gutil'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {ActionHistoryImpl} from 'app/server/lib/ActionHistoryImpl'; import {assertAccess, getOrSetDocAuth, RequestWithLogin} from 'app/server/lib/Authorizer'; import {Client} from 'app/server/lib/Client'; diff --git a/app/server/lib/FlexServer.ts b/app/server/lib/FlexServer.ts index 812e1d21017..a3568ecb772 100644 --- a/app/server/lib/FlexServer.ts +++ b/app/server/lib/FlexServer.ts @@ -20,7 +20,7 @@ import {Activations} from 'app/gen-server/lib/Activations'; import {DocApiForwarder} from 'app/gen-server/lib/DocApiForwarder'; import {getDocWorkerMap} from 'app/gen-server/lib/DocWorkerMap'; import {Doom} from 'app/gen-server/lib/Doom'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {Housekeeper} from 'app/gen-server/lib/Housekeeper'; import {Usage} from 'app/gen-server/lib/Usage'; import {AccessTokens, IAccessTokens} from 'app/server/lib/AccessTokens'; diff --git a/app/server/lib/GranularAccess.ts b/app/server/lib/GranularAccess.ts index 69fcf2ee708..08626869854 100644 --- a/app/server/lib/GranularAccess.ts +++ b/app/server/lib/GranularAccess.ts @@ -35,7 +35,7 @@ import { EmptyRecordView, InfoView, RecordView } from 'app/common/RecordView'; import { canEdit, canView, isValidRole, Role } from 'app/common/roles'; import { User } from 'app/common/User'; import { FullUser, UserAccessData } from 'app/common/UserAPI'; -import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager'; import { GristObjCode } from 'app/plugin/GristData'; import { DocClients } from 'app/server/lib/DocClients'; import { getDocSessionAccess, getDocSessionAltSessionId, getDocSessionShare, diff --git a/app/server/lib/GristServer.ts b/app/server/lib/GristServer.ts index 1e92639544a..265535d7bd9 100644 --- a/app/server/lib/GristServer.ts +++ b/app/server/lib/GristServer.ts @@ -8,7 +8,7 @@ import { Organization } from 'app/gen-server/entity/Organization'; import { User } from 'app/gen-server/entity/User'; import { Workspace } from 'app/gen-server/entity/Workspace'; import { Activations } from 'app/gen-server/lib/Activations'; -import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager'; import { IAccessTokens } from 'app/server/lib/AccessTokens'; import { RequestWithLogin } from 'app/server/lib/Authorizer'; import { Comm } from 'app/server/lib/Comm'; diff --git a/app/server/lib/HostedMetadataManager.ts b/app/server/lib/HostedMetadataManager.ts index bce0a0552c4..f49a545bd0c 100644 --- a/app/server/lib/HostedMetadataManager.ts +++ b/app/server/lib/HostedMetadataManager.ts @@ -1,4 +1,4 @@ -import {DocumentMetadata, HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {DocumentMetadata, HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import log from 'app/server/lib/log'; /** diff --git a/app/server/lib/HostedStorageManager.ts b/app/server/lib/HostedStorageManager.ts index 9be39f85479..fa73beb6303 100644 --- a/app/server/lib/HostedStorageManager.ts +++ b/app/server/lib/HostedStorageManager.ts @@ -8,7 +8,7 @@ import {DocumentUsage} from 'app/common/DocUsage'; import {buildUrlId, parseUrlId} from 'app/common/gristUrls'; import {KeyedOps} from 'app/common/KeyedOps'; import {DocReplacementOptions, NEW_DOCUMENT_CODE} from 'app/common/UserAPI'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {checksumFile} from 'app/server/lib/checksumFile'; import {DocSnapshotInventory, DocSnapshotPruner} from 'app/server/lib/DocSnapshots'; import {IDocWorkerMap} from 'app/server/lib/DocWorkerMap'; diff --git a/app/server/lib/ICreate.ts b/app/server/lib/ICreate.ts index 3ca48d0cd9b..4b4d66eeea8 100644 --- a/app/server/lib/ICreate.ts +++ b/app/server/lib/ICreate.ts @@ -1,7 +1,7 @@ import {GristDeploymentType} from 'app/common/gristUrls'; import {getThemeBackgroundSnippet} from 'app/common/Themes'; import {Document} from 'app/gen-server/entity/Document'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {ExternalStorage} from 'app/server/lib/ExternalStorage'; import {createDummyTelemetry, GristServer} from 'app/server/lib/GristServer'; import {IBilling} from 'app/server/lib/IBilling'; diff --git a/app/server/lib/InstallAdmin.ts b/app/server/lib/InstallAdmin.ts index 0a00bfa18e7..f7fdba0d035 100644 --- a/app/server/lib/InstallAdmin.ts +++ b/app/server/lib/InstallAdmin.ts @@ -1,5 +1,5 @@ import {ApiError} from 'app/common/ApiError'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {appSettings} from 'app/server/lib/AppSettings'; import {getUser, RequestWithLogin} from 'app/server/lib/Authorizer'; import {User} from 'app/gen-server/entity/User'; diff --git a/app/server/lib/Telemetry.ts b/app/server/lib/Telemetry.ts index 6d34160046f..a08381c1459 100644 --- a/app/server/lib/Telemetry.ts +++ b/app/server/lib/Telemetry.ts @@ -17,7 +17,7 @@ import { import {TelemetryPrefsWithSources} from 'app/common/InstallAPI'; import {Activation} from 'app/gen-server/entity/Activation'; import {Activations} from 'app/gen-server/lib/Activations'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {RequestWithLogin} from 'app/server/lib/Authorizer'; import {getDocSessionUser, OptDocSession} from 'app/server/lib/DocSession'; import {expressWrap} from 'app/server/lib/expressWrap'; diff --git a/app/server/lib/TestLogin.ts b/app/server/lib/TestLogin.ts index 2cd0d5ac193..12ef87a3c23 100644 --- a/app/server/lib/TestLogin.ts +++ b/app/server/lib/TestLogin.ts @@ -1,4 +1,4 @@ -import {SUPPORT_EMAIL} from 'app/gen-server/lib/HomeDBManager'; +import {SUPPORT_EMAIL} from 'app/gen-server/lib/homedb/HomeDBManager'; import {GristLoginSystem, GristServer} from 'app/server/lib/GristServer'; import {Request} from 'express'; diff --git a/app/server/lib/extractOrg.ts b/app/server/lib/extractOrg.ts index 787fa1b84f9..524aa97e381 100644 --- a/app/server/lib/extractOrg.ts +++ b/app/server/lib/extractOrg.ts @@ -3,7 +3,7 @@ import { mapGetOrSet, MapWithTTL } from 'app/common/AsyncCreate'; import { extractOrgParts, getHostType, getKnownOrg } from 'app/common/gristUrls'; import { isAffirmative } from 'app/common/gutil'; import { Organization } from 'app/gen-server/entity/Organization'; -import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager'; +import { HomeDBManager } from 'app/gen-server/lib/homedb/HomeDBManager'; import { GristServer } from 'app/server/lib/GristServer'; import { getOriginUrl } from 'app/server/lib/requestUtils'; import { NextFunction, Request, RequestHandler, Response } from 'express'; diff --git a/app/server/lib/requestUtils.ts b/app/server/lib/requestUtils.ts index de0326d478e..7f69396692d 100644 --- a/app/server/lib/requestUtils.ts +++ b/app/server/lib/requestUtils.ts @@ -1,7 +1,7 @@ import {ApiError} from 'app/common/ApiError'; import { DEFAULT_HOME_SUBDOMAIN, isOrgInPathOnly, parseSubdomain, sanitizePathTail } from 'app/common/gristUrls'; import * as gutil from 'app/common/gutil'; -import {DocScope, QueryResult, Scope} from 'app/gen-server/lib/HomeDBManager'; +import {DocScope, QueryResult, Scope} from 'app/gen-server/lib/homedb/HomeDBManager'; import {getUserId, RequestWithLogin} from 'app/server/lib/Authorizer'; import {RequestWithOrg} from 'app/server/lib/extractOrg'; import {RequestWithGrist} from 'app/server/lib/GristServer'; diff --git a/app/server/lib/sendAppPage.ts b/app/server/lib/sendAppPage.ts index ec53f2be695..3fce3c382d8 100644 --- a/app/server/lib/sendAppPage.ts +++ b/app/server/lib/sendAppPage.ts @@ -12,7 +12,7 @@ import {isAffirmative} from 'app/common/gutil'; import {getTagManagerSnippet} from 'app/common/tagManager'; import {Document} from 'app/common/UserAPI'; import {AttachedCustomWidgets, IAttachedCustomWidget} from "app/common/widgetTypes"; -import {SUPPORT_EMAIL} from 'app/gen-server/lib/HomeDBManager'; +import {SUPPORT_EMAIL} from 'app/gen-server/lib/homedb/HomeDBManager'; import {isAnonymousUser, isSingleUserMode, RequestWithLogin} from 'app/server/lib/Authorizer'; import {RequestWithOrg} from 'app/server/lib/extractOrg'; import {GristServer} from 'app/server/lib/GristServer'; diff --git a/stubs/app/server/server.ts b/stubs/app/server/server.ts index e8761cef15c..6fbffdf52b6 100644 --- a/stubs/app/server/server.ts +++ b/stubs/app/server/server.ts @@ -6,7 +6,7 @@ import {commonUrls} from 'app/common/gristUrls'; import {isAffirmative} from 'app/common/gutil'; -import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager'; +import {HomeDBManager} from 'app/gen-server/lib/homedb/HomeDBManager'; import {fixSiteProducts} from 'app/gen-server/lib/Housekeeper'; const debugging = isAffirmative(process.env.DEBUG) || isAffirmative(process.env.VERBOSE);