"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateBaseDir = void 0;
const chalk_1 = require("chalk");
const WizError_1 = require("../modules/WizError");
function validateBaseDir(path) {
    return __awaiter(this, void 0, void 0, function* () {
        const prohibitedSymbolsInPath = ['^', '?', '!'];
        const includesProhibited = (el) => path.includes(el);
        if (prohibitedSymbolsInPath.some(includesProhibited)) {
            const formatedSymbols = prohibitedSymbolsInPath.map((symbol) => chalk_1.default.bold(symbol));
            const symbolsList = formatedSymbols.slice(0, -1).join(', ')
                + ' and ' + formatedSymbols.slice(-1);
            throw new WizError_1.WizError(`Not supported symbols in content path. ${symbolsList} are reserved in eWizard CLI.`);
        }
    });
}
exports.validateBaseDir = validateBaseDir;
//# sourceMappingURL=validateDirPath.js.map