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.
Files changed (2) hide show
  1. package/dist/index.js +13 -2
  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
- console.log(chalk2.green(`Uploaded ${data.uploaded} screenshots`));
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
- console.log(chalk3.yellow(` changed: ${d.screen}`));
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}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-shots-cli",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "CLI for git-shots visual regression platform",
5
5
  "type": "module",
6
6
  "bin": {