2023-11-28 15:10:33 +00:00
|
|
|
import { Colors, CliffyPrompt } from "../deps.ts";
|
2020-08-02 21:37:59 +00:00
|
|
|
|
|
|
|
import { getMeta, setMeta, log } from "../global.ts";
|
|
|
|
|
|
|
|
export default async function deprecate(options: any) {
|
|
|
|
const meta = await getMeta();
|
|
|
|
|
2023-11-28 15:10:33 +00:00
|
|
|
const res = await CliffyPrompt.Confirm.prompt(
|
2020-08-16 17:28:27 +00:00
|
|
|
"Are you sure you want to deprecat this package?"
|
2020-08-02 21:37:59 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
if (res) {
|
|
|
|
meta.deprecated = true;
|
|
|
|
console.log(Colors.yellow("Package marked as deprecated!"));
|
|
|
|
} else {
|
|
|
|
console.log("Deprecation canceled");
|
|
|
|
}
|
|
|
|
|
|
|
|
await setMeta(meta);
|
|
|
|
}
|