πŸ“„ File detail

utils/sinks.ts

🧩 .tsπŸ“ 17 linesπŸ’Ύ 608 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œutils/”, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, …). On the API surface it exposes initSinks β€” mainly functions, hooks, or classes. It composes internal code from services and errorLogSink (relative imports).

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

import { initializeAnalyticsSink } from '../services/analytics/sink.js' import { initializeErrorLogSink } from './errorLogSink.js' /** * Attach error log and analytics sinks, draining any events queued before

πŸ“€ Exports (heuristic)

  • initSinks

πŸ–₯️ Source preview

import { initializeAnalyticsSink } from '../services/analytics/sink.js'
import { initializeErrorLogSink } from './errorLogSink.js'

/**
 * Attach error log and analytics sinks, draining any events queued before
 * attachment. Both inits are idempotent. Called from setup() for the default
 * command; other entrypoints (subcommands, daemon, bridge) call this directly
 * since they bypass setup().
 *
 * Leaf module β€” kept out of setup.ts to avoid the setup β†’ commands β†’ bridge
 * β†’ setup import cycle.
 */
export function initSinks(): void {
  initializeErrorLogSink()
  initializeAnalyticsSink()
}