@argos-ci/util
Version:
Set of utilities used across all Argos SDKs.
40 lines (33 loc) • 1.27 kB
TypeScript
import { ScreenshotMetadata } from './browser.js';
export { getMetadataPath, getScreenshotName, validateThreshold } from './browser.js';
/**
* Create a directory if it doesn't exist.
*/
declare function createDirectory(pathname: string): Promise<void>;
/**
* Create temporary directory.
*/
declare function createTemporaryDirectory(): Promise<string>;
/**
* Get the top level of the git repository.
*/
declare function getGitRepositoryPath(): Promise<string | null>;
/**
* Read the version from a package.json file.
*/
declare function readVersionFromPackage(pkgPath: string): Promise<string>;
/**
* Write screenshot metadata to disk.
*/
declare function writeMetadata(screenshotPath: string, metadata: ScreenshotMetadata): Promise<void>;
/**
* Read screenshot metadata from disk.
* If not found, returns null.
*/
declare function readMetadata(screenshotPath: string): Promise<ScreenshotMetadata | null>;
/**
* Get playwright trace from screenshot path.
* If not found, returns null.
*/
declare function getPlaywrightTracePath(screenshotPath: string): Promise<string | null>;
export { ScreenshotMetadata, createDirectory, createTemporaryDirectory, getGitRepositoryPath, getPlaywrightTracePath, readMetadata, readVersionFromPackage, writeMetadata };