Component evidence

CLI Event Bus (utilities/eventBus.ts)

trigger.dev · packages/cli-v3/src/utilities/eventBus.ts · typescript · Apache-2.0
dev-toolsclilang:typescripttag:eventemittertag:events

Typed EventEmitter defining build, worker, and socket connection lifecycle events used by the Trigger.dev CLI dev process. Reuse when coordinating cross-module notifications in CLI tooling.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/triggerdotdev/trigger.dev | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type {
  BuildManifest,
  BuildTarget,
  TaskRunExecution,
  TaskRunExecutionResult,
} from "@trigger.dev/core/v3";
import { EventEmitter } from "node:events";
import type { BackgroundWorker } from "../dev/backgroundWorker.js";
import type { Socket } from "socket.io-client";

export type EventBusEvents = {
  rebuildStarted: [BuildTarget];
  buildStarted: [BuildTarget];
  buildFailed: [BuildTarget, Error];
  /** A rebuild in watch mode failed. The errors are already logged, and the watcher keeps going. */
  rebuildFailed: [BuildTarget];
  workerSkipped: [];
  backgroundWor

... (truncated -- full source via MCP)