@design.estate/wcctools 6.2.0 → 7.0.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/changelog.md +21 -0
- package/dist_shell/bundle.js +4 -4
- package/dist_shell/bundle.js.map +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/capture/classes.capturebrowser.d.ts +65 -0
- package/dist_ts/capture/classes.capturebrowser.js +251 -0
- package/dist_ts/capture/classes.captureservice.d.ts +39 -0
- package/dist_ts/capture/classes.captureservice.js +119 -0
- package/dist_ts/capture/classes.screencast.d.ts +47 -0
- package/dist_ts/capture/classes.screencast.js +127 -0
- package/dist_ts/capture/errors.d.ts +14 -0
- package/dist_ts/capture/errors.js +23 -0
- package/dist_ts/capture/images.d.ts +3 -0
- package/dist_ts/capture/images.js +58 -0
- package/dist_ts/capture/index.d.ts +4 -0
- package/dist_ts/capture/index.js +5 -0
- package/dist_ts/capture/interaction.d.ts +11 -0
- package/dist_ts/capture/interaction.js +138 -0
- package/dist_ts/capture/navigationguard.d.ts +44 -0
- package/dist_ts/capture/navigationguard.js +129 -0
- package/dist_ts/capture/previewpage.d.ts +29 -0
- package/dist_ts/capture/previewpage.js +96 -0
- package/dist_ts/capture/request.d.ts +69 -0
- package/dist_ts/capture/request.js +239 -0
- package/dist_ts/classes.devserver.d.ts +25 -9
- package/dist_ts/classes.devserver.js +45 -14
- package/dist_ts/classes.hostpolicy.d.ts +63 -0
- package/dist_ts/classes.hostpolicy.js +171 -0
- package/dist_ts/cli.js +25 -3
- package/dist_ts/cli.screenshot.d.ts +6 -0
- package/dist_ts/cli.screenshot.js +89 -0
- package/dist_ts/plugins.d.ts +6 -2
- package/dist_ts/plugins.js +8 -3
- package/dist_ts_interfaces/capture.d.ts +151 -0
- package/dist_ts_interfaces/capture.js +2 -0
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/requests.d.ts +24 -0
- package/dist_ts_shell/elements/wcc-recording-panel.d.ts +9 -0
- package/dist_ts_shell/elements/wcc-recording-panel.js +12 -1
- package/dist_ts_shell/services/framesampler.service.d.ts +23 -0
- package/dist_ts_shell/services/framesampler.service.js +101 -0
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/package.json +2 -1
- package/readme.md +104 -6
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/capture/classes.capturebrowser.ts +290 -0
- package/ts/capture/classes.captureservice.ts +152 -0
- package/ts/capture/classes.screencast.ts +152 -0
- package/ts/capture/errors.ts +25 -0
- package/ts/capture/images.ts +61 -0
- package/ts/capture/index.ts +4 -0
- package/ts/capture/interaction.ts +146 -0
- package/ts/capture/navigationguard.ts +147 -0
- package/ts/capture/previewpage.ts +130 -0
- package/ts/capture/request.ts +304 -0
- package/ts/classes.devserver.ts +55 -13
- package/ts/classes.hostpolicy.ts +201 -0
- package/ts/cli.screenshot.ts +95 -0
- package/ts/cli.ts +25 -2
- package/ts/plugins.ts +9 -2
- package/ts_interfaces/capture.ts +144 -0
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/requests.ts +39 -0
- package/ts_shell/elements/wcc-recording-panel.ts +12 -0
- package/ts_shell/services/framesampler.service.ts +112 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-10-06 - 7.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- `wcctools dev` listens on `127.0.0.1` by default instead of every interface. `--host <address>` (`0.0.0.0` or `::` for every interface) exposes it; `WccDevServer` takes the same as its `host` option.
|
|
8
|
+
- The dev server answers only the hosts it serves: `localhost`, `127.0.0.1`, `::1`, the listen address (with a wildcard listen address, every address of the machine's interfaces) and the names given with `--allowed-host` (repeatable; option `allowedHosts`). Requests and WebSocket upgrades for any other `Host` are refused with `403` and a message naming the `--allowed-host` to add.
|
|
9
|
+
- Typed requests and every other request but `GET`, `HEAD` and `OPTIONS`, and WebSocket connections (shell and preview), are admitted only from the server's own origin (`http://<allowed host>:<port>`); a request without an `Origin` header only from a loopback connection.
|
|
10
|
+
- The preview surface no longer sends CORS headers (`Access-Control-Allow-Origin: *`): other origins can no longer read the catalogue bundle.
|
|
11
|
+
- Because of that origin rule, the shell no longer works through a TLS-terminating reverse proxy, even for an `--allowed-host` name: its typed requests and WebSocket connections carry an `https:` origin and are refused. Reach the dev server over plain HTTP on its own port (for example through an SSH tunnel).
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- `wcctools screenshot <item | section/item> --out <file.png|.jpg>` screenshots one demo in a headless Chrome: it bundles the catalogue, serves it on a free loopback port, renders the demo alone on the preview route at a named width (`phone` 400, `phablet` 600, `tablet` 1024, `desktop` 1600, from the dees-domtools breakpoints) or a width in pixels, a height, a theme and a scale, frames the rendered element, the viewport or the whole page, writes the image and stops. It waits only on the preview's own signals (the bridge, the render's completed updates, the fonts), never for a fixed time. `--demo` counts from 0.
|
|
16
|
+
- The dev server's typed API takes captures: `captureScreenshot` (`IReq_CaptureScreenshot`) and `captureInteraction` (`IReq_CaptureInteraction`), which runs scripted steps (`click`, `hover`, `fill`, `press`, `waitFor`, `wait`; selectors pierce open shadow roots) on a rendered demo while recording its screencast and answers per-step results and at most `maxFrames` timestamped JPEG frames, optionally a final screenshot. One headless browser per dev server starts with the first capture, closes after a minute without one and closes with the server; two captures run at once, eight wait, more are refused as busy; every capture has a deadline (30 s for a screenshot, 135 s for an interaction; fire interactions with a matching `timeoutMs`, since `TypedRequest.fire()` gives up after 60 s by default), ends when its client goes away, waits while a bundle builds and is refused while one failed. A capture stays on the preview route: navigations that would replace the preview document (links, form submissions, `location` assignments, reloads, `about:blank` and `blob:` URLs) are cancelled as they start, with request interception as a backstop, and the step that started one fails with `navigation to <url> blocked`. Not covered: `javascript:` URLs that evaluate to a string, and demos that route by `intercept()`-ing cross-document navigations (see Known Limitations). The browser leaves process signals to the application, so `Ctrl+C` stops the server and closes the browser once.
|
|
17
|
+
- The shell samples timestamped JPEG frames from a recording (`sampleVideoFrames` with mediabunny: count, range, maximum width, quality), and its recording panel hands out the finished recording with its trim range (`getRecording()`), for the coming assistant.
|
|
18
|
+
- `@design.estate/wcctools/interfaces` exports the capture contracts (`IWccScreenshotRequest`, `IWccInteractionRequest`, `TWccInteractionStep`, `IWccImage`, `IWccTimedFrame`, …).
|
|
19
|
+
|
|
20
|
+
### Maintenance
|
|
21
|
+
|
|
22
|
+
- New dependency `@push.rocks/smartbrowser` ^5.1.0 (Puppeteer through its `/automation` entry).
|
|
23
|
+
|
|
3
24
|
## 2026-10-06 - 6.2.0
|
|
4
25
|
|
|
5
26
|
### Features
|