@checkly/playwright-core 1.48.24-maxi → 1.48.25-beta.0

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 (113) hide show
  1. package/lib/generated/bindingsControllerSource.js +7 -0
  2. package/lib/generated/storageScriptSource.js +7 -0
  3. package/lib/server/har/harRecorder.js +3 -1
  4. package/lib/server/trace/recorder/tracing.js +9 -20
  5. package/lib/utils/fileUtils.js +65 -2
  6. package/lib/vite/{traceViewer/assets/codeMirrorModule-tzBrK1V4.js → recorder/assets/codeMirrorModule-baozm8ur.js} +10 -10
  7. package/lib/vite/recorder/assets/{index-BcaUAUCW.js → index-2ElAIWFB.js} +2 -2
  8. package/lib/vite/recorder/index.html +1 -1
  9. package/lib/vite/traceViewer/assets/{codeMirrorModule-CB-2okZ8.js → codeMirrorModule-DblsdhjA.js} +2096 -2331
  10. package/lib/vite/{recorder/assets/codeMirrorModule-CR6kB851.js → traceViewer/assets/codeMirrorModule-lDjkI8Ax.js} +1 -1
  11. package/lib/vite/traceViewer/assets/{inspectorTab-BHcfR9dD.js → inspectorTab-BPzhNk9r.js} +2 -2
  12. package/lib/vite/traceViewer/assets/inspectorTab-DOc4D3cX.js +17361 -0
  13. package/lib/vite/traceViewer/assets/{defaultSettingsView-CBiB4avC.js → testServerConnection-D-tXL3sj.js} +49 -42
  14. package/lib/vite/traceViewer/assets/{workbench-DZqNXdoV.js → workbench-DLv_q9ji.js} +1 -1
  15. package/lib/vite/traceViewer/assets/workbench-DNolpp3y.js +1473 -0
  16. package/lib/vite/traceViewer/assets/xtermModule-DZP0glxx.js +5982 -0
  17. package/lib/vite/traceViewer/{embedded.DInvAijy.js → embedded.BIubxTi3.js} +1 -1
  18. package/lib/vite/traceViewer/{embedded.gzudoghF.js → embedded.DeCrOtlO.js} +4 -4
  19. package/lib/vite/traceViewer/embedded.html +3 -3
  20. package/lib/vite/traceViewer/{index.DilotR1h.js → index.CM_h9lHr.js} +7 -124
  21. package/lib/vite/traceViewer/{index.Dha3cgqs.js → index.DPD22sZn.js} +1 -1
  22. package/lib/vite/traceViewer/index.html +3 -3
  23. package/lib/vite/traceViewer/{inspectorTab.DnGm18kV.css → inspectorTab.DGJWXOSd.css} +1488 -1521
  24. package/lib/vite/traceViewer/{recorder.C88JDknq.js → recorder.BaRuS6Pc.js} +1 -1
  25. package/lib/vite/traceViewer/{recorder.DVrkq3Um.js → recorder.Fwf59ZKh.js} +3 -3
  26. package/lib/vite/traceViewer/recorder.html +2 -2
  27. package/lib/vite/traceViewer/{uiMode.2tr9k625.js → uiMode.B11wexdJ.js} +1 -1
  28. package/lib/vite/traceViewer/{uiMode.C9_OcpPU.js → uiMode.CYBsUhm_.js} +58 -90
  29. package/lib/vite/traceViewer/{uiMode.c5ORgcrX.css → uiMode.DRmgrHSk.css} +45 -7
  30. package/lib/vite/traceViewer/uiMode.html +3 -3
  31. package/lib/vite/traceViewer/{workbench.xUZSA8PY.css → workbench.BQNDbcQ0.css} +83 -320
  32. package/package.json +1 -1
  33. package/lib/client/clientStackTrace.js +0 -66
  34. package/lib/client/fileUtils.js +0 -33
  35. package/lib/client/platform.js +0 -72
  36. package/lib/client/timeoutSettings.js +0 -66
  37. package/lib/client/webSocket.js +0 -107
  38. package/lib/generated/recorderSource.js +0 -7
  39. package/lib/server/callLog.js +0 -80
  40. package/lib/server/harBackend.js +0 -158
  41. package/lib/server/localUtils.js +0 -204
  42. package/lib/server/recorder/chat.js +0 -178
  43. package/lib/server/recorder/codeGenerator.js +0 -154
  44. package/lib/server/recorder/csharp.js +0 -311
  45. package/lib/server/recorder/java.js +0 -249
  46. package/lib/server/recorder/javascript.js +0 -230
  47. package/lib/server/recorder/jsonl.js +0 -48
  48. package/lib/server/recorder/language.js +0 -45
  49. package/lib/server/recorder/python.js +0 -276
  50. package/lib/server/recorder/recorderActions.js +0 -6
  51. package/lib/server/recorder/utils.js +0 -46
  52. package/lib/server/storageScript.js +0 -161
  53. package/lib/server/timeoutSettings.js +0 -75
  54. package/lib/server/utils/ascii.js +0 -32
  55. package/lib/server/utils/comparators.js +0 -160
  56. package/lib/server/utils/crypto.js +0 -172
  57. package/lib/server/utils/debug.js +0 -39
  58. package/lib/server/utils/debugLogger.js +0 -94
  59. package/lib/server/utils/env.js +0 -54
  60. package/lib/server/utils/eventsHelper.js +0 -39
  61. package/lib/server/utils/expectUtils.js +0 -34
  62. package/lib/server/utils/fileUtils.js +0 -205
  63. package/lib/server/utils/happyEyeballs.js +0 -210
  64. package/lib/server/utils/hostPlatform.js +0 -146
  65. package/lib/server/utils/httpServer.js +0 -234
  66. package/lib/server/utils/image_tools/colorUtils.js +0 -99
  67. package/lib/server/utils/image_tools/compare.js +0 -109
  68. package/lib/server/utils/image_tools/imageChannel.js +0 -71
  69. package/lib/server/utils/image_tools/stats.js +0 -103
  70. package/lib/server/utils/linuxUtils.js +0 -59
  71. package/lib/server/utils/network.js +0 -161
  72. package/lib/server/utils/nodePlatform.js +0 -141
  73. package/lib/server/utils/pipeTransport.js +0 -83
  74. package/lib/server/utils/processLauncher.js +0 -249
  75. package/lib/server/utils/profiler.js +0 -53
  76. package/lib/server/utils/socksProxy.js +0 -571
  77. package/lib/server/utils/spawnAsync.js +0 -46
  78. package/lib/server/utils/task.js +0 -59
  79. package/lib/server/utils/userAgent.js +0 -92
  80. package/lib/server/utils/wsServer.js +0 -129
  81. package/lib/server/utils/zipFile.js +0 -76
  82. package/lib/server/utils/zones.js +0 -55
  83. package/lib/utils/glob.js +0 -84
  84. package/lib/utils/isomorphic/ariaSnapshot.js +0 -393
  85. package/lib/utils/isomorphic/assert.js +0 -26
  86. package/lib/utils/isomorphic/colors.js +0 -66
  87. package/lib/utils/isomorphic/headers.js +0 -53
  88. package/lib/utils/isomorphic/manualPromise.js +0 -108
  89. package/lib/utils/isomorphic/multimap.js +0 -74
  90. package/lib/utils/isomorphic/rtti.js +0 -42
  91. package/lib/utils/isomorphic/semaphore.js +0 -52
  92. package/lib/utils/isomorphic/stackTrace.js +0 -170
  93. package/lib/utils/isomorphic/time.js +0 -26
  94. package/lib/utils/isomorphic/timeoutRunner.js +0 -67
  95. package/lib/utils/isomorphic/types.js +0 -6
  96. package/lib/utils/mimeType.js +0 -30
  97. package/lib/utils.js +0 -448
  98. package/lib/vite/traceViewer/assets/codeMirrorModule-DZoSgqUd.js +0 -24
  99. package/lib/vite/traceViewer/assets/inspectorTab-BuJ3wAX_.js +0 -64
  100. package/lib/vite/traceViewer/assets/inspectorTab-CwgfffWb.js +0 -25143
  101. package/lib/vite/traceViewer/assets/workbench-CWZselvp.js +0 -2470
  102. package/lib/vite/traceViewer/assets/workbench-DdmJ9AJV.js +0 -9
  103. package/lib/vite/traceViewer/assets/xtermModule-Es_gt_u7.js +0 -5994
  104. package/lib/vite/traceViewer/defaultSettingsView.Dp3b_92q.css +0 -41
  105. package/lib/vite/traceViewer/embedded.Dxe2heQk.js +0 -2
  106. package/lib/vite/traceViewer/index.CB297BuW.js +0 -2
  107. package/lib/vite/traceViewer/recorder.DNMfnSiu.js +0 -2
  108. package/lib/vite/traceViewer/uiMode.Cr1tvTWS.js +0 -5
  109. /package/lib/vite/traceViewer/{codeMirrorModule.DuST8d_k.css → codeMirrorModule.Cy8X9Wtw.css} +0 -0
  110. /package/lib/vite/traceViewer/{embedded.BeldSa2G.css → embedded.DjZq4InJ.css} +0 -0
  111. /package/lib/vite/traceViewer/{index.QewjJ85u.css → index.QanXxRUb.css} +0 -0
  112. /package/lib/vite/traceViewer/{recorder.DLgqV9db.css → recorder.DBDpiNOK.css} +0 -0
  113. /package/lib/vite/traceViewer/{xtermModule.EsaqrrTX.css → xtermModule.4oRVGWQ-.css} +0 -0
