mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
refactor(cli): address review findings in telemetry code
- Extract shared isDevMode() to utils/env.ts (was duplicated in dev.ts and client.ts) - Use ui/colors.ts instead of raw ANSI escapes in telemetry notice (respects NO_COLOR) - Derive known commands from subCommands object instead of maintaining duplicate set - Skip telemetry on --help/--version and unknown commands - Gate incrementCommandCount() behind shouldTrack() (no disk writes in CI) - Add flushSync() for process.exit() paths (beforeExit doesn't fire on explicit exit) - Remove dead trackBrowserInstall(success) param (failure path never called it) - Remove redundant isEnabled/anonymousId caching in client.ts (config.ts cache suffices) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export { readConfig, writeConfig, incrementCommandCount, CONFIG_PATH } from "./config.js";
|
||||
export { trackEvent, flush, showTelemetryNotice } from "./client.js";
|
||||
export { trackEvent, flush, flushSync, shouldTrack, showTelemetryNotice } from "./client.js";
|
||||
export {
|
||||
trackCommand,
|
||||
trackRenderComplete,
|
||||
|
||||
Reference in New Issue
Block a user