"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = require("fs");
const fs_extra_1 = require("fs-extra");
const glob = require("glob");
const path_1 = require("../path");
const removeLastSegment_1 = require("../util/removeLastSegment");
// const cwd = PATH_BUILD_SYSTEM_PLATFORM_COMPONENT
const cwd = path_1.PATH_BUILD_SYSTEM_PLATFORM_CORE_COMPONENT;
glob
    .sync(`**/**/spec.json`, {
    cwd,
})
    .map((path) => (0, removeLastSegment_1.removeLastSegment)(path))
    .forEach((_) => {
    const spec_file_path = `${cwd}/${_}/spec.json`;
    const spec = (0, fs_extra_1.readJSONSync)(spec_file_path);
    const segments = _.split('/');
    const { id, name, inputs = {}, outputs = {} } = spec;
    console.log(name);
    spec.render = true;
    (0, fs_1.writeFileSync)(spec_file_path, JSON.stringify(spec, null, 2));
});
//# sourceMappingURL=render.js.map