From 77cf5135f88f28cf00daa72c85a9c49762cda8d0 Mon Sep 17 00:00:00 2001 From: Lars Johansson Date: Fri, 17 Nov 2023 16:47:19 +0100 Subject: [PATCH] Revert "feat: dynamic import of socketio client (#173)" This reverts commit 058bbdcc0c1dc71616657931da073d523e9e08bc. --- source/event_hub.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/event_hub.ts b/source/event_hub.ts index 162f0c9..4cbe451 100644 --- a/source/event_hub.ts +++ b/source/event_hub.ts @@ -1,6 +1,7 @@ // :copyright: Copyright (c) 2016 ftrack import { v4 as uuidV4 } from "uuid"; import loglevel from "loglevel"; +import io from "./simple_socketio.js"; import { Event } from "./event.js"; import { EventServerConnectionTimeoutError, @@ -9,7 +10,7 @@ import { NotUniqueError, } from "./error.js"; import { Data } from "./types.js"; -import type io from "./simple_socketio.js"; + interface BaseActionData { selection: Array<{ entityId: string; @@ -177,9 +178,7 @@ export class EventHub { } /** Connect to the event server. */ - async connect(): Promise { - const simple_socketio = await import("./simple_socketio.js"); - const io = simple_socketio.default; + connect(): void { this._socketIo = io.connect(this._serverUrl, this._apiUser, this._apiKey); this._socketIo.on("connect", this._onSocketConnected); this._socketIo.on("ftrack.event", this._handle);