playwright-core 1.56.0-alpha-1757090131000 → 1.56.0-alpha-2025-09-07
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/lib/server/har/harTracer.js +7 -8
- package/package.json +1 -1
- package/types/types.d.ts +3 -12
|
@@ -165,7 +165,7 @@ class HarTracer {
|
|
|
165
165
|
_onAPIRequest(event) {
|
|
166
166
|
if (!this._shouldIncludeEntryWithUrl(event.url.toString()))
|
|
167
167
|
return;
|
|
168
|
-
const harEntry = createHarEntry(event.method, event.url, void 0, this._options);
|
|
168
|
+
const harEntry = createHarEntry(void 0, event.method, event.url, void 0, this._options);
|
|
169
169
|
harEntry._apiRequest = true;
|
|
170
170
|
if (!this._options.omitCookies)
|
|
171
171
|
harEntry.request.cookies = event.cookies;
|
|
@@ -227,9 +227,7 @@ class HarTracer {
|
|
|
227
227
|
if (!url)
|
|
228
228
|
return;
|
|
229
229
|
const pageEntry = this._createPageEntryIfNeeded(page);
|
|
230
|
-
const harEntry = createHarEntry(request.method(), url, request.frame()?.guid, this._options);
|
|
231
|
-
if (pageEntry)
|
|
232
|
-
harEntry.pageref = pageEntry.id;
|
|
230
|
+
const harEntry = createHarEntry(pageEntry?.id, request.method(), url, request.frame()?.guid, this._options);
|
|
233
231
|
this._recordRequestHeadersAndCookies(harEntry, request.headers());
|
|
234
232
|
harEntry.request.postData = this._postDataForRequest(request, this._options.content);
|
|
235
233
|
if (!this._options.omitSizes)
|
|
@@ -522,10 +520,9 @@ class HarTracer {
|
|
|
522
520
|
return result;
|
|
523
521
|
}
|
|
524
522
|
}
|
|
525
|
-
function createHarEntry(method, url, frameref, options) {
|
|
523
|
+
function createHarEntry(pageRef, method, url, frameref, options) {
|
|
526
524
|
const harEntry = {
|
|
527
|
-
|
|
528
|
-
_monotonicTime: options.includeTraceInfo ? (0, import_utils.monotonicTime)() : void 0,
|
|
525
|
+
pageref: pageRef,
|
|
529
526
|
startedDateTime: (/* @__PURE__ */ new Date()).toISOString(),
|
|
530
527
|
time: -1,
|
|
531
528
|
request: {
|
|
@@ -558,7 +555,9 @@ function createHarEntry(method, url, frameref, options) {
|
|
|
558
555
|
send: -1,
|
|
559
556
|
wait: -1,
|
|
560
557
|
receive: -1
|
|
561
|
-
}
|
|
558
|
+
},
|
|
559
|
+
_frameref: options.includeTraceInfo ? frameref : void 0,
|
|
560
|
+
_monotonicTime: options.includeTraceInfo ? (0, import_utils.monotonicTime)() : void 0
|
|
562
561
|
};
|
|
563
562
|
return harEntry;
|
|
564
563
|
}
|
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -14918,10 +14918,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
14918
14918
|
*/
|
|
14919
14919
|
downloadsPath?: string;
|
|
14920
14920
|
|
|
14921
|
-
|
|
14922
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
14923
|
-
*/
|
|
14924
|
-
env?: { [key: string]: string|number|boolean; };
|
|
14921
|
+
env?: { [key: string]: string|undefined; };
|
|
14925
14922
|
|
|
14926
14923
|
/**
|
|
14927
14924
|
* Path to a browser executable to run instead of the bundled one. If
|
|
@@ -15351,10 +15348,7 @@ export interface BrowserType<Unused = {}> {
|
|
|
15351
15348
|
*/
|
|
15352
15349
|
downloadsPath?: string;
|
|
15353
15350
|
|
|
15354
|
-
|
|
15355
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
15356
|
-
*/
|
|
15357
|
-
env?: { [key: string]: string|number|boolean; };
|
|
15351
|
+
env?: { [key: string]: string|undefined; };
|
|
15358
15352
|
|
|
15359
15353
|
/**
|
|
15360
15354
|
* Path to a browser executable to run instead of the bundled one. If
|
|
@@ -21766,10 +21760,7 @@ export interface LaunchOptions {
|
|
|
21766
21760
|
*/
|
|
21767
21761
|
downloadsPath?: string;
|
|
21768
21762
|
|
|
21769
|
-
|
|
21770
|
-
* Specify environment variables that will be visible to the browser. Defaults to `process.env`.
|
|
21771
|
-
*/
|
|
21772
|
-
env?: { [key: string]: string|number|boolean; };
|
|
21763
|
+
env?: { [key: string]: string|undefined; };
|
|
21773
21764
|
|
|
21774
21765
|
/**
|
|
21775
21766
|
* Path to a browser executable to run instead of the bundled one. If
|