Files
certd/packages/plugins/plugin-aliyun/src/utils/index.ts
T

16 lines
361 B
TypeScript
Raw Normal View History

2022-11-08 22:48:57 +08:00
import dayjs from "dayjs";
export const ZoneOptions = [{ value: "cn-hangzhou" }];
export function appendTimeSuffix(name: string) {
if (name == null) {
name = "certd";
}
return name + "-" + dayjs().format("YYYYMMDD-HHmmss");
}
export function checkRet(ret: any) {
if (ret.code != null) {
throw new Error("执行失败:" + ret.Message);
}
}