rtgl 0.0.35 → 0.0.36

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/cli.js +14 -3
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -195,8 +195,11 @@ vtCommand
195
195
  .command("generate")
196
196
  .description("Generate visualizations")
197
197
  .option("--skip-screenshots", "Skip screenshot generation")
198
- .option("--screenshot-wait-time <time>", "Wait time between screenshots",parseInt, 0)
198
+ .option("--screenshot-wait-time <time>", "Wait time between screenshots", parseInt, 0)
199
+ .option("--concurrency <number>", "Number of concurrent screenshots", parseInt, 12)
200
+ .option("--canvas", "Take screenshots from canvas element instead of full page")
199
201
  .action((options) => {
202
+ console.log(`rtgl v${packageJson.version}`);
200
203
  const config = readConfig();
201
204
 
202
205
  if (!config) {
@@ -212,7 +215,10 @@ vtCommand
212
215
  vtCommand
213
216
  .command("report")
214
217
  .description("Create reports")
215
- .action(() => {
218
+ .option("--compare-method <method>", "Comparison method: pixelmatch or md5", "pixelmatch")
219
+ .option("--color-threshold <number>", "Color threshold for pixelmatch (0-1)", parseFloat, 0.1)
220
+ .option("--diff-threshold <number>", "Max diff pixels percentage to pass (0-100)", parseFloat, 0.3)
221
+ .action((options) => {
216
222
  const config = readConfig();
217
223
 
218
224
  if (!config) {
@@ -220,7 +226,12 @@ vtCommand
220
226
  }
221
227
 
222
228
  const vtPath = config.vt?.path || "vt";
223
- report({ vtPath });
229
+ report({
230
+ vtPath,
231
+ compareMethod: options.compareMethod,
232
+ colorThreshold: options.colorThreshold,
233
+ diffThreshold: options.diffThreshold,
234
+ });
224
235
  });
225
236
 
226
237
  vtCommand
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rtgl",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "CLI tool for Rettangoli - A frontend framework and development toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,7 +49,7 @@
49
49
  "js-yaml": "^4.1.0",
50
50
  "@rettangoli/fe": "0.0.14",
51
51
  "@rettangoli/sites": "0.2.6",
52
- "@rettangoli/vt": "0.0.12",
52
+ "@rettangoli/vt": "0.0.13",
53
53
  "@rettangoli/ui": "0.1.28"
54
54
  }
55
55
  }