import * as testdirs from "testdirs"; import { DirectoryContent, DirectoryJSON, EncodingForFileFn, FIXTURE_METADATA_SYMBOL, FIXTURE_ORIGINAL_PATH_SYMBOL, FIXTURE_TYPE_LINK_SYMBOL, FIXTURE_TYPE_SYMLINK_SYMBOL, FSMetadata, FromFileSystemOptions, TestdirFn, TestdirLink, TestdirMetadata, TestdirResult, TestdirSymlink, createFileTree, fromFileSystem as fromFileSystem$1 } from "testdirs"; import { z } from "zod"; //#region src/constants.d.ts /** * The base directory for test directories. */ declare const BASE_DIR = ".vitest-testdirs"; //#endregion //#region src/index.d.ts declare const optionsSchema: z.ZodObject<{ dirname: z.ZodOptional; cleanup: z.ZodDefault; allowOutside: z.ZodDefault; }, z.core.$strip>; type TestdirOptions = z.input; /** * Creates a test directory with the specified files and options. * * @param {DirectoryJSON} files - The directory structure to create. * @param {TestdirOptions?} options - The options for creating the test directory. * @returns {Promise} The path of the created test directory. * @throws An error if `testdir` is called outside of a test. */ declare const testdir$1: testdirs.ExtendedTestdirFn<{ dirname?: string | undefined; cleanup?: boolean | undefined; allowOutside?: boolean | undefined; }, string, { /** * Creates a test directory from an existing filesystem path * * @param {string} fsPath - The filesystem path to create the test directory from * @param {TestdirFromOptions & TestdirOptions} options - Configuration options * @returns {Promise} A test directory instance initialized with the contents from the specified path * * @example * ```ts * const dir = testdir.from('./fixtures/basic'); * ``` */ from: (fsPath: string, options?: TestdirOptions & { fromFS?: FromFileSystemOptions; }) => Promise; /** * Generates the path for a test directory. * * @param {string?} dirname - The directory name to use. * * If not provided, a directory name will be generated based on the test name. * * @returns {string} The path of the current test directory. * @throws An error if `testdir` is called outside of a test. */ dirname: (dirname?: string) => string; }>; //#endregion export { FIXTURE_TYPE_LINK_SYMBOL as _, TestdirFn as a, TestdirOptions as c, createFileTree as d, fromFileSystem$1 as f, FIXTURE_ORIGINAL_PATH_SYMBOL as g, FIXTURE_METADATA_SYMBOL as h, FSMetadata as i, TestdirResult as l, BASE_DIR as m, DirectoryJSON as n, TestdirLink as o, testdir$1 as p, EncodingForFileFn as r, TestdirMetadata as s, DirectoryContent as t, TestdirSymlink as u, FIXTURE_TYPE_SYMLINK_SYMBOL as v };