refactor(server): standalone runtime module (#9120)

This commit is contained in:
forehalo
2024-12-13 06:27:14 +00:00
parent 4c23991047
commit 81c68032e1
18 changed files with 85 additions and 75 deletions

View File

@@ -12,11 +12,11 @@ import { Socket } from 'socket.io';
import {
AlreadyInSpace,
CallMetric,
Config,
DocNotFound,
GatewayErrorWrapper,
metrics,
NotInSpace,
Runtime,
SpaceAccessDenied,
VersionRejected,
} from '../../base';
@@ -139,7 +139,7 @@ export class SpaceSyncGateway
private connectionCount = 0;
constructor(
private readonly config: Config,
private readonly runtime: Runtime,
private readonly permissions: PermissionService,
private readonly workspace: PgWorkspaceDocStorageAdapter,
private readonly userspace: PgUserspaceDocStorageAdapter
@@ -175,7 +175,7 @@ export class SpaceSyncGateway
}
async assertVersion(client: Socket, version?: string) {
const shouldCheckClientVersion = await this.config.runtime.fetch(
const shouldCheckClientVersion = await this.runtime.fetch(
'flags/syncClientVersionCheck'
);
if (