"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommonDriver = void 0;
const ts_morph_1 = require("ts-morph");
const typescript_1 = require("typescript");
const path = require("node:path");
class CommonDriver {
    static createProject(tsconfigPath) {
        return new ts_morph_1.Project({
            tsConfigFilePath: path.join(process.cwd(), ...tsconfigPath),
            // these are the defaults
            manipulationSettings: {
                // TwoSpaces, FourSpaces, EightSpaces, or Tab
                indentationText: ts_morph_1.IndentationText.FourSpaces,
                // LineFeed or CarriageReturnLineFeed
                newLineKind: typescript_1.NewLineKind.LineFeed,
                // Single or Double
                quoteKind: ts_morph_1.QuoteKind.Single,
                // Whether to change shorthand property assignments to property assignments
                // and add aliases to import & export specifiers (see more information in
                // the renaming section of the documentation).
                usePrefixAndSuffixTextForRename: false,
                // Whether to use trailing commas in multi-line scenarios where trailing
                // commas would be used.
                useTrailingCommas: false,
            },
        });
    }
    static createSourceFile(project, filePath) {
        return project === null || project === void 0 ? void 0 : project.addSourceFileAtPath(path.join(process.cwd(), ...filePath));
    }
}
exports.CommonDriver = CommonDriver;
