git-shots-cli 0.5.3 → 0.5.5
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/index.js +13 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -95,7 +95,11 @@ async function upload(config, options) {
|
|
|
95
95
|
console.error(chalk2.red(`Upload failed: ${JSON.stringify(data)}`));
|
|
96
96
|
process.exit(1);
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
if (data.skipped > 0) {
|
|
99
|
+
console.log(chalk2.green(`Uploaded ${data.uploaded} screenshots`) + chalk2.dim(` (${data.skipped} unchanged, skipped)`));
|
|
100
|
+
} else {
|
|
101
|
+
console.log(chalk2.green(`Uploaded ${data.uploaded} screenshots`));
|
|
102
|
+
}
|
|
99
103
|
} catch (err) {
|
|
100
104
|
console.error(chalk2.red(`Request failed: ${err}`));
|
|
101
105
|
process.exit(1);
|
|
@@ -138,7 +142,14 @@ async function compare(config, options) {
|
|
|
138
142
|
return;
|
|
139
143
|
}
|
|
140
144
|
for (const d of data.diffs) {
|
|
141
|
-
|
|
145
|
+
const type = d.changeType ?? "changed";
|
|
146
|
+
if (type === "new") {
|
|
147
|
+
console.log(chalk3.green(` + new: ${d.screen}`));
|
|
148
|
+
} else if (type === "removed") {
|
|
149
|
+
console.log(chalk3.red(` - removed: ${d.screen}`));
|
|
150
|
+
} else {
|
|
151
|
+
console.log(chalk3.yellow(` ~ changed: ${d.screen}`));
|
|
152
|
+
}
|
|
142
153
|
}
|
|
143
154
|
} catch (err) {
|
|
144
155
|
console.error(chalk3.red(`Request failed: ${err}`));
|