@tanstack/cli
Version:
TanStack CLI
25 lines (24 loc) • 1.07 kB
TypeScript
import { getTelemetryStatus } from './telemetry-config.js';
import type { StatusEvent } from '@tanstack/create';
type TelemetryProperties = Record<string, unknown>;
export declare class TelemetryClient {
private commandProperties;
private pendingSteps;
private completedSteps;
private readonly disabledBy?;
private readonly distinctId?;
readonly enabled: boolean;
constructor(status: Awaited<ReturnType<typeof getTelemetryStatus>>);
mergeProperties(properties: TelemetryProperties): void;
startStep(info: StatusEvent): void;
finishStep(id: string): void;
captureCommandStarted(command: string, properties: TelemetryProperties): Promise<void>;
captureCommandCompleted(command: string, durationMs: number): Promise<void>;
captureCommandFailed(command: string, durationMs: number, error: unknown): Promise<void>;
private baseProperties;
}
export declare function createTelemetryClient(opts?: {
json?: boolean;
}): Promise<TelemetryClient>;
export declare function resetTelemetryStateForTests(): void;
export {};