@checkly/playwright-core 1.48.24-maxi → 1.48.24

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 (109) hide show
  1. package/lib/vite/traceViewer/assets/{codeMirrorModule-tzBrK1V4.js → codeMirrorModule-Bh1rfd2w.js} +10 -10
  2. package/lib/vite/traceViewer/assets/codeMirrorModule-lDjkI8Ax.js +24 -0
  3. package/lib/vite/traceViewer/assets/codeMirrorModule-xvopPhZ4.js +24 -0
  4. package/lib/vite/traceViewer/assets/{inspectorTab-BuJ3wAX_.js → inspectorTab-7GHnKvSD.js} +2 -2
  5. package/lib/vite/traceViewer/assets/inspectorTab-BPzhNk9r.js +64 -0
  6. package/lib/vite/traceViewer/assets/inspectorTab-wfvwpMHs.js +64 -0
  7. package/lib/vite/traceViewer/assets/{workbench-DdmJ9AJV.js → workbench-C6nMfKVy.js} +1 -1
  8. package/lib/vite/traceViewer/assets/workbench-DLv_q9ji.js +9 -0
  9. package/lib/vite/traceViewer/assets/workbench-LKskf2Iy.js +9 -0
  10. package/lib/vite/traceViewer/{embedded.DInvAijy.js → embedded.BIubxTi3.js} +1 -1
  11. package/lib/vite/traceViewer/embedded.BXYl5zRv.js +2 -0
  12. package/lib/vite/traceViewer/embedded.CShPz96b.js +2 -0
  13. package/lib/vite/traceViewer/embedded.html +3 -3
  14. package/lib/vite/traceViewer/{index.Dha3cgqs.js → index.BZ9CE8t3.js} +1 -1
  15. package/lib/vite/traceViewer/index.DPD22sZn.js +2 -0
  16. package/lib/vite/traceViewer/index.DZkJsFod.js +2 -0
  17. package/lib/vite/traceViewer/index.html +3 -3
  18. package/lib/vite/traceViewer/{recorder.DNMfnSiu.js → recorder.BVExlUUk.js} +1 -1
  19. package/lib/vite/traceViewer/recorder.BaRuS6Pc.js +2 -0
  20. package/lib/vite/traceViewer/recorder.C4zxcvd2.js +2 -0
  21. package/lib/vite/traceViewer/recorder.html +2 -2
  22. package/lib/vite/traceViewer/{uiMode.Cr1tvTWS.js → uiMode.B11wexdJ.js} +1 -1
  23. package/lib/vite/traceViewer/uiMode.DXa41vt9.js +5 -0
  24. package/lib/vite/traceViewer/uiMode.DjTS7tqC.js +5 -0
  25. package/lib/vite/traceViewer/uiMode.html +3 -3
  26. package/package.json +1 -1
  27. package/lib/client/clientStackTrace.js +0 -66
  28. package/lib/client/fileUtils.js +0 -33
  29. package/lib/client/platform.js +0 -72
  30. package/lib/client/timeoutSettings.js +0 -66
  31. package/lib/client/webSocket.js +0 -107
  32. package/lib/generated/recorderSource.js +0 -7
  33. package/lib/server/callLog.js +0 -80
  34. package/lib/server/harBackend.js +0 -158
  35. package/lib/server/localUtils.js +0 -204
  36. package/lib/server/recorder/chat.js +0 -178
  37. package/lib/server/recorder/codeGenerator.js +0 -154
  38. package/lib/server/recorder/csharp.js +0 -311
  39. package/lib/server/recorder/java.js +0 -249
  40. package/lib/server/recorder/javascript.js +0 -230
  41. package/lib/server/recorder/jsonl.js +0 -48
  42. package/lib/server/recorder/language.js +0 -45
  43. package/lib/server/recorder/python.js +0 -276
  44. package/lib/server/recorder/recorderActions.js +0 -6
  45. package/lib/server/recorder/utils.js +0 -46
  46. package/lib/server/storageScript.js +0 -161
  47. package/lib/server/timeoutSettings.js +0 -75
  48. package/lib/server/utils/ascii.js +0 -32
  49. package/lib/server/utils/comparators.js +0 -160
  50. package/lib/server/utils/crypto.js +0 -172
  51. package/lib/server/utils/debug.js +0 -39
  52. package/lib/server/utils/debugLogger.js +0 -94
  53. package/lib/server/utils/env.js +0 -54
  54. package/lib/server/utils/eventsHelper.js +0 -39
  55. package/lib/server/utils/expectUtils.js +0 -34
  56. package/lib/server/utils/fileUtils.js +0 -205
  57. package/lib/server/utils/happyEyeballs.js +0 -210
  58. package/lib/server/utils/hostPlatform.js +0 -146
  59. package/lib/server/utils/httpServer.js +0 -234
  60. package/lib/server/utils/image_tools/colorUtils.js +0 -99
  61. package/lib/server/utils/image_tools/compare.js +0 -109
  62. package/lib/server/utils/image_tools/imageChannel.js +0 -71
  63. package/lib/server/utils/image_tools/stats.js +0 -103
  64. package/lib/server/utils/linuxUtils.js +0 -59
  65. package/lib/server/utils/network.js +0 -161
  66. package/lib/server/utils/nodePlatform.js +0 -141
  67. package/lib/server/utils/pipeTransport.js +0 -83
  68. package/lib/server/utils/processLauncher.js +0 -249
  69. package/lib/server/utils/profiler.js +0 -53
  70. package/lib/server/utils/socksProxy.js +0 -571
  71. package/lib/server/utils/spawnAsync.js +0 -46
  72. package/lib/server/utils/task.js +0 -59
  73. package/lib/server/utils/userAgent.js +0 -92
  74. package/lib/server/utils/wsServer.js +0 -129
  75. package/lib/server/utils/zipFile.js +0 -76
  76. package/lib/server/utils/zones.js +0 -55
  77. package/lib/utils/glob.js +0 -84
  78. package/lib/utils/isomorphic/ariaSnapshot.js +0 -393
  79. package/lib/utils/isomorphic/assert.js +0 -26
  80. package/lib/utils/isomorphic/colors.js +0 -66
  81. package/lib/utils/isomorphic/headers.js +0 -53
  82. package/lib/utils/isomorphic/manualPromise.js +0 -108
  83. package/lib/utils/isomorphic/multimap.js +0 -74
  84. package/lib/utils/isomorphic/rtti.js +0 -42
  85. package/lib/utils/isomorphic/semaphore.js +0 -52
  86. package/lib/utils/isomorphic/stackTrace.js +0 -170
  87. package/lib/utils/isomorphic/time.js +0 -26
  88. package/lib/utils/isomorphic/timeoutRunner.js +0 -67
  89. package/lib/utils/isomorphic/types.js +0 -6
  90. package/lib/utils/mimeType.js +0 -30
  91. package/lib/utils.js +0 -448
  92. package/lib/vite/traceViewer/assets/codeMirrorModule-CB-2okZ8.js +0 -16684
  93. package/lib/vite/traceViewer/assets/defaultSettingsView-CBiB4avC.js +0 -217
  94. package/lib/vite/traceViewer/assets/inspectorTab-CwgfffWb.js +0 -25143
  95. package/lib/vite/traceViewer/assets/workbench-CWZselvp.js +0 -2470
  96. package/lib/vite/traceViewer/assets/xtermModule-Es_gt_u7.js +0 -5994
  97. package/lib/vite/traceViewer/codeMirrorModule.DuST8d_k.css +0 -344
  98. package/lib/vite/traceViewer/defaultSettingsView.Dp3b_92q.css +0 -41
  99. package/lib/vite/traceViewer/embedded.BeldSa2G.css +0 -68
  100. package/lib/vite/traceViewer/embedded.gzudoghF.js +0 -106
  101. package/lib/vite/traceViewer/index.DilotR1h.js +0 -314
  102. package/lib/vite/traceViewer/index.QewjJ85u.css +0 -131
  103. package/lib/vite/traceViewer/inspectorTab.DnGm18kV.css +0 -3178
  104. package/lib/vite/traceViewer/recorder.DLgqV9db.css +0 -15
  105. package/lib/vite/traceViewer/recorder.DVrkq3Um.js +0 -551
  106. package/lib/vite/traceViewer/uiMode.C9_OcpPU.js +0 -1756
  107. package/lib/vite/traceViewer/uiMode.c5ORgcrX.css +0 -1424
  108. package/lib/vite/traceViewer/workbench.xUZSA8PY.css +0 -787
  109. package/lib/vite/traceViewer/xtermModule.EsaqrrTX.css +0 -209
