@piwitests/reporter 0.68.0 → 0.70.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.
@@ -47,6 +47,27 @@ var path3 = __toESM(require("path"));
47
47
  var fs = __toESM(require("fs"));
48
48
  var os = __toESM(require("os"));
49
49
  var path = __toESM(require("path"));
50
+
51
+ // ../core/src/hmac.ts
52
+ async function hmacSha256Hex(key, message) {
53
+ const encoder = new TextEncoder();
54
+ const cryptoKey = await crypto.subtle.importKey(
55
+ "raw",
56
+ encoder.encode(key),
57
+ { name: "HMAC", hash: "SHA-256" },
58
+ false,
59
+ ["sign"]
60
+ );
61
+ return hex(new Uint8Array(await crypto.subtle.sign("HMAC", cryptoKey, encoder.encode(message))));
62
+ }
63
+ function randomHex(byteCount) {
64
+ return hex(crypto.getRandomValues(new Uint8Array(byteCount)));
65
+ }
66
+ function hex(bytes) {
67
+ return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
68
+ }
69
+
70
+ // src/internal/config/desktop.ts
50
71
  function defaultDesktopConfigPath() {
51
72
  return path.join(os.homedir(), ".piwi", "desktop.json");
52
73
  }
@@ -69,17 +90,20 @@ function readDesktopToken(filePath) {
69
90
  }
70
91
  function readDesktopFile(filePath) {
71
92
  try {
72
- const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
73
- const url = parsed?.url;
74
- const token = parsed?.token;
75
- if (typeof url !== "string" || !url) return null;
76
- if (typeof token !== "string" || !token) return null;
77
- const pid = Number.isInteger(parsed?.pid) && parsed.pid > 0 ? parsed.pid : null;
78
- return { url, token, pid };
93
+ return desktopFields(JSON.parse(fs.readFileSync(filePath, "utf8")));
79
94
  } catch {
80
95
  return null;
81
96
  }
82
97
  }
98
+ function desktopFields(parsed) {
99
+ const file = parsed;
100
+ const url = file?.url;
101
+ const token = file?.token;
102
+ if (typeof url !== "string" || !url) return null;
103
+ if (typeof token !== "string" || !token) return null;
104
+ const pid = Number.isInteger(file?.pid) && file.pid > 0 ? file.pid : null;
105
+ return { url, token, pid };
106
+ }
83
107
 
84
108
  // src/internal/config/dotenv.ts
85
109
  var fs2 = __toESM(require("fs"));
@@ -179,6 +203,34 @@ function privateTempDir() {
179
203
  }
180
204
  return dir;
181
205
  }
206
+ var STALE_PRIVATE_FILE_MS = 24 * 60 * 60 * 1e3;
207
+ function sweepStalePrivateFiles(prefix, { dir = privateTempDir(), now = Date.now() } = {}) {
208
+ let names;
209
+ try {
210
+ names = fs3.readdirSync(dir);
211
+ } catch {
212
+ return;
213
+ }
214
+ for (const name of names) {
215
+ if (!name.startsWith(prefix)) continue;
216
+ const file = path2.join(dir, name);
217
+ try {
218
+ const stat = fs3.lstatSync(file);
219
+ if (!stat.isFile()) continue;
220
+ if (typeof process.getuid === "function" && stat.uid !== process.getuid()) continue;
221
+ if (now - stat.mtimeMs < STALE_PRIVATE_FILE_MS) continue;
222
+ fs3.rmSync(file, { force: true });
223
+ } catch {
224
+ }
225
+ }
226
+ }
227
+ function keepPrivateFileLive(file) {
228
+ try {
229
+ const now = /* @__PURE__ */ new Date();
230
+ fs3.lutimesSync(file, now, now);
231
+ } catch {
232
+ }
233
+ }
182
234
  var NO_FOLLOW = fs3.constants.O_NOFOLLOW ?? 0;
183
235
  var NO_WAIT = fs3.constants.O_NONBLOCK ?? 0;
