21 lines
497 B
TypeScript
21 lines
497 B
TypeScript
|
import { Colors, Cliffy } from "../deps.ts";
|
||
|
|
||
|
import { getMeta, setMeta, log } from "../global.ts";
|
||
|
|
||
|
export default async function deprecate(options: any) {
|
||
|
const meta = await getMeta();
|
||
|
|
||
|
const res = await Cliffy.Confirm.prompt(
|
||
|
"Are you shure 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);
|
||
|
}
|