Files
Automata/packages/cli/src/internal-hooks.ts
Iván Ovejero f667b384c9 refactor(core): Standardize filenames in cli (no-changelog) (#10484)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2024-08-22 11:10:37 +02:00

25 lines
925 B
TypeScript

import { Service } from 'typedi';
import { Telemetry } from '@/telemetry';
import { MessageEventBus } from './eventbus/MessageEventBus/MessageEventBus';
/**
* @deprecated Do not add to this class. It will be removed once we remove
* further dep cycles. To add log streaming or telemetry events, use
* `EventService` to emit the event and then use the `LogStreamingEventRelay` or
* `TelemetryEventRelay` to forward them to the event bus or telemetry.
*/
@Service()
export class InternalHooks {
constructor(
private readonly telemetry: Telemetry,
// Can't use @ts-expect-error because only dev time tsconfig considers this as an error, but not build time
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - needed until we decouple telemetry
private readonly _eventBus: MessageEventBus, // needed until we decouple telemetry
) {}
async init() {
await this.telemetry.init();
}
}