import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, } from "./base.js";
// Re-export base utilities for entry-point configs
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, worktreeExclusions, };
/**
 * NestJS-specific patterns excluded from coverage collection.
 * These are generated or boilerplate files that don't benefit from coverage tracking.
 */
const nestjsCoverageExclusions = [
    ...defaultCoverageExclusions,
    "**/*.entity.ts",
    "**/*.dto.ts",
    "**/*.input.ts",
    "**/*.args.ts",
    "**/*.model.ts",
    "**/*.module.ts",
    "**/*.factory.ts",
    "**/*.enum.ts",
    "**/*.interface.ts",
    "**/*.constants.ts",
    "**/database/migrations/**",
    "**/database/seeds/**",
    "**/graphql/**",
    "**/main.ts",
];
/**
 * Creates a Vitest configuration for NestJS projects.
 *
 * Unlike the Jest equivalent, no `ts-jest` with `tsconfig.spec.json` is needed —
 * Vitest transforms TypeScript natively via esbuild. Path aliases should be
 * configured via `vite-tsconfig-paths` plugin in the project's vitest.config.local.ts.
 * @param options - Configuration options for threshold overrides
 * @param options.thresholds - Coverage thresholds in portable format
 * @returns Vitest UserConfig object with node environment and NestJS-specific exclusions
 */
export const getNestjsVitestConfig = ({ thresholds = defaultThresholds, } = {}) => ({
    test: {
        setupFiles: [...scratchSetupFiles()],
        globalSetup: [...scratchGlobalSetup()],
        globals: true,
        environment: "node",
        root: "src",
        include: ["**/*.spec.ts"],
        exclude: [...defaultTestExclusions, ...worktreeExclusions()],
        testTimeout: 10000,
        coverage: {
            provider: "v8",
            include: ["**/*.ts"],
            exclude: [...nestjsCoverageExclusions, ...worktreeExclusions()],
            thresholds: mapThresholds(thresholds),
        },
    },
});
//# sourceMappingURL=nestjs.js.map