@flemist/simple-utils 2.1.0 → 2.1.2
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/node/index.mjs
CHANGED
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import { L as
|
|
3
|
-
import { Locker as
|
|
4
|
-
import { Pool as
|
|
5
|
-
import
|
|
1
|
+
import { T as mt, Q as pt, E as yt } from "../urlGet-BCW9jvAm.mjs";
|
|
2
|
+
import { L as de, V as he, W as me, O as pe, R as ye, _ as we, $ as ge, U as xe, K as Ee, G as Se, a2 as be, J as ke, H as Oe, M as Pe, q as je, Y as Ce, l as Ae, o as Le, A as De, B as Fe, C as Te, D as Ie, y as _e, z as Re, P as We, u as Ne, v as $e, w as Me, I as Be, p as ze, d as Je, g as Ue, Z as He, a1 as Ge, aq as ve, as as Ke, a5 as Ve, a3 as Ye, aP as qe, a4 as Qe, a8 as Xe, au as Ze, ax as tn, am as en, al as nn, a9 as rn, aI as sn, ag as an, aH as on, ae as cn, aG as ln, aj as un, ad as fn, aJ as dn, ab as hn, aa as mn, a7 as pn, aM as yn, ao as wn, an as gn, ac as xn, af as En, aA as Sn, aB as bn, aC as kn, aE as On, ay as Pn, aF as jn, ah as Cn, aD as An, az as Ln, aw as Dn, at as Fn, ap as Tn, ar as In, aK as _n, aL as Rn, a6 as Wn, ai as Nn, av as $n, ak as Mn, aN as Bn, aO as zn, b as Jn, m as Un, c as Hn, n as Gn, f as vn, k as Kn, r as Vn, h as Yn, e as qn, i as Qn, j as Xn, F as Zn, a as tr, s as er, S as nr, t as rr, x as sr, aV as ar, aX as or, aW as ir, aQ as cr, aU as lr, aR as ur, aT as fr, aS as dr, a0 as hr, N as mr, X as pr } from "../urlGet-BCW9jvAm.mjs";
|
|
3
|
+
import { Locker as wt, useAbortController as gt, combineAbortSignals as st, delay as at } from "@flemist/async-utils";
|
|
4
|
+
import { Pool as xt, poolRunWait as N } from "@flemist/time-limits";
|
|
5
|
+
import Et from "node:os";
|
|
6
6
|
import * as T from "path";
|
|
7
|
-
import
|
|
7
|
+
import ot from "path";
|
|
8
|
+
import { priorityCreate as z } from "@flemist/priority-queue";
|
|
8
9
|
import * as I from "fs";
|
|
9
|
-
import
|
|
10
|
-
import { spawn as
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import St from "picomatch";
|
|
11
|
+
import { spawn as H } from "child_process";
|
|
12
|
+
import { AbortControllerFast as bt } from "@flemist/abort-controller-fast";
|
|
13
|
+
const Z = new xt(Et.cpus().length);
|
|
14
|
+
function $(t) {
|
|
13
15
|
return t.replace(/\\/g, "/");
|
|
14
16
|
}
|
|
15
|
-
let
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
const e =
|
|
19
|
-
let r =
|
|
20
|
-
return r == null && (r = new
|
|
17
|
+
let U = null;
|
|
18
|
+
function kt(t) {
|
|
19
|
+
U == null && (U = /* @__PURE__ */ new Map());
|
|
20
|
+
const e = $(t);
|
|
21
|
+
let r = U.get(e);
|
|
22
|
+
return r == null && (r = new wt(), U.set(e, r)), r;
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function Xt(t) {
|
|
23
25
|
const { filePath: e, func: r } = t;
|
|
24
|
-
return
|
|
25
|
-
() =>
|
|
26
|
-
pool:
|
|
26
|
+
return kt(e).lock(
|
|
27
|
+
() => N({
|
|
28
|
+
pool: Z,
|
|
27
29
|
count: 1,
|
|
28
30
|
func: r
|
|
29
31
|
})
|
|
30
32
|
);
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function Ot(t) {
|
|
33
35
|
return t.match(/^[/\\]?[^/\\]+/)[0];
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
37
|
+
function Pt(t, e) {
|
|
38
|
+
return Ot(t) + "|" + e.ino;
|
|
37
39
|
}
|
|
38
|
-
function
|
|
40
|
+
function jt(t) {
|
|
39
41
|
return t.endsWith(":") && (t += "/"), T.resolve(t);
|
|
40
42
|
}
|
|
41
|
-
function
|
|
43
|
+
function et(t, e) {
|
|
42
44
|
t.totalSize += e.totalSize, t.maxFileDateModified = Math.max(
|
|
43
45
|
t.maxFileDateModified,
|
|
44
46
|
e.maxFileDateModified
|
|
45
47
|
), t.countFiles += e.countFiles, t.countDirs += e.countDirs, t.countLinks += e.countLinks;
|
|
46
48
|
}
|
|
47
|
-
const
|
|
49
|
+
const Ct = function(e) {
|
|
48
50
|
return e.code === "ENOENT";
|
|
49
51
|
};
|
|
50
|
-
function
|
|
52
|
+
function it(t) {
|
|
51
53
|
const e = t.paths;
|
|
52
54
|
if (!e || e.length === 0)
|
|
53
55
|
return Promise.resolve({
|
|
@@ -57,43 +59,43 @@ function et(t) {
|
|
|
57
59
|
countDirs: 0,
|
|
58
60
|
countLinks: 0
|
|
59
61
|
});
|
|
60
|
-
const r = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), n = t.abortSignal, a = t.pool ??
|
|
62
|
+
const r = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), n = t.abortSignal, a = t.pool ?? Z, o = t.handleError, i = t.priority ?? z(0), u = t.walkLinks ?? !1, c = t.log, E = t.handlePath, f = t.matchPath;
|
|
61
63
|
async function y(d) {
|
|
62
|
-
if (!(o && await o(d)) && !
|
|
64
|
+
if (!(o && await o(d)) && !Ct(d))
|
|
63
65
|
throw d;
|
|
64
66
|
}
|
|
65
|
-
function
|
|
66
|
-
return !(!
|
|
67
|
+
function P(d) {
|
|
68
|
+
return !(!c || c.minTotalContentSize != null && d < c.minTotalContentSize || c.maxNestedLevel != null && r > c.maxNestedLevel);
|
|
67
69
|
}
|
|
68
|
-
return
|
|
69
|
-
const w =
|
|
70
|
+
return gt(async (d) => {
|
|
71
|
+
const w = st(n, d), m = {
|
|
70
72
|
totalSize: 0,
|
|
71
73
|
maxFileDateModified: 0,
|
|
72
74
|
countFiles: 0,
|
|
73
75
|
countDirs: 0,
|
|
74
76
|
countLinks: 0
|
|
75
77
|
};
|
|
76
|
-
function D(x,
|
|
77
|
-
if (
|
|
78
|
-
const g = `${
|
|
79
|
-
|
|
78
|
+
function D(x, O) {
|
|
79
|
+
if (P(O.totalSize)) {
|
|
80
|
+
const g = `${O.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${x}`;
|
|
81
|
+
c?.handleLog ? c.handleLog(g) : console.log(g);
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
|
-
async function
|
|
83
|
-
return
|
|
84
|
+
async function l(x, O, p, g) {
|
|
85
|
+
return E ? await N({
|
|
84
86
|
pool: a,
|
|
85
87
|
func: async () => {
|
|
86
88
|
try {
|
|
87
|
-
return await
|
|
89
|
+
return await E({
|
|
88
90
|
level: r,
|
|
89
91
|
path: x,
|
|
90
|
-
stat:
|
|
92
|
+
stat: O,
|
|
91
93
|
itemStat: p,
|
|
92
94
|
totalStat: m,
|
|
93
95
|
abortSignal: w
|
|
94
96
|
});
|
|
95
|
-
} catch (
|
|
96
|
-
return await y(
|
|
97
|
+
} catch (k) {
|
|
98
|
+
return await y(k), !1;
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
count: 1,
|
|
@@ -101,71 +103,71 @@ function et(t) {
|
|
|
101
103
|
abortSignal: w
|
|
102
104
|
}) : !0;
|
|
103
105
|
}
|
|
104
|
-
async function
|
|
106
|
+
async function S(x, O, p, g) {
|
|
105
107
|
g || (g = x);
|
|
106
|
-
const
|
|
108
|
+
const k = await N({
|
|
107
109
|
pool: a,
|
|
108
110
|
func: () => I.promises.lstat(x).catch(y),
|
|
109
111
|
count: 1,
|
|
110
|
-
priority:
|
|
112
|
+
priority: z(O, z(1, i)),
|
|
111
113
|
abortSignal: w
|
|
112
114
|
});
|
|
113
|
-
if (!
|
|
115
|
+
if (!k || !p && k.isFile())
|
|
114
116
|
return null;
|
|
115
|
-
const
|
|
116
|
-
if (s.has(
|
|
117
|
+
const C = Pt(x, k);
|
|
118
|
+
if (s.has(C))
|
|
117
119
|
return null;
|
|
118
|
-
s.add(
|
|
120
|
+
s.add(C);
|
|
119
121
|
let h = {
|
|
120
|
-
totalSize:
|
|
121
|
-
maxFileDateModified:
|
|
122
|
+
totalSize: k.size,
|
|
123
|
+
maxFileDateModified: k.isDirectory() ? 0 : k.mtimeMs,
|
|
122
124
|
countFiles: 0,
|
|
123
125
|
countDirs: 0,
|
|
124
126
|
countLinks: 0
|
|
125
127
|
};
|
|
126
|
-
const A =
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
const A = z(
|
|
129
|
+
O,
|
|
130
|
+
z(k.isDirectory() ? 2 : 3, i)
|
|
129
131
|
);
|
|
130
|
-
if (
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
132
|
+
if (k.isSymbolicLink()) {
|
|
133
|
+
if (u) {
|
|
134
|
+
const j = await N({
|
|
133
135
|
pool: a,
|
|
134
136
|
func: () => I.promises.readlink(x).catch(y).then((F) => F ?? null),
|
|
135
137
|
count: 1,
|
|
136
138
|
priority: A,
|
|
137
139
|
abortSignal: w
|
|
138
140
|
});
|
|
139
|
-
if (
|
|
140
|
-
const F = T.isAbsolute(
|
|
141
|
+
if (j) {
|
|
142
|
+
const F = T.isAbsolute(j) ? j : T.resolve(T.dirname(g), j), _ = await S(
|
|
141
143
|
F,
|
|
142
|
-
|
|
144
|
+
O,
|
|
143
145
|
p,
|
|
144
146
|
g
|
|
145
147
|
);
|
|
146
|
-
|
|
148
|
+
_ && (h = _);
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (h.countLinks += 1, await
|
|
151
|
+
return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (h.countLinks += 1, await l(
|
|
150
152
|
g,
|
|
151
|
-
|
|
153
|
+
k,
|
|
152
154
|
h,
|
|
153
155
|
A
|
|
154
|
-
) && (
|
|
155
|
-
} else if (
|
|
156
|
-
const
|
|
156
|
+
) && (et(m, h), D(g, h))), h;
|
|
157
|
+
} else if (k.isDirectory()) {
|
|
158
|
+
const j = await N({
|
|
157
159
|
pool: a,
|
|
158
160
|
func: () => I.promises.readdir(x).catch(y),
|
|
159
161
|
count: 1,
|
|
160
|
-
priority:
|
|
162
|
+
priority: i,
|
|
161
163
|
abortSignal: w
|
|
162
164
|
});
|
|
163
|
-
if (
|
|
164
|
-
for (let F = 0,
|
|
165
|
-
|
|
166
|
-
h = await
|
|
165
|
+
if (j) {
|
|
166
|
+
for (let F = 0, _ = j.length; F < _; F++)
|
|
167
|
+
j[F] = T.join(g, j[F]);
|
|
168
|
+
h = await it({
|
|
167
169
|
...t,
|
|
168
|
-
paths:
|
|
170
|
+
paths: j,
|
|
169
171
|
abortSignal: w,
|
|
170
172
|
priority: A,
|
|
171
173
|
level: r + 1,
|
|
@@ -173,32 +175,32 @@ function et(t) {
|
|
|
173
175
|
});
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
|
-
return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (
|
|
178
|
+
return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (k.isDirectory() ? h.countDirs += 1 : k.isFile() && (h.countFiles += 1), await l(
|
|
177
179
|
g,
|
|
178
|
-
|
|
180
|
+
k,
|
|
179
181
|
h,
|
|
180
182
|
A
|
|
181
|
-
) && (
|
|
183
|
+
) && (et(m, h), D(g, h))), h;
|
|
182
184
|
}
|
|
183
|
-
const
|
|
184
|
-
for (let x = 0,
|
|
185
|
-
const p =
|
|
186
|
-
g !== !1 &&
|
|
185
|
+
const b = [];
|
|
186
|
+
for (let x = 0, O = e.length; x < O; x++) {
|
|
187
|
+
const p = jt(e[x]), g = f ? f(p) : !0;
|
|
188
|
+
g !== !1 && b.push(S(p, x, g));
|
|
187
189
|
}
|
|
188
|
-
return await Promise.all(
|
|
190
|
+
return await Promise.all(b), m;
|
|
189
191
|
});
|
|
190
192
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
193
|
+
function Zt(t) {
|
|
194
|
+
return it(t);
|
|
193
195
|
}
|
|
194
|
-
function
|
|
196
|
+
function te({
|
|
195
197
|
globs: t,
|
|
196
198
|
rootDir: e,
|
|
197
199
|
noCase: r
|
|
198
200
|
}) {
|
|
199
201
|
const s = [];
|
|
200
202
|
return t.forEach((n) => {
|
|
201
|
-
n =
|
|
203
|
+
n = $(n).trim();
|
|
202
204
|
const a = n.startsWith("^");
|
|
203
205
|
a && (n = n.substring(1).trim());
|
|
204
206
|
const o = n.startsWith("!");
|
|
@@ -207,85 +209,85 @@ function Ht({
|
|
|
207
209
|
`Invalid glob pattern: "${n}". The syntax '${n.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.`
|
|
208
210
|
);
|
|
209
211
|
n.startsWith("/") && (n = "." + n);
|
|
210
|
-
const
|
|
211
|
-
if (!
|
|
212
|
+
const i = $(e ? T.resolve(e, n) : n);
|
|
213
|
+
if (!i)
|
|
212
214
|
return;
|
|
213
|
-
let
|
|
215
|
+
let u;
|
|
214
216
|
try {
|
|
215
|
-
|
|
217
|
+
u = St(i, {
|
|
216
218
|
nocase: r ?? !1,
|
|
217
219
|
dot: !0,
|
|
218
220
|
strictBrackets: !0
|
|
219
221
|
// Validate bracket balance for patterns like "["
|
|
220
222
|
});
|
|
221
|
-
} catch (
|
|
223
|
+
} catch (c) {
|
|
222
224
|
throw new Error(
|
|
223
|
-
`Invalid glob pattern: "${n}". ${
|
|
225
|
+
`Invalid glob pattern: "${n}". ${c instanceof Error ? c.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.`
|
|
224
226
|
);
|
|
225
227
|
}
|
|
226
228
|
s.push({
|
|
227
229
|
exclude: a,
|
|
228
230
|
negative: o,
|
|
229
|
-
debugInfo:
|
|
230
|
-
match:
|
|
231
|
+
debugInfo: i,
|
|
232
|
+
match: u
|
|
231
233
|
});
|
|
232
234
|
}), function(a) {
|
|
233
|
-
a =
|
|
234
|
-
let o = null,
|
|
235
|
-
for (let
|
|
236
|
-
const
|
|
237
|
-
|
|
235
|
+
a = $(a);
|
|
236
|
+
let o = null, i = !1;
|
|
237
|
+
for (let u = 0, c = s.length; u < c; u++) {
|
|
238
|
+
const E = s[u];
|
|
239
|
+
E.match(a) && (E.exclude ? i = !E.negative : (o = !E.negative, i = !1));
|
|
238
240
|
}
|
|
239
|
-
return
|
|
241
|
+
return i ? !1 : o;
|
|
240
242
|
};
|
|
241
243
|
}
|
|
242
|
-
function
|
|
244
|
+
function At(t) {
|
|
243
245
|
const e = t.startsWith("!");
|
|
244
246
|
return e && (t = t.substring(1)), t.startsWith("/") ? t = t.substring(1) : !t.startsWith("**") && !t.startsWith("../") && (t = `**/${t}`), e && (t = "!" + t), t;
|
|
245
247
|
}
|
|
246
|
-
function
|
|
248
|
+
function Lt(t, e) {
|
|
247
249
|
if (!e || e === ".")
|
|
248
250
|
return t;
|
|
249
251
|
const r = t.startsWith("^");
|
|
250
252
|
r && (t = t.substring(1));
|
|
251
253
|
const s = t.startsWith("!");
|
|
252
|
-
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 =
|
|
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 = $(T.normalize(t)), s && (t = "!" + t), r && (t = "^" + t), t;
|
|
253
255
|
}
|
|
254
|
-
function
|
|
256
|
+
function nt(t) {
|
|
255
257
|
return "^" + t;
|
|
256
258
|
}
|
|
257
|
-
async function
|
|
259
|
+
async function Dt(t) {
|
|
258
260
|
const r = (await I.promises.readFile(t, "utf-8")).split(`
|
|
259
261
|
`), s = [];
|
|
260
262
|
return r.forEach((n) => {
|
|
261
263
|
n = n.trim(), !(!n || n.startsWith("#")) && s.push(n);
|
|
262
264
|
}), s;
|
|
263
265
|
}
|
|
264
|
-
async function
|
|
266
|
+
async function ee(t) {
|
|
265
267
|
const e = t.rootDir ?? ".", r = [];
|
|
266
268
|
if (!t.globs?.length)
|
|
267
269
|
return r;
|
|
268
270
|
const s = [];
|
|
269
271
|
return t.globs.forEach((n) => {
|
|
270
|
-
n.value && (n.valueType === "file-contains-patterns" ? s.push(n) : n.valueType === "pattern" && r.push(n.exclude ?
|
|
272
|
+
n.value && (n.valueType === "file-contains-patterns" ? s.push(n) : n.valueType === "pattern" && r.push(n.exclude ? nt(n.value) : n.value));
|
|
271
273
|
}), s.length && await Promise.all(
|
|
272
274
|
s.map(async (n) => {
|
|
273
|
-
await
|
|
274
|
-
pool:
|
|
275
|
+
await N({
|
|
276
|
+
pool: Z,
|
|
275
277
|
count: 1,
|
|
276
278
|
func: async () => {
|
|
277
|
-
const a = T.resolve(e, n.value), o = await
|
|
278
|
-
o.forEach((
|
|
279
|
-
|
|
279
|
+
const a = T.resolve(e, n.value), o = await Dt(a), i = T.relative(e, T.dirname(a));
|
|
280
|
+
o.forEach((u) => {
|
|
281
|
+
u = At(u), u = Lt(u, i), r.push(n.exclude ? nt(u) : u);
|
|
280
282
|
});
|
|
281
283
|
}
|
|
282
284
|
});
|
|
283
285
|
})
|
|
284
286
|
), r;
|
|
285
287
|
}
|
|
286
|
-
function
|
|
288
|
+
function Ft(t, e = {}) {
|
|
287
289
|
return new Promise((r, s) => {
|
|
288
|
-
const n =
|
|
290
|
+
const n = H(t, {
|
|
289
291
|
shell: !0,
|
|
290
292
|
...e
|
|
291
293
|
}), a = [];
|
|
@@ -294,93 +296,120 @@ function Lt(t, e = {}) {
|
|
|
294
296
|
}), n.on("error", (o) => {
|
|
295
297
|
s(o);
|
|
296
298
|
}), n.on("exit", (o) => {
|
|
297
|
-
const
|
|
299
|
+
const i = Buffer.concat(a).toString("utf8");
|
|
298
300
|
if (o !== 0) {
|
|
299
301
|
s(new Error(`[exec][exit] code: ${o}`));
|
|
300
302
|
return;
|
|
301
303
|
}
|
|
302
|
-
r(
|
|
304
|
+
r(i);
|
|
303
305
|
});
|
|
304
306
|
});
|
|
305
307
|
}
|
|
306
|
-
async function
|
|
308
|
+
async function ne() {
|
|
309
|
+
let t;
|
|
310
|
+
switch (process.platform) {
|
|
311
|
+
case "darwin":
|
|
312
|
+
t = H("afplay", ["/System/Library/Sounds/Ping.aiff"], {
|
|
313
|
+
stdio: "ignore"
|
|
314
|
+
});
|
|
315
|
+
break;
|
|
316
|
+
case "linux":
|
|
317
|
+
t = H("beep", [], { stdio: "ignore", shell: !0 });
|
|
318
|
+
break;
|
|
319
|
+
case "win32":
|
|
320
|
+
t = H("powershell", ["-c", "[console]::beep(1000,300)"], {
|
|
321
|
+
stdio: "ignore"
|
|
322
|
+
});
|
|
323
|
+
break;
|
|
324
|
+
default:
|
|
325
|
+
throw new Error(
|
|
326
|
+
`[nodeBeep] Beep not supported on platform: ${process.platform}`
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
await new Promise((e, r) => {
|
|
330
|
+
t.on("error", r), t.on("close", (s) => {
|
|
331
|
+
s !== 0 ? r(new Error(`[nodeBeep] Beep process exited with code ${s}`)) : e();
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
async function Tt({
|
|
307
336
|
page: t,
|
|
308
337
|
urlFilters: e,
|
|
309
338
|
timeouts: r
|
|
310
339
|
}) {
|
|
311
|
-
return r || (r = {}), r.downloadInternal || (r.downloadInternal = 10 * 1e3), r.downloadExternal || (r.downloadExternal = 60 * 1e3), r.total || (r.total = 300 * 1e3), await
|
|
340
|
+
return r || (r = {}), r.downloadInternal || (r.downloadInternal = 10 * 1e3), r.downloadExternal || (r.downloadExternal = 60 * 1e3), r.total || (r.total = 300 * 1e3), await mt(
|
|
312
341
|
() => t.evaluate(
|
|
313
342
|
({
|
|
314
343
|
urlFilters: n,
|
|
315
344
|
timeouts: a
|
|
316
345
|
}) => {
|
|
317
|
-
function o(
|
|
318
|
-
return function(
|
|
346
|
+
function o(c) {
|
|
347
|
+
return function(f) {
|
|
319
348
|
let y = !1;
|
|
320
|
-
for (let
|
|
321
|
-
const w =
|
|
322
|
-
w.pattern.test(
|
|
349
|
+
for (let P = 0, d = c.length; P < d; P++) {
|
|
350
|
+
const w = c[P];
|
|
351
|
+
w.pattern.test(f) && (y = w.value);
|
|
323
352
|
}
|
|
324
353
|
return y;
|
|
325
354
|
};
|
|
326
355
|
}
|
|
327
|
-
const
|
|
328
|
-
let
|
|
329
|
-
return
|
|
356
|
+
const i = n && o(n);
|
|
357
|
+
let u = performance.getEntries && performance.getEntries();
|
|
358
|
+
return u || (u = []), u.push({
|
|
330
359
|
name: location.href
|
|
331
360
|
}), Promise.all(
|
|
332
|
-
|
|
333
|
-
(
|
|
334
|
-
if (
|
|
361
|
+
u.map(
|
|
362
|
+
(c) => {
|
|
363
|
+
if (c.entryType != null && c.entryType !== "resource" || i && !i(c.name))
|
|
335
364
|
return null;
|
|
336
|
-
if (
|
|
337
|
-
return
|
|
338
|
-
url:
|
|
339
|
-
error:
|
|
365
|
+
if (c.responseStatus != null)
|
|
366
|
+
return c.responseStatus >= 400 ? Promise.resolve({
|
|
367
|
+
url: c.name,
|
|
368
|
+
error: c.responseStatus
|
|
340
369
|
}) : null;
|
|
341
370
|
if (navigator.userAgent.indexOf("Chrome") === -1)
|
|
342
371
|
return null;
|
|
343
|
-
const
|
|
344
|
-
let
|
|
345
|
-
const d = new Promise((
|
|
346
|
-
|
|
372
|
+
const E = typeof AbortController < "u" ? new AbortController() : null, f = new URL(c.name).origin === location.origin, y = f ? a.downloadInternal : a.downloadExternal;
|
|
373
|
+
let P;
|
|
374
|
+
const d = new Promise((l, S) => {
|
|
375
|
+
P = S;
|
|
347
376
|
}), w = y && setTimeout(() => {
|
|
348
|
-
|
|
377
|
+
E?.abort(), P(
|
|
349
378
|
new Error("[test][getPageHttpErrors] fetch timeout")
|
|
350
379
|
);
|
|
351
380
|
}, y);
|
|
352
|
-
let m = fetch(
|
|
353
|
-
mode:
|
|
354
|
-
signal:
|
|
355
|
-
cache:
|
|
381
|
+
let m = fetch(c.name, {
|
|
382
|
+
mode: f ? "same-origin" : "no-cors",
|
|
383
|
+
signal: E?.signal,
|
|
384
|
+
cache: f ? "force-cache" : void 0,
|
|
356
385
|
method: "HEAD"
|
|
357
|
-
}).then((
|
|
358
|
-
url:
|
|
359
|
-
error:
|
|
360
|
-
}).catch((
|
|
361
|
-
url:
|
|
362
|
-
error:
|
|
386
|
+
}).then((l) => l.ok ? null : {
|
|
387
|
+
url: c.name,
|
|
388
|
+
error: l.status + " " + l.statusText
|
|
389
|
+
}).catch((l) => ({
|
|
390
|
+
url: c.name,
|
|
391
|
+
error: l.message
|
|
363
392
|
}));
|
|
364
|
-
|
|
393
|
+
E || (m = Promise.race([m, d]));
|
|
365
394
|
function D() {
|
|
366
395
|
w && clearTimeout(w);
|
|
367
396
|
}
|
|
368
397
|
return m.then(
|
|
369
|
-
(
|
|
370
|
-
(
|
|
371
|
-
throw D(),
|
|
398
|
+
(l) => (D(), l),
|
|
399
|
+
(l) => {
|
|
400
|
+
throw D(), l;
|
|
372
401
|
}
|
|
373
402
|
);
|
|
374
403
|
}
|
|
375
404
|
)
|
|
376
|
-
).then((
|
|
377
|
-
const
|
|
378
|
-
(
|
|
379
|
-
url: new URL(
|
|
380
|
-
error:
|
|
405
|
+
).then((c) => {
|
|
406
|
+
const E = c.filter((f) => f).map(
|
|
407
|
+
(f) => ({
|
|
408
|
+
url: new URL(f.url),
|
|
409
|
+
error: f.error
|
|
381
410
|
})
|
|
382
411
|
);
|
|
383
|
-
return
|
|
412
|
+
return E.length > 0 ? E : null;
|
|
384
413
|
});
|
|
385
414
|
},
|
|
386
415
|
{
|
|
@@ -391,12 +420,12 @@ async function At({
|
|
|
391
420
|
{ timeout: r.total }
|
|
392
421
|
);
|
|
393
422
|
}
|
|
394
|
-
async function
|
|
423
|
+
async function It({
|
|
395
424
|
page: t,
|
|
396
425
|
urlFilters: e,
|
|
397
426
|
errorFilter: r
|
|
398
427
|
}) {
|
|
399
|
-
let s = await
|
|
428
|
+
let s = await Tt({
|
|
400
429
|
page: t,
|
|
401
430
|
urlFilters: e
|
|
402
431
|
});
|
|
@@ -405,45 +434,45 @@ async function Gt({
|
|
|
405
434
|
`[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(s, null, 2)}`
|
|
406
435
|
);
|
|
407
436
|
}
|
|
408
|
-
async function
|
|
437
|
+
async function _t({
|
|
409
438
|
page: t,
|
|
410
439
|
filter: e,
|
|
411
440
|
onError: r
|
|
412
441
|
}) {
|
|
413
|
-
const s = "callback_191b355ea6f64499a6607ad571da5d4d", n = t.context().browser()?.browserType().name(), a =
|
|
414
|
-
function o(
|
|
442
|
+
const s = "callback_191b355ea6f64499a6607ad571da5d4d", n = t.context().browser()?.browserType().name(), a = pt();
|
|
443
|
+
function o(i) {
|
|
415
444
|
try {
|
|
416
445
|
if (e && !e({
|
|
417
446
|
url: new URL(t.url()),
|
|
418
|
-
error:
|
|
447
|
+
error: i
|
|
419
448
|
}))
|
|
420
449
|
return;
|
|
421
|
-
} catch (
|
|
422
|
-
|
|
450
|
+
} catch (u) {
|
|
451
|
+
i = String(u);
|
|
423
452
|
}
|
|
424
453
|
try {
|
|
425
454
|
console.error(
|
|
426
|
-
`[test][subscribeJsErrors] BROWSER JS ERROR (${n}): ${
|
|
455
|
+
`[test][subscribeJsErrors] BROWSER JS ERROR (${n}): ${i}`
|
|
427
456
|
);
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
} catch (
|
|
431
|
-
console.error("[test][subscribeJsErrors] error",
|
|
457
|
+
const u = new Error(i);
|
|
458
|
+
u.stack = a, r(u);
|
|
459
|
+
} catch (u) {
|
|
460
|
+
console.error("[test][subscribeJsErrors] error", u);
|
|
432
461
|
}
|
|
433
462
|
}
|
|
434
|
-
await t.exposeFunction(s, o), await t.addInitScript((
|
|
435
|
-
function f
|
|
436
|
-
if (Array.isArray(
|
|
437
|
-
return
|
|
463
|
+
await t.exposeFunction(s, o), await t.addInitScript((i) => {
|
|
464
|
+
function u(f) {
|
|
465
|
+
if (Array.isArray(f))
|
|
466
|
+
return f.map(u).join(`\r
|
|
438
467
|
\r
|
|
439
468
|
`);
|
|
440
|
-
if (
|
|
441
|
-
return
|
|
442
|
-
if (typeof
|
|
469
|
+
if (f instanceof Error)
|
|
470
|
+
return f.stack || f.toString();
|
|
471
|
+
if (typeof f == "object" && f != null) {
|
|
443
472
|
const y = /* @__PURE__ */ new Set();
|
|
444
473
|
return JSON.stringify(
|
|
445
|
-
|
|
446
|
-
(
|
|
474
|
+
f,
|
|
475
|
+
(P, d) => {
|
|
447
476
|
if (typeof d == "object" && d != null) {
|
|
448
477
|
if (y.has(d))
|
|
449
478
|
return "[Circular]";
|
|
@@ -454,37 +483,37 @@ async function Kt({
|
|
|
454
483
|
2
|
|
455
484
|
);
|
|
456
485
|
}
|
|
457
|
-
return String(
|
|
486
|
+
return String(f);
|
|
458
487
|
}
|
|
459
|
-
function
|
|
460
|
-
window[
|
|
488
|
+
function c(f) {
|
|
489
|
+
window[i](f);
|
|
461
490
|
}
|
|
462
|
-
const
|
|
491
|
+
const E = {
|
|
463
492
|
warn: console.warn.bind(console),
|
|
464
493
|
error: console.error.bind(console)
|
|
465
494
|
};
|
|
466
495
|
console.warn = function(...y) {
|
|
467
|
-
return
|
|
496
|
+
return c("console.warn: " + u(y)), E.warn.apply(this, y);
|
|
468
497
|
}, console.error = function(...y) {
|
|
469
|
-
return
|
|
498
|
+
return c("console.error: " + u(y)), E.error.apply(this, y);
|
|
470
499
|
}, window.addEventListener(
|
|
471
500
|
"error",
|
|
472
|
-
function(
|
|
473
|
-
|
|
501
|
+
function(f) {
|
|
502
|
+
c("window error: " + (f.message || JSON.stringify(f)));
|
|
474
503
|
},
|
|
475
504
|
!0
|
|
476
505
|
), window.addEventListener(
|
|
477
506
|
"unhandledrejection",
|
|
478
|
-
function(
|
|
479
|
-
|
|
507
|
+
function(f) {
|
|
508
|
+
c("window unhandledrejection: " + u(f.reason));
|
|
480
509
|
},
|
|
481
510
|
!0
|
|
482
511
|
);
|
|
483
512
|
}, s);
|
|
484
513
|
}
|
|
485
|
-
async function
|
|
514
|
+
async function Rt() {
|
|
486
515
|
try {
|
|
487
|
-
process.platform === "win32" && await
|
|
516
|
+
process.platform === "win32" && await Ft(
|
|
488
517
|
`wmic process where "commandline like '%ms-playwright%' and not commandline like '%wmic.exe%' and priority != 4" CALL setpriority "idle"`
|
|
489
518
|
);
|
|
490
519
|
} catch (t) {
|
|
@@ -494,28 +523,123 @@ async function Vt() {
|
|
|
494
523
|
console.warn("[test][setPlaywrightPriorityLow] error: " + e);
|
|
495
524
|
}
|
|
496
525
|
}
|
|
497
|
-
|
|
526
|
+
let G = null, q = null;
|
|
527
|
+
function re(t) {
|
|
528
|
+
q = t;
|
|
529
|
+
}
|
|
530
|
+
function Wt() {
|
|
531
|
+
if (G)
|
|
532
|
+
return;
|
|
533
|
+
const t = q || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
|
|
534
|
+
if (q)
|
|
535
|
+
return console.log(`[test][delayOnError] Delay on error: ${t} ms`), G = at(t), G;
|
|
536
|
+
}
|
|
537
|
+
function se() {
|
|
538
|
+
return G;
|
|
539
|
+
}
|
|
540
|
+
async function Nt(t) {
|
|
541
|
+
const { page: e } = t, r = e.context().browser()?.browserType().name(), s = new bt(), n = st(
|
|
542
|
+
s.signal,
|
|
543
|
+
t.abortSignal
|
|
544
|
+
), a = (i) => {
|
|
545
|
+
let u = `Error in (${r}) ${e.url()}
|
|
546
|
+
`;
|
|
547
|
+
t.pageFilePath && (u += ` at _ (${ot.resolve(t.pageFilePath)}:0:0)
|
|
548
|
+
`), i.stack = u + (i.stack || i.message), i.message = u + i.message, console.error("[test][initPage] error", i), s.abort(i);
|
|
549
|
+
};
|
|
550
|
+
return await _t({
|
|
551
|
+
page: e,
|
|
552
|
+
filter: t.filters?.js?.filter,
|
|
553
|
+
onError: a
|
|
554
|
+
}), {
|
|
555
|
+
abortSignal: n,
|
|
556
|
+
checkErrors: async () => {
|
|
557
|
+
await It({
|
|
558
|
+
page: e,
|
|
559
|
+
urlFilters: t.filters?.http?.urlFilters,
|
|
560
|
+
errorFilter: t.filters?.http?.errorFilter
|
|
561
|
+
}), n.throwIfAborted();
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
async function ae({
|
|
566
|
+
page: t,
|
|
567
|
+
abortSignal: e,
|
|
568
|
+
filters: r,
|
|
569
|
+
func: s,
|
|
570
|
+
pageFilePath: n
|
|
571
|
+
}) {
|
|
572
|
+
const a = t.context().browser()?.browserType().name();
|
|
573
|
+
try {
|
|
574
|
+
const { abortSignal: o, checkErrors: i } = await Nt({
|
|
575
|
+
page: t,
|
|
576
|
+
abortSignal: e,
|
|
577
|
+
filters: r,
|
|
578
|
+
pageFilePath: n
|
|
579
|
+
});
|
|
580
|
+
await s({
|
|
581
|
+
page: t,
|
|
582
|
+
abortSignal: o,
|
|
583
|
+
checkErrors: i
|
|
584
|
+
}), await i();
|
|
585
|
+
} catch (o) {
|
|
586
|
+
let i = `Error in (${a}) ${t.url()}
|
|
587
|
+
`;
|
|
588
|
+
throw n && (i += ` at _ (${ot.resolve(n)}:0:0)
|
|
589
|
+
`), o.stack = i + (o.stack || o.message), o.message = i + o.message, o;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
function oe({
|
|
593
|
+
browserType: t,
|
|
594
|
+
options: e
|
|
595
|
+
}) {
|
|
596
|
+
return async function(s) {
|
|
597
|
+
const n = await t.launch(e ?? void 0);
|
|
598
|
+
try {
|
|
599
|
+
return await s(n);
|
|
600
|
+
} finally {
|
|
601
|
+
await n.close();
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function ie({
|
|
606
|
+
browser: t,
|
|
607
|
+
options: e
|
|
608
|
+
}) {
|
|
609
|
+
return async function(s) {
|
|
610
|
+
const n = await t.newContext(e ?? void 0);
|
|
611
|
+
await Rt();
|
|
612
|
+
try {
|
|
613
|
+
const a = await s(n);
|
|
614
|
+
return await n.close(), a;
|
|
615
|
+
} catch (a) {
|
|
616
|
+
const o = Wt?.();
|
|
617
|
+
throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => n.close())) : await n.close(), a;
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
async function Y(t, e) {
|
|
498
622
|
const r = T.dirname(t);
|
|
499
623
|
await I.promises.stat(r).catch(() => null) || await I.promises.mkdir(r, { recursive: !0 }), await I.promises.writeFile(t, JSON.stringify(e, null, 4), {
|
|
500
624
|
encoding: "utf-8"
|
|
501
625
|
});
|
|
502
626
|
}
|
|
503
|
-
async function
|
|
627
|
+
async function $t(t) {
|
|
504
628
|
if (!await I.promises.stat(t).catch(() => null))
|
|
505
629
|
return null;
|
|
506
630
|
const e = await I.promises.readFile(t, { encoding: "utf-8" });
|
|
507
631
|
return JSON.parse(e);
|
|
508
632
|
}
|
|
509
|
-
const
|
|
510
|
-
function
|
|
633
|
+
const Q = "-", X = "+";
|
|
634
|
+
function v(t, e, r) {
|
|
511
635
|
if (t === e)
|
|
512
636
|
return null;
|
|
513
637
|
if (Array.isArray(t)) {
|
|
514
638
|
if (Array.isArray(e)) {
|
|
515
639
|
let n = null;
|
|
516
640
|
for (let a = 0, o = Math.max(e.length, e.length); a < o; a++) {
|
|
517
|
-
const
|
|
518
|
-
|
|
641
|
+
const i = v(t[a], e[a], r);
|
|
642
|
+
i != null && (n || (n = []), n.push(i));
|
|
519
643
|
}
|
|
520
644
|
return n != null && r && (n = r(t, e, n)), n;
|
|
521
645
|
}
|
|
@@ -523,131 +647,131 @@ function B(t, e, r) {
|
|
|
523
647
|
let n = null;
|
|
524
648
|
for (const a in t)
|
|
525
649
|
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
526
|
-
const o =
|
|
650
|
+
const o = v(t[a], e[a], r);
|
|
527
651
|
o != null && (n || (n = {}), n[a] = o);
|
|
528
652
|
}
|
|
529
653
|
for (const a in e)
|
|
530
654
|
if (Object.prototype.hasOwnProperty.call(e, a) && !Object.prototype.hasOwnProperty.call(t, a)) {
|
|
531
|
-
const o =
|
|
655
|
+
const o = v(t[a], e[a], r);
|
|
532
656
|
o != null && (n || (n = {}), n[a] = o);
|
|
533
657
|
}
|
|
534
658
|
return n != null && r && (n = r(t, e, n)), n;
|
|
535
659
|
}
|
|
536
660
|
let s = {
|
|
537
|
-
[
|
|
538
|
-
[
|
|
661
|
+
[Q]: t,
|
|
662
|
+
[X]: e
|
|
539
663
|
};
|
|
540
664
|
return r && (s = r(t, e, s)), s;
|
|
541
665
|
}
|
|
542
|
-
function
|
|
543
|
-
function e(
|
|
544
|
-
return
|
|
666
|
+
function rt(t) {
|
|
667
|
+
function e(l) {
|
|
668
|
+
return l.sort((S, b) => S[0] > b[0] ? 1 : -1).reduce((S, b) => (S[b[0]] = b[1], S), {});
|
|
545
669
|
}
|
|
546
|
-
function r(
|
|
547
|
-
return
|
|
670
|
+
function r(l) {
|
|
671
|
+
return l.reduce((S, b) => (S[b] = !0, S), {});
|
|
548
672
|
}
|
|
549
|
-
const s = t.filters && t.filters.excludeAttrs && r(t.filters.excludeAttrs), n = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && r(t.filters.excludeStyles),
|
|
673
|
+
const s = t.filters && t.filters.excludeAttrs && r(t.filters.excludeAttrs), n = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && r(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, u = t.filters && t.filters.excludeClasses, c = t.filters && t.filters.excludeIds, E = t.filters && t.filters.excludeSelectorClasses, f = t.filters && t.filters.excludeSelectorIds;
|
|
550
674
|
let y;
|
|
551
675
|
if (t.filters && t.filters.excludeSelectors && t.filters.excludeSelectors.length > 0) {
|
|
552
|
-
const
|
|
676
|
+
const l = Array.from(
|
|
553
677
|
document.querySelectorAll(t.filters.excludeSelectors.join(","))
|
|
554
678
|
);
|
|
555
|
-
|
|
679
|
+
l.length > 0 && (y = new Set(l));
|
|
556
680
|
}
|
|
557
|
-
function
|
|
558
|
-
const
|
|
559
|
-
for (let g = 0,
|
|
560
|
-
const
|
|
561
|
-
if (o && o[
|
|
681
|
+
function P(l, S, b, x) {
|
|
682
|
+
const O = getComputedStyle(l, S), p = [];
|
|
683
|
+
for (let g = 0, k = O.length; g < k; g++) {
|
|
684
|
+
const C = O[g];
|
|
685
|
+
if (o && o[C])
|
|
562
686
|
continue;
|
|
563
|
-
let h =
|
|
687
|
+
let h = O[C];
|
|
564
688
|
if (h && a)
|
|
565
|
-
for (let A = 0,
|
|
566
|
-
a[A].name.test(
|
|
567
|
-
(!
|
|
689
|
+
for (let A = 0, j = a.length; A < j; A++)
|
|
690
|
+
a[A].name.test(C) && (h = h.replace(a[A].search, a[A].replace));
|
|
691
|
+
(!b || b[C] !== h) && (!x || x[C] === h) && p.push([C, h]);
|
|
568
692
|
}
|
|
569
693
|
return e(p);
|
|
570
694
|
}
|
|
571
|
-
function d(
|
|
695
|
+
function d(l, S, b) {
|
|
572
696
|
return {
|
|
573
|
-
_:
|
|
574
|
-
|
|
697
|
+
_: P(
|
|
698
|
+
l,
|
|
575
699
|
void 0,
|
|
576
|
-
|
|
577
|
-
|
|
700
|
+
S && S._,
|
|
701
|
+
b && b._
|
|
578
702
|
),
|
|
579
|
-
before:
|
|
580
|
-
|
|
703
|
+
before: P(
|
|
704
|
+
l,
|
|
581
705
|
"before",
|
|
582
|
-
|
|
583
|
-
|
|
706
|
+
S && S.before,
|
|
707
|
+
b && b.before
|
|
584
708
|
),
|
|
585
|
-
after:
|
|
586
|
-
|
|
709
|
+
after: P(
|
|
710
|
+
l,
|
|
587
711
|
"after",
|
|
588
|
-
|
|
589
|
-
|
|
712
|
+
S && S.after,
|
|
713
|
+
b && b.after
|
|
590
714
|
)
|
|
591
715
|
};
|
|
592
716
|
}
|
|
593
|
-
function w(
|
|
594
|
-
for (let p = 0, g =
|
|
595
|
-
const
|
|
596
|
-
if (!
|
|
717
|
+
function w(l, S, b, x, O) {
|
|
718
|
+
for (let p = 0, g = l.childNodes.length; p < g; p++) {
|
|
719
|
+
const k = l.childNodes[p];
|
|
720
|
+
if (!k)
|
|
597
721
|
throw new Error(
|
|
598
|
-
`child is null; index=${p}; ${x}, ${
|
|
722
|
+
`child is null; index=${p}; ${x}, ${l.className}\r
|
|
599
723
|
You should wait js executions before test`
|
|
600
724
|
);
|
|
601
|
-
|
|
602
|
-
O,
|
|
603
|
-
E,
|
|
725
|
+
k instanceof Element && m(
|
|
604
726
|
k,
|
|
727
|
+
S,
|
|
728
|
+
b,
|
|
605
729
|
x,
|
|
606
|
-
|
|
730
|
+
O
|
|
607
731
|
);
|
|
608
732
|
}
|
|
609
733
|
}
|
|
610
|
-
function m(
|
|
611
|
-
const p =
|
|
612
|
-
if (
|
|
734
|
+
function m(l, S, b, x, O) {
|
|
735
|
+
const p = O && O[S.length];
|
|
736
|
+
if (O && !p || y && y.has(l))
|
|
613
737
|
return;
|
|
614
|
-
let g =
|
|
615
|
-
if (g === "head" && (
|
|
616
|
-
for (let
|
|
617
|
-
g = g.replace(
|
|
738
|
+
let g = l.tagName && l.tagName.toLowerCase();
|
|
739
|
+
if (g === "head" && (b = !1), i)
|
|
740
|
+
for (let L = 0, M = i.length; L < M; L++)
|
|
741
|
+
g = g.replace(i[L].search, i[L].replace);
|
|
618
742
|
if (p && p.tag !== g)
|
|
619
743
|
return;
|
|
620
|
-
const
|
|
621
|
-
for (let
|
|
622
|
-
const
|
|
623
|
-
let
|
|
624
|
-
if (
|
|
744
|
+
const k = [];
|
|
745
|
+
for (let L = 0, M = l.attributes.length; L < M; L++) {
|
|
746
|
+
const R = l.attributes.item(L);
|
|
747
|
+
let W = R.name, J = R.value;
|
|
748
|
+
if (W = W.toLowerCase(), W !== "class" && !(s && s[W])) {
|
|
625
749
|
if (n)
|
|
626
|
-
for (let
|
|
627
|
-
n[
|
|
628
|
-
(!p || p.attrs && p.attrs[
|
|
750
|
+
for (let B = 0, ht = n.length; B < ht; B++)
|
|
751
|
+
n[B].name.test(W) && (J = J.replace(n[B].search, n[B].replace));
|
|
752
|
+
(!p || p.attrs && p.attrs[W] === J) && k.push([W, J]);
|
|
629
753
|
}
|
|
630
754
|
}
|
|
631
|
-
const
|
|
632
|
-
for (let
|
|
633
|
-
const
|
|
634
|
-
(!
|
|
755
|
+
const C = [], h = [];
|
|
756
|
+
for (let L = 0, M = l.classList.length; L < M; L++) {
|
|
757
|
+
const R = l.classList.item(L);
|
|
758
|
+
(!u || !u.test(R)) && C.push(R), (!E || !E.test(R)) && h.push(R);
|
|
635
759
|
}
|
|
636
|
-
const A =
|
|
637
|
-
|
|
638
|
-
const F =
|
|
760
|
+
const A = b ? d(l, t.defaultStyle, p && p.style) : null, j = l.childElementCount ? [] : null;
|
|
761
|
+
l.id && (!c || !c.test(l.id)) && l.id;
|
|
762
|
+
const F = l.id && (!f || !f.test(l.id)) ? l.id : "", _ = (g || "") + (F ? "#" + F : "") + (h.length > 0 ? "." + h.join(".") : ""), tt = _ ? x ? x + " > " + _ : _ : x, dt = {
|
|
639
763
|
tag: g,
|
|
640
|
-
selector:
|
|
641
|
-
classes:
|
|
642
|
-
attrs:
|
|
764
|
+
selector: tt,
|
|
765
|
+
classes: C,
|
|
766
|
+
attrs: k.length > 0 ? e(k) : null,
|
|
643
767
|
style: A,
|
|
644
|
-
childs:
|
|
768
|
+
childs: j
|
|
645
769
|
};
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
770
|
+
S.push(dt), j && w(
|
|
771
|
+
l,
|
|
772
|
+
j,
|
|
773
|
+
b,
|
|
774
|
+
tt,
|
|
651
775
|
p && p.childs
|
|
652
776
|
);
|
|
653
777
|
}
|
|
@@ -660,22 +784,22 @@ You should wait js executions before test`
|
|
|
660
784
|
t.shouldEqualResult && [t.shouldEqualResult]
|
|
661
785
|
), D[0];
|
|
662
786
|
}
|
|
663
|
-
async function
|
|
787
|
+
async function ct(t) {
|
|
664
788
|
const e = await t.context().newCDPSession(t);
|
|
665
789
|
return await e.send("DOM.enable"), await e.send("CSS.enable"), e;
|
|
666
790
|
}
|
|
667
|
-
async function
|
|
791
|
+
async function lt(t) {
|
|
668
792
|
await t.send("CSS.disable"), await t.send("DOM.disable"), await t.detach();
|
|
669
793
|
}
|
|
670
|
-
async function
|
|
671
|
-
const r = await
|
|
794
|
+
async function ce(t, e) {
|
|
795
|
+
const r = await ct(t);
|
|
672
796
|
try {
|
|
673
797
|
return await e(r);
|
|
674
798
|
} finally {
|
|
675
|
-
await
|
|
799
|
+
await lt(r);
|
|
676
800
|
}
|
|
677
801
|
}
|
|
678
|
-
async function
|
|
802
|
+
async function Mt(t, e) {
|
|
679
803
|
const { nodes: r } = await t.send("DOM.getFlattenedDocument", {
|
|
680
804
|
depth: -1,
|
|
681
805
|
pierce: !0
|
|
@@ -686,7 +810,7 @@ async function Dt(t, e) {
|
|
|
686
810
|
forcedPseudoClasses: e
|
|
687
811
|
});
|
|
688
812
|
}
|
|
689
|
-
function
|
|
813
|
+
function K(t, e) {
|
|
690
814
|
if (!t || !e)
|
|
691
815
|
return e || null;
|
|
692
816
|
let r = null;
|
|
@@ -696,17 +820,17 @@ function G(t, e) {
|
|
|
696
820
|
Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (r || (r = {}), r[s] = "");
|
|
697
821
|
return r;
|
|
698
822
|
}
|
|
699
|
-
function
|
|
823
|
+
function Bt(t, e) {
|
|
700
824
|
if (!t || !e)
|
|
701
825
|
return e || null;
|
|
702
|
-
const r =
|
|
826
|
+
const r = K(t._, e._), s = K(t.before, e.before), n = K(t.after, e.after);
|
|
703
827
|
return !r && !s && !n ? null : {
|
|
704
828
|
_: r || {},
|
|
705
829
|
before: s || {},
|
|
706
830
|
after: n || {}
|
|
707
831
|
};
|
|
708
832
|
}
|
|
709
|
-
function
|
|
833
|
+
function zt(t, e) {
|
|
710
834
|
if (!t || !e)
|
|
711
835
|
return e || null;
|
|
712
836
|
if (t.length !== e.length)
|
|
@@ -716,20 +840,20 @@ function Tt(t, e) {
|
|
|
716
840
|
return e;
|
|
717
841
|
return null;
|
|
718
842
|
}
|
|
719
|
-
function
|
|
720
|
-
const r =
|
|
843
|
+
function ut(t, e) {
|
|
844
|
+
const r = zt(t.classes, e.classes), s = K(t.attrs, e.attrs), n = Bt(t.style, e.style);
|
|
721
845
|
let a = null;
|
|
722
846
|
if (t.childs && e.childs) {
|
|
723
847
|
const o = Math.min(t.childs.length, e.childs.length);
|
|
724
|
-
for (let
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
848
|
+
for (let i = 0; i < o; i++) {
|
|
849
|
+
const u = ut(t.childs[i], e.childs[i]);
|
|
850
|
+
if (u) {
|
|
727
851
|
if (!a) {
|
|
728
852
|
a = [];
|
|
729
|
-
for (let
|
|
853
|
+
for (let c = 0; c < o; c++)
|
|
730
854
|
a.push({});
|
|
731
855
|
}
|
|
732
|
-
a[
|
|
856
|
+
a[i] = u;
|
|
733
857
|
}
|
|
734
858
|
}
|
|
735
859
|
}
|
|
@@ -742,23 +866,23 @@ function st(t, e) {
|
|
|
742
866
|
childs: a
|
|
743
867
|
};
|
|
744
868
|
}
|
|
745
|
-
const
|
|
869
|
+
const V = (t, e, r, s) => {
|
|
746
870
|
const n = s(t, e, r, s);
|
|
747
871
|
if (n == null)
|
|
748
872
|
return n;
|
|
749
873
|
if (Array.isArray(n))
|
|
750
874
|
return n.map(
|
|
751
|
-
(a, o,
|
|
875
|
+
(a, o, i) => V(a, o, i, s)
|
|
752
876
|
);
|
|
753
877
|
if (typeof n == "object") {
|
|
754
878
|
const a = {};
|
|
755
879
|
for (const o in n)
|
|
756
|
-
Object.prototype.hasOwnProperty.call(n, o) && (a[o] =
|
|
880
|
+
Object.prototype.hasOwnProperty.call(n, o) && (a[o] = V(n[o], o, n, s));
|
|
757
881
|
return a;
|
|
758
882
|
}
|
|
759
883
|
return n;
|
|
760
884
|
};
|
|
761
|
-
function
|
|
885
|
+
function ft(t, e) {
|
|
762
886
|
if (t.attrs && e.excludeAttrs) {
|
|
763
887
|
for (let r = 0, s = e.excludeAttrs.length; r < s; r++)
|
|
764
888
|
delete t.attrs[e.excludeAttrs[r]];
|
|
@@ -775,9 +899,9 @@ function at(t, e) {
|
|
|
775
899
|
}
|
|
776
900
|
if (t.childs)
|
|
777
901
|
for (let r = 0, s = t.childs.length; r < s; r++)
|
|
778
|
-
|
|
902
|
+
ft(t.childs[r], e);
|
|
779
903
|
}
|
|
780
|
-
function
|
|
904
|
+
function Jt(t, e) {
|
|
781
905
|
for (const r in t) {
|
|
782
906
|
if (!Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
783
907
|
const s = t[r];
|
|
@@ -785,11 +909,11 @@ function It(t, e) {
|
|
|
785
909
|
if (!Object.prototype.hasOwnProperty.call(s, n)) continue;
|
|
786
910
|
const a = s[n];
|
|
787
911
|
for (const o in a)
|
|
788
|
-
Object.prototype.hasOwnProperty.call(a, o) &&
|
|
912
|
+
Object.prototype.hasOwnProperty.call(a, o) && ft(a[o], e);
|
|
789
913
|
}
|
|
790
914
|
}
|
|
791
915
|
}
|
|
792
|
-
function
|
|
916
|
+
function le({
|
|
793
917
|
actualResultFile: t,
|
|
794
918
|
expectedResultFile: e,
|
|
795
919
|
diffResultFile: r,
|
|
@@ -797,228 +921,236 @@ function vt({
|
|
|
797
921
|
transform: n,
|
|
798
922
|
pseudoStates: a
|
|
799
923
|
}) {
|
|
800
|
-
let o,
|
|
924
|
+
let o, i, u, c = {};
|
|
801
925
|
return {
|
|
802
|
-
async init(
|
|
803
|
-
o = await
|
|
926
|
+
async init(E) {
|
|
927
|
+
o = await $t(e), n && (o = V(o, null, null, n)), o && s && Jt(o, s), await E.goto("about:blank"), i = await E.evaluate(rt, { filters: s }), u = i.style;
|
|
804
928
|
},
|
|
805
929
|
async handlePage({
|
|
806
|
-
page:
|
|
807
|
-
testId:
|
|
930
|
+
page: E,
|
|
931
|
+
testId: f,
|
|
808
932
|
url: y,
|
|
809
|
-
stateId:
|
|
933
|
+
stateId: P,
|
|
810
934
|
_filters: d
|
|
811
935
|
}) {
|
|
812
|
-
let w =
|
|
813
|
-
w || (w = {},
|
|
936
|
+
let w = c[f];
|
|
937
|
+
w || (w = {}, c[f] = w);
|
|
814
938
|
let m = w[y.href];
|
|
815
|
-
m || (m = {}, w[y.href] = m), await
|
|
939
|
+
m || (m = {}, w[y.href] = m), await E.addStyleTag({
|
|
816
940
|
content: "*, *::before, *::after { animation-name: none!important; transition-duration: 0s !important; }"
|
|
817
941
|
});
|
|
818
942
|
const D = a ?? [{ states: [] }];
|
|
819
|
-
let
|
|
943
|
+
let l = null, S;
|
|
820
944
|
try {
|
|
821
|
-
for (let
|
|
822
|
-
const x = D[
|
|
945
|
+
for (let b = 0; b < D.length; b++) {
|
|
946
|
+
const x = D[b], O = x.states.length > 0 ? P + ":" + x.states.join(":") : P;
|
|
823
947
|
let p = null;
|
|
824
948
|
if (x.states.length > 0) {
|
|
825
|
-
|
|
949
|
+
l || (l = await ct(E));
|
|
826
950
|
const h = performance.now();
|
|
827
|
-
await
|
|
951
|
+
await Mt(l, x.states), p = performance.now() - h;
|
|
828
952
|
}
|
|
829
|
-
x.delay && await
|
|
830
|
-
const g = performance.now(),
|
|
953
|
+
x.delay && await at(x.delay);
|
|
954
|
+
const g = performance.now(), k = await E.evaluate(rt, {
|
|
831
955
|
filters: d || s,
|
|
832
|
-
defaultStyle:
|
|
833
|
-
shouldEqualResult: m[
|
|
834
|
-
}),
|
|
956
|
+
defaultStyle: u,
|
|
957
|
+
shouldEqualResult: m[O]
|
|
958
|
+
}), C = performance.now() - g;
|
|
835
959
|
if (console.log(
|
|
836
|
-
`SNAPSHOT ${
|
|
837
|
-
), !
|
|
838
|
-
|
|
960
|
+
`SNAPSHOT ${O}:` + (p != null ? ` forcePseudoClasses ${p.toFixed(0)}ms,` : "") + ` getAllElements ${C.toFixed(0)}ms`
|
|
961
|
+
), !S)
|
|
962
|
+
S = k, m[O] = k;
|
|
839
963
|
else {
|
|
840
|
-
const h =
|
|
841
|
-
h && (m[
|
|
964
|
+
const h = ut(S, k);
|
|
965
|
+
h && (m[O] = h);
|
|
842
966
|
}
|
|
843
967
|
}
|
|
844
968
|
} finally {
|
|
845
|
-
|
|
969
|
+
l && await lt(l);
|
|
846
970
|
}
|
|
847
971
|
},
|
|
848
|
-
async end({ checkExistUrlsOnly:
|
|
849
|
-
if (
|
|
850
|
-
let
|
|
851
|
-
if (!
|
|
852
|
-
|
|
972
|
+
async end({ checkExistUrlsOnly: E }) {
|
|
973
|
+
if (c = yt(c), n && (c = V(c, null, null, n)), o) {
|
|
974
|
+
let f, y;
|
|
975
|
+
if (!E)
|
|
976
|
+
f = o, y = c;
|
|
853
977
|
else {
|
|
854
|
-
|
|
978
|
+
f = {}, y = {};
|
|
855
979
|
for (const d in o)
|
|
856
|
-
if (Object.prototype.hasOwnProperty.call(o, d) && Object.prototype.hasOwnProperty.call(
|
|
857
|
-
|
|
980
|
+
if (Object.prototype.hasOwnProperty.call(o, d) && Object.prototype.hasOwnProperty.call(c, d)) {
|
|
981
|
+
f[d] = {}, y[d] = {};
|
|
858
982
|
for (const w in o[d])
|
|
859
|
-
Object.prototype.hasOwnProperty.call(o[d], w) && Object.prototype.hasOwnProperty.call(
|
|
983
|
+
Object.prototype.hasOwnProperty.call(o[d], w) && Object.prototype.hasOwnProperty.call(c[d], w) && (f[d][w] = o[d][w], y[d][w] = c[d][w]);
|
|
860
984
|
}
|
|
861
985
|
}
|
|
862
|
-
const
|
|
863
|
-
|
|
986
|
+
const P = v(
|
|
987
|
+
f,
|
|
864
988
|
y,
|
|
865
|
-
(d, w, m) => m.selector && (delete m.selector, Object.keys(m).length === 0) ? null : m.childs && m.childs.length === 1 ? m.childs[0] : (w && w.selector ? m[
|
|
989
|
+
(d, w, m) => m.selector && (delete m.selector, Object.keys(m).length === 0) ? null : m.childs && m.childs.length === 1 ? m.childs[0] : (w && w.selector ? m[X] ? m[X] = w.selector : m = { selector: w.selector, ...m } : d && d.selector && (m[Q] ? m[Q] = d.selector : m = { selector: d.selector, ...m }), m)
|
|
866
990
|
);
|
|
867
|
-
if (r && await
|
|
868
|
-
throw await
|
|
869
|
-
"Pages elements changes: " + JSON.stringify(
|
|
991
|
+
if (r && await Y(r, P || {}), P)
|
|
992
|
+
throw await Y(t, c), console.error(
|
|
993
|
+
"Pages elements changes: " + JSON.stringify(P, null, 4).substring(0, 5e3)
|
|
870
994
|
), new Error("Pages elements changes detected");
|
|
871
995
|
await I.promises.stat(t).catch(() => null) && await I.promises.unlink(t);
|
|
872
996
|
} else
|
|
873
|
-
await
|
|
874
|
-
return
|
|
997
|
+
await Y(e, c);
|
|
998
|
+
return c;
|
|
875
999
|
}
|
|
876
1000
|
};
|
|
877
1001
|
}
|
|
878
1002
|
export {
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1003
|
+
de as ConsoleMessageLevel,
|
|
1004
|
+
X as DIFF_NEW,
|
|
1005
|
+
Q as DIFF_OLD,
|
|
1006
|
+
he as Lazy,
|
|
1007
|
+
me as LazyWithId,
|
|
1008
|
+
pe as LogLevel,
|
|
1009
|
+
ye as Random,
|
|
1010
|
+
we as Subject,
|
|
1011
|
+
ge as SubjectWithId,
|
|
1012
|
+
xe as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
|
|
1013
|
+
Ee as alertConsole,
|
|
1014
|
+
Se as alertReplace,
|
|
1015
|
+
be as check,
|
|
1016
|
+
It as checkPageHttpErrors,
|
|
1017
|
+
ke as consoleIntercept,
|
|
1018
|
+
Oe as consoleMessageToString,
|
|
1019
|
+
Pe as consoleReplace,
|
|
1020
|
+
je as convertTimeZone,
|
|
1021
|
+
ct as createCDPSession,
|
|
1022
|
+
te as createMatchPath,
|
|
1023
|
+
le as createPagesElementsChangesTest,
|
|
1024
|
+
Ce as createTaskDelayRetry,
|
|
1025
|
+
Ae as createUniquePseudoRandom,
|
|
1026
|
+
Le as dateNowUnique,
|
|
1027
|
+
De as deepCloneJsonLike,
|
|
1028
|
+
Fe as deepEqualJsonLike,
|
|
1029
|
+
Te as deepEqualJsonLikeMap,
|
|
1030
|
+
Wt as delayOnErrorCall,
|
|
1031
|
+
re as delayOnErrorSet,
|
|
1032
|
+
se as delayOnErrorWait,
|
|
1033
|
+
lt as destroyCDPSession,
|
|
1034
|
+
Ie as equalArray,
|
|
1035
|
+
_e as escapeHtml,
|
|
1036
|
+
Re as escapeRegExp,
|
|
1037
|
+
Ft as exec,
|
|
1038
|
+
Xt as fileLock,
|
|
1039
|
+
We as fixStackTrace,
|
|
1040
|
+
Mt as forcePseudoClasses,
|
|
1041
|
+
Ne as formatAny,
|
|
1042
|
+
$e as formatDate,
|
|
1043
|
+
Me as formatDateFileName,
|
|
1044
|
+
rt as getAllElements,
|
|
1045
|
+
Be as getConsoleMessages,
|
|
1046
|
+
ze as getDateInet,
|
|
1047
|
+
Ot as getDrive,
|
|
1048
|
+
ut as getElementsStyleDiff,
|
|
1049
|
+
Pt as getFileId,
|
|
1050
|
+
yt as getNormalizedObject,
|
|
1051
|
+
v as getObjectsDiff,
|
|
1052
|
+
Tt as getPageHttpErrors,
|
|
1053
|
+
Je as getRandomFunc,
|
|
1054
|
+
Ue as getRandomSeed,
|
|
1055
|
+
pt as getStackTrace,
|
|
1056
|
+
At as globGitIgnoreToPicomatch,
|
|
1057
|
+
Lt as globToRelative,
|
|
1058
|
+
Nt as initPage,
|
|
1059
|
+
He as isObservable,
|
|
1060
|
+
ee as loadGlobs,
|
|
1061
|
+
Dt as loadGlobsFromFile,
|
|
1062
|
+
$t as loadJson,
|
|
1063
|
+
Ge as match,
|
|
1064
|
+
ve as matchAnd,
|
|
1065
|
+
Ke as matchAndPipe,
|
|
1066
|
+
Ve as matchAny,
|
|
1067
|
+
Ye as matchArray,
|
|
1068
|
+
qe as matchArrayBuffer,
|
|
1069
|
+
Qe as matchArrayIncludes,
|
|
1070
|
+
Xe as matchArrayItem,
|
|
1071
|
+
Ze as matchArrayLength,
|
|
1072
|
+
tn as matchArrayWith,
|
|
1073
|
+
en as matchBoolean,
|
|
1074
|
+
nn as matchConstructor,
|
|
1075
|
+
rn as matchConvert,
|
|
1076
|
+
sn as matchCustom,
|
|
1077
|
+
an as matchDeep,
|
|
1078
|
+
on as matchEnum,
|
|
1079
|
+
cn as matchFloat,
|
|
1080
|
+
ln as matchIn,
|
|
1081
|
+
un as matchInstanceOf,
|
|
1082
|
+
fn as matchInt,
|
|
1083
|
+
dn as matchIntDate,
|
|
1084
|
+
hn as matchIs,
|
|
1085
|
+
mn as matchIsNonStrict,
|
|
1086
|
+
pn as matchNever,
|
|
1087
|
+
yn as matchNot,
|
|
1088
|
+
wn as matchNotNullish,
|
|
1089
|
+
gn as matchNullish,
|
|
1090
|
+
xn as matchNumber,
|
|
1091
|
+
En as matchObject,
|
|
1092
|
+
Sn as matchObjectEntries,
|
|
1093
|
+
bn as matchObjectEntry,
|
|
1094
|
+
kn as matchObjectKey,
|
|
1095
|
+
On as matchObjectKeyValue,
|
|
1096
|
+
Pn as matchObjectKeys,
|
|
1097
|
+
jn as matchObjectKeysNotNull,
|
|
1098
|
+
Cn as matchObjectPartial,
|
|
1099
|
+
An as matchObjectValue,
|
|
1100
|
+
Ln as matchObjectValues,
|
|
1101
|
+
Dn as matchObjectWith,
|
|
1102
|
+
Fn as matchOptional,
|
|
1103
|
+
Tn as matchOr,
|
|
1104
|
+
In as matchOrPipe,
|
|
1105
|
+
_n as matchRange,
|
|
1106
|
+
Rn as matchRangeDate,
|
|
1107
|
+
Wn as matchRef,
|
|
1108
|
+
Nn as matchString,
|
|
1109
|
+
$n as matchStringLength,
|
|
1110
|
+
Mn as matchTypeOf,
|
|
1111
|
+
Bn as matchUuid,
|
|
1112
|
+
zn as matchValueState,
|
|
1113
|
+
Jn as max,
|
|
1114
|
+
Un as min,
|
|
1115
|
+
Hn as minMax,
|
|
1116
|
+
ne as nodeBeep,
|
|
1117
|
+
Gn as numberMod,
|
|
1118
|
+
V as objectTransform,
|
|
1119
|
+
$ as pathNormalize,
|
|
1120
|
+
jt as pathResolve,
|
|
1121
|
+
Z as poolFs,
|
|
1122
|
+
vn as randomBoolean,
|
|
1123
|
+
Kn as randomEnum,
|
|
1124
|
+
Vn as randomFloat,
|
|
1125
|
+
Yn as randomIndexWeighted,
|
|
1126
|
+
qn as randomInt,
|
|
1127
|
+
Qn as randomItem,
|
|
1128
|
+
Xn as randomItems,
|
|
1129
|
+
Y as saveJson,
|
|
1130
|
+
Zn as setFuncName,
|
|
1131
|
+
Rt as setPlaywrightPriorityLow,
|
|
1132
|
+
tr as sha256,
|
|
1133
|
+
er as sha256Buffer,
|
|
1134
|
+
_t as subscribeJsErrors,
|
|
1135
|
+
ae as testPage,
|
|
1136
|
+
nr as timeoutAbortController,
|
|
1137
|
+
rr as toHex,
|
|
1138
|
+
sr as truncateString,
|
|
1139
|
+
ar as urlGetBoolean,
|
|
1140
|
+
or as urlGetFloat,
|
|
1141
|
+
ir as urlGetInt,
|
|
1142
|
+
cr as urlGetParams,
|
|
1143
|
+
lr as urlGetString,
|
|
1144
|
+
ur as urlParamToBoolean,
|
|
1145
|
+
fr as urlParamToFloat,
|
|
1146
|
+
dr as urlParamToInt,
|
|
1147
|
+
oe as useBrowser,
|
|
1148
|
+
ie as useBrowserContext,
|
|
1149
|
+
ce as usingCDPSession,
|
|
1150
|
+
hr as waitObservable,
|
|
1151
|
+
Ct as walkPathHandleErrorDefault,
|
|
1152
|
+
Zt as walkPaths,
|
|
1153
|
+
mr as withConsoleReplace,
|
|
1154
|
+
pr as withRetry,
|
|
1155
|
+
mt as withTimeout
|
|
1024
1156
|
};
|