#!/usr/bin/env node
/***
 * Assumptions:
 * - User wants to integrate with @cloud-technology/constructs
 * - User is going to have source code in relative root directory
 * - User has a `package.json` at relative directory (process.cwd())
 * - User does not have a ./ci directory for CI-CD
 */
import Path from "path";
import Process from "process";
import Chalk from "chalk";
import * as Utility from "./utility/index.js";
const CWD = Process.cwd();
const Subprocess = await import("child_process");
/*** @param command {string} - Command as String for Shell Inherited Execution */
const Execute = (command) => {
    Subprocess.execSync(command, {
        env: Process.env,
        shell: Process.env["SHELL"] ?? null,
        encoding: "utf-8",
        stdio: "inherit"
    });
};
await Utility.Distribution.directory(Path.join(Process.cwd(), "ci"));
await Utility.CDKTF.generate();
await Utility.Package.reconfigure();
await Utility.Main.hydrate();
await Utility.Typescript.create();
Process.chdir(Path.join(Process.cwd(), "ci"));
Execute("npm install --no-fund .");
Execute("npm run get");
Execute("npm run build");
const command = Chalk.redBright.underline.bold("cd ./ci && npm run initialize");
console.log("Lastly, Execute the Following to Finish Setup" + ":");
console.log("  ↳ " + command);
Process.chdir(CWD);
export { Execute };
export default Execute;
//# sourceMappingURL=index.js.map