184
236
  function untrustedReason(stat) {
@@ -345,6 +397,7 @@ var PIWI_ENV_KEYS = {
345
397
  var PIWI_DESKTOP_CONFIG_ENV = "PIWI_DESKTOP_CONFIG";
346
398
  var PIWI_SHARD_ENV = "PIWI_SHARD";
347
399
  var PIWI_RUN_LOG_ENV = "PIWI_RUN_LOG";
400
+ var PIWI_TERMINAL_PROGRESS_ENV = "PIWI_TERMINAL_PROGRESS";
348
401
  function readBool(val) {
349
402
  if (val === void 0) return void 0;
350
403
  return ["true", "1", "yes", "on"].includes(val.trim().toLowerCase());
@@ -508,25 +561,6 @@ var http = __toESM(require("http"));
508
561
  var import_node_url = require("url");
509
562
  var import_form_data = __toESM(require("form-data"));
510
563
 
511
- // ../core/src/hmac.ts
512
- async function hmacSha256Hex(key, message) {
513
- const encoder = new TextEncoder();
514
- const cryptoKey = await crypto.subtle.importKey(
515
- "raw",
516
- encoder.encode(key),
517
- { name: "HMAC", hash: "SHA-256" },
518
- false,
519
- ["sign"]
520
- );
521
- return hex(new Uint8Array(await crypto.subtle.sign("HMAC", cryptoKey, encoder.encode(message))));
522
- }
523
- function randomHex(byteCount) {
524
- return hex(crypto.getRandomValues(new Uint8Array(byteCount)));
525
- }
526
- function hex(bytes) {
527
- return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
528
- }
529
-
530
564
  // ../core/src/desktop-proof.ts
531
565
  var DESKTOP_CHALLENGE_HEADER = "x-piwi-desktop-challenge";
532
566
  var DESKTOP_PROOF_HEADER = "x-piwi-desktop-proof";
@@ -969,67 +1003,8 @@ function resolveShardInfo(config, env = process.env) {
969
1003
  var import_node_child_process = require("child_process");
970
1004
  var import_node_util = require("util");
971
1005
 
972
- // ../core/src/run-view.ts
973
- var MAX_VIEW_FRAME = 384 * 1024;
974
- var MAX_VIEW_FRAME_BASE64 = 4 * Math.ceil(MAX_VIEW_FRAME / 3);
975
-
976
- // ../core/src/run-channel.ts
977
- var RUN_INTENTS = ["pick", "record", "assert", "assert-region"];
978
- var RUN_TAKES = [
979
- ...RUN_INTENTS,
980
- "requests",
981
- "mock",
982
- "locator",
983
- "view",
984
- "input",
985
- "input-clicks",
986
- "pick-at",
987
- "agent",
988
- "events",
989
- "bind",
990
- "end",
991
- "share"
992
- ];
993
- var MAX_KEPT_BODY = 256 * 1024;
994
- var MAX_REGION_SNAPSHOT = 1024 * 1024;
995
- var MAX_AGENT_SNAPSHOT = 1024 * 1024;
996
-
997
- // src/internal/support/test-paths.ts
998
- var path4 = __toESM(require("path"));
999
- function configDirFromConfig(config) {
1000
- if (config?.configFile) return path4.dirname(config.configFile);
1001
- if (config?.rootDir) return config.rootDir;
1002
- return process.cwd();
1003
- }
1004
-
1005
- // src/internal/collect/metadata-collector.ts
1006
- var DETACHED_HEAD = "HEAD";
1007
- function resolveScmBranch(env, gitBranch) {
1008
- const pick = (...names) => {
1009
- for (const name of names) {
1010
- const value = env[name]?.trim();
1011
- if (value) return value;
1012
- }
1013
- return void 0;
1014
- };
1015
- const override = env.PIWI_BRANCH?.trim();
1016
- if (override) return override;
1017
- let provider;
1018
- if (env.JENKINS_URL) provider = pick("CHANGE_BRANCH", "BRANCH_NAME");
1019
- else if (env.GITHUB_ACTIONS) provider = pick("GITHUB_HEAD_REF", "GITHUB_REF_NAME");
1020
- else if (env.GITLAB_CI) provider = pick("CI_MERGE_REQUEST_SOURCE_BRANCH_NAME", "CI_COMMIT_REF_NAME");
1021
- else if (env.CIRCLECI) provider = pick("CIRCLE_BRANCH");
1022
- else if (env.TRAVIS) provider = pick("TRAVIS_PULL_REQUEST_BRANCH", "TRAVIS_BRANCH");
1023
- else if (env.TF_BUILD) provider = pick("SYSTEM_PULLREQUEST_SOURCEBRANCH", "BUILD_SOURCEBRANCHNAME");
1024
- else if (env.BITBUCKET_BUILD_NUMBER) provider = pick("BITBUCKET_BRANCH");
1025
- if (provider) return normalizeRef(provider);
1026
- const trimmed = gitBranch?.trim();
1027
- if (trimmed && trimmed !== DETACHED_HEAD) return trimmed;
1028
- return void 0;
1029
- }
1030
- function normalizeRef(ref) {
1031
- return ref.replace(/^refs\/heads\//, "");
1032
- }
1006
+ // ../core/src/live-layer-bounds.ts
1007
+ var MAX_LANE_TEXT = 96 * 1024;
1033
1008
 
1034
1009
  // ../core/src/locator-chain.ts
1035
1010
  var LOCATING_METHODS = /* @__PURE__ */ new Set([
@@ -1107,6 +1082,20 @@ var WHOLE_SHAPES = SECRET_SHAPES.map(
1107
1082
  (re) => new RegExp(`^(?:${re.source})$`, re.flags.replace("g", ""))
1108
1083
  );
1109
1084
 
1085
+ // ../core/src/live-layers.ts
1086
+ var MAX_EVENT_MS = 7 * 24 * 36e5;
1087
+ var MAX_LANE_TEXT_BYTES = 192 * 1024;
1088
+ var MAX_LANE_THUMB = 128 * 1024;
1089
+ var MAX_LANE_THUMB_BASE64 = 4 * Math.ceil(MAX_LANE_THUMB / 3);
1090
+ var MAX_FILMSTRIP_BYTES = 1024 * 1024;
1091
+
1092
+ // ../core/src/live-inspect.ts
1093
+ var MAX_SNAPSHOT_BYTES = 4 * 1024 * 1024;
1094
+ var MAX_RESOURCE_BYTES = 2 * 1024 * 1024;
1095
+ var MAX_SNAPSHOT_BACKLOG = 16 * 1024 * 1024;
1096
+ var KEPT_DATA = /data:(?:image\/[a-z0-9.+-]+|font\/[a-z0-9.+-]+|application\/(?:font-|x-font-)[a-z0-9.+-]+|application\/vnd\.ms-fontobject)(?:;[a-z0-9.+=-]+)*;base64,[A-Za-z0-9+/=]+/gi;
1097
+ var KEPT_DATA_URL = new RegExp(`^${KEPT_DATA.source}$`, "i");
1098
+
1110
1099
  // ../core/src/live-view.ts
1111
1100
  var LIVE_FRAME_BYTE_RATE = 256 * 1024;
1112
1101
  var MAX_LIVE_FRAME = 192 * 1024;
@@ -1116,6 +1105,73 @@ var KEY = /^pdl_[A-Za-z0-9_-]{43}$/;
1116
1105
  function isLiveViewKey(value) {
1117
1106
  return typeof value === "string" && KEY.test(value);
1118
1107
  }
1108
+ var MAX_LIVE_HEADER = 64 * 1024;
1109
+ var MAX_LIVE_FRAME_MESSAGE = 8 + MAX_LIVE_HEADER + MAX_LIVE_FRAME;
1110
+ var MAX_LIVE_INSPECT_MESSAGE = 8 + MAX_LIVE_HEADER + MAX_SNAPSHOT_BYTES;
1111
+ var LIVE_HEARTBEAT = new Uint8Array(8);
1112
+ var ASK_TO_WATCH_MS = 5 * 6e4;
1113
+
1114
+ // ../core/src/run-view.ts
1115
+ var MAX_VIEW_FRAME = 384 * 1024;
1116
+ var MAX_VIEW_FRAME_BASE64 = 4 * Math.ceil(MAX_VIEW_FRAME / 3);
1117
+
1118
+ // ../core/src/run-channel.ts
1119
+ var RUN_INTENTS = ["pick", "record", "assert", "assert-region"];
1120
+ var RUN_TAKES = [
1121
+ ...RUN_INTENTS,
1122
+ "requests",
1123
+ "mock",
1124
+ "locator",
1125
+ "view",
1126
+ "input",
1127
+ "input-clicks",
1128
+ "pick-at",
1129
+ "agent",
1130
+ "events",
1131
+ "bind",
1132
+ "end",
1133
+ "share"
1134
+ ];
1135
+ var MAX_KEPT_BODY = 256 * 1024;
1136
+ var MAX_REGION_SNAPSHOT = 1024 * 1024;
1137
+ var MAX_AGENT_SNAPSHOT = 1024 * 1024;
1138
+
1139
+ // src/internal/support/test-paths.ts
1140
+ var path4 = __toESM(require("path"));
1141
+ function configDirFromConfig(config) {
1142
+ if (config?.configFile) return path4.dirname(config.configFile);
1143
+ if (config?.rootDir) return config.rootDir;
1144
+ return process.cwd();
1145
+ }
1146
+
1147
+ // src/internal/collect/metadata-collector.ts
1148
+ var DETACHED_HEAD = "HEAD";
1149
+ function resolveScmBranch(env, gitBranch) {
1150
+ const pick = (...names) => {
1151
+ for (const name of names) {
1152
+ const value = env[name]?.trim();
1153
+ if (value) return value;
1154
+ }
1155
+ return void 0;
1156
+ };
1157
+ const override = env.PIWI_BRANCH?.trim();
1158
+ if (override) return override;
1159
+ let provider;
1160
+ if (env.JENKINS_URL) provider = pick("CHANGE_BRANCH", "BRANCH_NAME");
1161
+ else if (env.GITHUB_ACTIONS) provider = pick("GITHUB_HEAD_REF", "GITHUB_REF_NAME");
1162
+ else if (env.GITLAB_CI) provider = pick("CI_MERGE_REQUEST_SOURCE_BRANCH_NAME", "CI_COMMIT_REF_NAME");
1163
+ else if (env.CIRCLECI) provider = pick("CIRCLE_BRANCH");
1164
+ else if (env.TRAVIS) provider = pick("TRAVIS_PULL_REQUEST_BRANCH", "TRAVIS_BRANCH");
1165
+ else if (env.TF_BUILD) provider = pick("SYSTEM_PULLREQUEST_SOURCEBRANCH", "BUILD_SOURCEBRANCHNAME");
1166
+ else if (env.BITBUCKET_BUILD_NUMBER) provider = pick("BITBUCKET_BRANCH");
1167
+ if (provider) return normalizeRef(provider);
1168
+ const trimmed = gitBranch?.trim();
1169
+ if (trimmed && trimmed !== DETACHED_HEAD) return trimmed;
1170
+ return void 0;
1171
+ }
1172
+ function normalizeRef(ref) {
1173
+ return ref.replace(/^refs\/heads\//, "");
1174
+ }
1119
1175
 
1120
1176
  // src/internal/support/setup-file.ts
1121
1177
  var path5 = __toESM(require("path"));
@@ -1139,9 +1195,10 @@ function writeSetupFailure(projectName, failed) {
1139
1195
  function runUrl(serverUrl, runId) {
1140
1196
  return `${serverUrl.replace(/\/+$/, "")}/test-runs/${runId}`;
1141
1197
  }
1198
+ var UNREADABLE = /[\s()<>"'`\\\u0000-\u001f\u007f-\u009f]/;
1142
1199
  function answeredRunUrl(answer, serverUrl, runId) {
1143
1200
  const named = answer?.runUrl;
1144
- if (typeof named === "string" && named.length <= 2048 && !/[\s()<>"'`\\]/.test(named)) {
1201
+ if (typeof named === "string" && named.length <= 2048 && !UNREADABLE.test(named)) {
1145
1202
  if (/^\/[^/]/.test(named)) return `${serverUrl.replace(/\/+$/, "")}${named}`;
1146
1203
  try {
1147
1204
  const url = new URL(named);
@@ -1414,8 +1471,8 @@ var MAX_MANIFEST_BYTES = 4 * 1024 * 1024;
1414
1471
  function instrumentationManifestUrls(baseUrl) {
1415
1472
  const base = new URL(baseUrl);
1416
1473
  const root = new URL(INSTRUMENTATION_MANIFEST_PATH, base).toString();
1417
- const path12 = base.pathname.replace(/\/+$/, "");
1418
- return path12 ? [new URL(`${path12}${INSTRUMENTATION_MANIFEST_PATH}`, base).toString(), root] : [root];
1474
+ const path13 = base.pathname.replace(/\/+$/, "");
1475
+ return path13 ? [new URL(`${path13}${INSTRUMENTATION_MANIFEST_PATH}`, base).toString(), root] : [root];
1419
1476
  }
1420
1477
  async function fetchInstrumentationManifest(baseUrl, fetchImpl = fetch) {
1421
1478
  try {
@@ -1516,9 +1573,11 @@ function getReporterVersion() {
1516
1573
  var import_node_crypto = require("crypto");
1517
1574
  var fs9 = __toESM(require("fs"));
1518
1575
  var path11 = __toESM(require("path"));
1576
+ var RUN_LOG_PREFIX = "piwi-run-log-";
1519
1577
  var READ_MS = 1e3;
1520
1578
  function relayRunLog(print, env = process.env) {
1521
- const file = path11.join(privateTempDir(), `piwi-run-log-${(0, import_node_crypto.randomBytes)(12).toString("hex")}.txt`);
1579
+ sweepStalePrivateFiles(RUN_LOG_PREFIX);
1580
+ const file = path11.join(privateTempDir(), `${RUN_LOG_PREFIX}${(0, import_node_crypto.randomBytes)(12).toString("hex")}.txt`);
1522
1581
  writePrivateFile(file, "");
1523
1582
  env[PIWI_RUN_LOG_ENV] = file;
1524
1583
  let printed = 0;
@@ -1528,6 +1587,7 @@ function relayRunLog(print, env = process.env) {
1528
1587
  const found = readPrivateFile(file);
1529
1588
  if (!found || !("text" in found)) return;
1530
1589
  text = found.text;
1590
+ keepPrivateFileLive(file);
1531
1591
  } catch {
1532
1592
  return;
1533
1593
  }
@@ -1546,6 +1606,44 @@ function relayRunLog(print, env = process.env) {
1546
1606
  };
1547
1607
  }
1548
1608
 
1609
+ // src/internal/support/ci-output.ts
1610
+ var fs10 = __toESM(require("fs"));
1611
+ var path12 = __toESM(require("path"));
1612
+
1613
+ // src/internal/support/terminal.ts
1614
+ function readsProgress(env) {
1615
+ return !!env.WT_SESSION || env.ConEmuANSI === "ON" || env.TERM_PROGRAM === "ghostty";
1616
+ }
1617
+ function terminalFeatures(env, isTerminal) {
1618
+ const setting = env[PIWI_TERMINAL_PROGRESS_ENV]?.trim().toLowerCase();
1619
+ if (!isTerminal || detectCi(env) || env.TERM === "dumb" || ["off", "false", "0", "no"].includes(setting ?? "")) {
1620
+ return { links: false, progress: false };
1621
+ }
1622
+ return { links: true, progress: ["on", "true", "1", "yes"].includes(setting ?? "") || readsProgress(env) };
1623
+ }
1624
+ var OSC = "\x1B]";
1625
+ var ST = "\x1B\\";
1626
+ var TERMINAL_PROGRESS_CLEAR = `${OSC}9;4;0;0${ST}`;
1627
+ var CONTROL = /[\u0000-\u001f\u007f-\u009f]/;
1628
+ function terminalLink(url, text = url) {
1629
+ const plain = text.replace(/[\u0000-\u001f\u007f-\u009f]/g, "");
1630
+ if (CONTROL.test(url) || plain !== text) return plain;
1631
+ return `${OSC}8;;${url}${ST}${text}${OSC}8;;${ST}`;
1632
+ }
1633
+
1634
+ // src/internal/support/ci-output.ts
1635
+ function announceLiveRun(runUrl2, logger2, env = process.env) {
1636
+ logger2.info(`View live progress: ${shownUrl(runUrl2, env)}`);
1637
+ if (env.GITHUB_ACTIONS) process.stdout.write(`::notice title=Piwi live run::${workflowCommandValue(runUrl2)}
1638
+ `);
1639
+ }
1640
+ function shownUrl(url, env) {
1641
+ return terminalFeatures(env, !!process.stdout.isTTY).links ? terminalLink(url) : url;
1642
+ }
1643
+ function workflowCommandValue(value) {
1644
+ return value.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
1645
+ }
1646
+
1549
1647
  // src/public/global-setup.ts
1550
1648
  var relaying = false;
1551
1649
  function createGlobalSetup(options, userSetup) {
@@ -1685,7 +1783,7 @@ async function registerRun(httpClient, auth, opts, config, logger2) {
1685
1783
  ...response.liveView?.refused === "local" ? { liveViewLocal: true } : {},
1686
1784
  runUrl: runUrl2
1687
1785
  });
1688
- logger2.info(`View live progress: ${runUrl2}`);
1786
+ announceLiveRun(runUrl2, logger2);
1689
1787
  if (isLiveViewKey(liveViewKey) && detectCi(process.env) && !relaying) {
1690
1788
  try {
1691
1789
  const stopRelay = relayRunLog((line) => logger2.info(line));
package/dist/index.d.ts CHANGED
@@ -2,8 +2,6 @@ import { FullConfig, Suite, TestCase, TestResult, TestError, FullResult } from '
2
2
  import { PlaywrightTestConfig, Locator, TestType, Page, Fixtures, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions } from '@playwright/test';
3
3
  export { PlaywrightTestConfig } from '@playwright/test';
4
4
  export { PiwiFixtures, PiwiWorkerFixtures, extendPiwiFixtures, piwiFixtures } from './internal/capture/capture-fixtures.js';
5
- import './types-CGr9jJZ_.js';
6
- import './wire-7zsqlBoY.js';
7
5
 
8
6
  /**
9
7
  * Options for configuring the Piwi Dashboard reporter.
@@ -27,7 +25,9 @@ interface PiwiDashboardOptions {
27
25
  * `'prefer'` uses it whenever it is running and the run is not on CI, even
28
26
  * with `serverUrl` set, so local runs land in the app while CI runs, and
29
27
  * local runs with the app closed, go to `serverUrl` with its credentials.
30
- * `'off'` never uses it. Defaults to `'fallback'`. `PIWI_DESKTOP_APP`
28
+ * `'off'` never sends it results; a run started in a terminal in a folder it
29
+ * links still follows its window, unless `PIWI_EDITOR=off`. Defaults to
30
+ * `'fallback'`. `PIWI_DESKTOP_APP`
31
31
  * overrides this option, so setting it to `off` for one run sends that
32
32
  * local run to `serverUrl`.
33
33
  */
@@ -147,10 +147,11 @@ interface PiwiDashboardOptions {
147
147
  browser?: 'off' | 'files' | 'functions' | 'lines';
148
148
  /**
149
149
  * What the server side records, from a backend built with Piwi's coverage
150
- * instrumentation (ASP.NET Core: `-p:PiwiCoverage=true`), which names each
151
- * request's coverage on its response: `'files'` sends the backend files
152
- * each test ran, `'functions'` adds the start and end line of each function
153
- * that ran, `'lines'` adds the executed lines. The reporter collects a
150
+ * instrumentation (ASP.NET Core: `-p:PiwiCoverage=true`; Nitro:
151
+ * `PIWI_COVERAGE_BUILD=true`), which names each request's coverage on its
152
+ * response: `'files'` sends the backend files each test ran, `'functions'`
153
+ * adds the start and end line of each function that ran, `'lines'` adds the
154
+ * executed lines. The reporter collects a
154
155
  * test's coverage from the backend after the test ends, never in the test,
155
156
  * and at the end of the run sends the run's coverage of the backend too.
156
157
  * Line numbers are sent with `'functions'` and `'lines'` only, never source
@@ -326,7 +327,7 @@ interface PiwiDashboardOptions {
326
327
  * Enable live streaming of results (falls back to batch if unsupported). An
327
328
  * interrupted stream is retried until it catches up. Live events the
328
329
  * dashboard refuses, or has not taken two and a half minutes after they first
329
- * failed, leave the live view so the later ones flow; when test results are
330
+ * failed, leave the live stream so the later ones flow; when test results are
330
331
  * among the events the dashboard never took, the run is sent again as a batch
331
332
  * at its end. Defaults to `true`.
332
333
  */
@@ -347,8 +348,8 @@ interface PiwiDashboardOptions {
347
348
  * events are shed first — live step progress, then per-test `begin` markers,
348
349
  * and only as a last resort test results (the final counts and the end-of-run
349
350
  * batch submit stay complete regardless). Defaults to `104857600` (100 MB).
350
- * Set to `0` to disable the cap (unbounded, the pre-`0.28` behavior). Can also
351
- * be set with `PIWI_MAX_STREAM_BUFFER_BYTES`.
351
+ * Set to `0` to disable the cap (unbounded). Can also be set with
352
+ * `PIWI_MAX_STREAM_BUFFER_BYTES`.
352
353
  */
353
354
  maxStreamBufferBytes?: number;
354
355
  /**
@@ -359,7 +360,7 @@ interface PiwiDashboardOptions {
359
360
  * set with `PIWI_FAIL_ON_FLAKY_TESTS`.
360
361
  */
361
362
  failOnFlakyTests?: boolean;
362
- /** Username for dashboard login (use `apiKey` instead when possible) */
363
+ /** Username or email address for dashboard login (use `apiKey` instead when possible) */
363
364
  username?: string | null;
364
365
  /** Password for dashboard login (used with `username`) */
365
366
  password?: string | null;
@@ -555,6 +556,8 @@ declare class PiwiDashboardReporter {
555
556
  private runningTests;
556
557
  /** Reads the stops the workers note (`readStopNotes`). */
557
558
  private stopNotes;
559
+ /** The run's progress in its terminal's tab or taskbar, for a run outside CI that reports to the dashboard. */
560
+ private terminalProgress;
558
561
  /**
559
562
  * The failed attempts with retries left, by `test.id`: each is its test's last failure when no later attempt has a
560
563
  * say in its outcome (`decidesOutcome`), the run stopping before the retry or the retry not running.
@@ -607,6 +610,8 @@ declare class PiwiDashboardReporter {
607
610
  private readonly sourceLines;
608
611
  /** The user fixtures set up by the tests that left a page unused, by test id. */
609
612
  private fixturesByTest;
613
+ /** Per test that a fixture with a timeout of its own opened something in: the fixtures torn down with it. */
614
+ private testFixtures;
610
615
  /** The file workers append their shutdown census to, set in `onBegin`. */
611
616
  private resourcesFile;
612
617
  /** Samples the run's processes and the machine from `onBegin` to `onEnd`. */