DenReg/cli/commands/deprecate.ts
2023-11-28 16:10:33 +01:00

21 lines
508 B
TypeScript

import { Colors, CliffyPrompt } from "../deps.ts";
import { getMeta, setMeta, log } from "../global.ts";
export default async function deprecate(options: any) {
const meta = await getMeta();
const res = await CliffyPrompt.Confirm.prompt(
"Are you sure you want to deprecat this package?"
);
if (res) {
meta.deprecated = true;
console.log(Colors.yellow("Package marked as deprecated!"));
} else {
console.log("Deprecation canceled");
}
await setMeta(meta);
}