@@ -1,393 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ParserError = exports.KeyParser = void 0;
7
- exports.parseAriaSnapshot = parseAriaSnapshot;
8
- exports.parseAriaSnapshotUnsafe = parseAriaSnapshotUnsafe;
9
- exports.valueOrRegex = valueOrRegex;
10
- /**
11
- * Copyright (c) Microsoft Corporation.
12
- *
13
- * Licensed under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License.
15
- * You may obtain a copy of the License at
16
- *
17
- * http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * Unless required by applicable law or agreed to in writing, software
20
- * distributed under the License is distributed on an "AS IS" BASIS,
21
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
- * See the License for the specific language governing permissions and
23
- * limitations under the License.
24
- */
25
-
26
- // https://www.w3.org/TR/wai-aria-1.2/#role_definitions
27
-
28
- // We pass parsed template between worlds using JSON, make it easy.
29
-
30
- function parseAriaSnapshotUnsafe(yaml, text) {
31
- const result = parseAriaSnapshot(yaml, text);
32
- if (result.errors.length) throw new Error(result.errors[0].message);
33
- return result.fragment;
34
- }
35
- function parseAriaSnapshot(yaml, text, options = {}) {
36
- var _fragment$children;
37
- const lineCounter = new yaml.LineCounter();
38
- const parseOptions = {
39
- keepSourceTokens: true,
40
- lineCounter,
41
- ...options
42
- };
43
- const yamlDoc = yaml.parseDocument(text, parseOptions);
44
- const errors = [];
45
- const convertRange = range => {
46
- return [lineCounter.linePos(range[0]), lineCounter.linePos(range[1])];
47
- };
48
- const addError = error => {
49
- errors.push({
50
- message: error.message,
51
- range: [lineCounter.linePos(error.pos[0]), lineCounter.linePos(error.pos[1])]
52
- });
53
- };
54
- const convertSeq = (container, seq) => {
55
- for (const item of seq.items) {
56
- const itemIsString = item instanceof yaml.Scalar && typeof item.value === 'string';
57
- if (itemIsString) {
58
- const childNode = KeyParser.parse(item, parseOptions, errors);
59
- if (childNode) {
60
- container.children = container.children || [];
61
- container.children.push(childNode);
62
- }
63
- continue;
64
- }
65
- const itemIsMap = item instanceof yaml.YAMLMap;
66
- if (itemIsMap) {
67
- convertMap(container, item);
68
- continue;
69
- }
70
- errors.push({
71
- message: 'Sequence items should be strings or maps',
72
- range: convertRange(item.range || seq.range)
73
- });
74
- }
75
- };
76
- const convertMap = (container, map) => {
77
- for (const entry of map.items) {
78
- container.children = container.children || [];
79
- // Key must by a string
80
- const keyIsString = entry.key instanceof yaml.Scalar && typeof entry.key.value === 'string';
81
- if (!keyIsString) {
82
- errors.push({
83
- message: 'Only string keys are supported',
84
- range: convertRange(entry.key.range || map.range)
85
- });
86
- continue;
87
- }
88
- const key = entry.key;
89
- const value = entry.value;
90
-
91
- // - text: "text"
92
- if (key.value === 'text') {
93
- const valueIsString = value instanceof yaml.Scalar && typeof value.value === 'string';
94
- if (!valueIsString) {
95
- errors.push({
96
- message: 'Text value should be a string',
97
- range: convertRange(entry.value.range || map.range)
98
- });
99
- continue;
100
- }
101
- container.children.push({
102
- kind: 'text',
103
- text: valueOrRegex(value.value)
104
- });
105
- continue;
106
- }
107
-
108
- // role "name": ...
109
- const childNode = KeyParser.parse(key, parseOptions, errors);
110
- if (!childNode) continue;
111
-
112
- // - role "name": "text"
113
- const valueIsScalar = value instanceof yaml.Scalar;
114
- if (valueIsScalar) {
115
- const type = typeof value.value;
116
- if (type !== 'string' && type !== 'number' && type !== 'boolean') {
117
- errors.push({
118
- message: 'Node value should be a string or a sequence',
119
- range: convertRange(entry.value.range || map.range)
120
- });
121
- continue;
122
- }
123
- container.children.push({
124
- ...childNode,
125
- children: [{
126
- kind: 'text',
127
- text: valueOrRegex(String(value.value))
128
- }]
129
- });
130
- continue;
131
- }
132
-
133
- // - role "name":
134
- // - child
135
- const valueIsSequence = value instanceof yaml.YAMLSeq;
136
- if (valueIsSequence) {
137
- container.children.push(childNode);
138
- convertSeq(childNode, value);
139
- continue;
140
- }
141
- errors.push({
142
- message: 'Map values should be strings or sequences',
143
- range: convertRange(entry.value.range || map.range)
144
- });
145
- }
146
- };
147
- const fragment = {
148
- kind: 'role',
149
- role: 'fragment'
150
- };
151
- yamlDoc.errors.forEach(addError);
152
- if (errors.length) return {
153
- errors,
154
- fragment
155
- };
156
- if (!(yamlDoc.contents instanceof yaml.YAMLSeq)) {
157
- errors.push({
158
- message: 'Aria snapshot must be a YAML sequence, elements starting with " -"',
159
- range: yamlDoc.contents ? convertRange(yamlDoc.contents.range) : [{
160
- line: 0,
161
- col: 0
162
- }, {
163
- line: 0,
164
- col: 0
165
- }]
166
- });
167
- }
168
- if (errors.length) return {
169
- errors,
170
- fragment
171
- };
172
- convertSeq(fragment, yamlDoc.contents);
173
- if (errors.length) return {
174
- errors,
175
- fragment: emptyFragment
176
- };
177
- if (((_fragment$children = fragment.children) === null || _fragment$children === void 0 ? void 0 : _fragment$children.length) === 1) return {
178
- fragment: fragment.children[0],
179
- errors
180
- };
181
- return {
182
- fragment,
183
- errors
184
- };
185
- }
186
- const emptyFragment = {
187
- kind: 'role',
188
- role: 'fragment'
189
- };
190
- function normalizeWhitespace(text) {
191
- // TODO: why is this different from normalizeWhitespace in stringUtils.ts?
192
- return text.replace(/[\u200b\u00ad]/g, '').replace(/[\r\n\s\t]+/g, ' ').trim();
193
- }
194
- function valueOrRegex(value) {
195
- return value.startsWith('/') && value.endsWith('/') && value.length > 1 ? {
196
- pattern: value.slice(1, -1)
197
- } : normalizeWhitespace(value);
198
- }
199
- class KeyParser {
200
- static parse(text, options, errors) {
201
- try {
202
- return new KeyParser(text.value)._parse();
203
- } catch (e) {
204
- if (e instanceof ParserError) {
205
- const message = options.prettyErrors === false ? e.message : e.message + ':\n\n' + text.value + '\n' + ' '.repeat(e.pos) + '^\n';
206
- errors.push({
207
- message,
208
- range: [options.lineCounter.linePos(text.range[0]), options.lineCounter.linePos(text.range[0] + e.pos)]
209
- });
210
- return null;
211
- }
212
- throw e;
213
- }
214
- }
215
- constructor(input) {
216
- this._input = void 0;
217
- this._pos = void 0;
218
- this._length = void 0;
219
- this._input = input;
220
- this._pos = 0;
221
- this._length = input.length;
222
- }
223
- _peek() {
224
- return this._input[this._pos] || '';
225
- }
226
- _next() {
227
- if (this._pos < this._length) return this._input[this._pos++];
228
- return null;
229
- }
230
- _eof() {
231
- return this._pos >= this._length;
232
- }
233
- _isWhitespace() {
234
- return !this._eof() && /\s/.test(this._peek());
235
- }
236
- _skipWhitespace() {
237
- while (this._isWhitespace()) this._pos++;
238
- }
239
- _readIdentifier(type) {
240
- if (this._eof()) this._throwError(`Unexpected end of input when expecting ${type}`);
241
- const start = this._pos;
242
- while (!this._eof() && /[a-zA-Z]/.test(this._peek())) this._pos++;
243
- return this._input.slice(start, this._pos);
244
- }
245
- _readString() {
246
- let result = '';
247
- let escaped = false;
248
- while (!this._eof()) {
249
- const ch = this._next();
250
- if (escaped) {
251
- result += ch;
252
- escaped = false;
253
- } else if (ch === '\\') {
254
- escaped = true;
255
- } else if (ch === '"') {
256
- return result;
257
- } else {
258
- result += ch;
259
- }
260
- }
261
- this._throwError('Unterminated string');
262
- }
263
- _throwError(message, offset = 0) {
264
- throw new ParserError(message, offset || this._pos);
265
- }
266
- _readRegex() {
267
- let result = '';
268
- let escaped = false;
269
- let insideClass = false;
270
- while (!this._eof()) {
271
- const ch = this._next();
272
- if (escaped) {
273
- result += ch;
274
- escaped = false;
275
- } else if (ch === '\\') {
276
- escaped = true;
277
- result += ch;
278
- } else if (ch === '/' && !insideClass) {
279
- return {
280
- pattern: result
281
- };
282
- } else if (ch === '[') {
283
- insideClass = true;
284
- result += ch;
285
- } else if (ch === ']' && insideClass) {
286
- result += ch;
287
- insideClass = false;
288
- } else {
289
- result += ch;
290
- }
291
- }
292
- this._throwError('Unterminated regex');
293
- }
294
- _readStringOrRegex() {
295
- const ch = this._peek();
296
- if (ch === '"') {
297
- this._next();
298
- return normalizeWhitespace(this._readString());
299
- }
300
- if (ch === '/') {
301
- this._next();
302
- return this._readRegex();
303
- }
304
- return null;
305
- }
306
- _readAttributes(result) {
307
- let errorPos = this._pos;
308
- while (true) {
309
- this._skipWhitespace();
310
- if (this._peek() === '[') {
311
- this._next();
312
- this._skipWhitespace();
313
- errorPos = this._pos;
314
- const flagName = this._readIdentifier('attribute');
315
- this._skipWhitespace();
316
- let flagValue = '';
317
- if (this._peek() === '=') {
318
- this._next();
319
- this._skipWhitespace();
320
- errorPos = this._pos;
321
- while (this._peek() !== ']' && !this._isWhitespace() && !this._eof()) flagValue += this._next();
322
- }
323
- this._skipWhitespace();
324
- if (this._peek() !== ']') this._throwError('Expected ]');
325
- this._next(); // Consume ']'
326
- this._applyAttribute(result, flagName, flagValue || 'true', errorPos);
327
- } else {
328
- break;
329
- }
330
- }
331
- }
332
- _parse() {
333
- this._skipWhitespace();
334
- const role = this._readIdentifier('role');
335
- this._skipWhitespace();
336
- const name = this._readStringOrRegex() || '';
337
- const result = {
338
- kind: 'role',
339
- role,
340
- name
341
- };
342
- this._readAttributes(result);
343
- this._skipWhitespace();
344
- if (!this._eof()) this._throwError('Unexpected input');
345
- return result;
346
- }
347
- _applyAttribute(node, key, value, errorPos) {
348
- if (key === 'checked') {
349
- this._assert(value === 'true' || value === 'false' || value === 'mixed', 'Value of "checked\" attribute must be a boolean or "mixed"', errorPos);
350
- node.checked = value === 'true' ? true : value === 'false' ? false : 'mixed';
351
- return;
352
- }
353
- if (key === 'disabled') {
354
- this._assert(value === 'true' || value === 'false', 'Value of "disabled" attribute must be a boolean', errorPos);
355
- node.disabled = value === 'true';
356
- return;
357
- }
358
- if (key === 'expanded') {
359
- this._assert(value === 'true' || value === 'false', 'Value of "expanded" attribute must be a boolean', errorPos);
360
- node.expanded = value === 'true';
361
- return;
362
- }
363
- if (key === 'level') {
364
- this._assert(!isNaN(Number(value)), 'Value of "level" attribute must be a number', errorPos);
365
- node.level = Number(value);
366
- return;
367
- }
368
- if (key === 'pressed') {
369
- this._assert(value === 'true' || value === 'false' || value === 'mixed', 'Value of "pressed" attribute must be a boolean or "mixed"', errorPos);
370
- node.pressed = value === 'true' ? true : value === 'false' ? false : 'mixed';
371
- return;
372
- }
373
- if (key === 'selected') {
374
- this._assert(value === 'true' || value === 'false', 'Value of "selected" attribute must be a boolean', errorPos);
375
- node.selected = value === 'true';
376
- return;
377
- }
378
- this._assert(false, `Unsupported attribute [${key}]`, errorPos);
379
- }
380
- _assert(value, message, valuePos) {
381
- if (!value) this._throwError(message || 'Assertion error', valuePos);
382
- }
383
- }
384
- exports.KeyParser = KeyParser;
385
- class ParserError extends Error {
386
- constructor(message, pos) {
387
- super(message);
388
- this.pos = void 0;
389
- this.pos = pos;
390
- }
391
- }
392
- exports.ParserError = ParserError;
393
- //# sourceMappingURL=ariaSnapshot.js.map
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.assert = assert;
7
- /**
8
- * Copyright (c) Microsoft Corporation.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
-
23
- function assert(value, message) {
24
- if (!value) throw new Error(message || 'Assertion error');
25
- }
26
- //# sourceMappingURL=assert.js.map
@@ -1,66 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.webColors = exports.noColors = void 0;
7
- /**
8
- * Copyright (c) Microsoft Corporation.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
-
23
- const webColors = exports.webColors = {
24
- enabled: true,
25
- reset: text => applyStyle(0, 0, text),
26
- bold: text => applyStyle(1, 22, text),
27
- dim: text => applyStyle(2, 22, text),
28
- italic: text => applyStyle(3, 23, text),
29
- underline: text => applyStyle(4, 24, text),
30
- inverse: text => applyStyle(7, 27, text),
31
- hidden: text => applyStyle(8, 28, text),
32
- strikethrough: text => applyStyle(9, 29, text),
33
- black: text => applyStyle(30, 39, text),
34
- red: text => applyStyle(31, 39, text),
35
- green: text => applyStyle(32, 39, text),
36
- yellow: text => applyStyle(33, 39, text),
37
- blue: text => applyStyle(34, 39, text),
38
- magenta: text => applyStyle(35, 39, text),
39
- cyan: text => applyStyle(36, 39, text),
40
- white: text => applyStyle(37, 39, text),
41
- gray: text => applyStyle(90, 39, text),
42
- grey: text => applyStyle(90, 39, text)
43
- };
44
- const noColors = exports.noColors = {
45
- enabled: false,
46
- reset: t => t,
47
- bold: t => t,
48
- dim: t => t,
49
- italic: t => t,
50
- underline: t => t,
51
- inverse: t => t,
52
- hidden: t => t,
53
- strikethrough: t => t,
54
- black: t => t,
55
- red: t => t,
56
- green: t => t,
57
- yellow: t => t,
58
- blue: t => t,
59
- magenta: t => t,
60
- cyan: t => t,
61
- white: t => t,
62
- gray: t => t,
63
- grey: t => t
64
- };
65
- const applyStyle = (open, close, text) => `\u001b[${open}m${text}\u001b[${close}m`;
66
- //# sourceMappingURL=colors.js.map
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.headersArrayToObject = headersArrayToObject;
7
- exports.headersObjectToArray = headersObjectToArray;
8
- /**
9
- * Copyright (c) Microsoft Corporation.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License.
22
- */
23
-
24
- function headersObjectToArray(headers, separator, setCookieSeparator) {
25
- if (!setCookieSeparator) setCookieSeparator = separator;
26
- const result = [];
27
- for (const name in headers) {
28
- const values = headers[name];
29
- if (values === undefined) continue;
30
- if (separator) {
31
- const sep = name.toLowerCase() === 'set-cookie' ? setCookieSeparator : separator;
32
- for (const value of values.split(sep)) result.push({
33
- name,
34
- value: value.trim()
35
- });
36
- } else {
37
- result.push({
38
- name,
39
- value: values
40
- });
41
- }
42
- }
43
- return result;
44
- }
45
- function headersArrayToObject(headers, lowerCase) {
46
- const result = {};
47
- for (const {
48
- name,
49
- value
50
- } of headers) result[lowerCase ? name.toLowerCase() : name] = value;
51
- return result;
52
- }
53
- //# sourceMappingURL=headers.js.map
@@ -1,108 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ManualPromise = exports.LongStandingScope = void 0;
7
- var _stackTrace = require("./stackTrace");
8
- /**
9
- * Copyright (c) Microsoft Corporation.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License.
22
- */
23
-
24
- class ManualPromise extends Promise {
25
- constructor() {
26
- let resolve;
27
- let reject;
28
- super((f, r) => {
29
- resolve = f;
30
- reject = r;
31
- });
32
- this._resolve = void 0;
33
- this._reject = void 0;
34
- this._isDone = void 0;
35
- this._isDone = false;
36
- this._resolve = resolve;
37
- this._reject = reject;
38
- }
39
- isDone() {
40
- return this._isDone;
41
- }
42
- resolve(t) {
43
- this._isDone = true;
44
- this._resolve(t);
45
- }
46
- reject(e) {
47
- this._isDone = true;
48
- this._reject(e);
49
- }
50
- static get [Symbol.species]() {
51
- return Promise;
52
- }
53
- get [Symbol.toStringTag]() {
54
- return 'ManualPromise';
55
- }
56
- }
57
- exports.ManualPromise = ManualPromise;
58
- class LongStandingScope {
59
- constructor() {
60
- this._terminateError = void 0;
61
- this._closeError = void 0;
62
- this._terminatePromises = new Map();
63
- this._isClosed = false;
64
- }
65
- reject(error) {
66
- this._isClosed = true;
67
- this._terminateError = error;
68
- for (const p of this._terminatePromises.keys()) p.resolve(error);
69
- }
70
- close(error) {
71
- this._isClosed = true;
72
- this._closeError = error;
73
- for (const [p, frames] of this._terminatePromises) p.resolve(cloneError(error, frames));
74
- }
75
- isClosed() {
76
- return this._isClosed;
77
- }
78
- static async raceMultiple(scopes, promise) {
79
- return Promise.race(scopes.map(s => s.race(promise)));
80
- }
81
- async race(promise) {
82
- return this._race(Array.isArray(promise) ? promise : [promise], false);
83
- }
84
- async safeRace(promise, defaultValue) {
85
- return this._race([promise], true, defaultValue);
86
- }
87
- async _race(promises, safe, defaultValue) {
88
- const terminatePromise = new ManualPromise();
89
- const frames = (0, _stackTrace.captureRawStack)();
90
- if (this._terminateError) terminatePromise.resolve(this._terminateError);
91
- if (this._closeError) terminatePromise.resolve(cloneError(this._closeError, frames));
92
- this._terminatePromises.set(terminatePromise, frames);
93
- try {
94
- return await Promise.race([terminatePromise.then(e => safe ? defaultValue : Promise.reject(e)), ...promises]);
95
- } finally {
96
- this._terminatePromises.delete(terminatePromise);
97
- }
98
- }
99
- }
100
- exports.LongStandingScope = LongStandingScope;
101
- function cloneError(error, frames) {
102
- const clone = new Error();
103
- clone.name = error.name;
104
- clone.message = error.message;
105
- clone.stack = [error.name + ':' + error.message, ...frames].join('\n');
106
- return clone;
107
- }
108
- //# sourceMappingURL=manualPromise.js.map