
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@testivai/common
Advanced tools
Shared utilities for TestivAI SDKs and CLI.
This package contains common functionality used by:
@testivai/cli - The TestivAI command-line interface@testivai/witness-playwright - The Playwright SDKtestivai.config.tsnpm install @testivai/common
import {
CoreApiClient,
getApiKey,
loadConfig,
TestivaiConfig
} from '@testivai/common';
// Get API key from environment or stored credentials
const apiKey = getApiKey();
// Create API client
const client = new CoreApiClient(apiKey);
// Validate the API key
const result = await client.validateApiKey();
console.log(result.valid); // true or false
// Load configuration
const config = await loadConfig();
console.log(config.outputDir); // './visual-tests'
const client = new CoreApiClient(apiKey: string, baseUrl?: string);
// Validate API key
await client.validateApiKey(): Promise<ApiKeyValidationResponse>
// Submit visual check
await client.submitVisualCheck(data: CaptureData): Promise<VisualCheckResult>
// Get test run status
await client.getTestRunStatus(testRunId: string): Promise<VisualCheckResult>
// Get API key (from env var or stored credentials)
getApiKey(): string | null
// Check if authenticated
isAuthenticated(): boolean
// Save credentials
saveCredentials(credentials: StoredCredentials): void
// Load credentials
loadCredentials(): StoredCredentials | null
// Delete credentials
deleteCredentials(): void
// Load config from file (or return defaults)
await loadConfig(configPath?: string): Promise<TestivaiConfig>
// Check if config file exists
configExists(dir?: string): boolean
// Find config file path
findConfigFile(startDir?: string): string | null
// Get resolved output directory
getOutputDir(config: TestivaiConfig, baseDir?: string): string
MIT
FAQs
Shared utilities for TestivAI SDKs and CLI
The npm package @testivai/common receives a total of 130 weekly downloads. As such, @testivai/common popularity was classified as not popular.
We found that @testivai/common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.