diff --git a/index.js b/index.js index 05911a0..031999c 100644 --- a/index.js +++ b/index.js @@ -31,9 +31,12 @@ const argv = UtilArgs.getArgv(); const compareRevalidateQueueRhs = UtilQueue.createQueue({ concurrency: argv.m }); const compareRevalidateSummary = await UtilCompare.revalidateCompareSummary(compareSummary, compareRevalidateQueueLhs, compareRevalidateQueueRhs); + // resort compare summary + const compareResortSummary = UtilCompare.resortCompareSummary(compareRevalidateSummary); + // save compare summary const compareSummaryOutputPath = UtilPath.resolve(argv.o, './compare-summary.json'); - UtilFs.writeJson(compareSummaryOutputPath, compareRevalidateSummary); + UtilFs.writeJson(compareSummaryOutputPath, compareResortSummary); // compare report const compareReport = UtilCompare.getCompareReport(compareRevalidateSummary); diff --git a/package.json b/package.json index aa885c1..b268ad1 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { - "name": "file-compare", + "name": "@kongying-tavern/file-compare", "version": "0.0.0", "main": "index.js", "type": "module", "license": "MIT", - "private": false, "scripts": { "commit": "cz", "compare": "node index.js", "lint": "eslint --ext .js,.ts .", - "release": "semantic-release" + "release": "semantic-release", + "yalc": "yalc publish" }, "description": "Compare file differences between two directories and generate report", "keywords": [ @@ -25,6 +25,7 @@ "md5": "^2.3.0", "p-queue": "^7.2.0", "progress": "^2.0.3", + "string-natural-compare": "^3.0.1", "yargs": "^17.3.1" }, "devDependencies": { @@ -56,5 +57,6 @@ }, "publishConfig": { "access": "public" - } + }, + "packageManager": "pnpm@8.10.0+sha512.9c2cb83f2b6cf6a25d8c58300bf99197c7ef3be84cf3e766f29054b40b83b42f8aaba6fcc314a9ecf27c00f7ce80a757bb4c608800e7adbe2d29dc5c7056f5be" } diff --git a/template/compare.summary.vue b/template/compare.summary.vue index 4456e06..e216360 100644 --- a/template/compare.summary.vue +++ b/template/compare.summary.vue @@ -25,6 +25,15 @@ .action-wrapper { flex: none; margin-bottom: .7rem; + display: flex; + gap: .2rem; + align-items: center; + } + .action-wrapper .wrapper { + flex: auto; + } + .action-wrapper .summary { + flex: none; } .table-wrapper { position: relative; @@ -71,34 +80,48 @@ +
- - +
+ + +
+
+ +
+
+ height="auto" + @sort-change="sortChange"> + sortable="custom" + prop="hash"> + + sortable="custom" + prop="lhs">