import fs from "node:fs"; import { downloadTemplate } from "@bluwy/giget-core"; import * as $p from "@clack/prompts"; import type { CliCommand } from "cli/types"; import { typewriter, wait } from "cli/utils/cli"; import { execAsync, getVersion } from "cli/utils/sys"; import { Option } from "commander"; import { env } from "core"; import color from "picocolors"; import { overridePackageJson, updateBkndPackages } from "./npm"; import { type Template, templates } from "./templates"; import { createScoped, flush } from "cli/utils/telemetry"; const config = { types: { runtime: "Runtime", framework: "Framework", }, runtime: { node: "Node.js", bun: "Bun", cloudflare: "Cloudflare", aws: "AWS Lambda", }, framework: { nextjs: "Next.js", remix: "Remix", astro: "Astro", }, } as const; export const create: CliCommand = (program) => { program .command("create") .addOption(new Option("-i, --integration ", "integration to use")) .addOption(new Option("-t, --template