"use strict";
/*
 * Copyright 2018, collaboration Factory AG. All rights reserved.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.E2ETSConfigGenerator = void 0;
const AbstractTSConfigGenerator_1 = require("./AbstractTSConfigGenerator");
const E2ETypescriptCompiler_1 = require("../compiler/E2ETypescriptCompiler");
class E2ETSConfigGenerator extends AbstractTSConfigGenerator_1.AbstractTSConfigGenerator {
    constructor(plugin, dependencies, localOnly, isProduction) {
        super(plugin, dependencies, localOnly, isProduction, 'e2e');
    }
    createConfigAndGetPath() {
        const { paths } = this.getPathsAndRefs();
        this.tsConfig = {
            extends: `${this.pathToMain}/tsconfig.base.e2e.json`,
            compilerOptions: {
                baseUrl: '.',
                outDir: `../${E2ETypescriptCompiler_1.E2ETypescriptCompiler.DEST_DIR}`,
            },
            include: ['./specs/**/*.ts', './lib/**/*.ts'],
        };
        if (this.plugin.pluginName !== this.platformPlugin) {
            paths['*'].push(`${this.pathToMain}/node_modules/@types/*`, `${this.pathToMain}/node_modules/*`);
            this.tsConfig.compilerOptions.paths = paths;
        }
        this.saveConfig();
        return this.getTSConfigPath();
    }
}
exports.E2ETSConfigGenerator = E2ETSConfigGenerator;
//# sourceMappingURL=E2ETSConfigGenerator.js.map