@zwa73/dev-utils 1.0.19 → 1.0.20
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.
package/dist/Command/ScanDups.js
CHANGED
@@ -25,7 +25,8 @@ const CmdScanDups = (program) => program
|
|
25
25
|
.option("-r, --recursive", "是否处理子目录, 默认 true", true)
|
26
26
|
.action(async (options) => {
|
27
27
|
const regex = new RegExp(options.regex);
|
28
|
-
const
|
28
|
+
const basePath = process.cwd().replaceAll("\\", "/");
|
29
|
+
const pList = utils_1.UtilFT.fileSearchRegex(basePath, regex.source, {
|
29
30
|
relative: options.recursive,
|
30
31
|
normalize: "posix",
|
31
32
|
}).map(async (filePath) => ({ filePath, hash: await calculateHash(filePath) }));
|
package/package.json
CHANGED
package/src/Command/ScanDups.ts
CHANGED
@@ -23,7 +23,8 @@ export const CmdScanDups = (program: Command) => program
|
|
23
23
|
.option("-r, --recursive", "是否处理子目录, 默认 true", true)
|
24
24
|
.action(async (options) => {
|
25
25
|
const regex = new RegExp(options.regex);
|
26
|
-
const
|
26
|
+
const basePath = process.cwd().replaceAll("\\", "/")
|
27
|
+
const pList = UtilFT.fileSearchRegex(basePath, regex.source, {
|
27
28
|
relative: options.recursive,
|
28
29
|
normalize: "posix",
|
29
30
|
}).map(async (filePath) => ({ filePath, hash: await calculateHash(filePath) }));
|