@vosjs/render-core 0.11.0 → 0.12.1

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.
@@ -1877,6 +1877,16 @@ interface RecordOpts {
1877
1877
  * captured.
1878
1878
  */
1879
1879
  peerStorageState?: (name: string) => Promise<string> | string;
1880
+ /**
1881
+ * In a rehearsal only: stop after the step with this `id` and hand the
1882
+ * page, as that step left it, to `at` (`vos look --until`). The steps
1883
+ * after it never run; the teardown still does, since the walk clicked
1884
+ * for real. Ignored by a take.
1885
+ */
1886
+ until?: {
1887
+ id: string;
1888
+ at: (page: RecorderPage) => Promise<void>;
1889
+ };
1880
1890
  }
1881
1891
  /**
1882
1892
  * The expression a scroll tick evaluates: move the first scrollable
@@ -3596,6 +3596,7 @@ async function recordTakeSteps(browser, url, actions, sink, log, opts, late) {
3596
3596
  const outputNames = /* @__PURE__ */ new Set();
3597
3597
  const overruns = [];
3598
3598
  let stopped = null;
3599
+ let untilReached = false;
3599
3600
  let unpressedGuard = null;
3600
3601
  let capped = false;
3601
3602
  const signals = new StepSignals(
@@ -4297,6 +4298,11 @@ async function recordTakeSteps(browser, url, actions, sink, log, opts, late) {
4297
4298
  ...hang.hung ? { hung: true } : {}
4298
4299
  });
4299
4300
  if (stopped) break;
4301
+ if (dry && opts.until && step.id === opts.until.id) {
4302
+ await opts.until.at(rawPage);
4303
+ untilReached = true;
4304
+ break;
4305
+ }
4300
4306
  }
4301
4307
  signals.close();
4302
4308
  const peerRuns = await Promise.all(lanes);
@@ -4311,7 +4317,7 @@ async function recordTakeSteps(browser, url, actions, sink, log, opts, late) {
4311
4317
  ...ps.reason ? { reason: ps.reason } : {},
4312
4318
  peer: pr.id
4313
4319
  });
4314
- if (!capped && !stopped) await sleep(TRAILING_HOLD_MS);
4320
+ if (!capped && !stopped && !untilReached) await sleep(TRAILING_HOLD_MS);
4315
4321
  if (capped || capReached(now(), maxSeconds)) {
4316
4322
  capped = true;
4317
4323
  log(` ${cappedLine(maxSeconds)}`);