@spica/cli 0.18.45 → 0.18.46
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/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3656,7 +3656,7 @@ ${bold4(cyan(`\u2500\u2500 ${mod.displayName.toUpperCase()} \u2500\u2500`))} ${
|
|
|
3656
3656
|
if (!diff)
|
|
3657
3657
|
continue;
|
|
3658
3658
|
console.log(` ${bold4(section)}:`);
|
|
3659
|
-
renderUnifiedDiff(diff);
|
|
3659
|
+
renderUnifiedDiff(diff, true);
|
|
3660
3660
|
}
|
|
3661
3661
|
}
|
|
3662
3662
|
}
|
|
@@ -3724,12 +3724,12 @@ function summaryBadges(c, u, d) {
|
|
|
3724
3724
|
function dim(s) {
|
|
3725
3725
|
return `\x1B[2m${s}\x1B[0m`;
|
|
3726
3726
|
}
|
|
3727
|
-
function renderUnifiedDiff(diff) {
|
|
3727
|
+
function renderUnifiedDiff(diff, reversed = false) {
|
|
3728
3728
|
for (const line of diff.split("\n")) {
|
|
3729
3729
|
if (line.startsWith("+")) {
|
|
3730
|
-
process.stdout.write(green4(" " + line) + "\n");
|
|
3730
|
+
process.stdout.write((reversed ? red4 : green4)(" " + line) + "\n");
|
|
3731
3731
|
} else if (line.startsWith("-")) {
|
|
3732
|
-
process.stdout.write(red4(" " + line) + "\n");
|
|
3732
|
+
process.stdout.write((reversed ? green4 : red4)(" " + line) + "\n");
|
|
3733
3733
|
} else {
|
|
3734
3734
|
process.stdout.write(dim(" " + line) + "\n");
|
|
3735
3735
|
}
|