flashwright-core 1.64.1-flashwright.2 → 1.64.1-flashwright.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/lib/coreBundle.js +27 -3
- package/package.json +1 -1
package/lib/coreBundle.js
CHANGED
|
@@ -2292,6 +2292,7 @@ var init_manualPromise = __esm({
|
|
|
2292
2292
|
// packages/utils/stackTrace.ts
|
|
2293
2293
|
var stackTrace_exports = {};
|
|
2294
2294
|
__export(stackTrace_exports, {
|
|
2295
|
+
captureFilteredStackTrace: () => captureFilteredStackTrace,
|
|
2295
2296
|
captureRawStack: () => captureRawStack,
|
|
2296
2297
|
coreDir: () => coreDir,
|
|
2297
2298
|
filterStackFile: () => filterStackFile,
|
|
@@ -2459,6 +2460,25 @@ function filteredStackTrace(rawStack) {
|
|
|
2459
2460
|
}
|
|
2460
2461
|
return frames;
|
|
2461
2462
|
}
|
|
2463
|
+
function captureFilteredStackTrace() {
|
|
2464
|
+
const formatter = rawStackFormatter;
|
|
2465
|
+
if (!formatter)
|
|
2466
|
+
return filteredStackTrace(captureRawStack());
|
|
2467
|
+
const stackTraceLimit = Error.stackTraceLimit;
|
|
2468
|
+
Error.stackTraceLimit = 50;
|
|
2469
|
+
const prepareStackTrace = Error.prepareStackTrace;
|
|
2470
|
+
Error.prepareStackTrace = (error, callSites) => {
|
|
2471
|
+
const kept = callSites.filter((callSite) => {
|
|
2472
|
+
const fileName = callSite.getFileName();
|
|
2473
|
+
return !fileName || filterStackFile(fileURLToPath(fileName));
|
|
2474
|
+
});
|
|
2475
|
+
return kept.length ? formatter(error, kept) : "";
|
|
2476
|
+
};
|
|
2477
|
+
const stack = new Error().stack || "";
|
|
2478
|
+
Error.prepareStackTrace = prepareStackTrace;
|
|
2479
|
+
Error.stackTraceLimit = stackTraceLimit;
|
|
2480
|
+
return stack ? filteredStackTrace(stack.split("\n")) : [];
|
|
2481
|
+
}
|
|
2462
2482
|
function fileURLToPath(fileUrl) {
|
|
2463
2483
|
if (!fileUrl.startsWith("file://"))
|
|
2464
2484
|
return fileUrl;
|
|
@@ -5202,7 +5222,6 @@ var ProtocolError;
|
|
|
5202
5222
|
var init_protocolError = __esm({
|
|
5203
5223
|
"packages/playwright-core/src/server/protocolError.ts"() {
|
|
5204
5224
|
"use strict";
|
|
5205
|
-
init_stackTrace();
|
|
5206
5225
|
ProtocolError = class extends Error {
|
|
5207
5226
|
constructor(type3, method2, logs) {
|
|
5208
5227
|
super();
|
|
@@ -5210,8 +5229,12 @@ var init_protocolError = __esm({
|
|
|
5210
5229
|
this.method = method2;
|
|
5211
5230
|
this.logs = logs;
|
|
5212
5231
|
}
|
|
5232
|
+
// Flashwright: called once the browser answered with an error, before anything read this
|
|
5233
|
+
// error's stack. The stack is formatted with the current message when it is read, so it is not
|
|
5234
|
+
// formatted now: most of these errors are expected and never shown, and formatting a stack
|
|
5235
|
+
// through source map support takes milliseconds.
|
|
5213
5236
|
setMessage(message) {
|
|
5214
|
-
|
|
5237
|
+
this.message = `Protocol error (${this.method}): ${message}`;
|
|
5215
5238
|
}
|
|
5216
5239
|
browserLogMessage() {
|
|
5217
5240
|
return this.logs ? "\nBrowser logs:\n" + this.logs : "";
|
|
@@ -74850,6 +74873,7 @@ __export(utils_exports, {
|
|
|
74850
74873
|
blendWithWhite: () => blendWithWhite,
|
|
74851
74874
|
calculateSha1: () => calculateSha1,
|
|
74852
74875
|
canAccessFile: () => canAccessFile,
|
|
74876
|
+
captureFilteredStackTrace: () => captureFilteredStackTrace,
|
|
74853
74877
|
captureRawStack: () => captureRawStack,
|
|
74854
74878
|
colorDeltaE94: () => colorDeltaE94,
|
|
74855
74879
|
compare: () => compare,
|
|
@@ -79549,7 +79573,7 @@ var utilsFacade = [
|
|
|
79549
79573
|
[["adoptProcess", "envArrayToObject", "gracefullyCloseAll", "gracefullyCloseSet", "gracefullyProcessExitDoNotHang", "killProcessTree", "launchProcess", "spawnAsync"], () => (init_processLauncher(), __toCommonJS(processLauncher_exports))],
|
|
79550
79574
|
[["SerializedFS"], () => (init_serializedFS(), __toCommonJS(serializedFS_exports))],
|
|
79551
79575
|
[["SocksProxy", "SocksProxyHandler", "parsePattern"], () => (init_socksProxy(), __toCommonJS(socksProxy_exports))],
|
|
79552
|
-
[["captureRawStack", "coreDir", "filterStackFile", "filteredStackTrace", "parseErrorStack", "parseStackFrame", "rewriteErrorMessage", "setBoxedStackPrefixes", "setCoreDir", "setRawStackFormatter", "showInternalStackFrames", "splitErrorMessage", "stringifyStackFrames", "withShallowStack"], () => (init_stackTrace(), __toCommonJS(stackTrace_exports))],
|
|
79576
|
+
[["captureFilteredStackTrace", "captureRawStack", "coreDir", "filterStackFile", "filteredStackTrace", "parseErrorStack", "parseStackFrame", "rewriteErrorMessage", "setBoxedStackPrefixes", "setCoreDir", "setRawStackFormatter", "showInternalStackFrames", "splitErrorMessage", "stringifyStackFrames", "withShallowStack"], () => (init_stackTrace(), __toCommonJS(stackTrace_exports))],
|
|
79553
79577
|
[["fitToWidth", "stringWidth"], () => (init_stringWidth(), __toCommonJS(stringWidth_exports))],
|
|
79554
79578
|
[["WSServer", "perMessageDeflate"], () => (init_wsServer(), __toCommonJS(wsServer_exports))],
|
|
79555
79579
|
[["ZipFile"], () => (init_zipFile(), __toCommonJS(zipFile_exports))],
|
package/package.json
CHANGED