@visual-check/cli 0.0.0 → 0.1.0
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/LICENSE +21 -0
- package/dist/addon-build.d.ts +3 -0
- package/dist/addon-build.d.ts.map +1 -0
- package/dist/addon-build.js +4 -0
- package/dist/addon-build.js.map +1 -0
- package/dist/addon-child/addon-child.d.ts +63 -0
- package/dist/addon-child/addon-child.d.ts.map +1 -0
- package/dist/addon-child/addon-child.js +85 -0
- package/dist/addon-child/addon-child.js.map +1 -0
- package/dist/addon-child/image-files.d.ts +11 -0
- package/dist/addon-child/image-files.d.ts.map +1 -0
- package/dist/addon-child/image-files.js +138 -0
- package/dist/addon-child/image-files.js.map +1 -0
- package/dist/addon-child/protocol.d.ts +181 -0
- package/dist/addon-child/protocol.d.ts.map +1 -0
- package/dist/addon-child/protocol.js +2 -0
- package/dist/addon-child/protocol.js.map +1 -0
- package/dist/addon-child/read-request.d.ts +7 -0
- package/dist/addon-child/read-request.d.ts.map +1 -0
- package/dist/addon-child/read-request.js +25 -0
- package/dist/addon-child/read-request.js.map +1 -0
- package/dist/addon-child.d.ts +2 -0
- package/dist/addon-child.d.ts.map +1 -0
- package/dist/addon-child.js +61 -0
- package/dist/addon-child.js.map +1 -0
- package/dist/affected-stories/affected-stories.d.ts +128 -0
- package/dist/affected-stories/affected-stories.d.ts.map +1 -0
- package/dist/affected-stories/affected-stories.js +168 -0
- package/dist/affected-stories/affected-stories.js.map +1 -0
- package/dist/affected-stories/changed-file-rules.d.ts +98 -0
- package/dist/affected-stories/changed-file-rules.d.ts.map +1 -0
- package/dist/affected-stories/changed-file-rules.js +167 -0
- package/dist/affected-stories/changed-file-rules.js.map +1 -0
- package/dist/affected-stories/fallow-graph.d.ts +67 -0
- package/dist/affected-stories/fallow-graph.d.ts.map +1 -0
- package/dist/affected-stories/fallow-graph.js +180 -0
- package/dist/affected-stories/fallow-graph.js.map +1 -0
- package/dist/affected-stories/git-changes.d.ts +57 -0
- package/dist/affected-stories/git-changes.d.ts.map +1 -0
- package/dist/affected-stories/git-changes.js +203 -0
- package/dist/affected-stories/git-changes.js.map +1 -0
- package/dist/affected-stories/group-changes.d.ts +48 -0
- package/dist/affected-stories/group-changes.d.ts.map +1 -0
- package/dist/affected-stories/group-changes.js +41 -0
- package/dist/affected-stories/group-changes.js.map +1 -0
- package/dist/affected-stories/import-graph.d.ts +33 -0
- package/dist/affected-stories/import-graph.d.ts.map +1 -0
- package/dist/affected-stories/import-graph.js +99 -0
- package/dist/affected-stories/import-graph.js.map +1 -0
- package/dist/affected-stories/limited-map.d.ts +9 -0
- package/dist/affected-stories/limited-map.d.ts.map +1 -0
- package/dist/affected-stories/limited-map.js +24 -0
- package/dist/affected-stories/limited-map.js.map +1 -0
- package/dist/affected-stories/package-folder.d.ts +8 -0
- package/dist/affected-stories/package-folder.d.ts.map +1 -0
- package/dist/affected-stories/package-folder.js +45 -0
- package/dist/affected-stories/package-folder.js.map +1 -0
- package/dist/affected-stories/storybook-rules.d.ts +153 -0
- package/dist/affected-stories/storybook-rules.d.ts.map +1 -0
- package/dist/affected-stories/storybook-rules.js +161 -0
- package/dist/affected-stories/storybook-rules.js.map +1 -0
- package/dist/affected-stories/walk-back.d.ts +16 -0
- package/dist/affected-stories/walk-back.d.ts.map +1 -0
- package/dist/affected-stories/walk-back.js +46 -0
- package/dist/affected-stories/walk-back.js.map +1 -0
- package/dist/agent-skill/install-skill.d.ts +34 -0
- package/dist/agent-skill/install-skill.d.ts.map +1 -0
- package/dist/agent-skill/install-skill.js +43 -0
- package/dist/agent-skill/install-skill.js.map +1 -0
- package/dist/agent-skill/refresh-skill.d.ts +62 -0
- package/dist/agent-skill/refresh-skill.d.ts.map +1 -0
- package/dist/agent-skill/refresh-skill.js +105 -0
- package/dist/agent-skill/refresh-skill.js.map +1 -0
- package/dist/agent-skill/setup-file.d.ts +41 -0
- package/dist/agent-skill/setup-file.d.ts.map +1 -0
- package/dist/agent-skill/setup-file.js +38 -0
- package/dist/agent-skill/setup-file.js.map +1 -0
- package/dist/agent-skill/skill-files.d.ts +19 -0
- package/dist/agent-skill/skill-files.d.ts.map +1 -0
- package/dist/agent-skill/skill-files.js +29 -0
- package/dist/agent-skill/skill-files.js.map +1 -0
- package/dist/agent-skill/skill-markdown.d.ts +31 -0
- package/dist/agent-skill/skill-markdown.d.ts.map +1 -0
- package/dist/agent-skill/skill-markdown.js +54 -0
- package/dist/agent-skill/skill-markdown.js.map +1 -0
- package/dist/baselines/baseline-clash.d.ts +31 -0
- package/dist/baselines/baseline-clash.d.ts.map +1 -0
- package/dist/baselines/baseline-clash.js +23 -0
- package/dist/baselines/baseline-clash.js.map +1 -0
- package/dist/baselines/baseline-error.d.ts +39 -0
- package/dist/baselines/baseline-error.d.ts.map +1 -0
- package/dist/baselines/baseline-error.js +42 -0
- package/dist/baselines/baseline-error.js.map +1 -0
- package/dist/baselines/baseline-files.d.ts +130 -0
- package/dist/baselines/baseline-files.d.ts.map +1 -0
- package/dist/baselines/baseline-files.js +292 -0
- package/dist/baselines/baseline-files.js.map +1 -0
- package/dist/baselines/baseline-set.d.ts +42 -0
- package/dist/baselines/baseline-set.d.ts.map +1 -0
- package/dist/baselines/baseline-set.js +104 -0
- package/dist/baselines/baseline-set.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +57 -0
- package/dist/bin.js.map +1 -0
- package/dist/browser/browser-package.d.ts +54 -0
- package/dist/browser/browser-package.d.ts.map +1 -0
- package/dist/browser/browser-package.js +105 -0
- package/dist/browser/browser-package.js.map +1 -0
- package/dist/browser/browser-version.d.ts +67 -0
- package/dist/browser/browser-version.d.ts.map +1 -0
- package/dist/browser/browser-version.js +61 -0
- package/dist/browser/browser-version.js.map +1 -0
- package/dist/browser/chrome-for-testing-platform.d.ts +24 -0
- package/dist/browser/chrome-for-testing-platform.d.ts.map +1 -0
- package/dist/browser/chrome-for-testing-platform.js +39 -0
- package/dist/browser/chrome-for-testing-platform.js.map +1 -0
- package/dist/browser/image-marker.d.ts +46 -0
- package/dist/browser/image-marker.d.ts.map +1 -0
- package/dist/browser/image-marker.js +81 -0
- package/dist/browser/image-marker.js.map +1 -0
- package/dist/browser/read-browser-package.d.ts +58 -0
- package/dist/browser/read-browser-package.d.ts.map +1 -0
- package/dist/browser/read-browser-package.js +130 -0
- package/dist/browser/read-browser-package.js.map +1 -0
- package/dist/browser-download/browser-download-error.d.ts +19 -0
- package/dist/browser-download/browser-download-error.d.ts.map +1 -0
- package/dist/browser-download/browser-download-error.js +21 -0
- package/dist/browser-download/browser-download-error.js.map +1 -0
- package/dist/browser-download/cache-folder.d.ts +7 -0
- package/dist/browser-download/cache-folder.d.ts.map +1 -0
- package/dist/browser-download/cache-folder.js +34 -0
- package/dist/browser-download/cache-folder.js.map +1 -0
- package/dist/browser-download/download-file.d.ts +45 -0
- package/dist/browser-download/download-file.d.ts.map +1 -0
- package/dist/browser-download/download-file.js +340 -0
- package/dist/browser-download/download-file.js.map +1 -0
- package/dist/browser-download/install-headless-shell.d.ts +96 -0
- package/dist/browser-download/install-headless-shell.d.ts.map +1 -0
- package/dist/browser-download/install-headless-shell.js +491 -0
- package/dist/browser-download/install-headless-shell.js.map +1 -0
- package/dist/browser-download/proxy.d.ts +19 -0
- package/dist/browser-download/proxy.d.ts.map +1 -0
- package/dist/browser-download/proxy.js +102 -0
- package/dist/browser-download/proxy.js.map +1 -0
- package/dist/browser-download/unzip.d.ts +11 -0
- package/dist/browser-download/unzip.d.ts.map +1 -0
- package/dist/browser-download/unzip.js +96 -0
- package/dist/browser-download/unzip.js.map +1 -0
- package/dist/browser-process/start-browser-process.d.ts +30 -0
- package/dist/browser-process/start-browser-process.d.ts.map +1 -0
- package/dist/browser-process/start-browser-process.js +131 -0
- package/dist/browser-process/start-browser-process.js.map +1 -0
- package/dist/capture/capture-session.d.ts +472 -0
- package/dist/capture/capture-session.d.ts.map +1 -0
- package/dist/capture/capture-session.js +701 -0
- package/dist/capture/capture-session.js.map +1 -0
- package/dist/capture/driver/cdp/cdp-connection.d.ts +127 -0
- package/dist/capture/driver/cdp/cdp-connection.d.ts.map +1 -0
- package/dist/capture/driver/cdp/cdp-connection.js +243 -0
- package/dist/capture/driver/cdp/cdp-connection.js.map +1 -0
- package/dist/capture/driver/cdp/cdp-driver.d.ts +42 -0
- package/dist/capture/driver/cdp/cdp-driver.d.ts.map +1 -0
- package/dist/capture/driver/cdp/cdp-driver.js +270 -0
- package/dist/capture/driver/cdp/cdp-driver.js.map +1 -0
- package/dist/capture/driver/cdp/cdp-page.d.ts +10 -0
- package/dist/capture/driver/cdp/cdp-page.d.ts.map +1 -0
- package/dist/capture/driver/cdp/cdp-page.js +704 -0
- package/dist/capture/driver/cdp/cdp-page.js.map +1 -0
- package/dist/capture/driver/cdp/last-lines.d.ts +13 -0
- package/dist/capture/driver/cdp/last-lines.d.ts.map +1 -0
- package/dist/capture/driver/cdp/last-lines.js +49 -0
- package/dist/capture/driver/cdp/last-lines.js.map +1 -0
- package/dist/capture/driver/cdp/launch-arguments.d.ts +16 -0
- package/dist/capture/driver/cdp/launch-arguments.d.ts.map +1 -0
- package/dist/capture/driver/cdp/launch-arguments.js +142 -0
- package/dist/capture/driver/cdp/launch-arguments.js.map +1 -0
- package/dist/capture/driver/cdp/loaded-document.d.ts +61 -0
- package/dist/capture/driver/cdp/loaded-document.d.ts.map +1 -0
- package/dist/capture/driver/cdp/loaded-document.js +104 -0
- package/dist/capture/driver/cdp/loaded-document.js.map +1 -0
- package/dist/capture/driver/cdp/main-frame-navigation.d.ts +127 -0
- package/dist/capture/driver/cdp/main-frame-navigation.d.ts.map +1 -0
- package/dist/capture/driver/cdp/main-frame-navigation.js +214 -0
- package/dist/capture/driver/cdp/main-frame-navigation.js.map +1 -0
- package/dist/capture/driver/cdp/request-watch.d.ts +117 -0
- package/dist/capture/driver/cdp/request-watch.d.ts.map +1 -0
- package/dist/capture/driver/cdp/request-watch.js +244 -0
- package/dist/capture/driver/cdp/request-watch.js.map +1 -0
- package/dist/capture/driver/cdp/time-limit.d.ts +29 -0
- package/dist/capture/driver/cdp/time-limit.d.ts.map +1 -0
- package/dist/capture/driver/cdp/time-limit.js +51 -0
- package/dist/capture/driver/cdp/time-limit.js.map +1 -0
- package/dist/capture/driver/driver.d.ts +500 -0
- package/dist/capture/driver/driver.d.ts.map +1 -0
- package/dist/capture/driver/driver.js +283 -0
- package/dist/capture/driver/driver.js.map +1 -0
- package/dist/capture/end-state.d.ts +131 -0
- package/dist/capture/end-state.d.ts.map +1 -0
- package/dist/capture/end-state.js +818 -0
- package/dist/capture/end-state.js.map +1 -0
- package/dist/capture/page-roots.d.ts +18 -0
- package/dist/capture/page-roots.d.ts.map +1 -0
- package/dist/capture/page-roots.js +67 -0
- package/dist/capture/page-roots.js.map +1 -0
- package/dist/capture/page-script.d.ts +118 -0
- package/dist/capture/page-script.d.ts.map +1 -0
- package/dist/capture/page-script.js +399 -0
- package/dist/capture/page-script.js.map +1 -0
- package/dist/capture/prepare-capture.d.ts +228 -0
- package/dist/capture/prepare-capture.d.ts.map +1 -0
- package/dist/capture/prepare-capture.js +480 -0
- package/dist/capture/prepare-capture.js.map +1 -0
- package/dist/capture/read-options.d.ts +65 -0
- package/dist/capture/read-options.d.ts.map +1 -0
- package/dist/capture/read-options.js +211 -0
- package/dist/capture/read-options.js.map +1 -0
- package/dist/capture/remote-content.d.ts +45 -0
- package/dist/capture/remote-content.d.ts.map +1 -0
- package/dist/capture/remote-content.js +309 -0
- package/dist/capture/remote-content.js.map +1 -0
- package/dist/capture/worker-pool.d.ts +35 -0
- package/dist/capture/worker-pool.d.ts.map +1 -0
- package/dist/capture/worker-pool.js +51 -0
- package/dist/capture/worker-pool.js.map +1 -0
- package/dist/commands/abortable.d.ts +9 -0
- package/dist/commands/abortable.d.ts.map +1 -0
- package/dist/commands/abortable.js +18 -0
- package/dist/commands/abortable.js.map +1 -0
- package/dist/commands/browser-route.d.ts +86 -0
- package/dist/commands/browser-route.d.ts.map +1 -0
- package/dist/commands/browser-route.js +27 -0
- package/dist/commands/browser-route.js.map +1 -0
- package/dist/commands/capture-settings.d.ts +8 -0
- package/dist/commands/capture-settings.d.ts.map +1 -0
- package/dist/commands/capture-settings.js +17 -0
- package/dist/commands/capture-settings.js.map +1 -0
- package/dist/commands/check-story.d.ts +91 -0
- package/dist/commands/check-story.d.ts.map +1 -0
- package/dist/commands/check-story.js +52 -0
- package/dist/commands/check-story.js.map +1 -0
- package/dist/commands/check-storybooks.d.ts +71 -0
- package/dist/commands/check-storybooks.d.ts.map +1 -0
- package/dist/commands/check-storybooks.js +49 -0
- package/dist/commands/check-storybooks.js.map +1 -0
- package/dist/commands/consistency-check.d.ts +62 -0
- package/dist/commands/consistency-check.d.ts.map +1 -0
- package/dist/commands/consistency-check.js +63 -0
- package/dist/commands/consistency-check.js.map +1 -0
- package/dist/commands/consistency-output.d.ts +63 -0
- package/dist/commands/consistency-output.d.ts.map +1 -0
- package/dist/commands/consistency-output.js +63 -0
- package/dist/commands/consistency-output.js.map +1 -0
- package/dist/commands/docker-problem.d.ts +23 -0
- package/dist/commands/docker-problem.d.ts.map +1 -0
- package/dist/commands/docker-problem.js +18 -0
- package/dist/commands/docker-problem.js.map +1 -0
- package/dist/commands/launch-browser.d.ts +123 -0
- package/dist/commands/launch-browser.d.ts.map +1 -0
- package/dist/commands/launch-browser.js +113 -0
- package/dist/commands/launch-browser.js.map +1 -0
- package/dist/commands/missing-library.d.ts +6 -0
- package/dist/commands/missing-library.d.ts.map +1 -0
- package/dist/commands/missing-library.js +19 -0
- package/dist/commands/missing-library.js.map +1 -0
- package/dist/commands/network-warning.d.ts +36 -0
- package/dist/commands/network-warning.d.ts.map +1 -0
- package/dist/commands/network-warning.js +92 -0
- package/dist/commands/network-warning.js.map +1 -0
- package/dist/commands/parse-command-line.d.ts +133 -0
- package/dist/commands/parse-command-line.d.ts.map +1 -0
- package/dist/commands/parse-command-line.js +425 -0
- package/dist/commands/parse-command-line.js.map +1 -0
- package/dist/commands/place-browser.d.ts +75 -0
- package/dist/commands/place-browser.d.ts.map +1 -0
- package/dist/commands/place-browser.js +82 -0
- package/dist/commands/place-browser.js.map +1 -0
- package/dist/commands/plan-snapshots.d.ts +134 -0
- package/dist/commands/plan-snapshots.d.ts.map +1 -0
- package/dist/commands/plan-snapshots.js +278 -0
- package/dist/commands/plan-snapshots.js.map +1 -0
- package/dist/commands/platform-problem.d.ts +7 -0
- package/dist/commands/platform-problem.d.ts.map +1 -0
- package/dist/commands/platform-problem.js +12 -0
- package/dist/commands/platform-problem.js.map +1 -0
- package/dist/commands/read-image-fit.d.ts +16 -0
- package/dist/commands/read-image-fit.d.ts.map +1 -0
- package/dist/commands/read-image-fit.js +26 -0
- package/dist/commands/read-image-fit.js.map +1 -0
- package/dist/commands/remote-content-hint.d.ts +6 -0
- package/dist/commands/remote-content-hint.d.ts.map +1 -0
- package/dist/commands/remote-content-hint.js +37 -0
- package/dist/commands/remote-content-hint.js.map +1 -0
- package/dist/commands/report-entries.d.ts +94 -0
- package/dist/commands/report-entries.d.ts.map +1 -0
- package/dist/commands/report-entries.js +384 -0
- package/dist/commands/report-entries.js.map +1 -0
- package/dist/commands/run-browser.d.ts +128 -0
- package/dist/commands/run-browser.d.ts.map +1 -0
- package/dist/commands/run-browser.js +210 -0
- package/dist/commands/run-browser.js.map +1 -0
- package/dist/commands/run-cli.d.ts +125 -0
- package/dist/commands/run-cli.d.ts.map +1 -0
- package/dist/commands/run-cli.js +656 -0
- package/dist/commands/run-cli.js.map +1 -0
- package/dist/commands/run-output.d.ts +78 -0
- package/dist/commands/run-output.d.ts.map +1 -0
- package/dist/commands/run-output.js +71 -0
- package/dist/commands/run-output.js.map +1 -0
- package/dist/commands/run-report.d.ts +147 -0
- package/dist/commands/run-report.d.ts.map +1 -0
- package/dist/commands/run-report.js +137 -0
- package/dist/commands/run-report.js.map +1 -0
- package/dist/commands/run-selection.d.ts +191 -0
- package/dist/commands/run-selection.d.ts.map +1 -0
- package/dist/commands/run-selection.js +150 -0
- package/dist/commands/run-selection.js.map +1 -0
- package/dist/commands/run-snapshots.d.ts +272 -0
- package/dist/commands/run-snapshots.d.ts.map +1 -0
- package/dist/commands/run-snapshots.js +354 -0
- package/dist/commands/run-snapshots.js.map +1 -0
- package/dist/commands/same-address.d.ts +6 -0
- package/dist/commands/same-address.d.ts.map +1 -0
- package/dist/commands/same-address.js +32 -0
- package/dist/commands/same-address.js.map +1 -0
- package/dist/commands/select-stories.d.ts +40 -0
- package/dist/commands/select-stories.d.ts.map +1 -0
- package/dist/commands/select-stories.js +15 -0
- package/dist/commands/select-stories.js.map +1 -0
- package/dist/commands/shard-share.d.ts +41 -0
- package/dist/commands/shard-share.d.ts.map +1 -0
- package/dist/commands/shard-share.js +61 -0
- package/dist/commands/shard-share.js.map +1 -0
- package/dist/commands/snapshot-result.d.ts +165 -0
- package/dist/commands/snapshot-result.d.ts.map +1 -0
- package/dist/commands/snapshot-result.js +135 -0
- package/dist/commands/snapshot-result.js.map +1 -0
- package/dist/commands/stop-message.d.ts +65 -0
- package/dist/commands/stop-message.d.ts.map +1 -0
- package/dist/commands/stop-message.js +186 -0
- package/dist/commands/stop-message.js.map +1 -0
- package/dist/commands/stopped-run.d.ts +116 -0
- package/dist/commands/stopped-run.d.ts.map +1 -0
- package/dist/commands/stopped-run.js +103 -0
- package/dist/commands/stopped-run.js.map +1 -0
- package/dist/commands/story-run.d.ts +196 -0
- package/dist/commands/story-run.d.ts.map +1 -0
- package/dist/commands/story-run.js +258 -0
- package/dist/commands/story-run.js.map +1 -0
- package/dist/commands/take-snapshot.d.ts +27 -0
- package/dist/commands/take-snapshot.d.ts.map +1 -0
- package/dist/commands/take-snapshot.js +16 -0
- package/dist/commands/take-snapshot.js.map +1 -0
- package/dist/commands/test-plan.d.ts +100 -0
- package/dist/commands/test-plan.d.ts.map +1 -0
- package/dist/commands/test-plan.js +66 -0
- package/dist/commands/test-plan.js.map +1 -0
- package/dist/commands/test-snapshot.d.ts +52 -0
- package/dist/commands/test-snapshot.d.ts.map +1 -0
- package/dist/commands/test-snapshot.js +183 -0
- package/dist/commands/test-snapshot.js.map +1 -0
- package/dist/commands/update-baselines.d.ts +93 -0
- package/dist/commands/update-baselines.d.ts.map +1 -0
- package/dist/commands/update-baselines.js +120 -0
- package/dist/commands/update-baselines.js.map +1 -0
- package/dist/commands/update-snapshot.d.ts +69 -0
- package/dist/commands/update-snapshot.d.ts.map +1 -0
- package/dist/commands/update-snapshot.js +214 -0
- package/dist/commands/update-snapshot.js.map +1 -0
- package/dist/commands/update-story.d.ts +70 -0
- package/dist/commands/update-story.d.ts.map +1 -0
- package/dist/commands/update-story.js +64 -0
- package/dist/commands/update-story.js.map +1 -0
- package/dist/commands/warm-browser.d.ts +43 -0
- package/dist/commands/warm-browser.d.ts.map +1 -0
- package/dist/commands/warm-browser.js +192 -0
- package/dist/commands/warm-browser.js.map +1 -0
- package/dist/config/addon-image-folders.d.ts +13 -0
- package/dist/config/addon-image-folders.d.ts.map +1 -0
- package/dist/config/addon-image-folders.js +7 -0
- package/dist/config/addon-image-folders.js.map +1 -0
- package/dist/config/checks.d.ts +108 -0
- package/dist/config/checks.d.ts.map +1 -0
- package/dist/config/checks.js +190 -0
- package/dist/config/checks.js.map +1 -0
- package/dist/config/config-error.d.ts +23 -0
- package/dist/config/config-error.d.ts.map +1 -0
- package/dist/config/config-error.js +23 -0
- package/dist/config/config-error.js.map +1 -0
- package/dist/config/config-thread.d.ts +25 -0
- package/dist/config/config-thread.d.ts.map +1 -0
- package/dist/config/config-thread.js +73 -0
- package/dist/config/config-thread.js.map +1 -0
- package/dist/config/define-config.d.ts +192 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/define-config.js +9 -0
- package/dist/config/define-config.js.map +1 -0
- package/dist/config/evaluate-config.d.ts +6 -0
- package/dist/config/evaluate-config.d.ts.map +1 -0
- package/dist/config/evaluate-config.js +39 -0
- package/dist/config/evaluate-config.js.map +1 -0
- package/dist/config/find-config.d.ts +35 -0
- package/dist/config/find-config.d.ts.map +1 -0
- package/dist/config/find-config.js +71 -0
- package/dist/config/find-config.js.map +1 -0
- package/dist/config/find-storybook-url-problem.d.ts +29 -0
- package/dist/config/find-storybook-url-problem.d.ts.map +1 -0
- package/dist/config/find-storybook-url-problem.js +34 -0
- package/dist/config/find-storybook-url-problem.js.map +1 -0
- package/dist/config/is-ci.d.ts +7 -0
- package/dist/config/is-ci.d.ts.map +1 -0
- package/dist/config/is-ci.js +10 -0
- package/dist/config/is-ci.js.map +1 -0
- package/dist/config/load-config.d.ts +72 -0
- package/dist/config/load-config.d.ts.map +1 -0
- package/dist/config/load-config.js +95 -0
- package/dist/config/load-config.js.map +1 -0
- package/dist/config/load-storybook-config.d.ts +71 -0
- package/dist/config/load-storybook-config.d.ts.map +1 -0
- package/dist/config/load-storybook-config.js +104 -0
- package/dist/config/load-storybook-config.js.map +1 -0
- package/dist/config/mode-rules.d.ts +42 -0
- package/dist/config/mode-rules.d.ts.map +1 -0
- package/dist/config/mode-rules.js +188 -0
- package/dist/config/mode-rules.js.map +1 -0
- package/dist/config/read-config-afresh.d.ts +13 -0
- package/dist/config/read-config-afresh.d.ts.map +1 -0
- package/dist/config/read-config-afresh.js +28 -0
- package/dist/config/read-config-afresh.js.map +1 -0
- package/dist/config/resolve-config.d.ts +162 -0
- package/dist/config/resolve-config.d.ts.map +1 -0
- package/dist/config/resolve-config.js +181 -0
- package/dist/config/resolve-config.js.map +1 -0
- package/dist/config/story-options.d.ts +69 -0
- package/dist/config/story-options.d.ts.map +1 -0
- package/dist/config/story-options.js +174 -0
- package/dist/config/story-options.js.map +1 -0
- package/dist/config/validate-config.d.ts +9 -0
- package/dist/config/validate-config.d.ts.map +1 -0
- package/dist/config/validate-config.js +185 -0
- package/dist/config/validate-config.js.map +1 -0
- package/dist/container/browser-container.d.ts +57 -0
- package/dist/container/browser-container.d.ts.map +1 -0
- package/dist/container/browser-container.js +112 -0
- package/dist/container/browser-container.js.map +1 -0
- package/dist/container/container-error.d.ts +47 -0
- package/dist/container/container-error.d.ts.map +1 -0
- package/dist/container/container-error.js +43 -0
- package/dist/container/container-error.js.map +1 -0
- package/dist/container/docker-probe.d.ts +37 -0
- package/dist/container/docker-probe.d.ts.map +1 -0
- package/dist/container/docker-probe.js +85 -0
- package/dist/container/docker-probe.js.map +1 -0
- package/dist/container/image-pull.d.ts +11 -0
- package/dist/container/image-pull.d.ts.map +1 -0
- package/dist/container/image-pull.js +40 -0
- package/dist/container/image-pull.js.map +1 -0
- package/dist/container/inside-container.d.ts +8 -0
- package/dist/container/inside-container.d.ts.map +1 -0
- package/dist/container/inside-container.js +11 -0
- package/dist/container/inside-container.js.map +1 -0
- package/dist/container/launch-through-proxy.d.ts +16 -0
- package/dist/container/launch-through-proxy.d.ts.map +1 -0
- package/dist/container/launch-through-proxy.js +51 -0
- package/dist/container/launch-through-proxy.js.map +1 -0
- package/dist/container/own-container.d.ts +12 -0
- package/dist/container/own-container.d.ts.map +1 -0
- package/dist/container/own-container.js +61 -0
- package/dist/container/own-container.js.map +1 -0
- package/dist/container/proxy-reach.d.ts +19 -0
- package/dist/container/proxy-reach.d.ts.map +1 -0
- package/dist/container/proxy-reach.js +101 -0
- package/dist/container/proxy-reach.js.map +1 -0
- package/dist/container/run-docker.d.ts +11 -0
- package/dist/container/run-docker.d.ts.map +1 -0
- package/dist/container/run-docker.js +61 -0
- package/dist/container/run-docker.js.map +1 -0
- package/dist/container/socks-proxy.d.ts +28 -0
- package/dist/container/socks-proxy.d.ts.map +1 -0
- package/dist/container/socks-proxy.js +335 -0
- package/dist/container/socks-proxy.js.map +1 -0
- package/dist/docs-site/docs-url.d.ts +7 -0
- package/dist/docs-site/docs-url.d.ts.map +1 -0
- package/dist/docs-site/docs-url.js +13 -0
- package/dist/docs-site/docs-url.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/init/addon-question.d.ts +99 -0
- package/dist/init/addon-question.d.ts.map +1 -0
- package/dist/init/addon-question.js +111 -0
- package/dist/init/addon-question.js.map +1 -0
- package/dist/init/closing-message.d.ts +182 -0
- package/dist/init/closing-message.d.ts.map +1 -0
- package/dist/init/closing-message.js +189 -0
- package/dist/init/closing-message.js.map +1 -0
- package/dist/init/detect-project.d.ts +111 -0
- package/dist/init/detect-project.d.ts.map +1 -0
- package/dist/init/detect-project.js +166 -0
- package/dist/init/detect-project.js.map +1 -0
- package/dist/init/existing-config.d.ts +68 -0
- package/dist/init/existing-config.d.ts.map +1 -0
- package/dist/init/existing-config.js +149 -0
- package/dist/init/existing-config.js.map +1 -0
- package/dist/init/find-storybooks.d.ts +93 -0
- package/dist/init/find-storybooks.d.ts.map +1 -0
- package/dist/init/find-storybooks.js +165 -0
- package/dist/init/find-storybooks.js.map +1 -0
- package/dist/init/init-checks.d.ts +49 -0
- package/dist/init/init-checks.d.ts.map +1 -0
- package/dist/init/init-checks.js +151 -0
- package/dist/init/init-checks.js.map +1 -0
- package/dist/init/install.d.ts +286 -0
- package/dist/init/install.d.ts.map +1 -0
- package/dist/init/install.js +226 -0
- package/dist/init/install.js.map +1 -0
- package/dist/init/list-of.d.ts +10 -0
- package/dist/init/list-of.d.ts.map +1 -0
- package/dist/init/list-of.js +18 -0
- package/dist/init/list-of.js.map +1 -0
- package/dist/init/package-manager.d.ts +214 -0
- package/dist/init/package-manager.d.ts.map +1 -0
- package/dist/init/package-manager.js +308 -0
- package/dist/init/package-manager.js.map +1 -0
- package/dist/init/package-scripts.d.ts +72 -0
- package/dist/init/package-scripts.d.ts.map +1 -0
- package/dist/init/package-scripts.js +29 -0
- package/dist/init/package-scripts.js.map +1 -0
- package/dist/init/prompter.d.ts +143 -0
- package/dist/init/prompter.d.ts.map +1 -0
- package/dist/init/prompter.js +65 -0
- package/dist/init/prompter.js.map +1 -0
- package/dist/init/questions.d.ts +144 -0
- package/dist/init/questions.d.ts.map +1 -0
- package/dist/init/questions.js +342 -0
- package/dist/init/questions.js.map +1 -0
- package/dist/init/run-command.d.ts +27 -0
- package/dist/init/run-command.d.ts.map +1 -0
- package/dist/init/run-command.js +63 -0
- package/dist/init/run-command.js.map +1 -0
- package/dist/init/run-init.d.ts +133 -0
- package/dist/init/run-init.d.ts.map +1 -0
- package/dist/init/run-init.js +330 -0
- package/dist/init/run-init.js.map +1 -0
- package/dist/init/segment.d.ts +60 -0
- package/dist/init/segment.d.ts.map +1 -0
- package/dist/init/segment.js +54 -0
- package/dist/init/segment.js.map +1 -0
- package/dist/init/setup-files.d.ts +85 -0
- package/dist/init/setup-files.d.ts.map +1 -0
- package/dist/init/setup-files.js +191 -0
- package/dist/init/setup-files.js.map +1 -0
- package/dist/init/setup-progress.d.ts +46 -0
- package/dist/init/setup-progress.d.ts.map +1 -0
- package/dist/init/setup-progress.js +36 -0
- package/dist/init/setup-progress.js.map +1 -0
- package/dist/init/skill-setup.d.ts +55 -0
- package/dist/init/skill-setup.d.ts.map +1 -0
- package/dist/init/skill-setup.js +47 -0
- package/dist/init/skill-setup.js.map +1 -0
- package/dist/init/storybook-scripts.d.ts +47 -0
- package/dist/init/storybook-scripts.d.ts.map +1 -0
- package/dist/init/storybook-scripts.js +114 -0
- package/dist/init/storybook-scripts.js.map +1 -0
- package/dist/init/storybook-start.d.ts +145 -0
- package/dist/init/storybook-start.d.ts.map +1 -0
- package/dist/init/storybook-start.js +109 -0
- package/dist/init/storybook-start.js.map +1 -0
- package/dist/init/unlisted-dependencies.d.ts +75 -0
- package/dist/init/unlisted-dependencies.d.ts.map +1 -0
- package/dist/init/unlisted-dependencies.js +142 -0
- package/dist/init/unlisted-dependencies.js.map +1 -0
- package/dist/init/workspace-packages.d.ts +58 -0
- package/dist/init/workspace-packages.d.ts.map +1 -0
- package/dist/init/workspace-packages.js +86 -0
- package/dist/init/workspace-packages.js.map +1 -0
- package/dist/init/workspace.d.ts +109 -0
- package/dist/init/workspace.d.ts.map +1 -0
- package/dist/init/workspace.js +433 -0
- package/dist/init/workspace.js.map +1 -0
- package/dist/report/display-path.d.ts +7 -0
- package/dist/report/display-path.d.ts.map +1 -0
- package/dist/report/display-path.js +10 -0
- package/dist/report/display-path.js.map +1 -0
- package/dist/report/report-document.d.ts +682 -0
- package/dist/report/report-document.d.ts.map +1 -0
- package/dist/report/report-document.js +90 -0
- package/dist/report/report-document.js.map +1 -0
- package/dist/report/report-folder.d.ts +102 -0
- package/dist/report/report-folder.d.ts.map +1 -0
- package/dist/report/report-folder.js +160 -0
- package/dist/report/report-folder.js.map +1 -0
- package/dist/reporter/counts-line.d.ts +14 -0
- package/dist/reporter/counts-line.d.ts.map +1 -0
- package/dist/reporter/counts-line.js +18 -0
- package/dist/reporter/counts-line.js.map +1 -0
- package/dist/reporter/duration.d.ts +8 -0
- package/dist/reporter/duration.d.ts.map +1 -0
- package/dist/reporter/duration.js +18 -0
- package/dist/reporter/duration.js.map +1 -0
- package/dist/reporter/end-block.d.ts +42 -0
- package/dist/reporter/end-block.d.ts.map +1 -0
- package/dist/reporter/end-block.js +121 -0
- package/dist/reporter/end-block.js.map +1 -0
- package/dist/reporter/log-reporter.d.ts +10 -0
- package/dist/reporter/log-reporter.d.ts.map +1 -0
- package/dist/reporter/log-reporter.js +23 -0
- package/dist/reporter/log-reporter.js.map +1 -0
- package/dist/reporter/reporter-choice.d.ts +27 -0
- package/dist/reporter/reporter-choice.d.ts.map +1 -0
- package/dist/reporter/reporter-choice.js +12 -0
- package/dist/reporter/reporter-choice.js.map +1 -0
- package/dist/reporter/run-event.d.ts +90 -0
- package/dist/reporter/run-event.d.ts.map +1 -0
- package/dist/reporter/run-event.js +2 -0
- package/dist/reporter/run-event.js.map +1 -0
- package/dist/sharding/shard.d.ts +17 -0
- package/dist/sharding/shard.d.ts.map +1 -0
- package/dist/sharding/shard.js +2 -0
- package/dist/sharding/shard.js.map +1 -0
- package/dist/sharding/split-stories-files.d.ts +43 -0
- package/dist/sharding/split-stories-files.d.ts.map +1 -0
- package/dist/sharding/split-stories-files.js +70 -0
- package/dist/sharding/split-stories-files.js.map +1 -0
- package/dist/step-summary/step-summary.d.ts +45 -0
- package/dist/step-summary/step-summary.d.ts.map +1 -0
- package/dist/step-summary/step-summary.js +263 -0
- package/dist/step-summary/step-summary.js.map +1 -0
- package/dist/storybook/options-encoding.d.ts +115 -0
- package/dist/storybook/options-encoding.d.ts.map +1 -0
- package/dist/storybook/options-encoding.js +117 -0
- package/dist/storybook/options-encoding.js.map +1 -0
- package/dist/storybook/options-read.d.ts +146 -0
- package/dist/storybook/options-read.d.ts.map +1 -0
- package/dist/storybook/options-read.js +192 -0
- package/dist/storybook/options-read.js.map +1 -0
- package/dist/storybook/preview-script.d.ts +172 -0
- package/dist/storybook/preview-script.d.ts.map +1 -0
- package/dist/storybook/preview-script.js +804 -0
- package/dist/storybook/preview-script.js.map +1 -0
- package/dist/storybook/read-stories.d.ts +72 -0
- package/dist/storybook/read-stories.d.ts.map +1 -0
- package/dist/storybook/read-stories.js +317 -0
- package/dist/storybook/read-stories.js.map +1 -0
- package/dist/storybook/stories-matchers.d.ts +39 -0
- package/dist/storybook/stories-matchers.d.ts.map +1 -0
- package/dist/storybook/stories-matchers.js +149 -0
- package/dist/storybook/stories-matchers.js.map +1 -0
- package/dist/storybook/storybook-error.d.ts +24 -0
- package/dist/storybook/storybook-error.d.ts.map +1 -0
- package/dist/storybook/storybook-error.js +24 -0
- package/dist/storybook/storybook-error.js.map +1 -0
- package/dist/storybook/storybook-version.d.ts +62 -0
- package/dist/storybook/storybook-version.d.ts.map +1 -0
- package/dist/storybook/storybook-version.js +105 -0
- package/dist/storybook/storybook-version.js.map +1 -0
- package/dist/storybook/test-path.d.ts +19 -0
- package/dist/storybook/test-path.d.ts.map +1 -0
- package/dist/storybook/test-path.js +47 -0
- package/dist/storybook/test-path.js.map +1 -0
- package/dist/storybook/wait-hook.d.ts +64 -0
- package/dist/storybook/wait-hook.d.ts.map +1 -0
- package/dist/storybook/wait-hook.js +50 -0
- package/dist/storybook/wait-hook.js.map +1 -0
- package/dist/system-error/system-reason.d.ts +8 -0
- package/dist/system-error/system-reason.d.ts.map +1 -0
- package/dist/system-error/system-reason.js +15 -0
- package/dist/system-error/system-reason.js.map +1 -0
- package/dist/terminal-ui/answered-line.d.ts +21 -0
- package/dist/terminal-ui/answered-line.d.ts.map +1 -0
- package/dist/terminal-ui/answered-line.js +12 -0
- package/dist/terminal-ui/answered-line.js.map +1 -0
- package/dist/terminal-ui/brand-header.d.ts +21 -0
- package/dist/terminal-ui/brand-header.d.ts.map +1 -0
- package/dist/terminal-ui/brand-header.js +12 -0
- package/dist/terminal-ui/brand-header.js.map +1 -0
- package/dist/terminal-ui/checklist-question.d.ts +26 -0
- package/dist/terminal-ui/checklist-question.d.ts.map +1 -0
- package/dist/terminal-ui/checklist-question.js +62 -0
- package/dist/terminal-ui/checklist-question.js.map +1 -0
- package/dist/terminal-ui/choice-line.d.ts +29 -0
- package/dist/terminal-ui/choice-line.d.ts.map +1 -0
- package/dist/terminal-ui/choice-line.js +13 -0
- package/dist/terminal-ui/choice-line.js.map +1 -0
- package/dist/terminal-ui/coloured-text.d.ts +19 -0
- package/dist/terminal-ui/coloured-text.d.ts.map +1 -0
- package/dist/terminal-ui/coloured-text.js +16 -0
- package/dist/terminal-ui/coloured-text.js.map +1 -0
- package/dist/terminal-ui/confirm-question.d.ts +8 -0
- package/dist/terminal-ui/confirm-question.d.ts.map +1 -0
- package/dist/terminal-ui/confirm-question.js +44 -0
- package/dist/terminal-ui/confirm-question.js.map +1 -0
- package/dist/terminal-ui/init-screen.d.ts +23 -0
- package/dist/terminal-ui/init-screen.d.ts.map +1 -0
- package/dist/terminal-ui/init-screen.js +74 -0
- package/dist/terminal-ui/init-screen.js.map +1 -0
- package/dist/terminal-ui/init-view-state.d.ts +294 -0
- package/dist/terminal-ui/init-view-state.d.ts.map +1 -0
- package/dist/terminal-ui/init-view-state.js +148 -0
- package/dist/terminal-ui/init-view-state.js.map +1 -0
- package/dist/terminal-ui/init-view.d.ts +70 -0
- package/dist/terminal-ui/init-view.d.ts.map +1 -0
- package/dist/terminal-ui/init-view.js +128 -0
- package/dist/terminal-ui/init-view.js.map +1 -0
- package/dist/terminal-ui/live-screen.d.ts +22 -0
- package/dist/terminal-ui/live-screen.d.ts.map +1 -0
- package/dist/terminal-ui/live-screen.js +41 -0
- package/dist/terminal-ui/live-screen.js.map +1 -0
- package/dist/terminal-ui/live-view-state.d.ts +64 -0
- package/dist/terminal-ui/live-view-state.d.ts.map +1 -0
- package/dist/terminal-ui/live-view-state.js +54 -0
- package/dist/terminal-ui/live-view-state.js.map +1 -0
- package/dist/terminal-ui/live-view.d.ts +37 -0
- package/dist/terminal-ui/live-view.d.ts.map +1 -0
- package/dist/terminal-ui/live-view.js +67 -0
- package/dist/terminal-ui/live-view.js.map +1 -0
- package/dist/terminal-ui/message-line.d.ts +31 -0
- package/dist/terminal-ui/message-line.d.ts.map +1 -0
- package/dist/terminal-ui/message-line.js +79 -0
- package/dist/terminal-ui/message-line.js.map +1 -0
- package/dist/terminal-ui/output-tail.d.ts +29 -0
- package/dist/terminal-ui/output-tail.d.ts.map +1 -0
- package/dist/terminal-ui/output-tail.js +52 -0
- package/dist/terminal-ui/output-tail.js.map +1 -0
- package/dist/terminal-ui/progress-bar.d.ts +47 -0
- package/dist/terminal-ui/progress-bar.d.ts.map +1 -0
- package/dist/terminal-ui/progress-bar.js +23 -0
- package/dist/terminal-ui/progress-bar.js.map +1 -0
- package/dist/terminal-ui/question-header.d.ts +23 -0
- package/dist/terminal-ui/question-header.d.ts.map +1 -0
- package/dist/terminal-ui/question-header.js +24 -0
- package/dist/terminal-ui/question-header.js.map +1 -0
- package/dist/terminal-ui/question.d.ts +85 -0
- package/dist/terminal-ui/question.d.ts.map +1 -0
- package/dist/terminal-ui/question.js +77 -0
- package/dist/terminal-ui/question.js.map +1 -0
- package/dist/terminal-ui/select-question.d.ts +19 -0
- package/dist/terminal-ui/select-question.d.ts.map +1 -0
- package/dist/terminal-ui/select-question.js +24 -0
- package/dist/terminal-ui/select-question.js.map +1 -0
- package/dist/terminal-ui/spinner.d.ts +26 -0
- package/dist/terminal-ui/spinner.d.ts.map +1 -0
- package/dist/terminal-ui/spinner.js +39 -0
- package/dist/terminal-ui/spinner.js.map +1 -0
- package/dist/terminal-ui/step-list.d.ts +36 -0
- package/dist/terminal-ui/step-list.d.ts.map +1 -0
- package/dist/terminal-ui/step-list.js +122 -0
- package/dist/terminal-ui/step-list.js.map +1 -0
- package/dist/terminal-ui/summary.d.ts +20 -0
- package/dist/terminal-ui/summary.d.ts.map +1 -0
- package/dist/terminal-ui/summary.js +96 -0
- package/dist/terminal-ui/summary.js.map +1 -0
- package/dist/terminal-ui/text-input.d.ts +65 -0
- package/dist/terminal-ui/text-input.d.ts.map +1 -0
- package/dist/terminal-ui/text-input.js +72 -0
- package/dist/terminal-ui/text-input.js.map +1 -0
- package/dist/terminal-ui/text-question.d.ts +18 -0
- package/dist/terminal-ui/text-question.d.ts.map +1 -0
- package/dist/terminal-ui/text-question.js +60 -0
- package/dist/terminal-ui/text-question.js.map +1 -0
- package/dist/terminal-ui/theme.d.ts +106 -0
- package/dist/terminal-ui/theme.d.ts.map +1 -0
- package/dist/terminal-ui/theme.js +97 -0
- package/dist/terminal-ui/theme.js.map +1 -0
- package/dist/terminal-ui/wrapped-lines.d.ts +15 -0
- package/dist/terminal-ui/wrapped-lines.d.ts.map +1 -0
- package/dist/terminal-ui/wrapped-lines.js +105 -0
- package/dist/terminal-ui/wrapped-lines.js.map +1 -0
- package/dist/terminal-ui/wrapped-segments.d.ts +27 -0
- package/dist/terminal-ui/wrapped-segments.d.ts.map +1 -0
- package/dist/terminal-ui/wrapped-segments.js +37 -0
- package/dist/terminal-ui/wrapped-segments.js.map +1 -0
- package/dist/terminal-ui/wrapped-text.d.ts +21 -0
- package/dist/terminal-ui/wrapped-text.d.ts.map +1 -0
- package/dist/terminal-ui/wrapped-text.js +11 -0
- package/dist/terminal-ui/wrapped-text.js.map +1 -0
- package/dist/visual-diff/diff-thread.d.ts +27 -0
- package/dist/visual-diff/diff-thread.d.ts.map +1 -0
- package/dist/visual-diff/diff-thread.js +233 -0
- package/dist/visual-diff/diff-thread.js.map +1 -0
- package/dist/visual-diff/visual-diff.d.ts +259 -0
- package/dist/visual-diff/visual-diff.d.ts.map +1 -0
- package/dist/visual-diff/visual-diff.js +317 -0
- package/dist/visual-diff/visual-diff.js.map +1 -0
- package/fallow-graph.json +1 -0
- package/package.json +61 -4
- package/skill/SKILL.md +92 -0
- package/skill/scripts/run.mjs +1532 -0
- package/README.md +0 -3
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import { type CaptureArea, type ConsoleMessage, type Driver, type PageSetup, type PageViewport } from './driver/driver.js';
|
|
2
|
+
import { type PageGrid, type PageRemoteContent, type StoryMask } from './prepare-capture.js';
|
|
3
|
+
/**
|
|
4
|
+
* How much longer than a wait in the page the driver waits for its answer, in ms. The wait in the page gives up first
|
|
5
|
+
* and says why; this catches a page that stopped answering.
|
|
6
|
+
*/
|
|
7
|
+
export declare const waitMarginMs = 1000;
|
|
8
|
+
/**
|
|
9
|
+
* How a session captures every story.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface CaptureSettings {
|
|
14
|
+
/**
|
|
15
|
+
* The config's `readyTimeout`, in ms, per attempt: a story that navigates away is captured again, up to 2 more times,
|
|
16
|
+
* each with the whole of it. It's counted from just before the viewport is set. Loading the story (`goto`), waiting
|
|
17
|
+
* for Storybook to report it finished, waiting for its images and fonts, running its wait hook, checking its images
|
|
18
|
+
* and fonts again after the hook, bringing it to its end state, checking its images and fonts again after that and
|
|
19
|
+
* painting its masks share it, each getting what's left, in whole ms rounded up. Each wait in the page gives up when
|
|
20
|
+
* it runs out, and the driver allows up to 1 s more for the page's answer. Setting the viewport, the capture and
|
|
21
|
+
* capturing the snapshot again are bound by the driver's own fixed limits instead. Nothing limits a story's
|
|
22
|
+
* `captureAgainIf`.
|
|
23
|
+
*/
|
|
24
|
+
readyTimeoutMs: number;
|
|
25
|
+
/**
|
|
26
|
+
* The time zone the page runs in, such as `Europe/Warsaw`.
|
|
27
|
+
*/
|
|
28
|
+
timezone: string;
|
|
29
|
+
/**
|
|
30
|
+
* The locale the page runs in, such as `en-US`.
|
|
31
|
+
*/
|
|
32
|
+
locale: string;
|
|
33
|
+
/**
|
|
34
|
+
* The colour scheme the page's `prefers-color-scheme` media feature reports.
|
|
35
|
+
*/
|
|
36
|
+
colorScheme: PageSetup['colorScheme'];
|
|
37
|
+
/**
|
|
38
|
+
* The colour masks are painted in: `#RGB` or `#RRGGBB`.
|
|
39
|
+
*/
|
|
40
|
+
maskColor: string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether each capture also lists the hosts its story sends real network requests to and shows remote content from.
|
|
43
|
+
* It turns on the page's request watching, so only `update` sets it.
|
|
44
|
+
*/
|
|
45
|
+
listHosts: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* How long the capture of a broken story's image may take, in ms: `brokenImageTimeLimitMs` outside tests. A capture
|
|
48
|
+
* that takes longer gives no image.
|
|
49
|
+
*/
|
|
50
|
+
brokenImageTimeLimitMs: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* How long the capture of a broken story's image may take, in ms.
|
|
54
|
+
*
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
export declare const brokenImageTimeLimitMs = 5000;
|
|
58
|
+
/**
|
|
59
|
+
* A snapshot to capture: a story's URL, with a mode's globals in it, the viewport to capture it at, the story's element
|
|
60
|
+
* and masks, and whether to capture the same page again once the snapshot is captured.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export interface StoryToCapture {
|
|
65
|
+
/**
|
|
66
|
+
* The story's ID, such as `button--primary`.
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
/**
|
|
70
|
+
* The URL of the story on its own, such as `http://localhost:6006/iframe.html?id=button--primary&viewMode=story`. A
|
|
71
|
+
* mode's snapshot adds the mode's globals to it.
|
|
72
|
+
*/
|
|
73
|
+
url: string;
|
|
74
|
+
/**
|
|
75
|
+
* The size the snapshot is laid out and captured at: the default capture's, or its mode's merged over it.
|
|
76
|
+
*/
|
|
77
|
+
viewport: PageViewport;
|
|
78
|
+
/**
|
|
79
|
+
* The CSS selector of the element whose box is captured. The full page is captured without it.
|
|
80
|
+
*/
|
|
81
|
+
element?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The masks painted over the story before its capture, in order. None without it.
|
|
84
|
+
*/
|
|
85
|
+
masks?: readonly StoryMask[];
|
|
86
|
+
/**
|
|
87
|
+
* Whether the capture also brings back the remote content the snapshot shows. Without it, the snapshot comes
|
|
88
|
+
* without it, and no remote content search runs for it unless a host mask needs one or the session's settings ask
|
|
89
|
+
* to list hosts.
|
|
90
|
+
*/
|
|
91
|
+
findRemoteContent?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether a story that breaks while its page still shows something comes with an image of that page: for the
|
|
94
|
+
* reasons `error`, `play-threw`, `timeout`, `fonts-not-loaded`, `wait-threw`, `element-missing` and
|
|
95
|
+
* `grid-too-wide`, the full page, captured at once, before the page is closed. Without it, a broken story comes
|
|
96
|
+
* without one.
|
|
97
|
+
*/
|
|
98
|
+
imageWhenBroken?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Decides whether to capture the same page again. It's called with the snapshot as soon as it's captured and what
|
|
101
|
+
* the snapshot comes with is read, with the page left as it is. Each attempt that captured a snapshot calls it once,
|
|
102
|
+
* and an attempt that's broken before its snapshot is captured never calls it. A second capture that navigates away
|
|
103
|
+
* is retried like any other attempt, and the retry calls it again, so it may be called once per attempt. When it
|
|
104
|
+
* resolves true, the area the snapshot was captured from is captured again at once, with nothing done to the page in
|
|
105
|
+
* between, and the capture gives it as `capturedAgain`. For the full page, the page is measured again at the second
|
|
106
|
+
* capture, so its size can change. When it resolves false, nothing more is captured. When it rejects, the page is
|
|
107
|
+
* closed and the capture rejects with the same error. readyTimeout doesn't limit it. Without it, the snapshot is
|
|
108
|
+
* captured once.
|
|
109
|
+
*/
|
|
110
|
+
captureAgainIf?: (snapshot: Uint8Array) => Promise<boolean>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Remote content a snapshot shows: one box per element and host, in pixels of the snapshot's image.
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export interface RemoteContentBox {
|
|
118
|
+
/**
|
|
119
|
+
* The host it comes from, such as `images.example.com`, with its port when the URL has one.
|
|
120
|
+
*/
|
|
121
|
+
host: string;
|
|
122
|
+
/**
|
|
123
|
+
* The distance from the image's left edge to the box's, in whole pixels. It can be below 0, or past the image, for
|
|
124
|
+
* content outside the capture area.
|
|
125
|
+
*/
|
|
126
|
+
x: number;
|
|
127
|
+
/**
|
|
128
|
+
* The distance from the image's top edge to the box's, in whole pixels. It can be below 0, or past the image, for
|
|
129
|
+
* content outside the capture area.
|
|
130
|
+
*/
|
|
131
|
+
y: number;
|
|
132
|
+
/**
|
|
133
|
+
* The box's width, in whole pixels.
|
|
134
|
+
*/
|
|
135
|
+
width: number;
|
|
136
|
+
/**
|
|
137
|
+
* The box's height, in whole pixels.
|
|
138
|
+
*/
|
|
139
|
+
height: number;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Why a story can't be captured, as a code a report can group by.
|
|
143
|
+
*
|
|
144
|
+
* - `load-failed`: its stories file failed to load, or didn't load within readyTimeout, so every story of that file is
|
|
145
|
+
* broken. The run's options read gives it, before any capture; a capture session never does.
|
|
146
|
+
* - `error`: the story, Storybook or the browser failed it: Storybook reported an error or showed its error display,
|
|
147
|
+
* the story threw, the page script didn't run, the story's wait hook couldn't run, or a step of the capture failed.
|
|
148
|
+
* - `play-threw`: the story's `play` function threw or left unhandled errors.
|
|
149
|
+
* - `timeout`: the story wasn't ready within readyTimeout.
|
|
150
|
+
* - `fonts-not-loaded`: a font face the story's page uses was still loading when readyTimeout ran out.
|
|
151
|
+
* - `wait-threw`: the story's `wait` hook threw or rejected.
|
|
152
|
+
* - `navigated-away`: the story's page went to another document.
|
|
153
|
+
* - `crashed`: the page crashed, usually from running out of memory.
|
|
154
|
+
* - `too-tall`: the capture, or a grid on the story's page, is over 32,767 device pixels on a side.
|
|
155
|
+
* - `element-missing`: the story's `element` selector matched nothing, or an element whose box is of zero size.
|
|
156
|
+
* - `grid-too-wide`: a grid on the story's page is wider than the viewport.
|
|
157
|
+
* - `browser-exited`: the browser exited while the story was in flight. The run's browser gives it; a capture session
|
|
158
|
+
* rejects with a `BrowserExitedError` instead.
|
|
159
|
+
* - `changed-after-capture`: the story's page, captured again a second after its first capture on one load, had
|
|
160
|
+
* changed beyond its tolerance, so `update` wrote no baseline. `update` gives it; a capture session never does.
|
|
161
|
+
* - `unstable`: no two of the 3 loads `update` made of the story agreed within its tolerance, so it wrote no baseline.
|
|
162
|
+
* `update` gives it; a capture session never does.
|
|
163
|
+
*
|
|
164
|
+
* @public
|
|
165
|
+
*/
|
|
166
|
+
export type BrokenReason = 'load-failed' | 'error' | 'play-threw' | 'timeout' | 'fonts-not-loaded' | 'wait-threw' | 'navigated-away' | 'crashed' | 'too-tall' | 'element-missing' | 'grid-too-wide' | 'browser-exited' | 'changed-after-capture' | 'unstable';
|
|
167
|
+
/**
|
|
168
|
+
* A story that can't be captured: why, and a one-line message for people saying so. A capture session gives one for a
|
|
169
|
+
* story it can't capture, and the run gives one for a story in flight when its browser exits and for each story of a
|
|
170
|
+
* stories file that didn't load. `update` gives one for a story that doesn't render the same way twice. Some reasons
|
|
171
|
+
* keep details besides: the stories file's load error or the time it had, `play`'s stack, the readyTimeout that ran
|
|
172
|
+
* out, the font faces still loading, where a story that navigated away went, the size of a capture too tall to take,
|
|
173
|
+
* and the width of a grid wider than the viewport.
|
|
174
|
+
*
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export type BrokenStory = {
|
|
178
|
+
/**
|
|
179
|
+
* Why the story can't be captured.
|
|
180
|
+
*/
|
|
181
|
+
reason: Exclude<BrokenReason, 'load-failed' | 'play-threw' | 'timeout' | 'fonts-not-loaded' | 'navigated-away' | 'too-tall' | 'grid-too-wide'>;
|
|
182
|
+
/**
|
|
183
|
+
* One line for people saying why.
|
|
184
|
+
*/
|
|
185
|
+
message: string;
|
|
186
|
+
} | {
|
|
187
|
+
/**
|
|
188
|
+
* Why the story can't be captured: its stories file failed to load, or didn't load within readyTimeout.
|
|
189
|
+
*/
|
|
190
|
+
reason: 'load-failed';
|
|
191
|
+
/**
|
|
192
|
+
* One line for people saying why.
|
|
193
|
+
*/
|
|
194
|
+
message: string;
|
|
195
|
+
/**
|
|
196
|
+
* The error the stories file failed to load with, as Storybook gave it. `undefined` when it didn't load in time,
|
|
197
|
+
* or failed with no message.
|
|
198
|
+
*/
|
|
199
|
+
loadError: string | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* The config's readyTimeout, in ms, when the stories file didn't load within it. `undefined` when it failed.
|
|
202
|
+
*/
|
|
203
|
+
readyTimeoutMs: number | undefined;
|
|
204
|
+
} | {
|
|
205
|
+
/**
|
|
206
|
+
* Why the story can't be captured: its `play` function threw or left unhandled errors.
|
|
207
|
+
*/
|
|
208
|
+
reason: 'play-threw';
|
|
209
|
+
/**
|
|
210
|
+
* One line for people saying why, with the error's message.
|
|
211
|
+
*/
|
|
212
|
+
message: string;
|
|
213
|
+
/**
|
|
214
|
+
* The error as Storybook described it, such as `Error: boom`, or the unhandled errors, `; ` apart. Empty when it
|
|
215
|
+
* described none.
|
|
216
|
+
*/
|
|
217
|
+
errorText: string;
|
|
218
|
+
/**
|
|
219
|
+
* Up to the first 5 frames of the error's stack, the lines that start with `at `, each trimmed, without its
|
|
220
|
+
* message. None when the error had no stack.
|
|
221
|
+
*/
|
|
222
|
+
stack: string[];
|
|
223
|
+
} | {
|
|
224
|
+
/**
|
|
225
|
+
* Why the story can't be captured: it wasn't ready within readyTimeout.
|
|
226
|
+
*/
|
|
227
|
+
reason: 'timeout';
|
|
228
|
+
/**
|
|
229
|
+
* One line for people saying why, and what the story was doing.
|
|
230
|
+
*/
|
|
231
|
+
message: string;
|
|
232
|
+
/**
|
|
233
|
+
* The config's readyTimeout, in ms, that ran out.
|
|
234
|
+
*/
|
|
235
|
+
readyTimeoutMs: number;
|
|
236
|
+
} | {
|
|
237
|
+
/**
|
|
238
|
+
* Why the story can't be captured: a font face was still loading when readyTimeout ran out.
|
|
239
|
+
*/
|
|
240
|
+
reason: 'fonts-not-loaded';
|
|
241
|
+
/**
|
|
242
|
+
* One line for people saying why, naming the faces still loading.
|
|
243
|
+
*/
|
|
244
|
+
message: string;
|
|
245
|
+
/**
|
|
246
|
+
* The font faces still loading, each as its family, weight and style. The weight and style are as declared, such
|
|
247
|
+
* as `Inter normal normal` or `Inter 100 900 normal`.
|
|
248
|
+
*/
|
|
249
|
+
faces: string[];
|
|
250
|
+
/**
|
|
251
|
+
* The config's readyTimeout, in ms, that ran out.
|
|
252
|
+
*/
|
|
253
|
+
readyTimeoutMs: number;
|
|
254
|
+
} | {
|
|
255
|
+
/**
|
|
256
|
+
* Why the story can't be captured: its page went to another document.
|
|
257
|
+
*/
|
|
258
|
+
reason: 'navigated-away';
|
|
259
|
+
/**
|
|
260
|
+
* One line for people saying why.
|
|
261
|
+
*/
|
|
262
|
+
message: string;
|
|
263
|
+
/**
|
|
264
|
+
* The full URL the document went to.
|
|
265
|
+
*/
|
|
266
|
+
url: string;
|
|
267
|
+
} | {
|
|
268
|
+
/**
|
|
269
|
+
* Why the story can't be captured: the capture, or a grid on the story's page, is over 32,767 device pixels on a
|
|
270
|
+
* side.
|
|
271
|
+
*/
|
|
272
|
+
reason: 'too-tall';
|
|
273
|
+
/**
|
|
274
|
+
* One line for people saying why, with the capture's size or the grid's.
|
|
275
|
+
*/
|
|
276
|
+
message: string;
|
|
277
|
+
/**
|
|
278
|
+
* The capture's size, or the grid's, in device pixels.
|
|
279
|
+
*/
|
|
280
|
+
size: {
|
|
281
|
+
/**
|
|
282
|
+
* The capture's width, or the grid's, in device pixels.
|
|
283
|
+
*/
|
|
284
|
+
width: number;
|
|
285
|
+
/**
|
|
286
|
+
* The capture's height, or the grid's, in device pixels.
|
|
287
|
+
*/
|
|
288
|
+
height: number;
|
|
289
|
+
};
|
|
290
|
+
} | {
|
|
291
|
+
/**
|
|
292
|
+
* Why the story can't be captured: a grid on the story's page is wider than the viewport.
|
|
293
|
+
*/
|
|
294
|
+
reason: 'grid-too-wide';
|
|
295
|
+
/**
|
|
296
|
+
* One line for people saying why, with the grid's width and the viewport's.
|
|
297
|
+
*/
|
|
298
|
+
message: string;
|
|
299
|
+
/**
|
|
300
|
+
* The widest grid's width and the viewport's, in CSS pixels.
|
|
301
|
+
*/
|
|
302
|
+
grid: {
|
|
303
|
+
/**
|
|
304
|
+
* The widest grid's width, in CSS pixels, rounded up.
|
|
305
|
+
*/
|
|
306
|
+
width: number;
|
|
307
|
+
/**
|
|
308
|
+
* The viewport's width, in CSS pixels.
|
|
309
|
+
*/
|
|
310
|
+
viewportWidth: number;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* The hosts a story reaches, as a capture lists them.
|
|
315
|
+
*
|
|
316
|
+
* @public
|
|
317
|
+
*/
|
|
318
|
+
export interface StoryHosts {
|
|
319
|
+
/**
|
|
320
|
+
* The hosts the story's page sent real network requests to, as the page reports them, each once.
|
|
321
|
+
*/
|
|
322
|
+
requests: string[];
|
|
323
|
+
/**
|
|
324
|
+
* The hosts of the remote content the story shows, each once, in the order found, without the hosts one of the
|
|
325
|
+
* story's host masks covers. None when the remote content search didn't answer in time.
|
|
326
|
+
*/
|
|
327
|
+
remoteContent: string[];
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* What capturing a story gave: its snapshot, with how long Storybook's `completing` render step took, the console
|
|
331
|
+
* messages and errors its page sent, the remote content it shows when the story asked for it, the hosts it reaches
|
|
332
|
+
* when the session lists them and the same page captured again when the story's `captureAgainIf` asked for it, or, for
|
|
333
|
+
* a broken story, why it can't be captured and, when it had a page, what its page sent.
|
|
334
|
+
*
|
|
335
|
+
* @public
|
|
336
|
+
*/
|
|
337
|
+
export type StoryCapture = {
|
|
338
|
+
/**
|
|
339
|
+
* The snapshot, as PNG bytes exactly as the browser made them.
|
|
340
|
+
*/
|
|
341
|
+
snapshot: Uint8Array;
|
|
342
|
+
/**
|
|
343
|
+
* How long Storybook's `completing` render step took for the story, in ms: about 0 on Storybook's test path, and
|
|
344
|
+
* 100 or more off it. `undefined` when the page didn't see both the `completing` and `completed` steps.
|
|
345
|
+
*/
|
|
346
|
+
completingMs: number | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* The last 50 console messages and errors the story's page sent from the load of the story in the attempt that
|
|
349
|
+
* captured it, as the page gives them right after the first capture, before the story's `captureAgainIf` is
|
|
350
|
+
* called.
|
|
351
|
+
*/
|
|
352
|
+
console: ConsoleMessage[];
|
|
353
|
+
/**
|
|
354
|
+
* The remote content the snapshot shows, when the story asked for it with `findRemoteContent` and the search
|
|
355
|
+
* answered in time. Without it, the remote content is unknown.
|
|
356
|
+
*/
|
|
357
|
+
remoteContent?: RemoteContentBox[];
|
|
358
|
+
/**
|
|
359
|
+
* The hosts the story reaches. Present exactly when the session's settings ask to list hosts. They're read right
|
|
360
|
+
* after the first capture, before the story's `captureAgainIf` is called.
|
|
361
|
+
*/
|
|
362
|
+
hosts?: StoryHosts;
|
|
363
|
+
/**
|
|
364
|
+
* The same area of the page captured a second time, at once after the story's `captureAgainIf` resolved true for
|
|
365
|
+
* the snapshot, as PNG bytes exactly as the browser made them. Present exactly when it resolved true.
|
|
366
|
+
*/
|
|
367
|
+
capturedAgain?: Uint8Array;
|
|
368
|
+
} | {
|
|
369
|
+
/**
|
|
370
|
+
* Why the story can't be captured.
|
|
371
|
+
*/
|
|
372
|
+
broken: BrokenStory;
|
|
373
|
+
/**
|
|
374
|
+
* The last 50 console messages and errors the story's page sent from the start of the attempt that broke, read
|
|
375
|
+
* before the page is closed, from the document the story went to too when it navigated away. Left out when the
|
|
376
|
+
* story had no page: a page that couldn't be opened, or a browser that exited.
|
|
377
|
+
*/
|
|
378
|
+
console?: ConsoleMessage[];
|
|
379
|
+
/**
|
|
380
|
+
* The full page as it was when the story broke, as PNG bytes exactly as the browser made them. Present only when
|
|
381
|
+
* the story asked for it with `imageWhenBroken`, broke for a reason whose page still shows something, and the
|
|
382
|
+
* page was captured within the settings' `brokenImageTimeLimitMs`.
|
|
383
|
+
*/
|
|
384
|
+
image?: Uint8Array;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Captures stories one at a time on one page of a running browser.
|
|
388
|
+
*
|
|
389
|
+
* @public
|
|
390
|
+
*/
|
|
391
|
+
export interface CaptureSession {
|
|
392
|
+
/**
|
|
393
|
+
* Captures a story, opening the session's page first when none is open. On a page kept from the previous story, it
|
|
394
|
+
* first clears the cookies and storage that story left, and when that fails, it captures on a fresh page instead. A
|
|
395
|
+
* story that navigates away is captured again at once, up to 2 more times, each on a fresh page in a fresh browser
|
|
396
|
+
* context; when it navigates away a third time, it's a broken story. Any other story that can't be captured comes
|
|
397
|
+
* back as a broken story straight away, and the page is replaced by a fresh one for the next. When the story's
|
|
398
|
+
* `captureAgainIf` resolves true for the snapshot, the same page is captured again at once. Rejects with a
|
|
399
|
+
* `BrowserExitedError` when the browser exits, and, after closing the page, with whatever the story's
|
|
400
|
+
* `captureAgainIf` rejects with. Call it once the previous capture has settled.
|
|
401
|
+
*/
|
|
402
|
+
capture: (story: StoryToCapture) => Promise<StoryCapture>;
|
|
403
|
+
/**
|
|
404
|
+
* Closes the session's page, if one is open. The browser stays open: it belongs to whoever opened the session.
|
|
405
|
+
*/
|
|
406
|
+
close: () => Promise<void>;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Gives an error's message, or the thrown value as text, ending with a period.
|
|
410
|
+
*
|
|
411
|
+
* @public
|
|
412
|
+
*/
|
|
413
|
+
export declare function failureReasonOf(error: unknown): string;
|
|
414
|
+
/**
|
|
415
|
+
* Converts the page's remote content boxes, in CSS pixels of the top document, to pixels of the snapshot's image:
|
|
416
|
+
* measured from the capture area's origin, the element's box or the document's for the full page, times
|
|
417
|
+
* `deviceScaleFactor`, and out to whole pixels, the left and top edges rounded down and the right and bottom edges up.
|
|
418
|
+
*/
|
|
419
|
+
export declare function remoteContentBoxesOf(remote: readonly PageRemoteContent[], area: CaptureArea, deviceScaleFactor: number): RemoteContentBox[];
|
|
420
|
+
/**
|
|
421
|
+
* Lists the hosts of the remote content a story shows, from what the capture preparation found: each item's host,
|
|
422
|
+
* once, in the order found. It leaves out a host one of the story's host masks covers, as the page matches them: the
|
|
423
|
+
* mask's host, in lowercase, is the item's host or its hostname. Without `remote`, when the search didn't answer in
|
|
424
|
+
* time, it lists none.
|
|
425
|
+
*/
|
|
426
|
+
export declare function remoteHostsOf(remote: readonly PageRemoteContent[] | undefined, masks: readonly StoryMask[]): string[];
|
|
427
|
+
/**
|
|
428
|
+
* Says why a story whose page shows a grid can't be captured, or gives nothing when the grid fits. A grid wider than the
|
|
429
|
+
* viewport, rounded up, is too wide, whatever the capture area: a cell past the viewport's edge would be cut or wrap. A
|
|
430
|
+
* grid whose own box, at the viewport's scale and rounded up, is over 32,767 device pixels on a side is too tall. Too
|
|
431
|
+
* wide wins over too tall. `viewport` is the snapshot's: its mode's when it has one.
|
|
432
|
+
*/
|
|
433
|
+
export declare function gridProblemOf(grid: PageGrid | undefined, viewport: PageViewport): BrokenStory | undefined;
|
|
434
|
+
/**
|
|
435
|
+
* Gives how a page is set up for the settings: a user agent ending in `StorybookTestRunner`, the settings' time zone,
|
|
436
|
+
* locale and colour scheme, the page script, and the watching of its real network requests when the settings list
|
|
437
|
+
* hosts. A capture page is set up this way.
|
|
438
|
+
*/
|
|
439
|
+
export declare function pageSetupOf(settings: CaptureSettings): PageSetup;
|
|
440
|
+
/**
|
|
441
|
+
* Starts a session that captures stories on `driver`, one at a time, on one page. It opens the page at its first
|
|
442
|
+
* capture, set up with the settings, a user agent ending in `StorybookTestRunner` and the page script. After a broken
|
|
443
|
+
* story, it closes the page and opens a fresh one, in a fresh browser context, for the next story.
|
|
444
|
+
*
|
|
445
|
+
* Before each later capture on that page, it clears the cookies, `localStorage`, `sessionStorage` and IndexedDB the
|
|
446
|
+
* previous story left, keeping Cache Storage and service workers. The previous story's document stays loaded until the
|
|
447
|
+
* next story's commits, so a timer or handler of it can still write storage after the clearing. When the clearing
|
|
448
|
+
* fails, such as after the previous story left its document, the story isn't to blame: the session closes the page and
|
|
449
|
+
* captures the story on a fresh one, whose fresh browser context holds nothing.
|
|
450
|
+
*
|
|
451
|
+
* A story that navigates away is captured again at once, up to 2 more times, each on a fresh page in a fresh browser
|
|
452
|
+
* context. When the third attempt navigates away too, the story is broken, with that attempt's message and URL. Any
|
|
453
|
+
* other outcome of a retry, a snapshot or another broken reason, is the story's outcome, and no other reason is
|
|
454
|
+
* retried.
|
|
455
|
+
*
|
|
456
|
+
* A story whose page shows a grid wider than the viewport, or too tall to capture, is broken with `grid-too-wide` or
|
|
457
|
+
* `too-tall` before anything is captured.
|
|
458
|
+
*
|
|
459
|
+
* A story that asks for it with `imageWhenBroken` and breaks while its page still shows something, for the reasons
|
|
460
|
+
* `error`, `play-threw`, `timeout`, `fonts-not-loaded`, `wait-threw`, `element-missing` and `grid-too-wide`, comes
|
|
461
|
+
* with an image of the full page, captured before the page is closed, unless that capture fails or takes longer than
|
|
462
|
+
* the settings' `brokenImageTimeLimitMs`. A browser exit during it rejects the capture with a `BrowserExitedError`.
|
|
463
|
+
*
|
|
464
|
+
* When a story has `captureAgainIf`, each attempt that captured a snapshot calls it with the snapshot, the page left as
|
|
465
|
+
* it is, and captures the same area again at once when it resolves true. A second capture that fails makes the story
|
|
466
|
+
* broken, and its page is closed; one that navigates away is retried like any attempt that does. When
|
|
467
|
+
* `captureAgainIf` rejects, the session closes the page and the capture rejects with the same error.
|
|
468
|
+
*
|
|
469
|
+
* @public
|
|
470
|
+
*/
|
|
471
|
+
export declare function openCaptureSession(driver: Driver, settings: CaptureSettings): CaptureSession;
|
|
472
|
+
//# sourceMappingURL=capture-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture-session.d.ts","sourceRoot":"","sources":["../../src/capture/capture-session.ts"],"names":[],"mappings":"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"}
|