import { r as ux } from "./cli-B86kvKcR.mjs";
import { n as getReleaseStatus } from "./release-C3xNWdlR.mjs";
import process from "node:process";
import { defineCommand } from "citty";
//#region src/commands/release/status.ts
async function runReleaseStatusCommand() {
	try {
		const cwd = process.cwd();
		const status = await ux.running("Inspecting release status", async () => getReleaseStatus(cwd));
		console.log(`working tree: ${status.cleanWorkingTree ? "clean" : "dirty"}`);
		console.log(`active summary: ${status.activeSummary ? "present" : "absent"}`);
		if (status.activeTitle) console.log(`active release: ${status.activeTitle}`);
		console.log(`changed packages: ${status.changedPackages.length}`);
		for (const pkg of status.changedPackages) console.log(`- ${pkg.name}@${pkg.version}`);
	} catch (error) {
		ux.handleError(error);
	}
}
var status_default = defineCommand({
	meta: {
		name: "status",
		description: "Show the current release status"
	},
	async run() {
		await runReleaseStatusCommand();
		if (!process.exitCode) process.exit(0);
	}
});
//#endregion
export { status_default as default };

//# sourceMappingURL=status-DxwEDTh2.mjs.map