@zwa73/dev-utils 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,8 @@ const path_1 = __importDefault(require("path"));
10
10
  const DupMethodList = ["no-rename", "overwrite", "move"];
11
11
  /**重命名文件或路径 */
12
12
  const CmdMapPath = (program) => program
13
- .command("mappath")
13
+ .command("Map-Path")
14
+ .alias("mappath")
14
15
  .description("根据正则表达式对文件名进行映射")
15
16
  .argument("<regex>", "要匹配的正则表达式, posix风格路径")
16
17
  .argument("<replacement>", "替换字符串")
@@ -19,7 +19,8 @@ async function calculateHash(filePath) {
19
19
  }
20
20
  /**重命名文件或路径 scan_duplicates */
21
21
  const CmdScanDups = (program) => program
22
- .command("scandups")
22
+ .command("Scan-Dups")
23
+ .alias("scandups")
23
24
  .description("扫描当前目录下hash重复的文件")
24
25
  .option("-re, --regex <regex>", "文件的正则表达式, 使用posix路径", ".*")
25
26
  .option("-o, --out <dir|console>", "输出的json文件路径, 默认 scandupsOut.json, 为 \"console\" 时无文件输出", "scandupsOut")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/dev-utils",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "编译与调试工具",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  "author": "zwa73",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@zwa73/utils": "^1.0.110",
18
+ "@zwa73/utils": "^1.0.111",
19
19
  "commander": "^11.1.0",
20
20
  "ts-node": "^10.9.2",
21
21
  "tsconfig-paths": "^4.2.0",
@@ -8,7 +8,8 @@ type DupMethod = typeof DupMethodList[number];
8
8
 
9
9
  /**重命名文件或路径 */
10
10
  export const CmdMapPath = (program: Command) => program
11
- .command("mappath")
11
+ .command("Map-Path")
12
+ .alias("mappath")
12
13
  .description("根据正则表达式对文件名进行映射")
13
14
  .argument("<regex>", "要匹配的正则表达式, posix风格路径")
14
15
  .argument("<replacement>", "替换字符串")
@@ -17,7 +17,8 @@ async function calculateHash(filePath:string) {
17
17
 
18
18
  /**重命名文件或路径 scan_duplicates */
19
19
  export const CmdScanDups = (program: Command) => program
20
- .command("scandups")
20
+ .command("Scan-Dups")
21
+ .alias("scandups")
21
22
  .description("扫描当前目录下hash重复的文件")
22
23
  .option("-re, --regex <regex>", "文件的正则表达式, 使用posix路径",".*")
23
24
  .option("-o, --out <dir|console>", "输出的json文件路径, 默认 scandupsOut.json, 为 \"console\" 时无文件输出", "scandupsOut")