tftsr-devops_investigation/node_modules/@wdio/utils/build/utils.d.ts

103 lines
4.3 KiB
TypeScript
Raw Normal View History

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-15 03:36:25 +00:00
import type { Options, Services } from '@wdio/types';
export declare const SLASH = "/";
export declare const REG_EXP_WINDOWS_ABS_PATH: RegExp;
export declare function isAbsolute(p: string): boolean;
/**
* overwrite native element commands with user defined
* @param {object} propertiesObject propertiesObject
*/
export declare function overwriteElementCommands(propertiesObject: {
'__elementOverrides__'?: {
value: Record<string, unknown>;
};
[key: string]: unknown;
}): void;
/**
* get command call structure
* (for logging purposes)
*/
export declare function commandCallStructure(commandName: string, args: unknown[], unfurl?: boolean): string;
/**
* transforms WebDriver result for log stream to avoid unnecessary long
* result strings e.g. if it contains a screenshot
* @param {object} result WebDriver response body
*/
export declare function transformCommandLogResult(result: unknown): {} | null;
/**
* checks if command argument is valid according to specification
*
* @param {*} arg command argument
* @param {Object} expectedType parameter type (e.g. `number`, `string[]` or `(number|string)`)
* @return {Boolean} true if argument is valid
*/
export declare function isValidParameter(arg: unknown, expectedType: string): boolean;
/**
* get type of command argument
*/
export declare function getArgumentType(arg: unknown): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null";
/**
* Utility to import modules with user friendly error message
* @param moduleName The name of the module to import
* @param namedImport The name of the import to return
* @returns The imported module
*/
export declare function userImport<T>(moduleName: string, namedImport?: string): Promise<T>;
/**
* Allows to safely require a package, it only throws if the package was found
* but failed to load due to syntax errors
* @param {string} name of package
* @return {object} package content
*/
export declare function safeImport(name: string): Promise<Services.ServicePlugin | null>;
/**
* is function async
* @param {Function} fn function to check
* @return {Boolean} true provided function is async
*/
export declare function isFunctionAsync(fn: Function): boolean;
/**
* filter out arguments passed to specFn & hookFn, don't allow callbacks
* as there is no need for user to call e.g. `done()`
*/
export declare function filterSpecArgs(args: unknown[]): unknown[];
/**
* checks if provided string is Base64
* @param {string} str string to check
* @return {boolean} `true` if the provided string is Base64
*/
export declare function isBase64(str: string): boolean;
/**
* sleep
* @param {number=0} ms number in ms to sleep
*/
export declare const sleep: (ms?: number) => Promise<unknown>;
/**
* Checks if the provided WebdriverIO capabilities object is related to Appium.
*
* @param {WebdriverIO.Capabilities} caps - The capabilities object to check.
* @returns {boolean} Returns true if the provided capabilities are related to Appium, false otherwise.
*/
export declare function isAppiumCapability(caps: WebdriverIO.Capabilities): boolean;
/**
* helper method to determine if we need to setup a browser driver
* which is:
* - whenever the user has set connection options that differ
* from the default, or a port is set
* - whenever the user defines `user` and `key` which later will
* update the connection options
*/
export declare function definesRemoteDriver(options: Pick<Options.WebDriver, 'user' | 'key' | 'protocol' | 'hostname' | 'port' | 'path'>): boolean;
export declare function isChrome(browserName?: string): boolean;
export declare function isSafari(browserName?: string): boolean;
export declare function isFirefox(browserName?: string): boolean;
export declare function isEdge(browserName?: string): boolean;
/**
* traverse up the scope chain until browser element was reached
*/
export declare function getBrowserObject(elem: WebdriverIO.Element | WebdriverIO.Browser | WebdriverIO.ElementArray): WebdriverIO.Browser;
/**
* Enables logging to a file in a specified directory.
* @param {string} outputDir Directory containing the log file
*/
export declare function enableFileLogging(outputDir?: string): Promise<void>;
//# sourceMappingURL=utils.d.ts.map