@flemist/simple-utils 2.1.4 → 2.1.6
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/build/browser/index.cjs +1 -1
- package/build/browser/index.mjs +175 -146
- package/build/common/async/Locker.d.ts +28 -0
- package/build/common/async/index.d.ts +2 -0
- package/build/common/async/promise.d.ts +7 -0
- package/build/common/cache/Cache.d.ts +46 -0
- package/build/common/cache/CacheStats.d.ts +20 -0
- package/build/common/cache/MemoryStorage.d.ts +11 -0
- package/build/common/cache/getHashKey.d.ts +1 -0
- package/build/common/cache/getJsonKey.d.ts +1 -0
- package/build/common/cache/index.d.ts +6 -0
- package/build/common/cache/types.d.ts +28 -0
- package/build/common/converter/converterErrorToBuffer.d.ts +2 -0
- package/build/common/converter/converterJson.d.ts +2 -0
- package/build/common/converter/converterJsonBuffer.d.ts +2 -0
- package/build/common/converter/converterStringToBuffer.d.ts +2 -0
- package/build/common/converter/helpers.d.ts +13 -0
- package/build/common/converter/index.d.ts +8 -0
- package/build/common/converter/mapObjectConverter.d.ts +2 -0
- package/build/common/converter/setArrayConverter.d.ts +2 -0
- package/build/common/converter/types.d.ts +41 -0
- package/build/common/gzip/compressGzip.d.ts +35 -0
- package/build/common/gzip/decompressGzip.d.ts +2 -0
- package/build/common/gzip/index.d.ts +2 -0
- package/build/common/index.cjs +1 -1
- package/build/common/index.d.ts +3 -0
- package/build/common/index.mjs +175 -146
- package/build/common/string/index.d.ts +1 -1
- package/build/node/cache/FileStatStorage.d.ts +23 -0
- package/build/node/cache/FileStorage.d.ts +29 -0
- package/build/node/cache/createConverterSubPath.d.ts +12 -0
- package/build/node/cache/createFileCacheOptions.d.ts +15 -0
- package/build/node/cache/generateTempFileName.d.ts +1 -0
- package/build/node/cache/index.d.ts +6 -0
- package/build/node/cache/writeFileThroughTmp.d.ts +2 -0
- package/build/node/fs/index.d.ts +1 -0
- package/build/node/fs/readDirRecursive.d.ts +6 -0
- package/build/node/index.cjs +8 -8
- package/build/node/index.d.ts +1 -0
- package/build/node/index.mjs +1063 -606
- package/build/node/test/helpers/common.d.ts +2 -0
- package/build/node/test/helpers/createTestE2e.d.ts +30 -0
- package/build/node/test/helpers/index.d.ts +3 -0
- package/build/node/test/helpers/waitPageStable.d.ts +35 -0
- package/build/node/test/index.d.ts +1 -0
- package/build/urlGet-BoqnOos7.js +17 -0
- package/build/urlGet-OHY_Qdk-.mjs +2416 -0
- package/package.json +37 -38
- package/build/common/time/dateToString.d.ts +0 -2
- package/build/urlGet-CerQ1cKh.js +0 -17
- package/build/urlGet-DZEwtNXt.mjs +0 -2000
package/build/node/index.mjs
CHANGED
|
@@ -1,55 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { aq as ut, an as St, r as xt, q as Ot, a as Tt, aj as _t, ah as kt, a5 as Ct } from "../urlGet-OHY_Qdk-.mjs";
|
|
2
|
+
import { C as Le, b as Fe, aF as Ie, ac as Re, ak as Ne, al as $e, am as We, af as ze, aM as Be, av as Ue, aw as Je, by as Ke, bz as Ge, bA as He, bB as Ve, bC as qe, bD as Ye, bE as Qe, bN as Xe, bF as Ze, bG as tr, bH as er, bI as rr, bJ as nr, bK as sr, bL as ar, bM as or, M as ir, R as cr, as as lr, at as ur, U as fr, ab as hr, a7 as dr, az as mr, aG as pr, aH as wr, y as yr, aa as br, a8 as gr, ad as Er, V as Sr, o as xr, p as Or, aD as Tr, aC as _r, aB as kr, ap as Cr, Q as Pr, S as Dr, A as vr, a1 as Ar, a2 as Mr, a3 as jr, a4 as Lr, W as Fr, X as Ir, ay as Rr, aJ as Nr, aI as $r, ag as Wr, Y as zr, Z as Br, _ as Ur, a9 as Jr, T as Kr, g as Gr, $ as Hr, H as Vr, G as qr, z as Yr, ax as Qr, ar as Xr, s as Zr, aE as tn, b8 as en, ba as rn, aP as nn, aN as sn, bx as an, aO as on, aS as cn, bc as ln, bf as un, b4 as fn, b3 as hn, aT as dn, bq as mn, a_ as pn, bp as wn, aY as yn, bo as bn, b1 as gn, aX as En, br as Sn, aV as xn, aU as On, aR as Tn, bu as _n, b6 as kn, b5 as Cn, aW as Pn, aZ as Dn, bi as vn, bj as An, bk as Mn, bm as jn, bg as Ln, bn as Fn, a$ as In, bl as Rn, bh as Nn, be as $n, bb as Wn, b7 as zn, b9 as Bn, bs as Un, bt as Jn, aQ as Kn, aK as Gn, aL as Hn, b0 as Vn, bd as qn, b2 as Yn, bv as Qn, bw as Xn, D as Zn, B as ts, E as es, F as rs, K as ns, P as ss, I as as, L as os, J as is, N as cs, O as ls, u as us, a6 as fs, w as hs, v as ds, ai as ms, k as ps, j as ws, e as ys, d as bs, n as gs, m as Es, l as Ss, i as xs, h as Os, f as Ts, c as _s, t as ks, x as Cs, a0 as Ps, bT as Ds, bV as vs, bU as As, bO as Ms, bS as js, bP as Ls, bR as Fs, bQ as Is, aA as Rs, au as Ns, ae as $s, ao as Ws } from "../urlGet-OHY_Qdk-.mjs";
|
|
3
|
+
import * as P from "path";
|
|
4
|
+
import I from "path";
|
|
5
|
+
import { Pool as Pt, poolRunWait as A } from "@flemist/time-limits";
|
|
6
|
+
import Dt from "node:os";
|
|
7
|
+
import * as v from "fs";
|
|
8
|
+
import $ from "fs";
|
|
9
|
+
import { priorityCreate as J } from "@flemist/priority-queue";
|
|
10
|
+
import { useAbortController as vt, combineAbortSignals as rt, delay as ft } from "@flemist/async-utils";
|
|
11
|
+
import At from "picomatch";
|
|
12
|
+
import { spawn as G } from "child_process";
|
|
13
|
+
import { AbortControllerFast as ht, AbortError as st } from "@flemist/abort-controller-fast";
|
|
14
|
+
import { createTestVariants as Mt } from "@flemist/test-variants";
|
|
15
|
+
const R = new Pt(Dt.cpus().length);
|
|
16
|
+
async function jt(t, e, n, s) {
|
|
17
|
+
t = I.resolve(t), e = I.resolve(e), await A({
|
|
18
|
+
pool: s ?? R,
|
|
19
|
+
count: 1,
|
|
20
|
+
func: async () => {
|
|
21
|
+
let r = !1;
|
|
22
|
+
try {
|
|
23
|
+
await ut([
|
|
24
|
+
$.promises.mkdir(I.dirname(t), { recursive: !0 }),
|
|
25
|
+
(async () => {
|
|
26
|
+
await $.promises.mkdir(I.dirname(e), { recursive: !0 }), await $.promises.writeFile(e, n), r = !0;
|
|
27
|
+
})()
|
|
28
|
+
]), await $.promises.rename(e, t);
|
|
29
|
+
} catch (a) {
|
|
30
|
+
throw r && await $.promises.unlink(e).catch(() => {
|
|
31
|
+
}), a;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
16
35
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
U == null && (U = /* @__PURE__ */ new Map());
|
|
20
|
-
const e = W(t);
|
|
21
|
-
let n = U.get(e);
|
|
22
|
-
return n == null && (n = new wt(), U.set(e, n)), n;
|
|
36
|
+
function Lt() {
|
|
37
|
+
return `${Date.now().toString(36)}${Math.random().toString(36).substring(2)}.tmp`;
|
|
23
38
|
}
|
|
24
|
-
function
|
|
39
|
+
function F(t) {
|
|
40
|
+
return t.replace(/[\\/]+/g, "/");
|
|
41
|
+
}
|
|
42
|
+
const Ft = new St();
|
|
43
|
+
function be(t) {
|
|
25
44
|
const { filePath: e, func: n } = t;
|
|
26
|
-
return
|
|
27
|
-
()
|
|
28
|
-
|
|
45
|
+
return Ft.lock(
|
|
46
|
+
F(e),
|
|
47
|
+
() => A({
|
|
48
|
+
pool: R,
|
|
29
49
|
count: 1,
|
|
30
50
|
func: n
|
|
31
51
|
})
|
|
32
52
|
);
|
|
33
53
|
}
|
|
34
|
-
function
|
|
54
|
+
function It(t) {
|
|
35
55
|
return t.match(/^[/\\]?[^/\\]+/)[0];
|
|
36
56
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
57
|
+
function Rt(t, e) {
|
|
58
|
+
return It(t) + "|" + e.ino;
|
|
39
59
|
}
|
|
40
|
-
function
|
|
41
|
-
return t.endsWith(":") && (t += "/"),
|
|
60
|
+
function Nt(t) {
|
|
61
|
+
return t.endsWith(":") && (t += "/"), P.resolve(t);
|
|
42
62
|
}
|
|
43
|
-
function
|
|
63
|
+
function at(t, e) {
|
|
44
64
|
t.totalSize += e.totalSize, t.maxFileDateModified = Math.max(
|
|
45
65
|
t.maxFileDateModified,
|
|
46
66
|
e.maxFileDateModified
|
|
47
67
|
), t.countFiles += e.countFiles, t.countDirs += e.countDirs, t.countLinks += e.countLinks;
|
|
48
68
|
}
|
|
49
|
-
const
|
|
69
|
+
const $t = function(e) {
|
|
50
70
|
return e.code === "ENOENT";
|
|
51
71
|
};
|
|
52
|
-
function
|
|
72
|
+
function dt(t) {
|
|
53
73
|
const e = t.paths;
|
|
54
74
|
if (!e || e.length === 0)
|
|
55
75
|
return Promise.resolve({
|
|
@@ -59,148 +79,148 @@ function it(t) {
|
|
|
59
79
|
countDirs: 0,
|
|
60
80
|
countLinks: 0
|
|
61
81
|
});
|
|
62
|
-
const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ??
|
|
63
|
-
async function
|
|
64
|
-
if (!(o && await o(
|
|
65
|
-
throw
|
|
82
|
+
const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? R, o = t.handleError, i = t.priority ?? J(0), c = t.walkLinks ?? !1, l = t.log, g = t.handlePath, d = t.matchPath;
|
|
83
|
+
async function h(f) {
|
|
84
|
+
if (!(o && await o(f)) && !$t(f))
|
|
85
|
+
throw f;
|
|
66
86
|
}
|
|
67
|
-
function
|
|
68
|
-
return !(!
|
|
87
|
+
function x(f) {
|
|
88
|
+
return !(!l || l.minTotalContentSize != null && f < l.minTotalContentSize || l.maxNestedLevel != null && n > l.maxNestedLevel);
|
|
69
89
|
}
|
|
70
|
-
return
|
|
71
|
-
const
|
|
90
|
+
return vt(async (f) => {
|
|
91
|
+
const m = rt(r, f), p = {
|
|
72
92
|
totalSize: 0,
|
|
73
93
|
maxFileDateModified: 0,
|
|
74
94
|
countFiles: 0,
|
|
75
95
|
countDirs: 0,
|
|
76
96
|
countLinks: 0
|
|
77
97
|
};
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
|
|
98
|
+
function k(w, _) {
|
|
99
|
+
if (x(_.totalSize)) {
|
|
100
|
+
const O = `${_.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${w}`;
|
|
101
|
+
l?.handleLog ? l.handleLog(O) : console.log(O);
|
|
82
102
|
}
|
|
83
103
|
}
|
|
84
|
-
async function
|
|
85
|
-
return
|
|
104
|
+
async function u(w, _, S, O) {
|
|
105
|
+
return g ? await A({
|
|
86
106
|
pool: a,
|
|
87
107
|
func: async () => {
|
|
88
108
|
try {
|
|
89
|
-
return await
|
|
109
|
+
return await g({
|
|
90
110
|
level: n,
|
|
91
|
-
path:
|
|
92
|
-
stat:
|
|
93
|
-
itemStat:
|
|
94
|
-
totalStat:
|
|
95
|
-
abortSignal:
|
|
111
|
+
path: w,
|
|
112
|
+
stat: _,
|
|
113
|
+
itemStat: S,
|
|
114
|
+
totalStat: p,
|
|
115
|
+
abortSignal: m
|
|
96
116
|
});
|
|
97
|
-
} catch (
|
|
98
|
-
return await
|
|
117
|
+
} catch (T) {
|
|
118
|
+
return await h(T), !1;
|
|
99
119
|
}
|
|
100
120
|
},
|
|
101
121
|
count: 1,
|
|
102
|
-
priority:
|
|
103
|
-
abortSignal:
|
|
122
|
+
priority: O,
|
|
123
|
+
abortSignal: m
|
|
104
124
|
}) : !0;
|
|
105
125
|
}
|
|
106
|
-
async function
|
|
107
|
-
|
|
108
|
-
const
|
|
126
|
+
async function y(w, _, S, O) {
|
|
127
|
+
O || (O = w);
|
|
128
|
+
const T = await A({
|
|
109
129
|
pool: a,
|
|
110
|
-
func: () =>
|
|
130
|
+
func: () => v.promises.lstat(w).catch(h),
|
|
111
131
|
count: 1,
|
|
112
|
-
priority:
|
|
113
|
-
abortSignal:
|
|
132
|
+
priority: J(_, J(1, i)),
|
|
133
|
+
abortSignal: m
|
|
114
134
|
});
|
|
115
|
-
if (!
|
|
135
|
+
if (!T || !S && T.isFile())
|
|
116
136
|
return null;
|
|
117
|
-
const
|
|
118
|
-
if (s.has(
|
|
137
|
+
const D = Rt(w, T);
|
|
138
|
+
if (s.has(D))
|
|
119
139
|
return null;
|
|
120
|
-
s.add(
|
|
121
|
-
let
|
|
122
|
-
totalSize:
|
|
123
|
-
maxFileDateModified:
|
|
140
|
+
s.add(D);
|
|
141
|
+
let b = {
|
|
142
|
+
totalSize: T.size,
|
|
143
|
+
maxFileDateModified: T.isDirectory() ? 0 : T.mtimeMs,
|
|
124
144
|
countFiles: 0,
|
|
125
145
|
countDirs: 0,
|
|
126
146
|
countLinks: 0
|
|
127
147
|
};
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
148
|
+
const M = J(
|
|
149
|
+
_,
|
|
150
|
+
J(T.isDirectory() ? 2 : 3, i)
|
|
131
151
|
);
|
|
132
|
-
if (
|
|
133
|
-
if (
|
|
134
|
-
const C = await
|
|
152
|
+
if (T.isSymbolicLink()) {
|
|
153
|
+
if (c) {
|
|
154
|
+
const C = await A({
|
|
135
155
|
pool: a,
|
|
136
|
-
func: () =>
|
|
156
|
+
func: () => v.promises.readlink(w).catch(h).then((L) => L ?? null),
|
|
137
157
|
count: 1,
|
|
138
|
-
priority:
|
|
139
|
-
abortSignal:
|
|
158
|
+
priority: M,
|
|
159
|
+
abortSignal: m
|
|
140
160
|
});
|
|
141
161
|
if (C) {
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
162
|
+
const L = P.isAbsolute(C) ? C : P.resolve(P.dirname(O), C), N = await y(
|
|
163
|
+
L,
|
|
164
|
+
_,
|
|
165
|
+
S,
|
|
166
|
+
O
|
|
147
167
|
);
|
|
148
|
-
|
|
168
|
+
N && (b = N);
|
|
149
169
|
}
|
|
150
170
|
}
|
|
151
|
-
return (
|
|
171
|
+
return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (b.countLinks += 1, await u(
|
|
172
|
+
O,
|
|
173
|
+
T,
|
|
152
174
|
b,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
} else if (k.isDirectory()) {
|
|
158
|
-
const C = await N({
|
|
175
|
+
M
|
|
176
|
+
) && (at(p, b), k(O, b))), b;
|
|
177
|
+
} else if (T.isDirectory()) {
|
|
178
|
+
const C = await A({
|
|
159
179
|
pool: a,
|
|
160
|
-
func: () =>
|
|
180
|
+
func: () => v.promises.readdir(w).catch(h),
|
|
161
181
|
count: 1,
|
|
162
182
|
priority: i,
|
|
163
|
-
abortSignal:
|
|
183
|
+
abortSignal: m
|
|
164
184
|
});
|
|
165
185
|
if (C) {
|
|
166
|
-
for (let
|
|
167
|
-
C[
|
|
168
|
-
|
|
186
|
+
for (let L = 0, N = C.length; L < N; L++)
|
|
187
|
+
C[L] = P.join(O, C[L]);
|
|
188
|
+
b = await dt({
|
|
169
189
|
...t,
|
|
170
190
|
paths: C,
|
|
171
|
-
abortSignal:
|
|
172
|
-
priority:
|
|
191
|
+
abortSignal: m,
|
|
192
|
+
priority: M,
|
|
173
193
|
level: n + 1,
|
|
174
194
|
walkedIds: s
|
|
175
195
|
});
|
|
176
196
|
}
|
|
177
197
|
}
|
|
178
|
-
return (
|
|
198
|
+
return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (T.isDirectory() ? b.countDirs += 1 : T.isFile() && (b.countFiles += 1), await u(
|
|
199
|
+
O,
|
|
200
|
+
T,
|
|
179
201
|
b,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
A
|
|
183
|
-
) && (et(m, d), T(b, d))), d;
|
|
202
|
+
M
|
|
203
|
+
) && (at(p, b), k(O, b))), b;
|
|
184
204
|
}
|
|
185
|
-
const
|
|
186
|
-
for (let
|
|
187
|
-
const
|
|
188
|
-
|
|
205
|
+
const E = [];
|
|
206
|
+
for (let w = 0, _ = e.length; w < _; w++) {
|
|
207
|
+
const S = Nt(e[w]), O = d ? d(S) : !0;
|
|
208
|
+
O !== !1 && E.push(y(S, w, O));
|
|
189
209
|
}
|
|
190
|
-
return await Promise.all(
|
|
210
|
+
return await Promise.all(E), p;
|
|
191
211
|
});
|
|
192
212
|
}
|
|
193
|
-
function
|
|
194
|
-
return
|
|
213
|
+
function ge(t) {
|
|
214
|
+
return dt(t);
|
|
195
215
|
}
|
|
196
|
-
function
|
|
216
|
+
function Ee({
|
|
197
217
|
globs: t,
|
|
198
218
|
rootDir: e,
|
|
199
219
|
noCase: n
|
|
200
220
|
}) {
|
|
201
221
|
const s = [];
|
|
202
222
|
return t.forEach((r) => {
|
|
203
|
-
r =
|
|
223
|
+
r = F(r).trim();
|
|
204
224
|
const a = r.startsWith("^");
|
|
205
225
|
a && (r = r.substring(1).trim());
|
|
206
226
|
const o = r.startsWith("!");
|
|
@@ -209,85 +229,326 @@ function te({
|
|
|
209
229
|
`Invalid glob pattern: "${r}". The syntax '${r.substring(0, 2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`
|
|
210
230
|
);
|
|
211
231
|
r.startsWith("/") && (r = "." + r);
|
|
212
|
-
const i =
|
|
232
|
+
const i = F(e ? P.resolve(e, r) : r);
|
|
213
233
|
if (!i)
|
|
214
234
|
return;
|
|
215
|
-
let
|
|
235
|
+
let c;
|
|
216
236
|
try {
|
|
217
|
-
|
|
237
|
+
c = At(i, {
|
|
218
238
|
nocase: n ?? !1,
|
|
219
239
|
dot: !0,
|
|
220
240
|
strictBrackets: !0
|
|
221
241
|
// Validate bracket balance for patterns like "["
|
|
222
242
|
});
|
|
223
|
-
} catch (
|
|
243
|
+
} catch (l) {
|
|
224
244
|
throw new Error(
|
|
225
|
-
`Invalid glob pattern: "${r}". ${
|
|
245
|
+
`Invalid glob pattern: "${r}". ${l instanceof Error ? l.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
|
|
226
246
|
);
|
|
227
247
|
}
|
|
228
248
|
s.push({
|
|
229
249
|
exclude: a,
|
|
230
250
|
negative: o,
|
|
231
251
|
debugInfo: i,
|
|
232
|
-
match:
|
|
252
|
+
match: c
|
|
233
253
|
});
|
|
234
254
|
}), function(a) {
|
|
235
|
-
a =
|
|
255
|
+
a = F(a);
|
|
236
256
|
let o = null, i = !1;
|
|
237
|
-
for (let
|
|
238
|
-
const
|
|
239
|
-
|
|
257
|
+
for (let c = 0, l = s.length; c < l; c++) {
|
|
258
|
+
const g = s[c];
|
|
259
|
+
g.match(a) && (g.exclude ? i = !g.negative : (o = !g.negative, i = !1));
|
|
240
260
|
}
|
|
241
261
|
return i ? !1 : o;
|
|
242
262
|
};
|
|
243
263
|
}
|
|
244
|
-
function
|
|
264
|
+
function Wt(t) {
|
|
245
265
|
const e = t.startsWith("!");
|
|
246
266
|
return e && (t = t.substring(1)), t.startsWith("/") ? t = t.substring(1) : !t.startsWith("**") && !t.startsWith("../") && (t = `**/${t}`), e && (t = "!" + t), t;
|
|
247
267
|
}
|
|
248
|
-
function
|
|
268
|
+
function zt(t, e) {
|
|
249
269
|
if (!e || e === ".")
|
|
250
270
|
return t;
|
|
251
271
|
const n = t.startsWith("^");
|
|
252
272
|
n && (t = t.substring(1));
|
|
253
273
|
const s = t.startsWith("!");
|
|
254
|
-
return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t =
|
|
274
|
+
return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = F(P.normalize(t)), s && (t = "!" + t), n && (t = "^" + t), t;
|
|
255
275
|
}
|
|
256
|
-
function
|
|
276
|
+
function ot(t) {
|
|
257
277
|
return "^" + t;
|
|
258
278
|
}
|
|
259
|
-
async function
|
|
260
|
-
const n = (await
|
|
279
|
+
async function Bt(t) {
|
|
280
|
+
const n = (await v.promises.readFile(t, "utf-8")).split(`
|
|
261
281
|
`), s = [];
|
|
262
282
|
return n.forEach((r) => {
|
|
263
283
|
r = r.trim(), !(!r || r.startsWith("#")) && s.push(r);
|
|
264
284
|
}), s;
|
|
265
285
|
}
|
|
266
|
-
async function
|
|
286
|
+
async function Se(t) {
|
|
267
287
|
const e = t.rootDir ?? ".", n = [];
|
|
268
288
|
if (!t.globs?.length)
|
|
269
289
|
return n;
|
|
270
290
|
const s = [];
|
|
271
291
|
return t.globs.forEach((r) => {
|
|
272
|
-
r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ?
|
|
292
|
+
r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ? ot(r.value) : r.value));
|
|
273
293
|
}), s.length && await Promise.all(
|
|
274
294
|
s.map(async (r) => {
|
|
275
|
-
await
|
|
276
|
-
pool:
|
|
295
|
+
await A({
|
|
296
|
+
pool: R,
|
|
277
297
|
count: 1,
|
|
278
298
|
func: async () => {
|
|
279
|
-
const a =
|
|
280
|
-
o.forEach((
|
|
281
|
-
|
|
299
|
+
const a = P.resolve(e, r.value), o = await Bt(a), i = P.relative(e, P.dirname(a));
|
|
300
|
+
o.forEach((c) => {
|
|
301
|
+
c = Wt(c), c = zt(c, i), n.push(r.exclude ? ot(c) : c);
|
|
282
302
|
});
|
|
283
303
|
}
|
|
284
304
|
});
|
|
285
305
|
})
|
|
286
306
|
), n;
|
|
287
307
|
}
|
|
288
|
-
function
|
|
308
|
+
function Ut(t, e) {
|
|
309
|
+
return A({
|
|
310
|
+
pool: e ?? R,
|
|
311
|
+
count: 1,
|
|
312
|
+
func: () => v.promises.readdir(t, { withFileTypes: !0 })
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
async function Jt(t, e) {
|
|
316
|
+
const n = [];
|
|
317
|
+
async function s(r, a) {
|
|
318
|
+
let o;
|
|
319
|
+
try {
|
|
320
|
+
o = await Ut(r, e);
|
|
321
|
+
} catch (c) {
|
|
322
|
+
if (a !== "" && c.code === "ENOENT")
|
|
323
|
+
return;
|
|
324
|
+
throw c;
|
|
325
|
+
}
|
|
326
|
+
let i = null;
|
|
327
|
+
o.forEach((c) => {
|
|
328
|
+
const l = P.join(a, c.name);
|
|
329
|
+
n.push([F(l), c]), c.isDirectory() && (i == null && (i = []), i.push(
|
|
330
|
+
s(P.join(r, c.name), l)
|
|
331
|
+
));
|
|
332
|
+
}), i != null && await Promise.all(i);
|
|
333
|
+
}
|
|
334
|
+
return await s(t, ""), n;
|
|
335
|
+
}
|
|
336
|
+
class it {
|
|
337
|
+
_options;
|
|
338
|
+
constructor(e) {
|
|
339
|
+
this._options = e;
|
|
340
|
+
}
|
|
341
|
+
get options() {
|
|
342
|
+
return this._options;
|
|
343
|
+
}
|
|
344
|
+
async set(e, n) {
|
|
345
|
+
const s = this._options.converterSubPath.to(e), r = P.join(this._options.dir, s), a = this._options.getTempFileName ? this._options.getTempFileName(e) : Lt(), o = P.join(this._options.tmpDir, a);
|
|
346
|
+
await jt(r, o, n, this._options.pool);
|
|
347
|
+
}
|
|
348
|
+
async get(e) {
|
|
349
|
+
const n = this._options.converterSubPath.to(e), s = P.join(this._options.dir, n);
|
|
350
|
+
try {
|
|
351
|
+
const r = await A({
|
|
352
|
+
pool: this._options.pool ?? R,
|
|
353
|
+
count: 1,
|
|
354
|
+
func: () => v.promises.readFile(s)
|
|
355
|
+
});
|
|
356
|
+
return new Uint8Array(r);
|
|
357
|
+
} catch (r) {
|
|
358
|
+
if (r.code === "ENOENT")
|
|
359
|
+
return;
|
|
360
|
+
throw r;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async delete(e) {
|
|
364
|
+
const n = this._options.converterSubPath.to(e), s = P.join(this._options.dir, n);
|
|
365
|
+
try {
|
|
366
|
+
await A({
|
|
367
|
+
pool: this._options.pool ?? R,
|
|
368
|
+
count: 1,
|
|
369
|
+
func: () => v.promises.unlink(s)
|
|
370
|
+
});
|
|
371
|
+
} catch (r) {
|
|
372
|
+
if (r.code === "ENOENT")
|
|
373
|
+
return;
|
|
374
|
+
throw r;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
async clear() {
|
|
378
|
+
const e = await this.getKeys();
|
|
379
|
+
await ut(e.map((n) => this.delete(n)));
|
|
380
|
+
}
|
|
381
|
+
async getKeys() {
|
|
382
|
+
try {
|
|
383
|
+
const e = await Jt(
|
|
384
|
+
this._options.dir,
|
|
385
|
+
this._options.pool
|
|
386
|
+
), n = [];
|
|
387
|
+
return e.forEach(([s, r]) => {
|
|
388
|
+
if (!r.isFile())
|
|
389
|
+
return;
|
|
390
|
+
const a = this._options.converterSubPath.from(s);
|
|
391
|
+
a != null && n.push(a);
|
|
392
|
+
}), n;
|
|
393
|
+
} catch (e) {
|
|
394
|
+
if (e.code === "ENOENT")
|
|
395
|
+
return [];
|
|
396
|
+
throw e;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function ct(t) {
|
|
401
|
+
const e = t.prefix ? F(t.prefix) : "", n = t.suffix ? F(t.suffix) : "", s = t.splitKeyLetters ?? 0;
|
|
402
|
+
return {
|
|
403
|
+
to(r) {
|
|
404
|
+
if (s <= 0)
|
|
405
|
+
return F(e + r + n);
|
|
406
|
+
const a = Math.min(s, r.length);
|
|
407
|
+
let o = e;
|
|
408
|
+
for (let i = 0; i < a; i++)
|
|
409
|
+
o += (i === 0 ? "" : "/") + r[i];
|
|
410
|
+
return a < r.length && (o += (a === 0 ? "" : "/") + r.slice(a)), F(o + n);
|
|
411
|
+
},
|
|
412
|
+
from(r) {
|
|
413
|
+
return s <= 0 ? !r.startsWith(e) || !r.endsWith(n) ? null : r.slice(e.length, r.length - n.length) : !r.startsWith(e) || !r.endsWith(n) ? null : r.slice(e.length, r.length - n.length).replace(/\//g, "");
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
class Kt {
|
|
418
|
+
_options;
|
|
419
|
+
_entries = /* @__PURE__ */ new Map();
|
|
420
|
+
_entriesLoaded = !1;
|
|
421
|
+
constructor(e) {
|
|
422
|
+
this._options = e;
|
|
423
|
+
}
|
|
424
|
+
async set(e, n) {
|
|
425
|
+
const s = n.hasError ? this._options.storages.error : this._options.storages.value, r = s.options.converterSubPath.to(e), a = I.resolve(s.options.dir, r);
|
|
426
|
+
await A({
|
|
427
|
+
pool: this._options.pool ?? R,
|
|
428
|
+
count: 1,
|
|
429
|
+
func: async () => {
|
|
430
|
+
await $.promises.utimes(
|
|
431
|
+
a,
|
|
432
|
+
n.dateUsed / 1e3,
|
|
433
|
+
n.dateModified / 1e3
|
|
434
|
+
), this._entries.set(e, n);
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
async get(e) {
|
|
439
|
+
const n = this._options.storages.value.options.converterSubPath.to(e), s = this._options.storages.error.options.converterSubPath.to(e), r = I.resolve(
|
|
440
|
+
this._options.storages.value.options.dir,
|
|
441
|
+
n
|
|
442
|
+
), a = I.resolve(
|
|
443
|
+
this._options.storages.error.options.dir,
|
|
444
|
+
s
|
|
445
|
+
);
|
|
446
|
+
return await A({
|
|
447
|
+
pool: this._options.pool ?? R,
|
|
448
|
+
count: 1,
|
|
449
|
+
func: async () => {
|
|
450
|
+
const [o, i] = await Promise.all([
|
|
451
|
+
$.promises.stat(r).catch((c) => {
|
|
452
|
+
if (c.code === "ENOENT")
|
|
453
|
+
return null;
|
|
454
|
+
throw c;
|
|
455
|
+
}),
|
|
456
|
+
$.promises.stat(a).catch((c) => {
|
|
457
|
+
if (c.code === "ENOENT")
|
|
458
|
+
return null;
|
|
459
|
+
throw c;
|
|
460
|
+
})
|
|
461
|
+
]);
|
|
462
|
+
if (o != null && i != null) {
|
|
463
|
+
const c = i.mtimeMs >= o.mtimeMs, l = c ? i : o;
|
|
464
|
+
return {
|
|
465
|
+
dateModified: l.mtimeMs,
|
|
466
|
+
dateUsed: l.atimeMs,
|
|
467
|
+
size: l.size,
|
|
468
|
+
hasError: c
|
|
469
|
+
};
|
|
470
|
+
} else return o != null ? {
|
|
471
|
+
dateModified: o.mtimeMs,
|
|
472
|
+
dateUsed: o.atimeMs,
|
|
473
|
+
size: o.size,
|
|
474
|
+
hasError: !1
|
|
475
|
+
} : i != null ? {
|
|
476
|
+
dateModified: i.mtimeMs,
|
|
477
|
+
dateUsed: i.atimeMs,
|
|
478
|
+
size: i.size,
|
|
479
|
+
hasError: !0
|
|
480
|
+
} : void 0;
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
async delete(e) {
|
|
485
|
+
this._entries.delete(e);
|
|
486
|
+
}
|
|
487
|
+
async clear() {
|
|
488
|
+
this._entries.clear();
|
|
489
|
+
}
|
|
490
|
+
async _getKeys() {
|
|
491
|
+
const [e, n] = await Promise.all([
|
|
492
|
+
this._options.storages.value.getKeys(),
|
|
493
|
+
this._options.storages.error.getKeys()
|
|
494
|
+
]);
|
|
495
|
+
return [...e, ...n];
|
|
496
|
+
}
|
|
497
|
+
async getEntries() {
|
|
498
|
+
if (!this._entriesLoaded) {
|
|
499
|
+
const e = await this._getKeys();
|
|
500
|
+
await Promise.all(
|
|
501
|
+
e.map(async (n) => {
|
|
502
|
+
if (this._entries.has(n))
|
|
503
|
+
return;
|
|
504
|
+
const s = await this.get(n);
|
|
505
|
+
s != null && this._entries.set(n, s);
|
|
506
|
+
})
|
|
507
|
+
), this._entriesLoaded = !0;
|
|
508
|
+
}
|
|
509
|
+
return this._entries;
|
|
510
|
+
}
|
|
511
|
+
async getKeys() {
|
|
512
|
+
const e = await this.getEntries();
|
|
513
|
+
return Array.from(e.keys());
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function xe(t) {
|
|
517
|
+
const e = new it({
|
|
518
|
+
dir: t.dir,
|
|
519
|
+
tmpDir: t.tmpDir,
|
|
520
|
+
converterSubPath: ct({ suffix: ".value" })
|
|
521
|
+
}), n = new it({
|
|
522
|
+
dir: t.dir,
|
|
523
|
+
tmpDir: t.tmpDir,
|
|
524
|
+
converterSubPath: ct({ suffix: ".error" })
|
|
525
|
+
});
|
|
526
|
+
return {
|
|
527
|
+
converterInput: t.converterInput ?? Tt,
|
|
528
|
+
converterValue: t.converterValue ?? Ot,
|
|
529
|
+
converterError: xt,
|
|
530
|
+
totalSize: t.totalSize,
|
|
531
|
+
getSize: {
|
|
532
|
+
value: (s) => s.byteLength,
|
|
533
|
+
error: (s) => s.byteLength,
|
|
534
|
+
stat: () => 0
|
|
535
|
+
},
|
|
536
|
+
isExpired: t.isExpired,
|
|
537
|
+
storages: {
|
|
538
|
+
value: e,
|
|
539
|
+
error: n,
|
|
540
|
+
stat: new Kt({
|
|
541
|
+
storages: {
|
|
542
|
+
value: e,
|
|
543
|
+
error: n
|
|
544
|
+
}
|
|
545
|
+
})
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
function Gt(t, e = {}) {
|
|
289
550
|
return new Promise((n, s) => {
|
|
290
|
-
const r =
|
|
551
|
+
const r = G(t, {
|
|
291
552
|
shell: !0,
|
|
292
553
|
...e
|
|
293
554
|
}), a = [];
|
|
@@ -305,19 +566,19 @@ function Mt(t, e = {}) {
|
|
|
305
566
|
});
|
|
306
567
|
});
|
|
307
568
|
}
|
|
308
|
-
async function
|
|
569
|
+
async function Oe() {
|
|
309
570
|
let t;
|
|
310
571
|
switch (process.platform) {
|
|
311
572
|
case "darwin":
|
|
312
|
-
t =
|
|
573
|
+
t = G("afplay", ["/System/Library/Sounds/Ping.aiff"], {
|
|
313
574
|
stdio: "ignore"
|
|
314
575
|
});
|
|
315
576
|
break;
|
|
316
577
|
case "linux":
|
|
317
|
-
t =
|
|
578
|
+
t = G("beep", [], { stdio: "ignore", shell: !0 });
|
|
318
579
|
break;
|
|
319
580
|
case "win32":
|
|
320
|
-
t =
|
|
581
|
+
t = G("powershell", ["-c", "[console]::beep(1000,300)"], {
|
|
321
582
|
stdio: "ignore"
|
|
322
583
|
});
|
|
323
584
|
break;
|
|
@@ -332,84 +593,84 @@ async function re() {
|
|
|
332
593
|
});
|
|
333
594
|
});
|
|
334
595
|
}
|
|
335
|
-
async function
|
|
596
|
+
async function Ht({
|
|
336
597
|
page: t,
|
|
337
598
|
urlFilters: e,
|
|
338
599
|
timeouts: n
|
|
339
600
|
}) {
|
|
340
|
-
return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await
|
|
601
|
+
return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await _t(
|
|
341
602
|
() => t.evaluate(
|
|
342
603
|
({
|
|
343
604
|
urlFilters: r,
|
|
344
605
|
timeouts: a
|
|
345
606
|
}) => {
|
|
346
|
-
function o(
|
|
347
|
-
return function(
|
|
348
|
-
let
|
|
349
|
-
for (let
|
|
350
|
-
const
|
|
351
|
-
|
|
607
|
+
function o(l) {
|
|
608
|
+
return function(d) {
|
|
609
|
+
let h = !1;
|
|
610
|
+
for (let x = 0, f = l.length; x < f; x++) {
|
|
611
|
+
const m = l[x];
|
|
612
|
+
m.pattern.test(d) && (h = m.value);
|
|
352
613
|
}
|
|
353
|
-
return
|
|
614
|
+
return h;
|
|
354
615
|
};
|
|
355
616
|
}
|
|
356
617
|
const i = r && o(r);
|
|
357
|
-
let
|
|
358
|
-
return
|
|
618
|
+
let c = performance.getEntries && performance.getEntries();
|
|
619
|
+
return c || (c = []), c.push({
|
|
359
620
|
name: location.href
|
|
360
621
|
}), Promise.all(
|
|
361
|
-
|
|
362
|
-
(
|
|
363
|
-
if (
|
|
622
|
+
c.map(
|
|
623
|
+
(l) => {
|
|
624
|
+
if (l.entryType != null && l.entryType !== "resource" || i && !i(l.name))
|
|
364
625
|
return null;
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
367
|
-
url:
|
|
368
|
-
error:
|
|
626
|
+
if (l.responseStatus != null)
|
|
627
|
+
return l.responseStatus >= 400 ? Promise.resolve({
|
|
628
|
+
url: l.name,
|
|
629
|
+
error: l.responseStatus
|
|
369
630
|
}) : null;
|
|
370
631
|
if (navigator.userAgent.indexOf("Chrome") === -1)
|
|
371
632
|
return null;
|
|
372
|
-
const
|
|
373
|
-
let
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
}),
|
|
377
|
-
|
|
633
|
+
const g = typeof AbortController < "u" ? new AbortController() : null, d = new URL(l.name).origin === location.origin, h = d ? a.downloadInternal : a.downloadExternal;
|
|
634
|
+
let x;
|
|
635
|
+
const f = new Promise((u, y) => {
|
|
636
|
+
x = y;
|
|
637
|
+
}), m = h && setTimeout(() => {
|
|
638
|
+
g?.abort(), x(
|
|
378
639
|
new Error("[test][getPageHttpErrors] fetch timeout")
|
|
379
640
|
);
|
|
380
|
-
},
|
|
381
|
-
let
|
|
382
|
-
mode:
|
|
383
|
-
signal:
|
|
384
|
-
cache:
|
|
641
|
+
}, h);
|
|
642
|
+
let p = fetch(l.name, {
|
|
643
|
+
mode: d ? "same-origin" : "no-cors",
|
|
644
|
+
signal: g?.signal,
|
|
645
|
+
cache: d ? "force-cache" : void 0,
|
|
385
646
|
method: "HEAD"
|
|
386
|
-
}).then((
|
|
387
|
-
url:
|
|
388
|
-
error:
|
|
389
|
-
}).catch((
|
|
390
|
-
url:
|
|
391
|
-
error:
|
|
647
|
+
}).then((u) => u.ok ? null : {
|
|
648
|
+
url: l.name,
|
|
649
|
+
error: u.status + " " + u.statusText
|
|
650
|
+
}).catch((u) => ({
|
|
651
|
+
url: l.name,
|
|
652
|
+
error: u.message
|
|
392
653
|
}));
|
|
393
|
-
|
|
394
|
-
function
|
|
395
|
-
|
|
654
|
+
g || (p = Promise.race([p, f]));
|
|
655
|
+
function k() {
|
|
656
|
+
m && clearTimeout(m);
|
|
396
657
|
}
|
|
397
|
-
return
|
|
398
|
-
(
|
|
399
|
-
(
|
|
400
|
-
throw
|
|
658
|
+
return p.then(
|
|
659
|
+
(u) => (k(), u),
|
|
660
|
+
(u) => {
|
|
661
|
+
throw k(), u;
|
|
401
662
|
}
|
|
402
663
|
);
|
|
403
664
|
}
|
|
404
665
|
)
|
|
405
|
-
).then((
|
|
406
|
-
const
|
|
407
|
-
(
|
|
408
|
-
url: new URL(
|
|
409
|
-
error:
|
|
666
|
+
).then((l) => {
|
|
667
|
+
const g = l.filter((d) => d).map(
|
|
668
|
+
(d) => ({
|
|
669
|
+
url: new URL(d.url),
|
|
670
|
+
error: d.error
|
|
410
671
|
})
|
|
411
672
|
);
|
|
412
|
-
return
|
|
673
|
+
return g.length > 0 ? g : null;
|
|
413
674
|
});
|
|
414
675
|
},
|
|
415
676
|
{
|
|
@@ -420,12 +681,12 @@ async function Dt({
|
|
|
420
681
|
{ timeout: n.total }
|
|
421
682
|
);
|
|
422
683
|
}
|
|
423
|
-
async function
|
|
684
|
+
async function Vt({
|
|
424
685
|
page: t,
|
|
425
686
|
urlFilters: e,
|
|
426
687
|
errorFilter: n
|
|
427
688
|
}) {
|
|
428
|
-
let s = await
|
|
689
|
+
let s = await Ht({
|
|
429
690
|
page: t,
|
|
430
691
|
urlFilters: e
|
|
431
692
|
});
|
|
@@ -434,12 +695,12 @@ async function Ft({
|
|
|
434
695
|
`[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(s, null, 2)}`
|
|
435
696
|
);
|
|
436
697
|
}
|
|
437
|
-
async function
|
|
698
|
+
async function qt({
|
|
438
699
|
page: t,
|
|
439
700
|
filter: e,
|
|
440
701
|
onError: n
|
|
441
702
|
}) {
|
|
442
|
-
const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a =
|
|
703
|
+
const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = kt();
|
|
443
704
|
function o(i) {
|
|
444
705
|
try {
|
|
445
706
|
if (e && !e({
|
|
@@ -447,73 +708,73 @@ async function It({
|
|
|
447
708
|
error: i
|
|
448
709
|
}))
|
|
449
710
|
return;
|
|
450
|
-
} catch (
|
|
451
|
-
i = String(
|
|
711
|
+
} catch (c) {
|
|
712
|
+
i = String(c);
|
|
452
713
|
}
|
|
453
714
|
try {
|
|
454
715
|
console.error(
|
|
455
716
|
`[test][subscribeJsErrors] BROWSER JS ERROR (${r}): ${i}`
|
|
456
717
|
);
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
} catch (
|
|
460
|
-
console.error("[test][subscribeJsErrors] error",
|
|
718
|
+
const c = new Error(i);
|
|
719
|
+
c.stack = a, n(c);
|
|
720
|
+
} catch (c) {
|
|
721
|
+
console.error("[test][subscribeJsErrors] error", c);
|
|
461
722
|
}
|
|
462
723
|
}
|
|
463
724
|
await t.exposeFunction(s, o), await t.addInitScript((i) => {
|
|
464
|
-
function
|
|
465
|
-
if (Array.isArray(
|
|
466
|
-
return
|
|
725
|
+
function c(d) {
|
|
726
|
+
if (Array.isArray(d))
|
|
727
|
+
return d.map(c).join(`\r
|
|
467
728
|
\r
|
|
468
729
|
`);
|
|
469
|
-
if (
|
|
470
|
-
return
|
|
471
|
-
if (typeof
|
|
472
|
-
const
|
|
730
|
+
if (d instanceof Error)
|
|
731
|
+
return d.stack || d.toString();
|
|
732
|
+
if (typeof d == "object" && d != null) {
|
|
733
|
+
const h = /* @__PURE__ */ new Set();
|
|
473
734
|
return JSON.stringify(
|
|
474
|
-
|
|
475
|
-
(
|
|
476
|
-
if (typeof
|
|
477
|
-
if (
|
|
735
|
+
d,
|
|
736
|
+
(x, f) => {
|
|
737
|
+
if (typeof f == "object" && f != null) {
|
|
738
|
+
if (h.has(f))
|
|
478
739
|
return "[Circular]";
|
|
479
|
-
|
|
740
|
+
h.add(f);
|
|
480
741
|
}
|
|
481
|
-
return
|
|
742
|
+
return f;
|
|
482
743
|
},
|
|
483
744
|
2
|
|
484
745
|
);
|
|
485
746
|
}
|
|
486
|
-
return String(
|
|
747
|
+
return String(d);
|
|
487
748
|
}
|
|
488
|
-
function
|
|
489
|
-
window[i](
|
|
749
|
+
function l(d) {
|
|
750
|
+
window[i](d);
|
|
490
751
|
}
|
|
491
|
-
const
|
|
752
|
+
const g = {
|
|
492
753
|
warn: console.warn.bind(console),
|
|
493
754
|
error: console.error.bind(console)
|
|
494
755
|
};
|
|
495
|
-
console.warn = function(...
|
|
496
|
-
return
|
|
497
|
-
}, console.error = function(...
|
|
498
|
-
return
|
|
756
|
+
console.warn = function(...h) {
|
|
757
|
+
return l("console.warn: " + c(h)), g.warn.apply(this, h);
|
|
758
|
+
}, console.error = function(...h) {
|
|
759
|
+
return l("console.error: " + c(h)), g.error.apply(this, h);
|
|
499
760
|
}, window.addEventListener(
|
|
500
761
|
"error",
|
|
501
|
-
function(
|
|
502
|
-
|
|
762
|
+
function(d) {
|
|
763
|
+
l("window error: " + (d.message || JSON.stringify(d)));
|
|
503
764
|
},
|
|
504
765
|
!0
|
|
505
766
|
), window.addEventListener(
|
|
506
767
|
"unhandledrejection",
|
|
507
|
-
function(
|
|
508
|
-
|
|
768
|
+
function(d) {
|
|
769
|
+
l("window unhandledrejection: " + c(d.reason));
|
|
509
770
|
},
|
|
510
771
|
!0
|
|
511
772
|
);
|
|
512
773
|
}, s);
|
|
513
774
|
}
|
|
514
|
-
async function
|
|
775
|
+
async function mt() {
|
|
515
776
|
try {
|
|
516
|
-
process.platform === "win32" && await
|
|
777
|
+
process.platform === "win32" && await Gt(
|
|
517
778
|
`wmic process where "commandline like '%ms-playwright%' and not commandline like '%wmic.exe%' and priority != 4" CALL setpriority "idle"`
|
|
518
779
|
);
|
|
519
780
|
} catch (t) {
|
|
@@ -523,38 +784,38 @@ async function Rt() {
|
|
|
523
784
|
console.warn("[test][setPlaywrightPriorityLow] error: " + e);
|
|
524
785
|
}
|
|
525
786
|
}
|
|
526
|
-
let H = null,
|
|
527
|
-
function
|
|
528
|
-
|
|
787
|
+
let H = null, Z = null;
|
|
788
|
+
function Te(t) {
|
|
789
|
+
Z = t;
|
|
529
790
|
}
|
|
530
|
-
function
|
|
791
|
+
function Yt() {
|
|
531
792
|
if (H)
|
|
532
793
|
return;
|
|
533
|
-
const t =
|
|
534
|
-
if (
|
|
535
|
-
return console.log(`[test][delayOnError] Delay on error: ${t} ms`), H =
|
|
794
|
+
const t = Z || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
|
|
795
|
+
if (Z)
|
|
796
|
+
return console.log(`[test][delayOnError] Delay on error: ${t} ms`), H = ft(t), H;
|
|
536
797
|
}
|
|
537
|
-
function
|
|
798
|
+
function _e() {
|
|
538
799
|
return H;
|
|
539
800
|
}
|
|
540
|
-
async function
|
|
541
|
-
const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new
|
|
801
|
+
async function Qt(t) {
|
|
802
|
+
const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new ht(), r = rt(
|
|
542
803
|
s.signal,
|
|
543
804
|
t.abortSignal
|
|
544
805
|
), a = (i) => {
|
|
545
|
-
let
|
|
806
|
+
let c = `Error in (${n}) ${e.url()}
|
|
546
807
|
`;
|
|
547
|
-
t.pageFilePath && (
|
|
548
|
-
`), i.stack =
|
|
808
|
+
t.pageFilePath && (c += ` at _ (${I.resolve(t.pageFilePath)}:0:0)
|
|
809
|
+
`), i.stack = c + (i.stack || i.message), i.message = c + i.message, console.error("[test][initPage] error", i), s.abort(i);
|
|
549
810
|
};
|
|
550
|
-
return await
|
|
811
|
+
return await qt({
|
|
551
812
|
page: e,
|
|
552
813
|
filter: t.filters?.js?.filter,
|
|
553
814
|
onError: a
|
|
554
815
|
}), {
|
|
555
816
|
abortSignal: r,
|
|
556
817
|
checkErrors: async () => {
|
|
557
|
-
await
|
|
818
|
+
await Vt({
|
|
558
819
|
page: e,
|
|
559
820
|
urlFilters: t.filters?.http?.urlFilters,
|
|
560
821
|
errorFilter: t.filters?.http?.errorFilter
|
|
@@ -562,7 +823,7 @@ async function Nt(t) {
|
|
|
562
823
|
}
|
|
563
824
|
};
|
|
564
825
|
}
|
|
565
|
-
async function
|
|
826
|
+
async function Xt({
|
|
566
827
|
page: t,
|
|
567
828
|
abortSignal: e,
|
|
568
829
|
filters: n,
|
|
@@ -571,7 +832,7 @@ async function ae({
|
|
|
571
832
|
}) {
|
|
572
833
|
const a = t.context().browser()?.browserType().name();
|
|
573
834
|
try {
|
|
574
|
-
const { abortSignal: o, checkErrors: i } = await
|
|
835
|
+
const { abortSignal: o, checkErrors: i } = await Qt({
|
|
575
836
|
page: t,
|
|
576
837
|
abortSignal: e,
|
|
577
838
|
filters: n,
|
|
@@ -585,11 +846,11 @@ async function ae({
|
|
|
585
846
|
} catch (o) {
|
|
586
847
|
let i = `Error in (${a}) ${t.url()}
|
|
587
848
|
`;
|
|
588
|
-
throw r && (i += ` at _ (${
|
|
849
|
+
throw r && (i += ` at _ (${I.resolve(r)}:0:0)
|
|
589
850
|
`), o.stack = i + (o.stack || o.message), o.message = i + o.message, o;
|
|
590
851
|
}
|
|
591
852
|
}
|
|
592
|
-
function
|
|
853
|
+
function ke({
|
|
593
854
|
browserType: t,
|
|
594
855
|
options: e
|
|
595
856
|
}) {
|
|
@@ -602,43 +863,199 @@ function oe({
|
|
|
602
863
|
}
|
|
603
864
|
};
|
|
604
865
|
}
|
|
605
|
-
function
|
|
866
|
+
function Zt({
|
|
606
867
|
browser: t,
|
|
607
868
|
options: e
|
|
608
869
|
}) {
|
|
609
870
|
return async function(s) {
|
|
610
871
|
const r = await t.newContext(e ?? void 0);
|
|
611
|
-
await
|
|
872
|
+
await mt();
|
|
612
873
|
try {
|
|
613
874
|
const a = await s(r);
|
|
614
875
|
return await r.close(), a;
|
|
615
876
|
} catch (a) {
|
|
616
|
-
const o =
|
|
877
|
+
const o = Yt?.();
|
|
617
878
|
throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => r.close())) : await r.close(), a;
|
|
618
879
|
}
|
|
619
880
|
};
|
|
620
881
|
}
|
|
621
|
-
async function
|
|
622
|
-
const n =
|
|
623
|
-
|
|
882
|
+
async function Ce(t, e) {
|
|
883
|
+
const n = await t.$$(e);
|
|
884
|
+
for (const s of n)
|
|
885
|
+
await s.click();
|
|
886
|
+
}
|
|
887
|
+
const Q = new ht();
|
|
888
|
+
let te = 0;
|
|
889
|
+
function ee(t) {
|
|
890
|
+
return async function({
|
|
891
|
+
browser: n,
|
|
892
|
+
contextOptions: s,
|
|
893
|
+
name: r,
|
|
894
|
+
url: a,
|
|
895
|
+
pool: o,
|
|
896
|
+
priority: i,
|
|
897
|
+
filters: c,
|
|
898
|
+
...l
|
|
899
|
+
}, g) {
|
|
900
|
+
const d = rt(
|
|
901
|
+
Q.signal,
|
|
902
|
+
g
|
|
903
|
+
);
|
|
904
|
+
try {
|
|
905
|
+
await A({
|
|
906
|
+
pool: o,
|
|
907
|
+
count: 1,
|
|
908
|
+
priority: i,
|
|
909
|
+
abortSignal: d,
|
|
910
|
+
func: async (h, x) => {
|
|
911
|
+
x.throwIfAborted(), await Zt({
|
|
912
|
+
browser: n,
|
|
913
|
+
options: s
|
|
914
|
+
})(async (f) => {
|
|
915
|
+
x.throwIfAborted();
|
|
916
|
+
const m = await f.newPage();
|
|
917
|
+
await mt();
|
|
918
|
+
const p = n.browserType().name(), k = x.subscribe(() => {
|
|
919
|
+
m.isClosed() || (m.close({
|
|
920
|
+
// reason: reason?.message,
|
|
921
|
+
runBeforeUnload: !1
|
|
922
|
+
}), f.close({
|
|
923
|
+
// reason: reason?.message,
|
|
924
|
+
}));
|
|
925
|
+
});
|
|
926
|
+
try {
|
|
927
|
+
console.log(`START ${r} (${p}): ${a}`), await Xt({
|
|
928
|
+
page: m,
|
|
929
|
+
abortSignal: x,
|
|
930
|
+
filters: c,
|
|
931
|
+
func: async ({ page: u, checkErrors: y, abortSignal: E }) => {
|
|
932
|
+
await t({
|
|
933
|
+
page: u,
|
|
934
|
+
url: a,
|
|
935
|
+
checkErrors: y,
|
|
936
|
+
abortSignal: E,
|
|
937
|
+
args: l
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
}), console.log(
|
|
941
|
+
`END [${te++}] ${r} (${p}): ${a}`
|
|
942
|
+
);
|
|
943
|
+
} catch (u) {
|
|
944
|
+
if (x.aborted || u instanceof st) {
|
|
945
|
+
console.log(`ABORTED ${r} (${p}): ${a}`);
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
throw console.log(`ERROR ${r} (${p}): ${a}`), Q.signal.aborted || (console.log("unsubscribe on first error"), k()), Q.abort(), u;
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
} catch (h) {
|
|
954
|
+
if (h instanceof st)
|
|
955
|
+
return;
|
|
956
|
+
throw h;
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
function Pe(t) {
|
|
961
|
+
const e = ee(t);
|
|
962
|
+
return Mt(async (n) => await e(n));
|
|
963
|
+
}
|
|
964
|
+
function De(t, e) {
|
|
965
|
+
const n = e.stableTime, s = e.timeout, r = e.mutation ? {
|
|
966
|
+
childList: !!e.mutation.childList,
|
|
967
|
+
attributes: !!e.mutation.attributes,
|
|
968
|
+
characterData: !!e.mutation.characterData,
|
|
969
|
+
subtree: !!e.mutation.subtree,
|
|
970
|
+
selector: e.mutation.selector ?? null
|
|
971
|
+
} : null, a = e.resource ? {
|
|
972
|
+
resource: !!e.resource.resource,
|
|
973
|
+
navigation: !!e.resource.navigation,
|
|
974
|
+
paint: !!e.resource.paint,
|
|
975
|
+
longTask: !!e.resource.longTask
|
|
976
|
+
} : null;
|
|
977
|
+
return t.evaluate(
|
|
978
|
+
({ stableTime: o, timeout: i, mutation: c, resource: l }) => {
|
|
979
|
+
return new Promise((h, x) => {
|
|
980
|
+
let f = Date.now(), m = null, p = null;
|
|
981
|
+
const k = [];
|
|
982
|
+
function u() {
|
|
983
|
+
f = Date.now();
|
|
984
|
+
}
|
|
985
|
+
function y() {
|
|
986
|
+
m != null && (clearTimeout(m), m = null), p != null && (clearTimeout(p), p = null);
|
|
987
|
+
for (let w = 0, _ = k.length; w < _; w++)
|
|
988
|
+
k[w]();
|
|
989
|
+
}
|
|
990
|
+
function E() {
|
|
991
|
+
const w = o - (Date.now() - f);
|
|
992
|
+
w <= 0 ? (y(), h()) : m = setTimeout(E, w);
|
|
993
|
+
}
|
|
994
|
+
if (c) {
|
|
995
|
+
const w = g(c, u);
|
|
996
|
+
k.push(w);
|
|
997
|
+
}
|
|
998
|
+
if (l) {
|
|
999
|
+
const w = d(l, u);
|
|
1000
|
+
k.push(w);
|
|
1001
|
+
}
|
|
1002
|
+
m = setTimeout(E, o), p = setTimeout(() => {
|
|
1003
|
+
y(), x(
|
|
1004
|
+
new Error(
|
|
1005
|
+
`[waitPageStable] timed out after ${i}ms waiting for page to stabilize`
|
|
1006
|
+
)
|
|
1007
|
+
);
|
|
1008
|
+
}, i);
|
|
1009
|
+
});
|
|
1010
|
+
function g(h, x) {
|
|
1011
|
+
const f = h.selector ? document.querySelector(h.selector) : document.documentElement;
|
|
1012
|
+
if (!f)
|
|
1013
|
+
throw new Error(
|
|
1014
|
+
`[waitPageStable] element not found: ${h.selector}`
|
|
1015
|
+
);
|
|
1016
|
+
const m = new MutationObserver(x);
|
|
1017
|
+
return m.observe(f, {
|
|
1018
|
+
childList: h.childList,
|
|
1019
|
+
attributes: h.attributes,
|
|
1020
|
+
characterData: h.characterData,
|
|
1021
|
+
subtree: h.subtree
|
|
1022
|
+
}), () => {
|
|
1023
|
+
m.disconnect();
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
function d(h, x) {
|
|
1027
|
+
const f = [];
|
|
1028
|
+
h.resource && f.push("resource"), h.navigation && f.push("navigation"), h.paint && f.push("paint"), h.longTask && f.push("longtask");
|
|
1029
|
+
const m = new PerformanceObserver(x);
|
|
1030
|
+
return m.observe({ entryTypes: f }), () => {
|
|
1031
|
+
m.disconnect();
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
{ stableTime: n, timeout: s, mutation: r, resource: a }
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
async function X(t, e) {
|
|
1039
|
+
const n = P.dirname(t);
|
|
1040
|
+
await v.promises.stat(n).catch(() => null) || await v.promises.mkdir(n, { recursive: !0 }), await v.promises.writeFile(t, JSON.stringify(e, null, 4), {
|
|
624
1041
|
encoding: "utf-8"
|
|
625
1042
|
});
|
|
626
1043
|
}
|
|
627
|
-
async function
|
|
628
|
-
if (!await
|
|
1044
|
+
async function re(t) {
|
|
1045
|
+
if (!await v.promises.stat(t).catch(() => null))
|
|
629
1046
|
return null;
|
|
630
|
-
const e = await
|
|
1047
|
+
const e = await v.promises.readFile(t, { encoding: "utf-8" });
|
|
631
1048
|
return JSON.parse(e);
|
|
632
1049
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
1050
|
+
const tt = "-", et = "+";
|
|
1051
|
+
function V(t, e, n) {
|
|
635
1052
|
if (t === e)
|
|
636
1053
|
return null;
|
|
637
1054
|
if (Array.isArray(t)) {
|
|
638
1055
|
if (Array.isArray(e)) {
|
|
639
1056
|
let r = null;
|
|
640
1057
|
for (let a = 0, o = Math.max(e.length, e.length); a < o; a++) {
|
|
641
|
-
const i =
|
|
1058
|
+
const i = V(t[a], e[a], n);
|
|
642
1059
|
i != null && (r || (r = []), r.push(i));
|
|
643
1060
|
}
|
|
644
1061
|
return r != null && n && (r = n(t, e, r)), r;
|
|
@@ -647,159 +1064,159 @@ function G(t, e, n) {
|
|
|
647
1064
|
let r = null;
|
|
648
1065
|
for (const a in t)
|
|
649
1066
|
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
650
|
-
const o =
|
|
1067
|
+
const o = V(t[a], e[a], n);
|
|
651
1068
|
o != null && (r || (r = {}), r[a] = o);
|
|
652
1069
|
}
|
|
653
1070
|
for (const a in e)
|
|
654
1071
|
if (Object.prototype.hasOwnProperty.call(e, a) && !Object.prototype.hasOwnProperty.call(t, a)) {
|
|
655
|
-
const o =
|
|
1072
|
+
const o = V(t[a], e[a], n);
|
|
656
1073
|
o != null && (r || (r = {}), r[a] = o);
|
|
657
1074
|
}
|
|
658
1075
|
return r != null && n && (r = n(t, e, r)), r;
|
|
659
1076
|
}
|
|
660
1077
|
let s = {
|
|
661
|
-
[
|
|
662
|
-
[
|
|
1078
|
+
[tt]: t,
|
|
1079
|
+
[et]: e
|
|
663
1080
|
};
|
|
664
1081
|
return n && (s = n(t, e, s)), s;
|
|
665
1082
|
}
|
|
666
|
-
function
|
|
667
|
-
function e(
|
|
668
|
-
return
|
|
1083
|
+
function lt(t) {
|
|
1084
|
+
function e(u) {
|
|
1085
|
+
return u.sort((y, E) => y[0] > E[0] ? 1 : -1).reduce((y, E) => (y[E[0]] = E[1], y), {});
|
|
669
1086
|
}
|
|
670
|
-
function n(
|
|
671
|
-
return
|
|
1087
|
+
function n(u) {
|
|
1088
|
+
return u.reduce((y, E) => (y[E] = !0, y), {});
|
|
672
1089
|
}
|
|
673
|
-
const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags,
|
|
674
|
-
let
|
|
1090
|
+
const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, c = t.filters && t.filters.excludeClasses, l = t.filters && t.filters.excludeIds, g = t.filters && t.filters.excludeSelectorClasses, d = t.filters && t.filters.excludeSelectorIds;
|
|
1091
|
+
let h;
|
|
675
1092
|
if (t.filters && t.filters.excludeSelectors && t.filters.excludeSelectors.length > 0) {
|
|
676
|
-
const
|
|
1093
|
+
const u = Array.from(
|
|
677
1094
|
document.querySelectorAll(t.filters.excludeSelectors.join(","))
|
|
678
1095
|
);
|
|
679
|
-
|
|
1096
|
+
u.length > 0 && (h = new Set(u));
|
|
680
1097
|
}
|
|
681
|
-
function
|
|
682
|
-
const
|
|
683
|
-
for (let
|
|
684
|
-
const
|
|
685
|
-
if (o && o[
|
|
1098
|
+
function x(u, y, E, w) {
|
|
1099
|
+
const _ = getComputedStyle(u, y), S = [];
|
|
1100
|
+
for (let O = 0, T = _.length; O < T; O++) {
|
|
1101
|
+
const D = _[O];
|
|
1102
|
+
if (o && o[D])
|
|
686
1103
|
continue;
|
|
687
|
-
let
|
|
688
|
-
if (
|
|
689
|
-
for (let
|
|
690
|
-
a[
|
|
691
|
-
(!
|
|
1104
|
+
let b = _[D];
|
|
1105
|
+
if (b && a)
|
|
1106
|
+
for (let M = 0, C = a.length; M < C; M++)
|
|
1107
|
+
a[M].name.test(D) && (b = b.replace(a[M].search, a[M].replace));
|
|
1108
|
+
(!E || E[D] !== b) && (!w || w[D] === b) && S.push([D, b]);
|
|
692
1109
|
}
|
|
693
|
-
return e(
|
|
1110
|
+
return e(S);
|
|
694
1111
|
}
|
|
695
|
-
function
|
|
1112
|
+
function f(u, y, E) {
|
|
696
1113
|
return {
|
|
697
|
-
_:
|
|
698
|
-
|
|
1114
|
+
_: x(
|
|
1115
|
+
u,
|
|
699
1116
|
void 0,
|
|
700
|
-
|
|
701
|
-
|
|
1117
|
+
y && y._,
|
|
1118
|
+
E && E._
|
|
702
1119
|
),
|
|
703
|
-
before:
|
|
704
|
-
|
|
1120
|
+
before: x(
|
|
1121
|
+
u,
|
|
705
1122
|
"before",
|
|
706
|
-
|
|
707
|
-
|
|
1123
|
+
y && y.before,
|
|
1124
|
+
E && E.before
|
|
708
1125
|
),
|
|
709
|
-
after:
|
|
710
|
-
|
|
1126
|
+
after: x(
|
|
1127
|
+
u,
|
|
711
1128
|
"after",
|
|
712
|
-
|
|
713
|
-
|
|
1129
|
+
y && y.after,
|
|
1130
|
+
E && E.after
|
|
714
1131
|
)
|
|
715
1132
|
};
|
|
716
1133
|
}
|
|
717
|
-
function
|
|
718
|
-
for (let
|
|
719
|
-
const
|
|
720
|
-
if (!
|
|
1134
|
+
function m(u, y, E, w, _) {
|
|
1135
|
+
for (let S = 0, O = u.childNodes.length; S < O; S++) {
|
|
1136
|
+
const T = u.childNodes[S];
|
|
1137
|
+
if (!T)
|
|
721
1138
|
throw new Error(
|
|
722
|
-
`child is null; index=${
|
|
1139
|
+
`child is null; index=${S}; ${w}, ${u.className}\r
|
|
723
1140
|
You should wait js executions before test`
|
|
724
1141
|
);
|
|
725
|
-
|
|
726
|
-
|
|
1142
|
+
T instanceof Element && p(
|
|
1143
|
+
T,
|
|
1144
|
+
y,
|
|
727
1145
|
E,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
O
|
|
1146
|
+
w,
|
|
1147
|
+
_
|
|
731
1148
|
);
|
|
732
1149
|
}
|
|
733
1150
|
}
|
|
734
|
-
function
|
|
735
|
-
const
|
|
736
|
-
if (
|
|
1151
|
+
function p(u, y, E, w, _) {
|
|
1152
|
+
const S = _ && _[y.length];
|
|
1153
|
+
if (_ && !S || h && h.has(u))
|
|
737
1154
|
return;
|
|
738
|
-
let
|
|
739
|
-
if (
|
|
740
|
-
for (let
|
|
741
|
-
|
|
742
|
-
if (
|
|
1155
|
+
let O = u.tagName && u.tagName.toLowerCase();
|
|
1156
|
+
if (O === "head" && (E = !1), i)
|
|
1157
|
+
for (let j = 0, B = i.length; j < B; j++)
|
|
1158
|
+
O = O.replace(i[j].search, i[j].replace);
|
|
1159
|
+
if (S && S.tag !== O)
|
|
743
1160
|
return;
|
|
744
|
-
const
|
|
745
|
-
for (let
|
|
746
|
-
const
|
|
747
|
-
let
|
|
748
|
-
if (
|
|
1161
|
+
const T = [];
|
|
1162
|
+
for (let j = 0, B = u.attributes.length; j < B; j++) {
|
|
1163
|
+
const W = u.attributes.item(j);
|
|
1164
|
+
let z = W.name, K = W.value;
|
|
1165
|
+
if (z = z.toLowerCase(), z !== "class" && !(s && s[z])) {
|
|
749
1166
|
if (r)
|
|
750
|
-
for (let
|
|
751
|
-
r[
|
|
752
|
-
(!
|
|
1167
|
+
for (let U = 0, Et = r.length; U < Et; U++)
|
|
1168
|
+
r[U].name.test(z) && (K = K.replace(r[U].search, r[U].replace));
|
|
1169
|
+
(!S || S.attrs && S.attrs[z] === K) && T.push([z, K]);
|
|
753
1170
|
}
|
|
754
1171
|
}
|
|
755
|
-
const
|
|
756
|
-
for (let
|
|
757
|
-
const
|
|
758
|
-
(!
|
|
1172
|
+
const D = [], b = [];
|
|
1173
|
+
for (let j = 0, B = u.classList.length; j < B; j++) {
|
|
1174
|
+
const W = u.classList.item(j);
|
|
1175
|
+
(!c || !c.test(W)) && D.push(W), (!g || !g.test(W)) && b.push(W);
|
|
759
1176
|
}
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
tag:
|
|
764
|
-
selector:
|
|
765
|
-
classes:
|
|
766
|
-
attrs:
|
|
767
|
-
style:
|
|
1177
|
+
const M = E ? f(u, t.defaultStyle, S && S.style) : null, C = u.childElementCount ? [] : null;
|
|
1178
|
+
u.id && (!l || !l.test(u.id)) && u.id;
|
|
1179
|
+
const L = u.id && (!d || !d.test(u.id)) ? u.id : "", N = (O || "") + (L ? "#" + L : "") + (b.length > 0 ? "." + b.join(".") : ""), nt = N ? w ? w + " > " + N : N : w, gt = {
|
|
1180
|
+
tag: O,
|
|
1181
|
+
selector: nt,
|
|
1182
|
+
classes: D,
|
|
1183
|
+
attrs: T.length > 0 ? e(T) : null,
|
|
1184
|
+
style: M,
|
|
768
1185
|
childs: C
|
|
769
1186
|
};
|
|
770
|
-
|
|
771
|
-
|
|
1187
|
+
y.push(gt), C && m(
|
|
1188
|
+
u,
|
|
772
1189
|
C,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
1190
|
+
E,
|
|
1191
|
+
nt,
|
|
1192
|
+
S && S.childs
|
|
776
1193
|
);
|
|
777
1194
|
}
|
|
778
|
-
const
|
|
779
|
-
return
|
|
1195
|
+
const k = [];
|
|
1196
|
+
return p(
|
|
780
1197
|
document.documentElement,
|
|
781
|
-
|
|
1198
|
+
k,
|
|
782
1199
|
!0,
|
|
783
1200
|
"",
|
|
784
1201
|
t.shouldEqualResult && [t.shouldEqualResult]
|
|
785
|
-
),
|
|
1202
|
+
), k[0];
|
|
786
1203
|
}
|
|
787
|
-
async function
|
|
1204
|
+
async function pt(t) {
|
|
788
1205
|
const e = await t.context().newCDPSession(t);
|
|
789
1206
|
return await e.send("DOM.enable"), await e.send("CSS.enable"), e;
|
|
790
1207
|
}
|
|
791
|
-
async function
|
|
1208
|
+
async function wt(t) {
|
|
792
1209
|
await t.send("CSS.disable"), await t.send("DOM.disable"), await t.detach();
|
|
793
1210
|
}
|
|
794
|
-
async function
|
|
795
|
-
const n = await
|
|
1211
|
+
async function ve(t, e) {
|
|
1212
|
+
const n = await pt(t);
|
|
796
1213
|
try {
|
|
797
1214
|
return await e(n);
|
|
798
1215
|
} finally {
|
|
799
|
-
await
|
|
1216
|
+
await wt(n);
|
|
800
1217
|
}
|
|
801
1218
|
}
|
|
802
|
-
async function
|
|
1219
|
+
async function ne(t, e) {
|
|
803
1220
|
const { nodes: n } = await t.send("DOM.getFlattenedDocument", {
|
|
804
1221
|
depth: -1,
|
|
805
1222
|
pierce: !0
|
|
@@ -810,7 +1227,7 @@ async function $t(t, e) {
|
|
|
810
1227
|
forcedPseudoClasses: e
|
|
811
1228
|
});
|
|
812
1229
|
}
|
|
813
|
-
function
|
|
1230
|
+
function q(t, e) {
|
|
814
1231
|
if (!t || !e)
|
|
815
1232
|
return e || null;
|
|
816
1233
|
let n = null;
|
|
@@ -820,17 +1237,17 @@ function K(t, e) {
|
|
|
820
1237
|
Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (n || (n = {}), n[s] = "");
|
|
821
1238
|
return n;
|
|
822
1239
|
}
|
|
823
|
-
function
|
|
1240
|
+
function se(t, e) {
|
|
824
1241
|
if (!t || !e)
|
|
825
1242
|
return e || null;
|
|
826
|
-
const n =
|
|
1243
|
+
const n = q(t._, e._), s = q(t.before, e.before), r = q(t.after, e.after);
|
|
827
1244
|
return !n && !s && !r ? null : {
|
|
828
1245
|
_: n || {},
|
|
829
1246
|
before: s || {},
|
|
830
1247
|
after: r || {}
|
|
831
1248
|
};
|
|
832
1249
|
}
|
|
833
|
-
function
|
|
1250
|
+
function ae(t, e) {
|
|
834
1251
|
if (!t || !e)
|
|
835
1252
|
return e || null;
|
|
836
1253
|
if (t.length !== e.length)
|
|
@@ -840,20 +1257,20 @@ function zt(t, e) {
|
|
|
840
1257
|
return e;
|
|
841
1258
|
return null;
|
|
842
1259
|
}
|
|
843
|
-
function
|
|
844
|
-
const n =
|
|
1260
|
+
function yt(t, e) {
|
|
1261
|
+
const n = ae(t.classes, e.classes), s = q(t.attrs, e.attrs), r = se(t.style, e.style);
|
|
845
1262
|
let a = null;
|
|
846
1263
|
if (t.childs && e.childs) {
|
|
847
1264
|
const o = Math.min(t.childs.length, e.childs.length);
|
|
848
1265
|
for (let i = 0; i < o; i++) {
|
|
849
|
-
const
|
|
850
|
-
if (
|
|
1266
|
+
const c = yt(t.childs[i], e.childs[i]);
|
|
1267
|
+
if (c) {
|
|
851
1268
|
if (!a) {
|
|
852
1269
|
a = [];
|
|
853
|
-
for (let
|
|
1270
|
+
for (let l = 0; l < o; l++)
|
|
854
1271
|
a.push({});
|
|
855
1272
|
}
|
|
856
|
-
a[i] =
|
|
1273
|
+
a[i] = c;
|
|
857
1274
|
}
|
|
858
1275
|
}
|
|
859
1276
|
}
|
|
@@ -866,23 +1283,23 @@ function ut(t, e) {
|
|
|
866
1283
|
childs: a
|
|
867
1284
|
};
|
|
868
1285
|
}
|
|
869
|
-
const
|
|
1286
|
+
const Y = (t, e, n, s) => {
|
|
870
1287
|
const r = s(t, e, n, s);
|
|
871
1288
|
if (r == null)
|
|
872
1289
|
return r;
|
|
873
1290
|
if (Array.isArray(r))
|
|
874
1291
|
return r.map(
|
|
875
|
-
(a, o, i) =>
|
|
1292
|
+
(a, o, i) => Y(a, o, i, s)
|
|
876
1293
|
);
|
|
877
1294
|
if (typeof r == "object") {
|
|
878
1295
|
const a = {};
|
|
879
1296
|
for (const o in r)
|
|
880
|
-
Object.prototype.hasOwnProperty.call(r, o) && (a[o] =
|
|
1297
|
+
Object.prototype.hasOwnProperty.call(r, o) && (a[o] = Y(r[o], o, r, s));
|
|
881
1298
|
return a;
|
|
882
1299
|
}
|
|
883
1300
|
return r;
|
|
884
1301
|
};
|
|
885
|
-
function
|
|
1302
|
+
function bt(t, e) {
|
|
886
1303
|
if (t.attrs && e.excludeAttrs) {
|
|
887
1304
|
for (let n = 0, s = e.excludeAttrs.length; n < s; n++)
|
|
888
1305
|
delete t.attrs[e.excludeAttrs[n]];
|
|
@@ -899,9 +1316,9 @@ function ft(t, e) {
|
|
|
899
1316
|
}
|
|
900
1317
|
if (t.childs)
|
|
901
1318
|
for (let n = 0, s = t.childs.length; n < s; n++)
|
|
902
|
-
|
|
1319
|
+
bt(t.childs[n], e);
|
|
903
1320
|
}
|
|
904
|
-
function
|
|
1321
|
+
function oe(t, e) {
|
|
905
1322
|
for (const n in t) {
|
|
906
1323
|
if (!Object.prototype.hasOwnProperty.call(t, n)) continue;
|
|
907
1324
|
const s = t[n];
|
|
@@ -909,11 +1326,11 @@ function Jt(t, e) {
|
|
|
909
1326
|
if (!Object.prototype.hasOwnProperty.call(s, r)) continue;
|
|
910
1327
|
const a = s[r];
|
|
911
1328
|
for (const o in a)
|
|
912
|
-
Object.prototype.hasOwnProperty.call(a, o) &&
|
|
1329
|
+
Object.prototype.hasOwnProperty.call(a, o) && bt(a[o], e);
|
|
913
1330
|
}
|
|
914
1331
|
}
|
|
915
1332
|
}
|
|
916
|
-
function
|
|
1333
|
+
function Ae({
|
|
917
1334
|
actualResultFile: t,
|
|
918
1335
|
expectedResultFile: e,
|
|
919
1336
|
diffResultFile: n,
|
|
@@ -921,269 +1338,309 @@ function le({
|
|
|
921
1338
|
transform: r,
|
|
922
1339
|
pseudoStates: a
|
|
923
1340
|
}) {
|
|
924
|
-
let o, i,
|
|
1341
|
+
let o, i, c, l = {};
|
|
925
1342
|
return {
|
|
926
|
-
async init(
|
|
927
|
-
o = await
|
|
1343
|
+
async init(g) {
|
|
1344
|
+
o = await re(e), r && (o = Y(o, null, null, r)), o && s && oe(o, s), await g.goto("about:blank"), i = await g.evaluate(lt, { filters: s }), c = i.style;
|
|
928
1345
|
},
|
|
929
1346
|
async handlePage({
|
|
930
|
-
page:
|
|
931
|
-
testId:
|
|
932
|
-
url:
|
|
933
|
-
stateId:
|
|
934
|
-
_filters:
|
|
1347
|
+
page: g,
|
|
1348
|
+
testId: d,
|
|
1349
|
+
url: h,
|
|
1350
|
+
stateId: x,
|
|
1351
|
+
_filters: f
|
|
935
1352
|
}) {
|
|
936
|
-
let
|
|
937
|
-
|
|
938
|
-
let
|
|
939
|
-
|
|
1353
|
+
let m = l[d];
|
|
1354
|
+
m || (m = {}, l[d] = m);
|
|
1355
|
+
let p = m[h.href];
|
|
1356
|
+
p || (p = {}, m[h.href] = p), await g.addStyleTag({
|
|
940
1357
|
content: "*, *::before, *::after { animation-name: none!important; transition-duration: 0s !important; }"
|
|
941
1358
|
});
|
|
942
|
-
const
|
|
943
|
-
let
|
|
1359
|
+
const k = a ?? [{ states: [] }];
|
|
1360
|
+
let u = null, y;
|
|
944
1361
|
try {
|
|
945
|
-
for (let
|
|
946
|
-
const
|
|
947
|
-
let
|
|
948
|
-
if (
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
await
|
|
1362
|
+
for (let E = 0; E < k.length; E++) {
|
|
1363
|
+
const w = k[E], _ = w.states.length > 0 ? x + ":" + w.states.join(":") : x;
|
|
1364
|
+
let S = null;
|
|
1365
|
+
if (w.states.length > 0) {
|
|
1366
|
+
u || (u = await pt(g));
|
|
1367
|
+
const b = performance.now();
|
|
1368
|
+
await ne(u, w.states), S = performance.now() - b;
|
|
952
1369
|
}
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
filters:
|
|
956
|
-
defaultStyle:
|
|
957
|
-
shouldEqualResult:
|
|
958
|
-
}),
|
|
1370
|
+
w.delay && await ft(w.delay);
|
|
1371
|
+
const O = performance.now(), T = await g.evaluate(lt, {
|
|
1372
|
+
filters: f || s,
|
|
1373
|
+
defaultStyle: c,
|
|
1374
|
+
shouldEqualResult: p[_]
|
|
1375
|
+
}), D = performance.now() - O;
|
|
959
1376
|
if (console.log(
|
|
960
|
-
`SNAPSHOT ${
|
|
961
|
-
), !
|
|
962
|
-
|
|
1377
|
+
`SNAPSHOT ${_}:` + (S != null ? ` forcePseudoClasses ${S.toFixed(0)}ms,` : "") + ` getAllElements ${D.toFixed(0)}ms`
|
|
1378
|
+
), !y)
|
|
1379
|
+
y = T, p[_] = T;
|
|
963
1380
|
else {
|
|
964
|
-
const
|
|
965
|
-
|
|
1381
|
+
const b = yt(y, T);
|
|
1382
|
+
b && (p[_] = b);
|
|
966
1383
|
}
|
|
967
1384
|
}
|
|
968
1385
|
} finally {
|
|
969
|
-
|
|
1386
|
+
u && await wt(u);
|
|
970
1387
|
}
|
|
971
1388
|
},
|
|
972
|
-
async end({ checkExistUrlsOnly:
|
|
973
|
-
if (
|
|
974
|
-
let
|
|
975
|
-
if (!
|
|
976
|
-
|
|
1389
|
+
async end({ checkExistUrlsOnly: g }) {
|
|
1390
|
+
if (l = Ct(l), r && (l = Y(l, null, null, r)), o) {
|
|
1391
|
+
let d, h;
|
|
1392
|
+
if (!g)
|
|
1393
|
+
d = o, h = l;
|
|
977
1394
|
else {
|
|
978
|
-
|
|
979
|
-
for (const
|
|
980
|
-
if (Object.prototype.hasOwnProperty.call(o,
|
|
981
|
-
f
|
|
982
|
-
for (const
|
|
983
|
-
Object.prototype.hasOwnProperty.call(o[
|
|
1395
|
+
d = {}, h = {};
|
|
1396
|
+
for (const f in o)
|
|
1397
|
+
if (Object.prototype.hasOwnProperty.call(o, f) && Object.prototype.hasOwnProperty.call(l, f)) {
|
|
1398
|
+
d[f] = {}, h[f] = {};
|
|
1399
|
+
for (const m in o[f])
|
|
1400
|
+
Object.prototype.hasOwnProperty.call(o[f], m) && Object.prototype.hasOwnProperty.call(l[f], m) && (d[f][m] = o[f][m], h[f][m] = l[f][m]);
|
|
984
1401
|
}
|
|
985
1402
|
}
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
(
|
|
1403
|
+
const x = V(
|
|
1404
|
+
d,
|
|
1405
|
+
h,
|
|
1406
|
+
(f, m, p) => p.selector && (delete p.selector, Object.keys(p).length === 0) ? null : p.childs && p.childs.length === 1 ? p.childs[0] : (m && m.selector ? p[et] ? p[et] = m.selector : p = { selector: m.selector, ...p } : f && f.selector && (p[tt] ? p[tt] = f.selector : p = { selector: f.selector, ...p }), p)
|
|
990
1407
|
);
|
|
991
|
-
if (n && await
|
|
992
|
-
throw await
|
|
993
|
-
"Pages elements changes: " + JSON.stringify(
|
|
1408
|
+
if (n && await X(n, x || {}), x)
|
|
1409
|
+
throw await X(t, l), console.error(
|
|
1410
|
+
"Pages elements changes: " + JSON.stringify(x, null, 4).substring(0, 5e3)
|
|
994
1411
|
), new Error("Pages elements changes detected");
|
|
995
|
-
await
|
|
1412
|
+
await v.promises.stat(t).catch(() => null) && await v.promises.unlink(t);
|
|
996
1413
|
} else
|
|
997
|
-
await
|
|
998
|
-
return
|
|
1414
|
+
await X(e, l);
|
|
1415
|
+
return l;
|
|
999
1416
|
}
|
|
1000
1417
|
};
|
|
1001
1418
|
}
|
|
1002
1419
|
export {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1420
|
+
Le as Cache,
|
|
1421
|
+
Fe as CacheStats,
|
|
1422
|
+
Ie as CheckError,
|
|
1423
|
+
Re as ConsoleMessageLevel,
|
|
1424
|
+
et as DIFF_NEW,
|
|
1425
|
+
tt as DIFF_OLD,
|
|
1426
|
+
Kt as FileStatStorage,
|
|
1427
|
+
it as FileStorage,
|
|
1428
|
+
Ne as Lazy,
|
|
1429
|
+
$e as LazyWithId,
|
|
1430
|
+
We as Locker,
|
|
1431
|
+
St as LockerWithId,
|
|
1432
|
+
ze as LogLevel,
|
|
1433
|
+
Be as MAX_REPORT_ITEMS_DEFAULT,
|
|
1434
|
+
Ue as MatchInternalError,
|
|
1435
|
+
Je as Matcher,
|
|
1436
|
+
Ke as MatcherAny,
|
|
1437
|
+
Ge as MatcherArray,
|
|
1438
|
+
He as MatcherArrayItem,
|
|
1439
|
+
Ve as MatcherConvert,
|
|
1440
|
+
qe as MatcherCustom,
|
|
1441
|
+
Ye as MatcherFew,
|
|
1442
|
+
Qe as MatcherIn,
|
|
1443
|
+
Xe as MatcherInstanceOf,
|
|
1444
|
+
Ze as MatcherIs,
|
|
1445
|
+
tr as MatcherNever,
|
|
1446
|
+
er as MatcherNot,
|
|
1447
|
+
rr as MatcherNumber,
|
|
1448
|
+
nr as MatcherObject,
|
|
1449
|
+
sr as MatcherObjectEntry,
|
|
1450
|
+
ar as MatcherRef,
|
|
1451
|
+
or as MatcherString,
|
|
1452
|
+
ir as MemoryStorage,
|
|
1453
|
+
cr as Random,
|
|
1454
|
+
lr as Subject,
|
|
1455
|
+
ur as SubjectWithId,
|
|
1456
|
+
fr as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
|
|
1457
|
+
hr as alertConsole,
|
|
1458
|
+
dr as alertReplace,
|
|
1459
|
+
mr as argsToString,
|
|
1460
|
+
pr as check,
|
|
1461
|
+
wr as checkFunc,
|
|
1462
|
+
Vt as checkPageHttpErrors,
|
|
1463
|
+
Ce as clickAll,
|
|
1464
|
+
yr as compressGzip,
|
|
1465
|
+
br as consoleIntercept,
|
|
1466
|
+
gr as consoleMessageToString,
|
|
1467
|
+
Er as consoleReplace,
|
|
1468
|
+
Sr as convertTimeZone,
|
|
1469
|
+
xt as converterErrorToBuffer,
|
|
1470
|
+
xr as converterJson,
|
|
1471
|
+
Ot as converterJsonBuffer,
|
|
1472
|
+
Or as converterStringToBuffer,
|
|
1473
|
+
pt as createCDPSession,
|
|
1474
|
+
ct as createConverterSubPath,
|
|
1475
|
+
xe as createFileCacheOptions,
|
|
1476
|
+
Ee as createMatchPath,
|
|
1477
|
+
Tr as createMatchResult,
|
|
1478
|
+
_r as createMatchResultBoolean,
|
|
1479
|
+
kr as createMatchResultError,
|
|
1480
|
+
Ae as createPagesElementsChangesTest,
|
|
1481
|
+
Cr as createTaskDelayRetry,
|
|
1482
|
+
ee as createTestE2e,
|
|
1483
|
+
Pe as createTestE2eVariants,
|
|
1484
|
+
Pr as createUniquePseudoRandom,
|
|
1485
|
+
Dr as dateNowUnique,
|
|
1486
|
+
vr as decompressGzip,
|
|
1487
|
+
Ar as deepCloneJsonLike,
|
|
1488
|
+
Mr as deepEqualJsonLike,
|
|
1489
|
+
jr as deepEqualJsonLikeMap,
|
|
1490
|
+
Yt as delayOnErrorCall,
|
|
1491
|
+
Te as delayOnErrorSet,
|
|
1492
|
+
_e as delayOnErrorWait,
|
|
1493
|
+
wt as destroyCDPSession,
|
|
1494
|
+
Lr as equalArray,
|
|
1495
|
+
Fr as escapeHtml,
|
|
1496
|
+
Ir as escapeRegExp,
|
|
1497
|
+
Gt as exec,
|
|
1498
|
+
Rr as expectedToString,
|
|
1499
|
+
be as fileLock,
|
|
1500
|
+
Nr as filterMatchResult,
|
|
1501
|
+
$r as filterMatchResultNested,
|
|
1502
|
+
Wr as fixStackTrace,
|
|
1503
|
+
ne as forcePseudoClasses,
|
|
1504
|
+
zr as formatAny,
|
|
1505
|
+
Br as formatDate,
|
|
1506
|
+
Ur as formatDateFileName,
|
|
1507
|
+
Lt as generateTempFileName,
|
|
1508
|
+
lt as getAllElements,
|
|
1509
|
+
Jr as getConsoleMessages,
|
|
1510
|
+
Kr as getDateInet,
|
|
1511
|
+
It as getDrive,
|
|
1512
|
+
yt as getElementsStyleDiff,
|
|
1513
|
+
Rt as getFileId,
|
|
1514
|
+
Tt as getHashKey,
|
|
1515
|
+
Gr as getJsonKey,
|
|
1516
|
+
Ct as getNormalizedObject,
|
|
1517
|
+
Hr as getObjectId,
|
|
1518
|
+
V as getObjectsDiff,
|
|
1519
|
+
Ht as getPageHttpErrors,
|
|
1520
|
+
Vr as getRandomFunc,
|
|
1521
|
+
qr as getRandomSeed,
|
|
1522
|
+
kt as getStackTrace,
|
|
1523
|
+
Wt as globGitIgnoreToPicomatch,
|
|
1524
|
+
zt as globToRelative,
|
|
1525
|
+
Qt as initPage,
|
|
1526
|
+
Yr as isGzipCompressed,
|
|
1527
|
+
Qr as isMatcher,
|
|
1528
|
+
Xr as isObservable,
|
|
1529
|
+
Se as loadGlobs,
|
|
1530
|
+
Bt as loadGlobsFromFile,
|
|
1531
|
+
re as loadJson,
|
|
1532
|
+
Zr as mapObjectConverter,
|
|
1533
|
+
tn as match,
|
|
1534
|
+
en as matchAnd,
|
|
1535
|
+
rn as matchAndPipe,
|
|
1536
|
+
nn as matchAny,
|
|
1537
|
+
sn as matchArray,
|
|
1538
|
+
an as matchArrayBuffer,
|
|
1539
|
+
on as matchArrayIncludes,
|
|
1540
|
+
cn as matchArrayItem,
|
|
1541
|
+
ln as matchArrayLength,
|
|
1542
|
+
un as matchArrayWith,
|
|
1543
|
+
fn as matchBoolean,
|
|
1544
|
+
hn as matchConstructor,
|
|
1545
|
+
dn as matchConvert,
|
|
1546
|
+
mn as matchCustom,
|
|
1547
|
+
pn as matchDeep,
|
|
1548
|
+
wn as matchEnum,
|
|
1549
|
+
yn as matchFloat,
|
|
1550
|
+
bn as matchIn,
|
|
1551
|
+
gn as matchInstanceOf,
|
|
1552
|
+
En as matchInt,
|
|
1553
|
+
Sn as matchIntDate,
|
|
1554
|
+
xn as matchIs,
|
|
1555
|
+
On as matchIsNonStrict,
|
|
1556
|
+
Tn as matchNever,
|
|
1557
|
+
_n as matchNot,
|
|
1558
|
+
kn as matchNotNullish,
|
|
1559
|
+
Cn as matchNullish,
|
|
1560
|
+
Pn as matchNumber,
|
|
1561
|
+
Dn as matchObject,
|
|
1562
|
+
vn as matchObjectEntries,
|
|
1563
|
+
An as matchObjectEntry,
|
|
1564
|
+
Mn as matchObjectKey,
|
|
1565
|
+
jn as matchObjectKeyValue,
|
|
1566
|
+
Ln as matchObjectKeys,
|
|
1567
|
+
Fn as matchObjectKeysNotNull,
|
|
1568
|
+
In as matchObjectPartial,
|
|
1569
|
+
Rn as matchObjectValue,
|
|
1570
|
+
Nn as matchObjectValues,
|
|
1571
|
+
$n as matchObjectWith,
|
|
1572
|
+
Wn as matchOptional,
|
|
1573
|
+
zn as matchOr,
|
|
1574
|
+
Bn as matchOrPipe,
|
|
1575
|
+
Un as matchRange,
|
|
1576
|
+
Jn as matchRangeDate,
|
|
1577
|
+
Kn as matchRef,
|
|
1578
|
+
Gn as matchResultNestedToString,
|
|
1579
|
+
Hn as matchResultToString,
|
|
1580
|
+
Vn as matchString,
|
|
1581
|
+
qn as matchStringLength,
|
|
1582
|
+
Yn as matchTypeOf,
|
|
1583
|
+
Qn as matchUuid,
|
|
1584
|
+
Xn as matchValueState,
|
|
1585
|
+
Zn as max,
|
|
1586
|
+
ts as min,
|
|
1587
|
+
es as minMax,
|
|
1588
|
+
Oe as nodeBeep,
|
|
1589
|
+
rs as numberMod,
|
|
1590
|
+
Y as objectTransform,
|
|
1591
|
+
F as pathNormalize,
|
|
1592
|
+
Nt as pathResolve,
|
|
1593
|
+
R as poolFs,
|
|
1594
|
+
ut as promiseAllWait,
|
|
1595
|
+
ns as randomBoolean,
|
|
1596
|
+
ss as randomEnum,
|
|
1597
|
+
as as randomFloat,
|
|
1598
|
+
os as randomIndexWeighted,
|
|
1599
|
+
is as randomInt,
|
|
1600
|
+
cs as randomItem,
|
|
1601
|
+
ls as randomItems,
|
|
1602
|
+
Jt as readDirRecursive,
|
|
1603
|
+
X as saveJson,
|
|
1604
|
+
us as setArrayConverter,
|
|
1605
|
+
fs as setFuncName,
|
|
1606
|
+
mt as setPlaywrightPriorityLow,
|
|
1607
|
+
hs as sha256,
|
|
1608
|
+
ds as sha256Buffer,
|
|
1609
|
+
qt as subscribeJsErrors,
|
|
1610
|
+
Xt as testPage,
|
|
1611
|
+
ms as timeoutAbortController,
|
|
1612
|
+
ps as toConvertFrom,
|
|
1613
|
+
ws as toConvertTo,
|
|
1614
|
+
ys as toConvertWithDefaultFrom,
|
|
1615
|
+
bs as toConvertWithDefaultTo,
|
|
1616
|
+
gs as toConverter,
|
|
1617
|
+
Es as toConverterFrom,
|
|
1618
|
+
Ss as toConverterTo,
|
|
1619
|
+
xs as toConverterWithDefault,
|
|
1620
|
+
Os as toConverterWithDefaultFrom,
|
|
1621
|
+
Ts as toConverterWithDefaultTo,
|
|
1622
|
+
_s as toCorrect,
|
|
1623
|
+
ks as toCorrectWithDefault,
|
|
1624
|
+
Cs as toHex,
|
|
1625
|
+
Ps as truncateString,
|
|
1626
|
+
Ds as urlGetBoolean,
|
|
1627
|
+
vs as urlGetFloat,
|
|
1628
|
+
As as urlGetInt,
|
|
1629
|
+
Ms as urlGetParams,
|
|
1630
|
+
js as urlGetString,
|
|
1631
|
+
Ls as urlParamToBoolean,
|
|
1632
|
+
Fs as urlParamToFloat,
|
|
1633
|
+
Is as urlParamToInt,
|
|
1634
|
+
ke as useBrowser,
|
|
1635
|
+
Zt as useBrowserContext,
|
|
1636
|
+
ve as usingCDPSession,
|
|
1637
|
+
Rs as validateMatchResult,
|
|
1638
|
+
Ns as waitObservable,
|
|
1639
|
+
De as waitPageStable,
|
|
1640
|
+
$t as walkPathHandleErrorDefault,
|
|
1641
|
+
ge as walkPaths,
|
|
1642
|
+
$s as withConsoleReplace,
|
|
1643
|
+
Ws as withRetry,
|
|
1644
|
+
_t as withTimeout,
|
|
1645
|
+
jt as writeFileThroughTmp
|
|
1189
1646
|
};
|