@checkly/playwright-core 1.51.17-beta.2 → 1.51.17-beta.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.
Files changed (65) hide show
  1. package/lib/checkly/checklyFileSystem.js +44 -0
  2. package/lib/checkly/secretsFilter.js +6 -10
  3. package/lib/escapeRegExp.js +30 -0
  4. package/lib/generated/bindingsControllerSource.js +7 -0
  5. package/lib/generated/clockSource.js +1 -2
  6. package/lib/generated/consoleApiSource.js +1 -2
  7. package/lib/generated/injectedScriptSource.js +1 -2
  8. package/lib/generated/pollingRecorderSource.js +1 -2
  9. package/lib/generated/storageScriptSource.js +7 -0
  10. package/lib/generated/utilityScriptSource.js +1 -2
  11. package/lib/generated/webSocketMockSource.js +1 -2
  12. package/lib/secretsFilter.js +131 -0
  13. package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
  14. package/lib/server/bidi/third_party/bidiProtocolCore.js +152 -0
  15. package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
  16. package/lib/server/chromium/protocol.d.js +16 -0
  17. package/lib/server/firefox/protocol.d.js +16 -0
  18. package/lib/server/har/harRecorder.js +4 -2
  19. package/lib/server/pageBinding.js +88 -0
  20. package/lib/server/recorder/recorderSignalProcessor.js +83 -0
  21. package/lib/server/registry/index.d.ts +86 -0
  22. package/lib/server/trace/recorder/tracing.js +9 -20
  23. package/lib/server/utils/fileUtils.js +65 -2
  24. package/lib/server/webkit/protocol.d.js +16 -0
  25. package/lib/utils/isomorphic/builtins.js +90 -0
  26. package/lib/utils/isomorphic/protocolFormatter.js +68 -0
  27. package/lib/utils/isomorphic/protocolMetainfo.js +321 -0
  28. package/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
  29. package/lib/vite/traceViewer/uiMode.html +1 -1
  30. package/package.json +1 -1
  31. package/lib/common/socksProxy.js +0 -569
  32. package/lib/common/timeoutSettings.js +0 -73
  33. package/lib/common/types.js +0 -5
  34. package/lib/image_tools/colorUtils.js +0 -98
  35. package/lib/image_tools/compare.js +0 -108
  36. package/lib/image_tools/imageChannel.js +0 -70
  37. package/lib/image_tools/stats.js +0 -102
  38. package/lib/protocol/transport.js +0 -82
  39. package/lib/third_party/diff_match_patch.js +0 -2222
  40. package/lib/utils/ascii.js +0 -31
  41. package/lib/utils/comparators.js +0 -171
  42. package/lib/utils/crypto.js +0 -174
  43. package/lib/utils/debug.js +0 -46
  44. package/lib/utils/debugLogger.js +0 -91
  45. package/lib/utils/env.js +0 -49
  46. package/lib/utils/eventsHelper.js +0 -38
  47. package/lib/utils/happy-eyeballs.js +0 -210
  48. package/lib/utils/headers.js +0 -52
  49. package/lib/utils/hostPlatform.js +0 -133
  50. package/lib/utils/httpServer.js +0 -237
  51. package/lib/utils/linuxUtils.js +0 -78
  52. package/lib/utils/manualPromise.js +0 -109
  53. package/lib/utils/multimap.js +0 -75
  54. package/lib/utils/network.js +0 -160
  55. package/lib/utils/processLauncher.js +0 -248
  56. package/lib/utils/profiler.js +0 -53
  57. package/lib/utils/rtti.js +0 -44
  58. package/lib/utils/semaphore.js +0 -51
  59. package/lib/utils/spawnAsync.js +0 -45
  60. package/lib/utils/task.js +0 -58
  61. package/lib/utils/time.js +0 -37
  62. package/lib/utils/traceUtils.js +0 -44
  63. package/lib/utils/userAgent.js +0 -105
  64. package/lib/utils/wsServer.js +0 -127
  65. package/lib/utils/zipFile.js +0 -75
