import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
// Re-export base utilities for stack-specific configs to use
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
/**
 * Creates a Vitest configuration for TypeScript/Node projects.
 *
 * Unlike the Jest equivalent, no `ts-jest` or `moduleNameMapper` is needed —
 * Vitest transforms TypeScript natively via esbuild and resolves `.ts` files
 * without extension mapping.
 * @param options - Configuration options for threshold overrides
 * @param options.thresholds - Coverage thresholds in portable format
 * @returns Vitest UserConfig object
 */
export const getTypescriptVitestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
    test: {
        setupFiles: [...scratchSetupFiles()],
        globalSetup: [...scratchGlobalSetup()],
        globals: true,
        environment: "node",
        include: ["tests/**/*.test.ts", "src/**/*.test.ts"],
        exclude: [...defaultTestExclusions, ...worktreeExclusions()],
        testTimeout: 10000,
        coverage: {
            provider: "v8",
            include: ["src/**/*.ts"],
            exclude: [...defaultCoverageExclusions, ...worktreeExclusions()],
            thresholds: mapThresholds(thresholds),
        },
    },
});
//# sourceMappingURL=typescript.js.map