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