@@ -1,249 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.envArrayToObject = envArrayToObject;
7
- exports.gracefullyCloseAll = gracefullyCloseAll;
8
- exports.gracefullyCloseSet = void 0;
9
- exports.gracefullyProcessExitDoNotHang = gracefullyProcessExitDoNotHang;
10
- exports.launchProcess = launchProcess;
11
- var childProcess = _interopRequireWildcard(require("child_process"));
12
- var _fs = _interopRequireDefault(require("fs"));
13
- var readline = _interopRequireWildcard(require("readline"));
14
- var _fileUtils = require("./fileUtils");
15
- var _utils = require("../../utils");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- /**
20
- * Copyright 2017 Google Inc. All rights reserved.
21
- * Modifications copyright (c) Microsoft Corporation.
22
- *
23
- * Licensed under the Apache License, Version 2.0 (the "License");
24
- * you may not use this file except in compliance with the License.
25
- * You may obtain a copy of the License at
26
- *
27
- * http://www.apache.org/licenses/LICENSE-2.0
28
- *
29
- * Unless required by applicable law or agreed to in writing, software
30
- * distributed under the License is distributed on an "AS IS" BASIS,
31
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
- * See the License for the specific language governing permissions and
33
- * limitations under the License.
34
- */
35
-
36
- const gracefullyCloseSet = exports.gracefullyCloseSet = new Set();
37
- const killSet = new Set();
38
- async function gracefullyCloseAll() {
39
- await Promise.all(Array.from(gracefullyCloseSet).map(gracefullyClose => gracefullyClose().catch(e => {})));
40
- }
41
- function gracefullyProcessExitDoNotHang(code) {
42
- // Force exit after 30 seconds.
43
- // eslint-disable-next-line no-restricted-properties
44
- setTimeout(() => process.exit(code), 30000);
45
- // Meanwhile, try to gracefully close all browsers.
46
- gracefullyCloseAll().then(() => {
47
- // eslint-disable-next-line no-restricted-properties
48
- process.exit(code);
49
- });
50
- }
51
- function exitHandler() {
52
- for (const kill of killSet) kill();
53
- }
54
- let sigintHandlerCalled = false;
55
- function sigintHandler() {
56
- const exitWithCode130 = () => {
57
- // Give tests a chance to see that launched process did exit and dispatch any async calls.
58
- if ((0, _utils.isUnderTest)()) {
59
- // eslint-disable-next-line no-restricted-properties
60
- setTimeout(() => process.exit(130), 1000);
61
- } else {
62
- // eslint-disable-next-line no-restricted-properties
63
- process.exit(130);
64
- }
65
- };
66
- if (sigintHandlerCalled) {
67
- // Resort to default handler from this point on, just in case we hang/stall.
68
- process.off('SIGINT', sigintHandler);
69
-
70
- // Upon second Ctrl+C, immediately kill browsers and exit.
71
- // This prevents hanging in the case where closing the browser takes a lot of time or is buggy.
72
- for (const kill of killSet) kill();
73
- exitWithCode130();
74
- } else {
75
- sigintHandlerCalled = true;
76
- gracefullyCloseAll().then(() => exitWithCode130());
77
- }
78
- }
79
- function sigtermHandler() {
80
- gracefullyCloseAll();
81
- }
82
- function sighupHandler() {
83
- gracefullyCloseAll();
84
- }
85
- const installedHandlers = new Set();
86
- const processHandlers = {
87
- exit: exitHandler,
88
- SIGINT: sigintHandler,
89
- SIGTERM: sigtermHandler,
90
- SIGHUP: sighupHandler
91
- };
92
- function addProcessHandlerIfNeeded(name) {
93
- if (!installedHandlers.has(name)) {
94
- installedHandlers.add(name);
95
- process.on(name, processHandlers[name]);
96
- }
97
- }
98
- function removeProcessHandlersIfNeeded() {
99
- if (killSet.size) return;
100
- for (const handler of installedHandlers) process.off(handler, processHandlers[handler]);
101
- installedHandlers.clear();
102
- }
103
- async function launchProcess(options) {
104
- const stdio = options.stdio === 'pipe' ? ['ignore', 'pipe', 'pipe', 'pipe', 'pipe'] : ['pipe', 'pipe', 'pipe'];
105
- options.log(`<launching> ${options.command} ${options.args ? options.args.join(' ') : ''}`);
106
- const spawnOptions = {
107
- // On non-windows platforms, `detached: true` makes child process a leader of a new
108
- // process group, making it possible to kill child process tree with `.kill(-pid)` command.
109
- // @see https://nodejs.org/api/child_process.html#child_process_options_detached
110
- detached: process.platform !== 'win32',
111
- env: options.env,
112
- cwd: options.cwd,
113
- shell: options.shell,
114
- stdio
115
- };
116
- const spawnedProcess = childProcess.spawn(options.command, options.args || [], spawnOptions);
117
- const cleanup = async () => {
118
- options.log(`[pid=${spawnedProcess.pid || 'N/A'}] starting temporary directories cleanup`);
119
- const errors = await (0, _fileUtils.removeFolders)(options.tempDirectories);
120
- for (let i = 0; i < options.tempDirectories.length; ++i) {
121
- if (errors[i]) options.log(`[pid=${spawnedProcess.pid || 'N/A'}] exception while removing ${options.tempDirectories[i]}: ${errors[i]}`);
122
- }
123
- options.log(`[pid=${spawnedProcess.pid || 'N/A'}] finished temporary directories cleanup`);
124
- };
125
-
126
- // Prevent Unhandled 'error' event.
127
- spawnedProcess.on('error', () => {});
128
- if (!spawnedProcess.pid) {
129
- let failed;
130
- const failedPromise = new Promise((f, r) => failed = f);
131
- spawnedProcess.once('error', error => {
132
- failed(new Error('Failed to launch: ' + error));
133
- });
134
- return cleanup().then(() => failedPromise).then(e => Promise.reject(e));
135
- }
136
- options.log(`<launched> pid=${spawnedProcess.pid}`);
137
- const stdout = readline.createInterface({
138
- input: spawnedProcess.stdout
139
- });
140
- stdout.on('line', data => {
141
- options.log(`[pid=${spawnedProcess.pid}][out] ` + data);
142
- });
143
- const stderr = readline.createInterface({
144
- input: spawnedProcess.stderr
145
- });
146
- stderr.on('line', data => {
147
- options.log(`[pid=${spawnedProcess.pid}][err] ` + data);
148
- });
149
- let processClosed = false;
150
- let fulfillCleanup = () => {};
151
- const waitForCleanup = new Promise(f => fulfillCleanup = f);
152
- spawnedProcess.once('close', (exitCode, signal) => {
153
- options.log(`[pid=${spawnedProcess.pid}] <process did exit: exitCode=${exitCode}, signal=${signal}>`);
154
- processClosed = true;
155
- gracefullyCloseSet.delete(gracefullyClose);
156
- killSet.delete(killProcessAndCleanup);
157
- removeProcessHandlersIfNeeded();
158
- options.onExit(exitCode, signal);
159
- // Cleanup as process exits.
160
- cleanup().then(fulfillCleanup);
161
- });
162
- addProcessHandlerIfNeeded('exit');
163
- if (options.handleSIGINT) addProcessHandlerIfNeeded('SIGINT');
164
- if (options.handleSIGTERM) addProcessHandlerIfNeeded('SIGTERM');
165
- if (options.handleSIGHUP) addProcessHandlerIfNeeded('SIGHUP');
166
- gracefullyCloseSet.add(gracefullyClose);
167
- killSet.add(killProcessAndCleanup);
168
- let gracefullyClosing = false;
169
- async function gracefullyClose() {
170
- // We keep listeners until we are done, to handle 'exit' and 'SIGINT' while
171
- // asynchronously closing to prevent zombie processes. This might introduce
172
- // reentrancy to this function, for example user sends SIGINT second time.
173
- // In this case, let's forcefully kill the process.
174
- if (gracefullyClosing) {
175
- options.log(`[pid=${spawnedProcess.pid}] <forcefully close>`);
176
- killProcess();
177
- await waitForCleanup; // Ensure the process is dead and we have cleaned up.
178
- return;
179
- }
180
- gracefullyClosing = true;
181
- options.log(`[pid=${spawnedProcess.pid}] <gracefully close start>`);
182
- await options.attemptToGracefullyClose().catch(() => killProcess());
183
- await waitForCleanup; // Ensure the process is dead and we have cleaned up.
184
- options.log(`[pid=${spawnedProcess.pid}] <gracefully close end>`);
185
- }
186
-
187
- // This method has to be sync to be used in the 'exit' event handler.
188
- function killProcess() {
189
- gracefullyCloseSet.delete(gracefullyClose);
190
- killSet.delete(killProcessAndCleanup);
191
- removeProcessHandlersIfNeeded();
192
- options.log(`[pid=${spawnedProcess.pid}] <kill>`);
193
- if (spawnedProcess.pid && !spawnedProcess.killed && !processClosed) {
194
- options.log(`[pid=${spawnedProcess.pid}] <will force kill>`);
195
- // Force kill the browser.
196
- try {
197
- if (process.platform === 'win32') {
198
- const taskkillProcess = childProcess.spawnSync(`taskkill /pid ${spawnedProcess.pid} /T /F`, {
199
- shell: true
200
- });
201
- const [stdout, stderr] = [taskkillProcess.stdout.toString(), taskkillProcess.stderr.toString()];
202
- if (stdout) options.log(`[pid=${spawnedProcess.pid}] taskkill stdout: ${stdout}`);
203
- if (stderr) options.log(`[pid=${spawnedProcess.pid}] taskkill stderr: ${stderr}`);
204
- } else {
205
- process.kill(-spawnedProcess.pid, 'SIGKILL');
206
- }
207
- } catch (e) {
208
- options.log(`[pid=${spawnedProcess.pid}] exception while trying to kill process: ${e}`);
209
- // the process might have already stopped
210
- }
211
- } else {
212
- options.log(`[pid=${spawnedProcess.pid}] <skipped force kill spawnedProcess.killed=${spawnedProcess.killed} processClosed=${processClosed}>`);
213
- }
214
- }
215
- function killProcessAndCleanup() {
216
- killProcess();
217
- options.log(`[pid=${spawnedProcess.pid || 'N/A'}] starting temporary directories cleanup`);
218
- for (const dir of options.tempDirectories) {
219
- try {
220
- _fs.default.rmSync(dir, {
221
- force: true,
222
- recursive: true,
223
- maxRetries: 5
224
- });
225
- } catch (e) {
226
- options.log(`[pid=${spawnedProcess.pid || 'N/A'}] exception while removing ${dir}: ${e}`);
227
- }
228
- }
229
- options.log(`[pid=${spawnedProcess.pid || 'N/A'}] finished temporary directories cleanup`);
230
- }
231
- function killAndWait() {
232
- killProcess();
233
- return waitForCleanup;
234
- }
235
- return {
236
- launchedProcess: spawnedProcess,
237
- gracefullyClose,
238
- kill: killAndWait
239
- };
240
- }
241
- function envArrayToObject(env) {
242
- const result = {};
243
- for (const {
244
- name,
245
- value
246
- } of env) result[name] = value;
247
- return result;
248
- }
249
- //# sourceMappingURL=processLauncher.js.map
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.startProfiling = startProfiling;
7
- exports.stopProfiling = stopProfiling;
8
- var _fs = _interopRequireDefault(require("fs"));
9
- var _path = _interopRequireDefault(require("path"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- /**
12
- * Copyright Microsoft Corporation. All rights reserved.
13
- *
14
- * Licensed under the Apache License, Version 2.0 (the "License");
15
- * you may not use this file except in compliance with the License.
16
- * You may obtain a copy of the License at
17
- *
18
- * http://www.apache.org/licenses/LICENSE-2.0
19
- *
20
- * Unless required by applicable law or agreed to in writing, software
21
- * distributed under the License is distributed on an "AS IS" BASIS,
22
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
- * See the License for the specific language governing permissions and
24
- * limitations under the License.
25
- */
26
-
27
- const profileDir = process.env.PWTEST_PROFILE_DIR || '';
28
- let session;
29
- async function startProfiling() {
30
- if (!profileDir) return;
31
- session = new (require('inspector').Session)();
32
- session.connect();
33
- await new Promise(f => {
34
- session.post('Profiler.enable', () => {
35
- session.post('Profiler.start', f);
36
- });
37
- });
38
- }
39
- async function stopProfiling(profileName) {
40
- if (!profileDir) return;
41
- await new Promise(f => session.post('Profiler.stop', (err, {
42
- profile
43
- }) => {
44
- if (!err) {
45
- _fs.default.mkdirSync(profileDir, {
46
- recursive: true
47
- });
48
- _fs.default.writeFileSync(_path.default.join(profileDir, profileName + '.json'), JSON.stringify(profile));
49
- }
50
- f();
51
- }));
52
- }
53
- //# sourceMappingURL=profiler.js.map