Skip to content

Commit 364e72a

Browse files
committed
🔧 chore(app): 更新日志
1 parent f286654 commit 364e72a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/command/clear.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from "node:path";
2+
import { performance } from "node:perf_hooks";
23

34
import type { CAC } from "cac";
45
import enquirer from "enquirer";
@@ -44,7 +45,7 @@ const generateEnquirer = async (): Promise<ClearOptions> => {
4445
});
4546
const result = await enquirer.prompt<ClearOptions>([
4647
{
47-
name: "paths",
48+
name: "files",
4849
type: "multiselect",
4950
message: "请选择需要清理的文件/夹",
5051
choices: fileMultiChoices,
@@ -84,7 +85,10 @@ export default function clearInstaller(cli: CAC) {
8485
? [options.pattern]
8586
: options.pattern;
8687
}
88+
const start = performance.now();
8789
await clear(paths);
90+
const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
91+
loggerInfo(`😁 clear 命令执行结束, 共用时: ${getTime()}`);
8892
});
8993
},
9094
};

src/command/git-commit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { CAC } from "cac";
44
import enquirer from "enquirer";
55

66
import { ACTIVATION, gitCommitScopes, gitCommitTypes } from "@/config";
7-
import { execCommand, loadConfigModule, loggerInfo, printInfo } from "@/helper";
7+
import { execCommand, loadConfigModule, loggerInfo } from "@/helper";
88
import { GitCommitOptions } from "@/types";
99

1010
const mergeConfig = async () => {
@@ -115,7 +115,7 @@ export default function gitCommitInstaller(cli: CAC) {
115115
await gitCommit(type, scope, description);
116116
}
117117
const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
118-
printInfo(`😁 commit 命令执行结束, 共用时: ${getTime()}`);
118+
loggerInfo(`😁 commit 命令执行结束, 共用时: ${getTime()}`);
119119
});
120120
},
121121
};

0 commit comments

Comments
 (0)