@@ -0,0 +1,251 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var utilityScriptSerializers_exports = {};
20
+ __export(utilityScriptSerializers_exports, {
21
+ parseEvaluationResultValue: () => parseEvaluationResultValue,
22
+ serializeAsCallArgument: () => serializeAsCallArgument
23
+ });
24
+ module.exports = __toCommonJS(utilityScriptSerializers_exports);
25
+ function isRegExp(obj) {
26
+ try {
27
+ return obj instanceof RegExp || Object.prototype.toString.call(obj) === "[object RegExp]";
28
+ } catch (error) {
29
+ return false;
30
+ }
31
+ }
32
+ function isDate(obj) {
33
+ try {
34
+ return obj instanceof Date || Object.prototype.toString.call(obj) === "[object Date]";
35
+ } catch (error) {
36
+ return false;
37
+ }
38
+ }
39
+ function isURL(obj) {
40
+ try {
41
+ return obj instanceof URL || Object.prototype.toString.call(obj) === "[object URL]";
42
+ } catch (error) {
43
+ return false;
44
+ }
45
+ }
46
+ function isError(obj) {
47
+ try {
48
+ return obj instanceof Error || obj && Object.getPrototypeOf(obj)?.name === "Error";
49
+ } catch (error) {
50
+ return false;
51
+ }
52
+ }
53
+ function isTypedArray(obj, constructor) {
54
+ try {
55
+ return obj instanceof constructor || Object.prototype.toString.call(obj) === `[object ${constructor.name}]`;
56
+ } catch (error) {
57
+ return false;
58
+ }
59
+ }
60
+ const typedArrayConstructors = {
61
+ i8: Int8Array,
62
+ ui8: Uint8Array,
63
+ ui8c: Uint8ClampedArray,
64
+ i16: Int16Array,
65
+ ui16: Uint16Array,
66
+ i32: Int32Array,
67
+ ui32: Uint32Array,
68
+ // TODO: add Float16Array once it's in baseline
69
+ f32: Float32Array,
70
+ f64: Float64Array,
71
+ bi64: BigInt64Array,
72
+ bui64: BigUint64Array
73
+ };
74
+ function typedArrayToBase64(array) {
75
+ if ("toBase64" in array)
76
+ return array.toBase64();
77
+ const binary = Array.from(new Uint8Array(array.buffer, array.byteOffset, array.byteLength)).map((b) => String.fromCharCode(b)).join("");
78
+ return btoa(binary);
79
+ }
80
+ function base64ToTypedArray(base64, TypedArrayConstructor) {
81
+ const binary = atob(base64);
82
+ const bytes = new Uint8Array(binary.length);
83
+ for (let i = 0; i < binary.length; i++)
84
+ bytes[i] = binary.charCodeAt(i);
85
+ return new TypedArrayConstructor(bytes.buffer);
86
+ }
87
+ function parseEvaluationResultValue(value, handles = [], refs = /* @__PURE__ */ new Map()) {
88
+ if (Object.is(value, void 0))
89
+ return void 0;
90
+ if (typeof value === "object" && value) {
91
+ if ("ref" in value)
92
+ return refs.get(value.ref);
93
+ if ("v" in value) {
94
+ if (value.v === "undefined")
95
+ return void 0;
96
+ if (value.v === "null")
97
+ return null;
98
+ if (value.v === "NaN")
99
+ return NaN;
100
+ if (value.v === "Infinity")
101
+ return Infinity;
102
+ if (value.v === "-Infinity")
103
+ return -Infinity;
104
+ if (value.v === "-0")
105
+ return -0;
106
+ return void 0;
107
+ }
108
+ if ("d" in value) {
109
+ return new Date(value.d);
110
+ }
111
+ if ("u" in value)
112
+ return new URL(value.u);
113
+ if ("bi" in value)
114
+ return BigInt(value.bi);
115
+ if ("e" in value) {
116
+ const error = new Error(value.e.m);
117
+ error.name = value.e.n;
118
+ error.stack = value.e.s;
119
+ return error;
120
+ }
121
+ if ("r" in value)
122
+ return new RegExp(value.r.p, value.r.f);
123
+ if ("a" in value) {
124
+ const result = [];
125
+ refs.set(value.id, result);
126
+ for (const a of value.a)
127
+ result.push(parseEvaluationResultValue(a, handles, refs));
128
+ return result;
129
+ }
130
+ if ("o" in value) {
131
+ const result = {};
132
+ refs.set(value.id, result);
133
+ for (const { k, v } of value.o) {
134
+ if (k === "__proto__")
135
+ continue;
136
+ result[k] = parseEvaluationResultValue(v, handles, refs);
137
+ }
138
+ return result;
139
+ }
140
+ if ("h" in value)
141
+ return handles[value.h];
142
+ if ("ta" in value)
143
+ return base64ToTypedArray(value.ta.b, typedArrayConstructors[value.ta.k]);
144
+ }
145
+ return value;
146
+ }
147
+ function serializeAsCallArgument(value, handleSerializer) {
148
+ return serialize(value, handleSerializer, { visited: /* @__PURE__ */ new Map(), lastId: 0 });
149
+ }
150
+ function serialize(value, handleSerializer, visitorInfo) {
151
+ if (value && typeof value === "object") {
152
+ if (typeof globalThis.Window === "function" && value instanceof globalThis.Window)
153
+ return "ref: <Window>";
154
+ if (typeof globalThis.Document === "function" && value instanceof globalThis.Document)
155
+ return "ref: <Document>";
156
+ if (typeof globalThis.Node === "function" && value instanceof globalThis.Node)
157
+ return "ref: <Node>";
158
+ }
159
+ return innerSerialize(value, handleSerializer, visitorInfo);
160
+ }
161
+ function innerSerialize(value, handleSerializer, visitorInfo) {
162
+ const result = handleSerializer(value);
163
+ if ("fallThrough" in result)
164
+ value = result.fallThrough;
165
+ else
166
+ return result;
167
+ if (typeof value === "symbol")
168
+ return { v: "undefined" };
169
+ if (Object.is(value, void 0))
170
+ return { v: "undefined" };
171
+ if (Object.is(value, null))
172
+ return { v: "null" };
173
+ if (Object.is(value, NaN))
174
+ return { v: "NaN" };
175
+ if (Object.is(value, Infinity))
176
+ return { v: "Infinity" };
177
+ if (Object.is(value, -Infinity))
178
+ return { v: "-Infinity" };
179
+ if (Object.is(value, -0))
180
+ return { v: "-0" };
181
+ if (typeof value === "boolean")
182
+ return value;
183
+ if (typeof value === "number")
184
+ return value;
185
+ if (typeof value === "string")
186
+ return value;
187
+ if (typeof value === "bigint")
188
+ return { bi: value.toString() };
189
+ if (isError(value)) {
190
+ let stack;
191
+ if (value.stack?.startsWith(value.name + ": " + value.message)) {
192
+ stack = value.stack;
193
+ } else {
194
+ stack = `${value.name}: ${value.message}
195
+ ${value.stack}`;
196
+ }
197
+ return { e: { n: value.name, m: value.message, s: stack } };
198
+ }
199
+ if (isDate(value))
200
+ return { d: value.toJSON() };
201
+ if (isURL(value))
202
+ return { u: value.toJSON() };
203
+ if (isRegExp(value))
204
+ return { r: { p: value.source, f: value.flags } };
205
+ for (const [k, ctor] of Object.entries(typedArrayConstructors)) {
206
+ if (isTypedArray(value, ctor))
207
+ return { ta: { b: typedArrayToBase64(value), k } };
208
+ }
209
+ const id = visitorInfo.visited.get(value);
210
+ if (id)
211
+ return { ref: id };
212
+ if (Array.isArray(value)) {
213
+ const a = [];
214
+ const id2 = ++visitorInfo.lastId;
215
+ visitorInfo.visited.set(value, id2);
216
+ for (let i = 0; i < value.length; ++i)
217
+ a.push(serialize(value[i], handleSerializer, visitorInfo));
218
+ return { a, id: id2 };
219
+ }
220
+ if (typeof value === "object") {
221
+ const o = [];
222
+ const id2 = ++visitorInfo.lastId;
223
+ visitorInfo.visited.set(value, id2);
224
+ for (const name of Object.keys(value)) {
225
+ let item;
226
+ try {
227
+ item = value[name];
228
+ } catch (e) {
229
+ continue;
230
+ }
231
+ if (name === "toJSON" && typeof item === "function")
232
+ o.push({ k: name, v: { o: [], id: 0 } });
233
+ else
234
+ o.push({ k: name, v: serialize(item, handleSerializer, visitorInfo) });
235
+ }
236
+ let jsonWrapper;
237
+ try {
238
+ if (o.length === 0 && value.toJSON && typeof value.toJSON === "function")
239
+ jsonWrapper = { value: value.toJSON() };
240
+ } catch (e) {
241
+ }
242
+ if (jsonWrapper)
243
+ return innerSerialize(jsonWrapper.value, handleSerializer, visitorInfo);
244
+ return { o, id: id2 };
245
+ }
246
+ }
247
+ // Annotate the CommonJS export names for ESM import in node:
248
+ 0 && (module.exports = {
249
+ parseEvaluationResultValue,
250
+ serializeAsCallArgument
251
+ });
@@ -11,8 +11,8 @@
11
11
  <link rel="modulepreload" crossorigin href="./assets/workbench-B_Nj4NA2.js">
12
12
  <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-B5n_FjMx.js">
13
13
  <link rel="stylesheet" crossorigin href="./inspectorTab.CXDulcFG.css">
14
- <link rel="stylesheet" crossorigin href="./workbench.B9vIAzH9.css">
15
14
  <link rel="stylesheet" crossorigin href="./defaultSettingsView.CO3FR0CX.css">
15
+ <link rel="stylesheet" crossorigin href="./workbench.B9vIAzH9.css">
16
16
  <link rel="stylesheet" crossorigin href="./uiMode.BatfzHMG.css">
17
17
  </head>
18
18
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkly/playwright-core",
3
- "version": "1.51.17-beta.2",
3
+ "version": "1.51.17-beta.3",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",