rtgl 1.0.0-rc28 → 1.0.0-rc29

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 +11 -7
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -35,6 +35,10 @@ function collectValues(value, previous = []) {
35
35
  return [...previous, value];
36
36
  }
37
37
 
38
+ function parseIntegerOption(value) {
39
+ return Number.parseInt(value, 10);
40
+ }
41
+
38
42
  const program = new Command();
39
43
 
40
44
  program
@@ -63,7 +67,7 @@ program
63
67
  .option("--no-yahtml", "Disable YAHTML attr/prop validation")
64
68
  .option("--expr", "Enable expression scope/type checks")
65
69
  .option("--watch", "Watch for file changes and re-run checks")
66
- .option("--watch-interval-ms <ms>", "Watch poll interval in milliseconds", parseInt, 800)
70
+ .option("--watch-interval-ms <ms>", "Watch poll interval in milliseconds", parseIntegerOption, 800)
67
71
  .addHelpText(
68
72
  "after",
69
73
  `
@@ -204,7 +208,7 @@ Examples:
204
208
  feCommand
205
209
  .command("watch")
206
210
  .description("Watch for changes")
207
- .option("-p, --port <port>", "The port to use", parseInt, 3001)
211
+ .option("-p, --port <port>", "The port to use", parseIntegerOption, 3001)
208
212
  .option("-s, --setup-path <path>", "Custom setup file path")
209
213
  .addHelpText(
210
214
  "after",
@@ -364,8 +368,8 @@ const vtCommand = program
364
368
  vtCommand
365
369
  .command("generate")
366
370
  .description("Generate candidate HTML pages only (no screenshots)")
367
- .option("--concurrency <number>", "Number of parallel capture workers", parseInt)
368
- .option("--timeout <ms>", "Global capture timeout in ms", parseInt)
371
+ .option("--concurrency <number>", "Number of parallel capture workers", parseIntegerOption)
372
+ .option("--timeout <ms>", "Global capture timeout in ms", parseIntegerOption)
369
373
  .option("--wait-event <name>", "Custom event name to mark page ready (uses event wait strategy)")
370
374
  .option("--folder <path>", "Run only specs under folder prefix (repeatable)", collectValues, [])
371
375
  .option("--group <section-key>", "Run only one section key from vt.sections (repeatable)", collectValues, [])
@@ -392,8 +396,8 @@ vtCommand
392
396
  vtCommand
393
397
  .command("screenshot")
394
398
  .description("Generate candidate HTML pages and capture screenshots")
395
- .option("--concurrency <number>", "Number of parallel capture workers", parseInt)
396
- .option("--timeout <ms>", "Global capture timeout in ms", parseInt)
399
+ .option("--concurrency <number>", "Number of parallel capture workers", parseIntegerOption)
400
+ .option("--timeout <ms>", "Global capture timeout in ms", parseIntegerOption)
397
401
  .option("--wait-event <name>", "Custom event name to mark page ready (uses event wait strategy)")
398
402
  .option("--folder <path>", "Run only specs under folder prefix (repeatable)", collectValues, [])
399
403
  .option("--group <section-key>", "Run only one section key from vt.sections (repeatable)", collectValues, [])
@@ -491,7 +495,7 @@ sitesCommand
491
495
  sitesCommand
492
496
  .command("watch")
493
497
  .description("Watch and rebuild site on changes")
494
- .option("-p, --port <port>", "The port to use", parseInt, 3001)
498
+ .option("-p, --port <port>", "The port to use", parseIntegerOption, 3001)
495
499
  .option("-r, --root-dir <path>", "Path to root directory", ".")
496
500
  .option("--rootDir <path>", "Deprecated alias for --root-dir")
497
501
  .option("-o, --output-path <path>", "Path to destination directory", "./_site")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rtgl",
3
- "version": "1.0.0-rc28",
3
+ "version": "1.0.0-rc29",
4
4
  "description": "CLI tool for Rettangoli - A frontend framework and development toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -50,7 +50,7 @@
50
50
  "@rettangoli/check": "0.1.2",
51
51
  "@rettangoli/be": "1.0.0-rc1",
52
52
  "@rettangoli/fe": "1.0.0-rc3",
53
- "@rettangoli/sites": "1.0.0-rc12",
53
+ "@rettangoli/sites": "1.0.0-rc13",
54
54
  "@rettangoli/vt": "1.0.0-rc15",
55
55
  "@rettangoli/ui": "1.0.0-rc16"
56
56
  }