tftsr-devops_investigation/node_modules/vitest/dist/chunks/config.Cy0C388Z.d.ts
Shaun Arman 8839075805 feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.

Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)

Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)

DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload

Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:36:25 -05:00

209 lines
6.0 KiB
TypeScript

import { PrettyFormatOptions } from '@vitest/pretty-format';
import { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
import { SnapshotUpdateState } from '@vitest/snapshot';
import { SnapshotEnvironment } from '@vitest/snapshot/environment';
/**
* Names of clock methods that may be faked by install.
*/
type FakeMethod =
| "setTimeout"
| "clearTimeout"
| "setImmediate"
| "clearImmediate"
| "setInterval"
| "clearInterval"
| "Date"
| "nextTick"
| "hrtime"
| "requestAnimationFrame"
| "cancelAnimationFrame"
| "requestIdleCallback"
| "cancelIdleCallback"
| "performance"
| "queueMicrotask";
interface FakeTimerInstallOpts {
/**
* Installs fake timers with the specified unix epoch (default: 0)
*/
now?: number | Date | undefined;
/**
* An array with names of global methods and APIs to fake.
* For instance, `vi.useFakeTimer({ toFake: ['setTimeout', 'performance'] })` will fake only `setTimeout()` and `performance.now()`
* @default ['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date']
*/
toFake?: FakeMethod[] | undefined;
/**
* The maximum number of timers that will be run when calling runAll()
* @default 10000
*/
loopLimit?: number | undefined;
/**
* Tells @sinonjs/fake-timers to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by
* 20ms for every 20ms change in the real system time) (default: false)
*/
shouldAdvanceTime?: boolean | undefined;
/**
* Relevant only when using with shouldAdvanceTime: true. increment mocked time by advanceTimeDelta ms every advanceTimeDelta ms change
* in the real system time (default: 20)
*/
advanceTimeDelta?: number | undefined;
/**
* Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers.
* @default true
*/
shouldClearNativeTimers?: boolean | undefined;
}
/**
* Config that tests have access to.
*/
interface SerializedConfig {
name: string | undefined;
globals: boolean;
base: string | undefined;
snapshotEnvironment?: string;
disableConsoleIntercept: boolean | undefined;
runner: string | undefined;
isolate: boolean;
mode: 'test' | 'benchmark';
bail: number | undefined;
environmentOptions?: Record<string, any>;
root: string;
setupFiles: string[];
passWithNoTests: boolean;
testNamePattern: RegExp | undefined;
allowOnly: boolean;
testTimeout: number;
hookTimeout: number;
clearMocks: boolean;
mockReset: boolean;
restoreMocks: boolean;
unstubGlobals: boolean;
unstubEnvs: boolean;
fakeTimers: FakeTimerInstallOpts;
maxConcurrency: number;
defines: Record<string, any>;
expect: {
requireAssertions?: boolean;
poll?: {
timeout?: number;
interval?: number;
};
};
printConsoleTrace: boolean | undefined;
sequence: {
shuffle?: boolean;
concurrent?: boolean;
seed: number;
hooks: SequenceHooks;
setupFiles: SequenceSetupFiles;
};
poolOptions: {
forks: {
singleFork: boolean;
isolate: boolean;
};
threads: {
singleThread: boolean;
isolate: boolean;
};
vmThreads: {
singleThread: boolean;
};
vmForks: {
singleFork: boolean;
};
};
deps: {
web: {
transformAssets?: boolean;
transformCss?: boolean;
transformGlobPattern?: RegExp | RegExp[];
};
optimizer: {
web: {
enabled: boolean;
};
ssr: {
enabled: boolean;
};
};
interopDefault: boolean | undefined;
moduleDirectories: string[] | undefined;
};
snapshotOptions: {
updateSnapshot: SnapshotUpdateState;
expand: boolean | undefined;
snapshotFormat: PrettyFormatOptions | undefined;
/**
* only exists for tests, not available in the main process
*/
snapshotEnvironment: SnapshotEnvironment;
};
pool: string;
snapshotSerializers: string[];
chaiConfig: {
includeStack?: boolean;
showDiff?: boolean;
truncateThreshold?: number;
} | undefined;
diff: string | undefined;
retry: number;
includeTaskLocation: boolean | undefined;
inspect: boolean | string | undefined;
inspectBrk: boolean | string | undefined;
inspector: {
enabled?: boolean;
port?: number;
host?: string;
waitForDebugger?: boolean;
};
watch: boolean;
env: Record<string, any>;
browser: {
name: string;
headless: boolean;
isolate: boolean;
fileParallelism: boolean;
ui: boolean;
viewport: {
width: number;
height: number;
};
locators: {
testIdAttribute: string;
};
screenshotFailures: boolean;
};
standalone: boolean;
logHeapUsage: boolean | undefined;
coverage: SerializedCoverageConfig;
benchmark?: {
includeSamples: boolean;
};
}
interface SerializedCoverageConfig {
provider: 'istanbul' | 'v8' | 'custom' | undefined;
reportsDirectory: string;
htmlReporter: {
subdir: string | undefined;
} | undefined;
enabled: boolean;
customProviderModule: string | undefined;
}
type RuntimeConfig = Pick<SerializedConfig, 'allowOnly' | 'testTimeout' | 'hookTimeout' | 'clearMocks' | 'mockReset' | 'restoreMocks' | 'fakeTimers' | 'maxConcurrency' | 'expect' | 'printConsoleTrace'> & {
sequence?: {
hooks?: SequenceHooks;
};
};
type RuntimeOptions = Partial<RuntimeConfig>;
export type { FakeTimerInstallOpts as F, RuntimeOptions as R, SerializedConfig as S, SerializedCoverageConfig as a, RuntimeConfig as b };