@crouton-kit/capture 1.3.15 → 1.3.17

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/bin/capture CHANGED
@@ -7294,7 +7294,7 @@ function assertTrustedTag(tag) {
7294
7294
  }
7295
7295
  }
7296
7296
  function neutralizeControl(s) {
7297
- return s.replace(/[\r\n\t\u2028\u2029]+/g, " ").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, "").replace(/\p{Cf}/gu, "").replace(/`/g, "'");
7297
+ return s.replace(/[\r\n\t\u2028\u2029]+/g, " ").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, "").replace(/\p{Cf}/gu, "");
7298
7298
  }
7299
7299
  function capLength(s, max) {
7300
7300
  if (s.length <= max) return s;
@@ -8832,9 +8832,9 @@ function validateCliInvocation(parsed) {
8832
8832
  throw invalidInput("motion rec lifecycle flags cannot be combined with one-shot flags.");
8833
8833
  }
8834
8834
  } else {
8835
- requireCount(values, 1, 1, "motion rec");
8835
+ requireCount(values, 0, 1, "motion rec");
8836
8836
  if (!parsed.do) throw invalidInput("motion rec one-shot requires --do.");
8837
- assertParseableUrl(values[0], "recording URL");
8837
+ if (values[0] !== void 0) assertParseableUrl(values[0], "recording URL");
8838
8838
  parseDoAction(parsed.do);
8839
8839
  }
8840
8840
  if (parsed.viewport !== void 0) {
@@ -9842,7 +9842,7 @@ function validateHarAppendBatch(value, source) {
9842
9842
  return { entries, incompleteLifecycles };
9843
9843
  }
9844
9844
  function captureVersion() {
9845
- const version = "1.3.15";
9845
+ const version = "1.3.17";
9846
9846
  return typeof version === "string" && version.length > 0 ? version : "development";
9847
9847
  }
9848
9848
  function token() {
@@ -11601,7 +11601,7 @@ function wallTime(value) {
11601
11601
  }
11602
11602
  }
11603
11603
  function captureVersion2() {
11604
- const version = "1.3.15";
11604
+ const version = "1.3.17";
11605
11605
  return typeof version === "string" && version.length > 0 ? version : "development";
11606
11606
  }
11607
11607
  function deepFreeze(value) {
@@ -241172,7 +241172,7 @@ CDP_PORT / CDP_TARGET pin the browser + tab for orchestrators \u2014 precedence:
241172
241172
  explicit flag > active session > env.`;
241173
241173
  }
241174
241174
  function printVersion() {
241175
- const declared = "1.3.15";
241175
+ const declared = "1.3.17";
241176
241176
  if (declared) {
241177
241177
  console.log(declared);
241178
241178
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crouton-kit/capture",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "description": "Browser automation and UI validation via CDP — session-based screenshots, HAR, a11y, click/type, and JS exec",
5
5
  "bin": {
6
6
  "capture": "./bin/capture"
package/src/cdp/args.ts CHANGED
@@ -179,9 +179,12 @@ export function validateCliInvocation(parsed: ParsedArgs): void {
179
179
  throw invalidInput('motion rec lifecycle flags cannot be combined with one-shot flags.');
180
180
  }
181
181
  } else {
182
- requireCount(values, 1, 1, 'motion rec');
182
+ // The URL is optional: omitting it records the active session tab
183
+ // (enforced downstream once session state is known — this pure
184
+ // validator only bounds cardinality at 0..1 and checks a supplied URL).
185
+ requireCount(values, 0, 1, 'motion rec');
183
186
  if (!parsed.do) throw invalidInput('motion rec one-shot requires --do.');
184
- assertParseableUrl(values[0], 'recording URL');
187
+ if (values[0] !== undefined) assertParseableUrl(values[0], 'recording URL');
185
188
  parseDoAction(parsed.do);
186
189
  }
187
190
  if (parsed.viewport !== undefined) {
@@ -107,8 +107,7 @@ function neutralizeControl(s: string): string {
107
107
  return s
108
108
  .replace(/[\r\n\t\u2028\u2029]+/g, ' ')
109
109
  .replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, '')
110
- .replace(/\p{Cf}/gu, '')
111
- .replace(/`/g, "'");
110
+ .replace(/\p{Cf}/gu, '');
112
111
  }
113
112
 
114
113
  function capLength(s: string, max: number): string {