browserpilot-cdp 1.2.2 → 1.2.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/index.js CHANGED
@@ -5,11 +5,12 @@ import os from "node:os";
5
5
  import path from "node:path";
6
6
 
7
7
  // ../protocol/dist/constants.js
8
- var BROWSERPILOT_VERSION = "1.2.2";
8
+ var BROWSERPILOT_VERSION = "1.2.3";
9
9
  var DEFAULT_DAEMON_HOST = "127.0.0.1";
10
10
  var DEFAULT_DAEMON_PORT = 19888;
11
11
  var NATIVE_HOST_NAME = "com.browserpilot.bridge";
12
12
  var NATIVE_MESSAGE_MAX_BYTES = 1024 * 1024;
13
+ var NATIVE_INCOMING_MAX_BYTES = 64 * 1024 * 1024;
13
14
  var DEFAULT_CDP_TIMEOUT_MS = 15e3;
14
15
  var MAX_CONSOLE_BUFFER = 5e3;
15
16
  var MAX_NETWORK_BUFFER = 2e3;
@@ -1097,7 +1098,16 @@ function filterSnapshotLines(fullText, search, maxMatches = 25) {
1097
1098
  const allLines = fullText.split("\n");
1098
1099
  const header = allLines[0]?.startsWith("URL:") ? allLines[0] : "";
1099
1100
  const body = header ? allLines.slice(1) : allLines;
1100
- const regex = search instanceof RegExp ? search : new RegExp(escapeRegex(search), "i");
1101
+ let regex;
1102
+ if (search instanceof RegExp) {
1103
+ regex = search;
1104
+ } else {
1105
+ try {
1106
+ regex = new RegExp(search, "i");
1107
+ } catch {
1108
+ regex = new RegExp(escapeRegex(search), "i");
1109
+ }
1110
+ }
1101
1111
  const matchedIndices = /* @__PURE__ */ new Set();
1102
1112
  let count = 0;
1103
1113
  for (let i = 0; i < body.length; i++) {