"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.writeExtentions = void 0;
const fs_extra_1 = require("fs-extra");
const upath_1 = require("upath");
function writeExtentions(baseDir, dest) {
    return __awaiter(this, void 0, void 0, function* () {
        const srcPath = upath_1.join(baseDir, 'extensions');
        const destPath = upath_1.join(dest, 'extensions');
        const extentionsList = yield fs_extra_1.readdir(srcPath);
        yield fs_extra_1.ensureDir(destPath);
        return Promise.all(extentionsList.map((extention) => {
            return fs_extra_1.writeFile(upath_1.join(destPath, extention), `// eslint-disable-next-line import/no-unresolved\nexport { default } from '^/extensions/${extention}';\n`);
        }));
    });
}
exports.writeExtentions = writeExtentions;
//# sourceMappingURL=writeExtentions.js.map