@ai-ecoverse/slicc-shared-web 2.4.0 → 2.4.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.
package/README.md CHANGED
@@ -108,6 +108,8 @@ Every pull request does, except Renovate's: one opened by `renovate[bot]` from a
108
108
 
109
109
  `*` reviews every Renovate pull request. With the default, none, a Renovate pull request is held only by its integration tests.
110
110
 
111
+ The commands in `lint`, `test`, `deploy`, `review-browser` and `after-release` run with `bash -eo pipefail -c`, so a multi-line command stops at its first failing line, a failure inside a pipe included.
112
+
111
113
  | Input | Default | |
112
114
  |---|---|---|
113
115
  | `node-version` | `24` | |
@@ -310,7 +312,7 @@ test('boots', async (t) => {
310
312
  - both errors end with the last five lines of the browser's stderr, and each test keeps up to 200 lines it wrote during the test in `chrome-stderr.log`.
311
313
  - a test that saw a renderer crash, or a browser that died of anything but `SIGKILL`, keeps Chrome's minidump of it as `<id>.dmp` in its artifact directory (see [Crash dumps](#crash-dumps)).
312
314
 
313
- `chrome.cdp` is the browser's own pipe, the one the harness already drives, with no session of its own: test-only, unguarded access that bypasses everything a product guard would do, and never for product code. `send(method, params, sessionId)` makes a raw call at browser level, or in any session the browser has (the harness's auto-attached ones included); a protocol error rejects with the message and keeps the error object as `error.cdp`. `on(listener)` receives every event the browser sends, as `{ method, params, sessionId }`, until `off(listener)` or the function `on` returned. `waitEvent(method, predicate, ms)` resolves with the next matching event (call it before the action that causes the event); the predicate is optional, a predicate alone works too (`waitEvent(predicate, ms)`), and it rejects after `ms` (10 s unless given). `events` is an append-only array of every event since it was first read. That is the `{ send, waitEvent, events }` client the guard runner of `@ai-ecoverse/slicc-browsers` takes, so `run(set, { client, unguarded: chrome.cdp, … })` gives it the unguarded observer that 14 of its vectors need.
315
+ `chrome.cdp` is the browser's own pipe, the one the harness already drives, with no session of its own: test-only, unguarded access that bypasses everything a product guard would do, and never for product code. `send(method, params, sessionId, ms)` makes a raw call at browser level, or in any session the browser has (the harness's auto-attached ones included), and rejects with `<method>: no answer in <ms> ms` after the caller's `ms` (60 s unless given); a protocol error rejects with the message and keeps the error object as `error.cdp`. `on(listener)` receives every event the browser sends, as `{ method, params, sessionId }`, until `off(listener)` or the function `on` returned. `waitEvent(method, predicate, ms)` resolves with the next matching event (call it before the action that causes the event); the predicate is optional, a predicate alone works too (`waitEvent(predicate, ms)`), and it rejects after `ms` (10 s unless given). `events` is an append-only array of every event since it was first read. That is the `{ send, waitEvent, events }` client the guard runner of `@ai-ecoverse/slicc-browsers` takes, so `run(set, { client, unguarded: chrome.cdp, … })` gives it the unguarded observer that 14 of its vectors need.
314
316
 
315
317
  When one evaluation runs past `stallAfter`, the harness probes once, without interrupting the wait:
316
318
  - it adds a `pending` line to `console.log` for every navigation and request of the page that has no answer yet, with its age. A worker's script loads in the worker's own session, so its request is left out. Chrome holds CDP messages to a page while a navigation is waiting for its response, so an evaluation that hangs while the page is idle usually means one of these;
@@ -7,7 +7,7 @@ import { env as inherited } from 'node:process';
7
7
  import { promisify } from 'node:util';
8
8
  import { executablePath, explicit } from './browser.mjs';
9
9
  import { cdn } from './cdn.mjs';
10
- import { CRASHED, connect, pipe } from './cdp.mjs';
10
+ import { CRASHED, connect, pipe, SEND_TIMEOUT } from './cdp.mjs';
11
11
  import { crashpad } from './dumps.mjs';
12
12
  import {
13
13
  builtinWanted,
@@ -268,7 +268,8 @@ export function unguarded(cdp) {
268
268
  return () => off(listener);
269
269
  };
270
270
  return {
271
- send: (method, params = {}, sessionId = undefined) => cdp.send(method, params, sessionId),
271
+ send: (method, params = {}, sessionId = undefined, ms = SEND_TIMEOUT) =>
272
+ cdp.send(method, params, sessionId, ms),
272
273
  on,
273
274
  off,
274
275
  get events() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Shared Renovate, Biome, TypeScript, lefthook and GitHub Actions configuration, plus the CDP integration-test harness, for SLICC's web repos",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -64,8 +64,8 @@
64
64
  "release": "semantic-release"
65
65
  },
66
66
  "devDependencies": {
67
- "@ai-ecoverse/slicc-browsers": "1.14.3",
68
- "@ai-ecoverse/slicc-cdp": "1.30.20",
67
+ "@ai-ecoverse/slicc-browsers": "1.15.0",
68
+ "@ai-ecoverse/slicc-cdp": "1.30.22",
69
69
  "@biomejs/biome": "2.5.15",
70
70
  "lefthook": "2.2.2",
71
71
  "monocart-coverage-reports": "2.13.2",