exiftool-vendored
Version:
Efficient, cross-platform access to ExifTool
44 lines (43 loc) • 2.41 kB
TypeScript
import { DateOrTime } from "./DateTime";
import { ExifTool } from "./ExifTool";
import { Maybe } from "./Maybe";
import { Tags } from "./Tags";
export declare function mkdirp(dir: string): Promise<string | undefined>;
export { expect } from "chai";
export declare const testDir: string;
export declare function end(et: ExifTool): Promise<void>;
export declare function randomChar(): string;
export declare function randomChars(chars?: number): string;
export declare const tmpdir: import("./Lazy").Lazy<string>;
export declare function tmpname(prefix?: string): string;
export declare function renderTagsWithISO(t: Tags): Record<string, any>;
export declare function renderTagsWithRawValues(t: Tags): Record<string, any>;
/**
* Copy a test image to a tmp directory and return the path
*/
export declare function testImg({ srcBasename, parentDir, destBasename, }?: {
srcBasename?: Maybe<string>;
parentDir?: string;
destBasename?: string;
}): Promise<string>;
export declare const IPTC_JPG = "iptc.jpg";
export declare function testFile(name: string): Promise<string>;
export declare function sha1(path: string): Promise<string>;
export declare function sha1buffer(input: string | Buffer): string;
export declare function assertEqlDateish(a: Maybe<string | DateOrTime>, b: Maybe<string | DateOrTime>): Chai.Assertion;
export declare const NonAlphaStrings: {
str: string;
desc: string;
}[];
export declare const UnicodeTestMessage = "Double quotes(\"\u201C\u201D\u00AB\u00BB) and single quotes('\u2018\u2019\u2039\u203A) and backquotes(`), oh my \uD83D\uDC4D\uD83C\uDF39\uD83D\uDC31\u200D\uD83D\uDC53\uD83D\uDEB5\u200D\u2640\uFE0F. \u0A38\u0A41\u0A06\u0A17\u0A24 \u0A39\u0A48 \u0E22\u0E34\u0E19\u0E14\u0E35\u0E15\u0E49\u0E2D\u0E19\u0E23\u0E31\u0E1A \uD658\uC601\uD558\uB2E4 \u3088\u3046\u3053\u305D \u6B61\u8FCE \u6B22\u8FCE \u05D1\u05E8\u05D5\u05DA \u05D4\u05D1\u05D0 \u062E\u0648\u0634 \u0622\u0645\u062F\u06CC\u062F";
/**
* Measure how long it takes to spawn ExifTool and get a response. This provides
* a baseline for setting realistic timeout values in tests. CI environments
* (especially Windows) can be 10-100x slower than local dev.
*
* Results are cached after first measurement to avoid overhead.
*
* CAUTION: You probably want to schedule this in a before() block so it doesn't
* impact test timeouts!
*/
export declare function measureSpawnTime(): Promise<number>;