"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateTemplatesFromNames = exports.generateTemplates = void 0;
const config_1 = require("../config");
const namespace_1 = require("./namespace");
const package_1 = require("./package");
const write_1 = require("./write");
async function generateTemplates(templates, opts) {
    // Write all template files before updating any package
    for (const template of templates) {
        await write_1.writeFiles(template);
    }
    for (const template of templates) {
        await package_1.updatePackages(template, opts);
    }
    await namespace_1.updateNamespace(opts);
}
exports.generateTemplates = generateTemplates;
async function generateTemplatesFromNames(names, opts) {
    const templates = config_1.getTemplatesFromNames(names, opts);
    await generateTemplates(templates, opts);
}
exports.generateTemplatesFromNames = generateTemplatesFromNames;
//# sourceMappingURL=index.js.map