@riddledc/riddle-proof 0.7.157 → 0.7.159
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/dist/{chunk-YB3LNLZB.js → chunk-TBTMD5WV.js} +16 -2
- package/dist/cli.cjs +24 -3
- package/dist/cli.js +9 -2
- package/dist/index.cjs +16 -2
- package/dist/index.js +1 -1
- package/dist/profile.cjs +16 -2
- package/dist/profile.js +1 -1
- package/package.json +1 -1
|
@@ -2094,7 +2094,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
2094
2094
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
2095
2095
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
2096
2096
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
2097
|
-
|
|
2097
|
+
let candidates;
|
|
2098
|
+
if (check.type === "selector_text_visible") {
|
|
2099
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
2100
|
+
} else if (check.type === "selector_text_absent") {
|
|
2101
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
2102
|
+
} else {
|
|
2103
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
2104
|
+
}
|
|
2098
2105
|
return candidates.map((text) => String(text).replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
2099
2106
|
}
|
|
2100
2107
|
return [];
|
|
@@ -3474,7 +3481,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
3474
3481
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
3475
3482
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
3476
3483
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
3477
|
-
|
|
3484
|
+
let candidates;
|
|
3485
|
+
if (check.type === "selector_text_visible") {
|
|
3486
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
3487
|
+
} else if (check.type === "selector_text_absent") {
|
|
3488
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
3489
|
+
} else {
|
|
3490
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
3491
|
+
}
|
|
3478
3492
|
return candidates.map((text) => String(text || "").replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
3479
3493
|
}
|
|
3480
3494
|
return [];
|
package/dist/cli.cjs
CHANGED
|
@@ -9051,7 +9051,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
9051
9051
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
9052
9052
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
9053
9053
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
9054
|
-
|
|
9054
|
+
let candidates;
|
|
9055
|
+
if (check.type === "selector_text_visible") {
|
|
9056
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
9057
|
+
} else if (check.type === "selector_text_absent") {
|
|
9058
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
9059
|
+
} else {
|
|
9060
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
9061
|
+
}
|
|
9055
9062
|
return candidates.map((text) => String(text).replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
9056
9063
|
}
|
|
9057
9064
|
return [];
|
|
@@ -10415,7 +10422,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
10415
10422
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
10416
10423
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
10417
10424
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
10418
|
-
|
|
10425
|
+
let candidates;
|
|
10426
|
+
if (check.type === "selector_text_visible") {
|
|
10427
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
10428
|
+
} else if (check.type === "selector_text_absent") {
|
|
10429
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
10430
|
+
} else {
|
|
10431
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
10432
|
+
}
|
|
10419
10433
|
return candidates.map((text) => String(text || "").replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
10420
10434
|
}
|
|
10421
10435
|
return [];
|
|
@@ -16048,13 +16062,20 @@ function riddlePollOptionsForProfile(options) {
|
|
|
16048
16062
|
} : void 0
|
|
16049
16063
|
};
|
|
16050
16064
|
}
|
|
16065
|
+
function profileItemAppliesToSplitViewport(item, viewport) {
|
|
16066
|
+
if (!item.viewports?.length) return true;
|
|
16067
|
+
return Boolean(viewport.name && item.viewports.includes(viewport.name));
|
|
16068
|
+
}
|
|
16051
16069
|
function profileForSplitViewport(profile, viewport) {
|
|
16070
|
+
const setupActions = profile.target.setup_actions?.filter((action) => profileItemAppliesToSplitViewport(action, viewport));
|
|
16052
16071
|
return {
|
|
16053
16072
|
...profile,
|
|
16054
16073
|
name: `${profile.name}-${viewport.name || `${viewport.width}x${viewport.height}`}`,
|
|
16074
|
+
checks: profile.checks.filter((check) => profileItemAppliesToSplitViewport(check, viewport)),
|
|
16055
16075
|
target: {
|
|
16056
16076
|
...profile.target,
|
|
16057
|
-
viewports: [viewport]
|
|
16077
|
+
viewports: [viewport],
|
|
16078
|
+
...setupActions ? { setup_actions: setupActions } : {}
|
|
16058
16079
|
},
|
|
16059
16080
|
metadata: {
|
|
16060
16081
|
...profile.metadata || {},
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
profileStatusExitCode,
|
|
14
14
|
resolveRiddleProofProfileTargetUrl,
|
|
15
15
|
resolveRiddleProofProfileTimeoutSec
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TBTMD5WV.js";
|
|
17
17
|
import {
|
|
18
18
|
createRiddleApiClient,
|
|
19
19
|
isTerminalRiddleJobStatus,
|
|
@@ -1299,13 +1299,20 @@ function riddlePollOptionsForProfile(options) {
|
|
|
1299
1299
|
} : void 0
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
+
function profileItemAppliesToSplitViewport(item, viewport) {
|
|
1303
|
+
if (!item.viewports?.length) return true;
|
|
1304
|
+
return Boolean(viewport.name && item.viewports.includes(viewport.name));
|
|
1305
|
+
}
|
|
1302
1306
|
function profileForSplitViewport(profile, viewport) {
|
|
1307
|
+
const setupActions = profile.target.setup_actions?.filter((action) => profileItemAppliesToSplitViewport(action, viewport));
|
|
1303
1308
|
return {
|
|
1304
1309
|
...profile,
|
|
1305
1310
|
name: `${profile.name}-${viewport.name || `${viewport.width}x${viewport.height}`}`,
|
|
1311
|
+
checks: profile.checks.filter((check) => profileItemAppliesToSplitViewport(check, viewport)),
|
|
1306
1312
|
target: {
|
|
1307
1313
|
...profile.target,
|
|
1308
|
-
viewports: [viewport]
|
|
1314
|
+
viewports: [viewport],
|
|
1315
|
+
...setupActions ? { setup_actions: setupActions } : {}
|
|
1309
1316
|
},
|
|
1310
1317
|
metadata: {
|
|
1311
1318
|
...profile.metadata || {},
|
package/dist/index.cjs
CHANGED
|
@@ -10827,7 +10827,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
10827
10827
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
10828
10828
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
10829
10829
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
10830
|
-
|
|
10830
|
+
let candidates;
|
|
10831
|
+
if (check.type === "selector_text_visible") {
|
|
10832
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
10833
|
+
} else if (check.type === "selector_text_absent") {
|
|
10834
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
10835
|
+
} else {
|
|
10836
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
10837
|
+
}
|
|
10831
10838
|
return candidates.map((text) => String(text).replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
10832
10839
|
}
|
|
10833
10840
|
return [];
|
|
@@ -12207,7 +12214,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
12207
12214
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
12208
12215
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
12209
12216
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
12210
|
-
|
|
12217
|
+
let candidates;
|
|
12218
|
+
if (check.type === "selector_text_visible") {
|
|
12219
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
12220
|
+
} else if (check.type === "selector_text_absent") {
|
|
12221
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
12222
|
+
} else {
|
|
12223
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
12224
|
+
}
|
|
12211
12225
|
return candidates.map((text) => String(text || "").replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
12212
12226
|
}
|
|
12213
12227
|
return [];
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveRiddleProofProfileTimeoutSec,
|
|
63
63
|
slugifyRiddleProofProfileName,
|
|
64
64
|
summarizeRiddleProofProfileResult
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-TBTMD5WV.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -2141,7 +2141,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
2141
2141
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
2142
2142
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
2143
2143
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
2144
|
-
|
|
2144
|
+
let candidates;
|
|
2145
|
+
if (check.type === "selector_text_visible") {
|
|
2146
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
2147
|
+
} else if (check.type === "selector_text_absent") {
|
|
2148
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
2149
|
+
} else {
|
|
2150
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
2151
|
+
}
|
|
2145
2152
|
return candidates.map((text) => String(text).replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
2146
2153
|
}
|
|
2147
2154
|
return [];
|
|
@@ -3521,7 +3528,14 @@ function textSequenceForCheck(viewport, check) {
|
|
|
3521
3528
|
const matchTexts = Array.isArray(sequence.match_texts) ? sequence.match_texts : [];
|
|
3522
3529
|
const visibleTexts = Array.isArray(sequence.visible_texts) ? sequence.visible_texts : [];
|
|
3523
3530
|
const texts = Array.isArray(sequence.texts) ? sequence.texts : [];
|
|
3524
|
-
|
|
3531
|
+
let candidates;
|
|
3532
|
+
if (check.type === "selector_text_visible") {
|
|
3533
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : visibleTexts;
|
|
3534
|
+
} else if (check.type === "selector_text_absent") {
|
|
3535
|
+
candidates = matchTexts.length ? matchTexts : texts;
|
|
3536
|
+
} else {
|
|
3537
|
+
candidates = visibleMatchTexts.length ? visibleMatchTexts : matchTexts.length ? matchTexts : visibleTexts.length ? visibleTexts : texts;
|
|
3538
|
+
}
|
|
3525
3539
|
return candidates.map((text) => String(text || "").replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
3526
3540
|
}
|
|
3527
3541
|
return [];
|
package/dist/profile.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveRiddleProofProfileTimeoutSec,
|
|
24
24
|
slugifyRiddleProofProfileName,
|
|
25
25
|
summarizeRiddleProofProfileResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TBTMD5WV.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|