@descryy/runtime-browser 0.5.1 → 0.5.3
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/dist/browser-action-collector.d.ts +11 -3
- package/dist/browser-action-collector.d.ts.map +1 -1
- package/dist/browser-action-collector.js +102 -11
- package/dist/browser-action-collector.js.map +1 -1
- package/dist/browser-console-collector.d.ts +2 -0
- package/dist/browser-console-collector.d.ts.map +1 -1
- package/dist/browser-console-collector.js +60 -6
- package/dist/browser-console-collector.js.map +1 -1
- package/dist/browser-network-collector.d.ts +31 -1
- package/dist/browser-network-collector.d.ts.map +1 -1
- package/dist/browser-network-collector.js +231 -11
- package/dist/browser-network-collector.js.map +1 -1
- package/dist/browser-recording-collector.d.ts +8 -1
- package/dist/browser-recording-collector.d.ts.map +1 -1
- package/dist/browser-recording-collector.js +141 -17
- package/dist/browser-recording-collector.js.map +1 -1
- package/dist/browser-session.d.ts +131 -5
- package/dist/browser-session.d.ts.map +1 -1
- package/dist/browser-session.js +547 -95
- package/dist/browser-session.js.map +1 -1
- package/dist/dom-evidence.d.ts +6 -0
- package/dist/dom-evidence.d.ts.map +1 -1
- package/dist/dom-evidence.js +40 -11
- package/dist/dom-evidence.js.map +1 -1
- package/dist/frontend-initiator-capture.d.ts +5 -1
- package/dist/frontend-initiator-capture.d.ts.map +1 -1
- package/dist/frontend-initiator-capture.js +72 -10
- package/dist/frontend-initiator-capture.js.map +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/network-correlation.d.ts +2 -11
- package/dist/network-correlation.d.ts.map +1 -1
- package/dist/network-correlation.js +1 -25
- package/dist/network-correlation.js.map +1 -1
- package/dist/script-url-mapping.d.ts +1 -0
- package/dist/script-url-mapping.d.ts.map +1 -1
- package/dist/script-url-mapping.js +7 -0
- package/dist/script-url-mapping.js.map +1 -1
- package/dist/secret-fields.d.ts +37 -0
- package/dist/secret-fields.d.ts.map +1 -0
- package/dist/secret-fields.js +121 -0
- package/dist/secret-fields.js.map +1 -0
- package/package.json +6 -6
|
@@ -86,7 +86,72 @@
|
|
|
86
86
|
* matching `BrowserConsoleCollector`'s own precedent, because Playwright
|
|
87
87
|
* offers a real way to detach it.
|
|
88
88
|
*/
|
|
89
|
+
import { normalizeOrigin } from "./browser-session.js";
|
|
90
|
+
import { SECRET_SCAN_CONFIG, scanForSecretInput, secretFieldPredicateSource } from "./secret-fields.js";
|
|
89
91
|
const RECORDING_BINDING_NAME = "__descryRecordInteraction";
|
|
92
|
+
export const MAX_RECORDED_INTERACTIONS = 5_000;
|
|
93
|
+
const MAX_ROLE_CHARS = 100;
|
|
94
|
+
const MAX_NAME_CHARS = 200;
|
|
95
|
+
const MAX_SELECTOR_CHARS = 1_000;
|
|
96
|
+
const MAX_VALUE_CHARS = 10_000;
|
|
97
|
+
const MAX_URL_CHARS = 2_048;
|
|
98
|
+
const RECORDED_ACTIONS = ["click", "fill", "select"];
|
|
99
|
+
const TOKEN_QUERY_PARAMETER = /^(.*[-_])?(access[-_]?token|id[-_]?token|refresh[-_]?token|token|code|state|session|sid|key|api[-_]?key|apikey|auth|authorization|password|passwd|secret|signature|sig|otp|jwt|bearer|ticket|nonce|csrf|xsrf)([-_].*)?$/i;
|
|
100
|
+
export class RecordingOverflowError extends Error {
|
|
101
|
+
constructor(sessionId) {
|
|
102
|
+
super(`browser session ${sessionId}: the recording exceeded ${String(MAX_RECORDED_INTERACTIONS)} interactions and was discarded; a recording this long is not a scenario a person drove.`);
|
|
103
|
+
this.name = "RecordingOverflowError";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export function sanitizeRecordedUrl(url) {
|
|
107
|
+
let parsed;
|
|
108
|
+
try {
|
|
109
|
+
parsed = new URL(url);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return url.slice(0, MAX_URL_CHARS);
|
|
113
|
+
}
|
|
114
|
+
parsed.username = "";
|
|
115
|
+
parsed.password = "";
|
|
116
|
+
parsed.hash = "";
|
|
117
|
+
for (const name of [...new Set(parsed.searchParams.keys())]) {
|
|
118
|
+
if (TOKEN_QUERY_PARAMETER.test(name))
|
|
119
|
+
parsed.searchParams.set(name, "REDACTED");
|
|
120
|
+
}
|
|
121
|
+
return parsed.toString().slice(0, MAX_URL_CHARS);
|
|
122
|
+
}
|
|
123
|
+
function boundedString(value, maxChars) {
|
|
124
|
+
if (value === null)
|
|
125
|
+
return null;
|
|
126
|
+
if (typeof value !== "string")
|
|
127
|
+
return undefined;
|
|
128
|
+
return value.length > maxChars ? value.slice(0, maxChars) : value;
|
|
129
|
+
}
|
|
130
|
+
function readInteractionPayload(value) {
|
|
131
|
+
if (typeof value !== "object" || value === null)
|
|
132
|
+
return null;
|
|
133
|
+
const candidate = value;
|
|
134
|
+
if (typeof candidate.action !== "string" || !RECORDED_ACTIONS.includes(candidate.action))
|
|
135
|
+
return null;
|
|
136
|
+
if (typeof candidate.secret !== "boolean")
|
|
137
|
+
return null;
|
|
138
|
+
const role = boundedString(candidate.role, MAX_ROLE_CHARS);
|
|
139
|
+
const name = boundedString(candidate.name, MAX_NAME_CHARS);
|
|
140
|
+
const selector = boundedString(candidate.selector, MAX_SELECTOR_CHARS);
|
|
141
|
+
const recordedValue = boundedString(candidate.value, MAX_VALUE_CHARS);
|
|
142
|
+
const pageUrl = candidate.pageUrl === undefined ? undefined : boundedString(candidate.pageUrl, MAX_URL_CHARS);
|
|
143
|
+
if (typeof role !== "string" || typeof name !== "string" || selector === undefined || recordedValue === undefined || pageUrl === null)
|
|
144
|
+
return null;
|
|
145
|
+
return {
|
|
146
|
+
action: candidate.action,
|
|
147
|
+
role,
|
|
148
|
+
name,
|
|
149
|
+
selector,
|
|
150
|
+
value: candidate.secret ? null : recordedValue,
|
|
151
|
+
secret: candidate.secret,
|
|
152
|
+
...(pageUrl === undefined ? {} : { pageUrl }),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
90
155
|
/** The same interactive-element set `playwright-driver.ts`'s `INTERACTIVE` constant already scopes a snapshot to -- kept identical so a click this collector captures is always one a snapshot-based replay could also have resolved. */
|
|
91
156
|
const INTERACTIVE_SELECTOR = "a, button, input, select, textarea, [role], [onclick], summary";
|
|
92
157
|
/**
|
|
@@ -102,9 +167,12 @@ function installerScriptSource() {
|
|
|
102
167
|
return `(() => {
|
|
103
168
|
const MARKER = "__descryRecordingInstalled";
|
|
104
169
|
if (window[MARKER] === true) return;
|
|
105
|
-
const
|
|
106
|
-
if (typeof
|
|
170
|
+
const exposed = window[${JSON.stringify(RECORDING_BINDING_NAME)}];
|
|
171
|
+
if (typeof exposed !== "function") return;
|
|
107
172
|
window[MARKER] = true;
|
|
173
|
+
// Every interaction says which page it happened on, read here and now: by the time the
|
|
174
|
+
// binding reaches Node, a click that navigates may already have moved the page.
|
|
175
|
+
const bind = function (payload) { payload.pageUrl = location.href; return exposed(payload); };
|
|
108
176
|
|
|
109
177
|
const GENERATED_ID = /[0-9a-f]{8}|:r[0-9a-z]+:|^\\s*$/i;
|
|
110
178
|
const FORM_CONTROLS = ["input", "select", "textarea", "button"];
|
|
@@ -249,13 +317,7 @@ function installerScriptSource() {
|
|
|
249
317
|
return el.getAttribute("placeholder") || el.getAttribute("title") || el.getAttribute("name") || "";
|
|
250
318
|
}
|
|
251
319
|
|
|
252
|
-
|
|
253
|
-
if (el.tagName.toLowerCase() !== "input") return false;
|
|
254
|
-
const type = (el.getAttribute("type") || "").toLowerCase();
|
|
255
|
-
if (type === "password") return true;
|
|
256
|
-
const autocomplete = (el.getAttribute("autocomplete") || "").toLowerCase();
|
|
257
|
-
return autocomplete === "current-password" || autocomplete === "new-password";
|
|
258
|
-
}
|
|
320
|
+
const isSecretField = (${secretFieldPredicateSource()});
|
|
259
321
|
|
|
260
322
|
function describeTarget(el) {
|
|
261
323
|
return { role: derivedRole(el), name: derivedName(el).slice(0, 200), selector: computeSelector(el) };
|
|
@@ -264,6 +326,7 @@ function installerScriptSource() {
|
|
|
264
326
|
document.addEventListener(
|
|
265
327
|
"click",
|
|
266
328
|
function (ev) {
|
|
329
|
+
if (!ev.isTrusted) return;
|
|
267
330
|
const el = ev.target && typeof ev.target.closest === "function" ? ev.target.closest(${JSON.stringify(INTERACTIVE_SELECTOR)}) : null;
|
|
268
331
|
if (!el) return;
|
|
269
332
|
const described = describeTarget(el);
|
|
@@ -275,6 +338,7 @@ function installerScriptSource() {
|
|
|
275
338
|
document.addEventListener(
|
|
276
339
|
"change",
|
|
277
340
|
function (ev) {
|
|
341
|
+
if (!ev.isTrusted) return;
|
|
278
342
|
const el = ev.target;
|
|
279
343
|
if (!el || !el.tagName) return;
|
|
280
344
|
const tag = el.tagName.toLowerCase();
|
|
@@ -290,7 +354,7 @@ function installerScriptSource() {
|
|
|
290
354
|
// own change is a state toggle, not a value entered, and is already reported by
|
|
291
355
|
// the click listener above (the click that toggled it matches INTERACTIVE too).
|
|
292
356
|
if (tag === "input" && TEXT_INPUT_TYPES.indexOf(type) === -1) return;
|
|
293
|
-
const secret =
|
|
357
|
+
const secret = isSecretField(el);
|
|
294
358
|
const described = describeTarget(el);
|
|
295
359
|
// The whole point: a password field's real value is never read into this payload at all.
|
|
296
360
|
bind({ action: "fill", role: described.role, name: described.name, selector: described.selector, value: secret ? null : el.value, secret: secret }).catch(function () {});
|
|
@@ -306,31 +370,79 @@ export function createBrowserRecordingCollector(options) {
|
|
|
306
370
|
let capturing = false;
|
|
307
371
|
let buffer = [];
|
|
308
372
|
let bindingInstalled = false;
|
|
309
|
-
|
|
373
|
+
let overflowed = false;
|
|
374
|
+
let pendingInteractions = Promise.resolve();
|
|
375
|
+
let lostInteractionReason = null;
|
|
376
|
+
function frameMayReport(frame) {
|
|
377
|
+
if (frame !== page.mainFrame())
|
|
378
|
+
return false;
|
|
379
|
+
const consented = session.consentedOrigins?.() ?? null;
|
|
380
|
+
if (consented === null)
|
|
381
|
+
return true;
|
|
382
|
+
const origin = normalizeOrigin(frame.url());
|
|
383
|
+
return origin !== null && consented.includes(origin);
|
|
384
|
+
}
|
|
385
|
+
async function fieldIsSecretNow(selector) {
|
|
386
|
+
if (selector === null)
|
|
387
|
+
return false;
|
|
388
|
+
const locator = page.locator(selector).first();
|
|
389
|
+
if ((await locator.count().catch(() => 0)) === 0)
|
|
390
|
+
return false;
|
|
391
|
+
return locator.evaluate(scanForSecretInput, { config: SECRET_SCAN_CONFIG, filledOnly: false }, { timeout: 1_000 }).then((verdict) => verdict === true, () => true);
|
|
392
|
+
}
|
|
393
|
+
function push(interaction) {
|
|
394
|
+
if (buffer.length >= MAX_RECORDED_INTERACTIONS) {
|
|
395
|
+
overflowed = true;
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
buffer.push(interaction);
|
|
399
|
+
}
|
|
400
|
+
async function record(payload) {
|
|
401
|
+
const secret = payload.secret || (payload.action === "fill" && (await fieldIsSecretNow(payload.selector)));
|
|
310
402
|
if (!capturing)
|
|
311
|
-
return;
|
|
312
|
-
|
|
403
|
+
return;
|
|
404
|
+
push({
|
|
313
405
|
action: payload.action,
|
|
314
406
|
target: { role: payload.role, name: payload.name, selector: payload.selector },
|
|
315
407
|
url: null,
|
|
316
|
-
text:
|
|
317
|
-
secret
|
|
408
|
+
text: secret ? null : payload.value,
|
|
409
|
+
secret,
|
|
410
|
+
pageUrl: sanitizeRecordedUrl(payload.pageUrl ?? page.url()),
|
|
318
411
|
at: new Date().toISOString(),
|
|
319
412
|
});
|
|
320
413
|
}
|
|
414
|
+
function onRecordedInteraction(source, rawPayload) {
|
|
415
|
+
if (!capturing || overflowed)
|
|
416
|
+
return;
|
|
417
|
+
if (!frameMayReport(source.frame))
|
|
418
|
+
return;
|
|
419
|
+
const payload = readInteractionPayload(rawPayload);
|
|
420
|
+
if (payload === null)
|
|
421
|
+
return;
|
|
422
|
+
pendingInteractions = pendingInteractions.then(() => record(payload)).catch((error) => {
|
|
423
|
+
lostInteractionReason ??= error instanceof Error ? `${error.name}: ${error.message}` : String(error);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
321
426
|
function onFrameNavigated(frame) {
|
|
322
427
|
if (!capturing)
|
|
323
428
|
return;
|
|
324
429
|
if (frame !== page.mainFrame())
|
|
325
430
|
return; // "top-level" -- an iframe's own navigation is not this session's page moving.
|
|
326
|
-
|
|
431
|
+
const url = sanitizeRecordedUrl(frame.url());
|
|
432
|
+
pendingInteractions = pendingInteractions.then(() => {
|
|
433
|
+
if (!capturing)
|
|
434
|
+
return;
|
|
435
|
+
push({ action: "navigate", target: null, url, text: null, secret: false, pageUrl: url, at: new Date().toISOString() });
|
|
436
|
+
});
|
|
327
437
|
}
|
|
328
438
|
async function ensureInstalled() {
|
|
329
439
|
if (!bindingInstalled) {
|
|
330
440
|
// Playwright refuses a second `exposeFunction` under the same name and would
|
|
331
441
|
// double-register in-page listeners on a second `addInitScript` -- both installed
|
|
332
442
|
// at most once per collector instance, ever.
|
|
333
|
-
await page.
|
|
443
|
+
await page.exposeBinding(RECORDING_BINDING_NAME, (source, rawPayload) => {
|
|
444
|
+
onRecordedInteraction(source, rawPayload);
|
|
445
|
+
});
|
|
334
446
|
await page.addInitScript({ content: installerScriptSource() });
|
|
335
447
|
bindingInstalled = true;
|
|
336
448
|
}
|
|
@@ -354,6 +466,9 @@ export function createBrowserRecordingCollector(options) {
|
|
|
354
466
|
}
|
|
355
467
|
await ensureInstalled();
|
|
356
468
|
buffer = [];
|
|
469
|
+
overflowed = false;
|
|
470
|
+
lostInteractionReason = null;
|
|
471
|
+
pendingInteractions = Promise.resolve();
|
|
357
472
|
capturing = true;
|
|
358
473
|
page.on("framenavigated", onFrameNavigated);
|
|
359
474
|
},
|
|
@@ -362,9 +477,18 @@ export function createBrowserRecordingCollector(options) {
|
|
|
362
477
|
throw new Error(`browser session ${session.sessionId}: not currently recording. Call start() first.`);
|
|
363
478
|
}
|
|
364
479
|
page.off("framenavigated", onFrameNavigated);
|
|
480
|
+
await pendingInteractions;
|
|
365
481
|
capturing = false;
|
|
366
482
|
const captured = buffer;
|
|
483
|
+
const hadOverflowed = overflowed;
|
|
484
|
+
const lostReason = lostInteractionReason;
|
|
367
485
|
buffer = [];
|
|
486
|
+
overflowed = false;
|
|
487
|
+
lostInteractionReason = null;
|
|
488
|
+
if (hadOverflowed)
|
|
489
|
+
throw new RecordingOverflowError(session.sessionId);
|
|
490
|
+
if (lostReason !== null)
|
|
491
|
+
throw new Error(`browser session ${session.sessionId}: an interaction could not be recorded (${lostReason}), so the recording is incomplete and was discarded.`);
|
|
368
492
|
return captured;
|
|
369
493
|
},
|
|
370
494
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-recording-collector.js","sourceRoot":"","sources":["../src/browser-recording-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;
|
|
1
|
+
{"version":3,"file":"browser-recording-collector.js","sourceRoot":"","sources":["../src/browser-recording-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAIH,OAAO,EAAE,eAAe,EAAuB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAqCxG,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAE/C,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B,MAAM,aAAa,GAAG,KAAK,CAAC;AAC5B,MAAM,gBAAgB,G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only so that answer has a real
|
|
11
11
|
* creation timestamp to report.
|
|
12
12
|
*/
|
|
13
|
-
import { type Page } from "playwright-core";
|
|
13
|
+
import { type Browser, type Dialog, type Page, type Request } from "playwright-core";
|
|
14
14
|
import type { BrowserConfiguration } from "@descryy/runtime-contracts";
|
|
15
15
|
/**
|
|
16
16
|
* RT-068: this is the contracts type (`BrowserConfiguration`), not a
|
|
@@ -81,7 +81,94 @@ export interface BrowserSessionAuth {
|
|
|
81
81
|
*/
|
|
82
82
|
export type BrowserSessionOptions = BrowserConfiguration & {
|
|
83
83
|
readonly auth?: BrowserSessionAuth;
|
|
84
|
+
/**
|
|
85
|
+
* The origins this session may show in a top-level frame -- the consented
|
|
86
|
+
* one first, then any the caller explicitly consented to alongside it
|
|
87
|
+
* (`localhost` and `127.0.0.1` are two origins, and neither implies the
|
|
88
|
+
* other). When set:
|
|
89
|
+
* - a top-level page load (the session's page or a popup) to any other
|
|
90
|
+
* origin is aborted before it is sent;
|
|
91
|
+
* - a page load on a consented origin is fetched without following
|
|
92
|
+
* redirects, and a redirect whose `Location` leaves the list is aborted
|
|
93
|
+
* before the browser follows it -- each later hop comes back through the
|
|
94
|
+
* same check;
|
|
95
|
+
* - a popup is closed;
|
|
96
|
+
* - service workers are blocked, because their requests never reach the
|
|
97
|
+
* route handler that does all of the above.
|
|
98
|
+
* Subresources and iframes on other origins still load -- blocking them
|
|
99
|
+
* would break ordinary apps (CDN scripts, fonts, analytics). Every origin
|
|
100
|
+
* must parse to a real (non-opaque) origin, or the launch is refused.
|
|
101
|
+
* Launch-time only, like `auth`: consent is not part of a configuration
|
|
102
|
+
* anything persists.
|
|
103
|
+
*/
|
|
104
|
+
readonly confineToOrigins?: readonly string[];
|
|
105
|
+
readonly dialogs?: DialogPolicy;
|
|
106
|
+
/**
|
|
107
|
+
* How many pages opened through `BrowserSession.openAuxiliaryPage()` may be
|
|
108
|
+
* open at once; `DEFAULT_MAX_AUXILIARY_PAGES` when omitted. Must be a
|
|
109
|
+
* positive whole number, or the launch is refused. Launch-time only.
|
|
110
|
+
*/
|
|
111
|
+
readonly maxAuxiliaryPages?: number;
|
|
84
112
|
};
|
|
113
|
+
export declare const DEFAULT_MAX_AUXILIARY_PAGES = 4;
|
|
114
|
+
export declare class AuxiliaryPageLimitError extends Error {
|
|
115
|
+
readonly limit: number;
|
|
116
|
+
constructor(limit: number);
|
|
117
|
+
}
|
|
118
|
+
export type DialogResponse = "accept" | "dismiss";
|
|
119
|
+
export interface DialogPolicy {
|
|
120
|
+
readonly confirm?: DialogResponse;
|
|
121
|
+
readonly prompt?: DialogResponse;
|
|
122
|
+
readonly promptText?: string;
|
|
123
|
+
}
|
|
124
|
+
export type DialogKind = "alert" | "confirm" | "prompt" | "beforeunload";
|
|
125
|
+
export interface DialogEvent {
|
|
126
|
+
readonly kind: DialogKind;
|
|
127
|
+
readonly message: string;
|
|
128
|
+
readonly url: string;
|
|
129
|
+
readonly response: "accepted" | "dismissed" | "unanswered";
|
|
130
|
+
readonly at: string;
|
|
131
|
+
}
|
|
132
|
+
export declare const MAX_DIALOG_EVENTS = 200;
|
|
133
|
+
export declare const MAX_DIALOG_MESSAGE_CHARS = 2000;
|
|
134
|
+
export declare function dialogDecision(kind: string, policy: DialogPolicy | undefined): DialogResponse;
|
|
135
|
+
export declare function answerDialog(dialog: Dialog, policy: DialogPolicy | undefined, events: DialogEvent[]): Promise<void>;
|
|
136
|
+
/** A page load, redirect or popup the origin guard stopped. `kind` says what it was. */
|
|
137
|
+
export interface OffOriginEvent {
|
|
138
|
+
/**
|
|
139
|
+
* `blocked`: a page load aborted before it was sent. `redirect-blocked`: a
|
|
140
|
+
* consented page answered with a redirect off the list, and the browser was
|
|
141
|
+
* not allowed to follow it. `landed`: the page reached another origin by a
|
|
142
|
+
* route the checks above could not see, and was sent to about:blank -- a
|
|
143
|
+
* backstop that should not fire. `popup-closed`: a new page opened and was
|
|
144
|
+
* closed.
|
|
145
|
+
*/
|
|
146
|
+
readonly kind: "blocked" | "redirect-blocked" | "landed" | "popup-closed";
|
|
147
|
+
readonly url: string;
|
|
148
|
+
readonly at: string;
|
|
149
|
+
}
|
|
150
|
+
export interface UnobservedPopupEvent {
|
|
151
|
+
readonly kind: "popup-unobserved";
|
|
152
|
+
readonly url: string;
|
|
153
|
+
readonly at: string;
|
|
154
|
+
}
|
|
155
|
+
export interface SandboxStatus {
|
|
156
|
+
readonly enabled: boolean;
|
|
157
|
+
readonly fallbackReason: string | null;
|
|
158
|
+
}
|
|
159
|
+
export declare const MAX_VIDEO_BYTES: number;
|
|
160
|
+
export declare class VideoTooLargeError extends Error {
|
|
161
|
+
readonly sizeBytes: number;
|
|
162
|
+
readonly maxBytes: number;
|
|
163
|
+
constructor(sizeBytes: number, maxBytes: number);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* An origin as the browser compares it: lower-case scheme and host, default
|
|
167
|
+
* port dropped, an IDN host in punycode, no path. `null` for anything with an
|
|
168
|
+
* opaque origin (`data:`, `file:`, `about:`) or that does not parse -- such a
|
|
169
|
+
* URL is never a consented origin and never equals one.
|
|
170
|
+
*/
|
|
171
|
+
export declare function normalizeOrigin(url: string): string | null;
|
|
85
172
|
/**
|
|
86
173
|
* Cookies and localStorage to inject into a session that is ALREADY
|
|
87
174
|
* running -- `BrowserSessionAuth` minus `extraHttpHeaders`, which is a
|
|
@@ -170,6 +257,35 @@ export interface BrowserSession {
|
|
|
170
257
|
* current origin.
|
|
171
258
|
*/
|
|
172
259
|
injectStorageState(seed: StorageStateSeed): Promise<StorageStateInjectionResult>;
|
|
260
|
+
/** True when this request was a page load the origin guard aborted. Optional so a hand-built session (tests) need not implement it. */
|
|
261
|
+
wasBlockedByOriginGuard?(request: Request): boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Opens one more page in this session's browser context for work the
|
|
264
|
+
* session's own page must not be disturbed by (rendering the same app at
|
|
265
|
+
* another viewport, say). It is the only sanctioned way to get a second
|
|
266
|
+
* page: a confined session closes every other page the context gains,
|
|
267
|
+
* because a popup is a page nothing is watching.
|
|
268
|
+
*
|
|
269
|
+
* The page is registered as the session's own before the popup guard can
|
|
270
|
+
* see it, by identity -- not by "has no opener", which a `noopener` popup
|
|
271
|
+
* also satisfies -- so a popup opened at the same moment is still closed.
|
|
272
|
+
* It is held to the same origin rules as the session's page: a top-level
|
|
273
|
+
* load or redirect to an origin that was not consented to is aborted before
|
|
274
|
+
* it is sent. At most `maxAuxiliaryPages` are open at once; one more
|
|
275
|
+
* rejects with `AuxiliaryPageLimitError` until a page is closed. Pages
|
|
276
|
+
* close with the session. A popup the page itself opens is closed like any
|
|
277
|
+
* other.
|
|
278
|
+
*
|
|
279
|
+
* Optional so a hand-built session (tests) need not implement it; a caller
|
|
280
|
+
* that needs it falls back, labelled, when it is absent.
|
|
281
|
+
*/
|
|
282
|
+
openAuxiliaryPage?(): Promise<Page>;
|
|
283
|
+
drainDialogEvents?(): readonly DialogEvent[];
|
|
284
|
+
/** Every off-origin event since the last call, oldest first. Empty when the session was launched without `confineToOrigins`. */
|
|
285
|
+
drainOffOriginEvents?(): readonly OffOriginEvent[];
|
|
286
|
+
drainUnobservedPopups?(): readonly UnobservedPopupEvent[];
|
|
287
|
+
readonly sandbox?: SandboxStatus;
|
|
288
|
+
consentedOrigins?(): readonly string[] | null;
|
|
173
289
|
}
|
|
174
290
|
/**
|
|
175
291
|
* Why this exists, and why it's not a throw.
|
|
@@ -232,6 +348,11 @@ export declare class BrowserUnavailableError extends Error {
|
|
|
232
348
|
*/
|
|
233
349
|
export declare function launchBrowserSessionOrRefuse(options?: BrowserSessionOptions): Promise<BrowserSessionLaunch>;
|
|
234
350
|
export declare function launchBrowserSession(options?: BrowserSessionOptions): Promise<BrowserSession>;
|
|
351
|
+
export interface ChromiumLaunchOptions {
|
|
352
|
+
readonly headless: boolean;
|
|
353
|
+
readonly executablePath: string;
|
|
354
|
+
readonly chromiumSandbox?: boolean;
|
|
355
|
+
}
|
|
235
356
|
/**
|
|
236
357
|
* RT-264 — browser reuse. Build A's own lane (`documents/plans/product-improvement`,
|
|
237
358
|
* lane 5) named the cost this replaces: every `browser_start_session` used to pay a
|
|
@@ -271,13 +392,18 @@ export interface SharedBrowserAcquireResult {
|
|
|
271
392
|
readonly launched: true;
|
|
272
393
|
readonly session: BrowserSession;
|
|
273
394
|
/**
|
|
274
|
-
* True exactly when
|
|
275
|
-
*
|
|
276
|
-
*
|
|
395
|
+
* True exactly when the shared browser this call needed had stopped unexpectedly
|
|
396
|
+
* (a crash or disconnect, never the first launch or an idle shutdown) and was launched
|
|
397
|
+
* again. A caller (`playwright-driver.ts`) should disclose this the
|
|
277
398
|
* same way it discloses any other honest-degradation fact (rule 7): it is the signal
|
|
278
399
|
* that this particular open paid the full launch cost anyway.
|
|
279
400
|
*/
|
|
280
401
|
readonly relaunchedBrowser: boolean;
|
|
402
|
+
readonly launchedBrowser: boolean;
|
|
403
|
+
}
|
|
404
|
+
export interface SharedBrowserSeams {
|
|
405
|
+
readonly launch?: (options: ChromiumLaunchOptions) => Promise<Browser>;
|
|
406
|
+
readonly resolveExecutable?: () => ChromiumAvailability;
|
|
281
407
|
}
|
|
282
408
|
export type SharedBrowserAcquireOutcome = SharedBrowserAcquireResult | ({
|
|
283
409
|
readonly launched: false;
|
|
@@ -300,5 +426,5 @@ export interface SharedBrowserManager {
|
|
|
300
426
|
}
|
|
301
427
|
/** See the module doc above this constant — NOT SHIPPABLE until the isolation test
|
|
302
428
|
* (`browser-session-reuse.test.ts`) has actually been run and is green. */
|
|
303
|
-
export declare function createSharedBrowserManager(idleTimeoutMs?: number): SharedBrowserManager;
|
|
429
|
+
export declare function createSharedBrowserManager(idleTimeoutMs?: number, seams?: SharedBrowserSeams): SharedBrowserManager;
|
|
304
430
|
//# sourceMappingURL=browser-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-session.d.ts","sourceRoot":"","sources":["../src/browser-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,O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