@vosjs/cli 0.9.0 → 0.9.2

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.
@@ -154,6 +154,8 @@ function validateActions(value) {
154
154
  errors.push(`${at}: wait needs ms`);
155
155
  if (s.do === "type" && typeof s.text !== "string")
156
156
  errors.push(`${at}: type needs text`);
157
+ if (s.do === "type" && s.focus !== void 0 && typeof s.focus !== "boolean")
158
+ errors.push(`${at}: type focus must be true or false`);
157
159
  if (s.do === "scroll" && typeof s.dy !== "number")
158
160
  errors.push(`${at}: scroll needs dy`);
159
161
  if (s.do === "move" && (typeof s.x !== "number" || typeof s.y !== "number")) {
@@ -3426,7 +3428,7 @@ async function recordTake(browser, url, actions, paths, log, opts = {}) {
3426
3428
  case "type": {
3427
3429
  const rect = await boxOf(step.selector);
3428
3430
  if (rect) {
3429
- await clickAt(rect);
3431
+ if (step.focus !== false) await clickAt(rect);
3430
3432
  const delay = step.delayMs ?? 40;
3431
3433
  const ping = () => emit({
3432
3434
  x: Math.round(rect.x + rect.w / 2),
@@ -6150,7 +6152,12 @@ function convertAgentBrowser(records, opts = {}) {
6150
6152
  case "key": {
6151
6153
  const key = args.at(0);
6152
6154
  if (key === "Enter" && lastTarget) {
6153
- emit(n, { do: "type", selector: lastTarget, text: "\n" });
6155
+ emit(n, {
6156
+ do: "type",
6157
+ selector: lastTarget,
6158
+ text: "\n",
6159
+ focus: false
6160
+ });
6154
6161
  notes.push(
6155
6162
  `line ${n}: press Enter became a newline typed into the last field`
6156
6163
  );
@@ -7409,8 +7416,11 @@ async function run(argv) {
7409
7416
 
7410
7417
  export {
7411
7418
  validateActions,
7419
+ RECORDING_NAME,
7412
7420
  takePaths,
7413
7421
  loadTake,
7422
+ startTakeServer,
7423
+ waitForPageDone,
7414
7424
  renderAnimation,
7415
7425
  digestTake,
7416
7426
  parseTranscript,
@@ -7418,6 +7428,8 @@ export {
7418
7428
  platformOrigin,
7419
7429
  parseVosId,
7420
7430
  resolveCredential,
7431
+ apiJson,
7432
+ apiError,
7421
7433
  readSyncState,
7422
7434
  writeSyncState,
7423
7435
  recordTake,
@@ -7429,4 +7441,4 @@ export {
7429
7441
  convertAgentBrowser,
7430
7442
  run
7431
7443
  };
7432
- //# sourceMappingURL=chunk-6JJETC43.js.map
7444
+ //# sourceMappingURL=chunk-NKUOT5JE.js.map