@riddledc/riddle-proof 0.7.103 → 0.7.105
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/README.md +11 -1
- package/dist/{chunk-7FQU5UH7.js → chunk-VO5U4I7F.js} +25 -1
- package/dist/cli.cjs +25 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +25 -1
- package/dist/index.js +1 -1
- package/dist/profile.cjs +25 -1
- package/dist/profile.js +1 -1
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -306,7 +306,10 @@ Use setup assertions when the pre-click or pre-navigation state is part of the c
|
|
|
306
306
|
for example a fresh row must be present, stale copy must be absent, exactly one
|
|
307
307
|
source link must exist before clicking into the final route, or a canvas app's
|
|
308
308
|
proof state must expose a terminal flag. `assert_selector_count` accepts
|
|
309
|
-
`expected_count`; `
|
|
309
|
+
`expected_count`; `assert_text_visible` and `assert_text_absent` prefer rendered
|
|
310
|
+
selector text (`innerText`) so casing from CSS `text-transform` matches
|
|
311
|
+
`selector_text_visible`, with a `textContent` fallback for non-HTML elements.
|
|
312
|
+
`assert_window_value` accepts `path` / `state_path` plus
|
|
310
313
|
`expected_value` / `expected` and compares JSON-safe values exactly.
|
|
311
314
|
`assert_window_number` accepts `path` / `state_path` plus `expected_value`,
|
|
312
315
|
`min_value`, or `max_value`, and is useful for canvas-only proof state such as
|
|
@@ -456,6 +459,13 @@ text. Use `text_visible` or `selector_text_visible` when CSS transforms,
|
|
|
456
459
|
hydration, client rendering, hidden elements, or layout-specific copy should be
|
|
457
460
|
judged exactly as the browser exposes it to users.
|
|
458
461
|
|
|
462
|
+
When the profile target is a mounted Riddle static Preview such as
|
|
463
|
+
`https://preview.riddledc.com/s/ps_1234abcd/docs/`, root-relative
|
|
464
|
+
`http_status` URLs preserve that mount. A check for
|
|
465
|
+
`/docs/markdown.md` probes
|
|
466
|
+
`https://preview.riddledc.com/s/ps_1234abcd/docs/markdown.md`, matching the
|
|
467
|
+
Preview artifact instead of escaping to the Preview origin root.
|
|
468
|
+
|
|
459
469
|
Use `frame_text_visible` and `frame_no_horizontal_overflow` for embedded app,
|
|
460
470
|
game, or preview surfaces that render inside iframes:
|
|
461
471
|
|
|
@@ -967,6 +967,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
967
967
|
const rawUrl = check.url || "";
|
|
968
968
|
if (!rawUrl) return "";
|
|
969
969
|
try {
|
|
970
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
971
|
+
const base = new URL(baseUrl);
|
|
972
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
973
|
+
if (mountPrefix) {
|
|
974
|
+
const requested = new URL(rawUrl, base.origin);
|
|
975
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
976
|
+
base.search = requested.search;
|
|
977
|
+
base.hash = requested.hash;
|
|
978
|
+
return base.href;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
970
981
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
971
982
|
} catch {
|
|
972
983
|
return rawUrl;
|
|
@@ -2342,6 +2353,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
2342
2353
|
const rawUrl = check.url || "";
|
|
2343
2354
|
if (!rawUrl) return "";
|
|
2344
2355
|
try {
|
|
2356
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
2357
|
+
const base = new URL(baseUrl);
|
|
2358
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
2359
|
+
if (mountPrefix) {
|
|
2360
|
+
const requested = new URL(rawUrl, base.origin);
|
|
2361
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
2362
|
+
base.search = requested.search;
|
|
2363
|
+
base.hash = requested.hash;
|
|
2364
|
+
return base.href;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2345
2367
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
2346
2368
|
} catch {
|
|
2347
2369
|
return rawUrl;
|
|
@@ -3710,7 +3732,9 @@ async function setupActionScope(action, timeout) {
|
|
|
3710
3732
|
return { ok: true, context: frame, frame_selector: frameSelector, frame_index: frameIndex, frame_count: frameCount };
|
|
3711
3733
|
}
|
|
3712
3734
|
async function setupLocatorText(locator, index) {
|
|
3713
|
-
|
|
3735
|
+
const target = locator.nth(index);
|
|
3736
|
+
return await target.innerText({ timeout: 1000 })
|
|
3737
|
+
.catch(async () => await target.textContent({ timeout: 1000 }).catch(() => ""));
|
|
3714
3738
|
}
|
|
3715
3739
|
function compactSetupResultText(value) {
|
|
3716
3740
|
const text = String(value || "").replace(/\s+/g, " ").trim();
|
package/dist/cli.cjs
CHANGED
|
@@ -7860,6 +7860,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
7860
7860
|
const rawUrl = check.url || "";
|
|
7861
7861
|
if (!rawUrl) return "";
|
|
7862
7862
|
try {
|
|
7863
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
7864
|
+
const base = new URL(baseUrl);
|
|
7865
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
7866
|
+
if (mountPrefix) {
|
|
7867
|
+
const requested = new URL(rawUrl, base.origin);
|
|
7868
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
7869
|
+
base.search = requested.search;
|
|
7870
|
+
base.hash = requested.hash;
|
|
7871
|
+
return base.href;
|
|
7872
|
+
}
|
|
7873
|
+
}
|
|
7863
7874
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
7864
7875
|
} catch {
|
|
7865
7876
|
return rawUrl;
|
|
@@ -9219,6 +9230,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
9219
9230
|
const rawUrl = check.url || "";
|
|
9220
9231
|
if (!rawUrl) return "";
|
|
9221
9232
|
try {
|
|
9233
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
9234
|
+
const base = new URL(baseUrl);
|
|
9235
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
9236
|
+
if (mountPrefix) {
|
|
9237
|
+
const requested = new URL(rawUrl, base.origin);
|
|
9238
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
9239
|
+
base.search = requested.search;
|
|
9240
|
+
base.hash = requested.hash;
|
|
9241
|
+
return base.href;
|
|
9242
|
+
}
|
|
9243
|
+
}
|
|
9222
9244
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
9223
9245
|
} catch {
|
|
9224
9246
|
return rawUrl;
|
|
@@ -10587,7 +10609,9 @@ async function setupActionScope(action, timeout) {
|
|
|
10587
10609
|
return { ok: true, context: frame, frame_selector: frameSelector, frame_index: frameIndex, frame_count: frameCount };
|
|
10588
10610
|
}
|
|
10589
10611
|
async function setupLocatorText(locator, index) {
|
|
10590
|
-
|
|
10612
|
+
const target = locator.nth(index);
|
|
10613
|
+
return await target.innerText({ timeout: 1000 })
|
|
10614
|
+
.catch(async () => await target.textContent({ timeout: 1000 }).catch(() => ""));
|
|
10591
10615
|
}
|
|
10592
10616
|
function compactSetupResultText(value) {
|
|
10593
10617
|
const text = String(value || "").replace(/\s+/g, " ").trim();
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -9696,6 +9696,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
9696
9696
|
const rawUrl = check.url || "";
|
|
9697
9697
|
if (!rawUrl) return "";
|
|
9698
9698
|
try {
|
|
9699
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
9700
|
+
const base = new URL(baseUrl);
|
|
9701
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
9702
|
+
if (mountPrefix) {
|
|
9703
|
+
const requested = new URL(rawUrl, base.origin);
|
|
9704
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
9705
|
+
base.search = requested.search;
|
|
9706
|
+
base.hash = requested.hash;
|
|
9707
|
+
return base.href;
|
|
9708
|
+
}
|
|
9709
|
+
}
|
|
9699
9710
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
9700
9711
|
} catch {
|
|
9701
9712
|
return rawUrl;
|
|
@@ -11071,6 +11082,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
11071
11082
|
const rawUrl = check.url || "";
|
|
11072
11083
|
if (!rawUrl) return "";
|
|
11073
11084
|
try {
|
|
11085
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
11086
|
+
const base = new URL(baseUrl);
|
|
11087
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
11088
|
+
if (mountPrefix) {
|
|
11089
|
+
const requested = new URL(rawUrl, base.origin);
|
|
11090
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
11091
|
+
base.search = requested.search;
|
|
11092
|
+
base.hash = requested.hash;
|
|
11093
|
+
return base.href;
|
|
11094
|
+
}
|
|
11095
|
+
}
|
|
11074
11096
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
11075
11097
|
} catch {
|
|
11076
11098
|
return rawUrl;
|
|
@@ -12439,7 +12461,9 @@ async function setupActionScope(action, timeout) {
|
|
|
12439
12461
|
return { ok: true, context: frame, frame_selector: frameSelector, frame_index: frameIndex, frame_count: frameCount };
|
|
12440
12462
|
}
|
|
12441
12463
|
async function setupLocatorText(locator, index) {
|
|
12442
|
-
|
|
12464
|
+
const target = locator.nth(index);
|
|
12465
|
+
return await target.innerText({ timeout: 1000 })
|
|
12466
|
+
.catch(async () => await target.textContent({ timeout: 1000 }).catch(() => ""));
|
|
12443
12467
|
}
|
|
12444
12468
|
function compactSetupResultText(value) {
|
|
12445
12469
|
const text = String(value || "").replace(/\s+/g, " ").trim();
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveRiddleProofProfileTimeoutSec,
|
|
59
59
|
slugifyRiddleProofProfileName,
|
|
60
60
|
summarizeRiddleProofProfileResult
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VO5U4I7F.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
64
64
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -1010,6 +1010,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
1010
1010
|
const rawUrl = check.url || "";
|
|
1011
1011
|
if (!rawUrl) return "";
|
|
1012
1012
|
try {
|
|
1013
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
1014
|
+
const base = new URL(baseUrl);
|
|
1015
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
1016
|
+
if (mountPrefix) {
|
|
1017
|
+
const requested = new URL(rawUrl, base.origin);
|
|
1018
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
1019
|
+
base.search = requested.search;
|
|
1020
|
+
base.hash = requested.hash;
|
|
1021
|
+
return base.href;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1013
1024
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
1014
1025
|
} catch {
|
|
1015
1026
|
return rawUrl;
|
|
@@ -2385,6 +2396,17 @@ function httpStatusRequestUrl(check, baseUrl) {
|
|
|
2385
2396
|
const rawUrl = check.url || "";
|
|
2386
2397
|
if (!rawUrl) return "";
|
|
2387
2398
|
try {
|
|
2399
|
+
if (baseUrl && rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
2400
|
+
const base = new URL(baseUrl);
|
|
2401
|
+
const mountPrefix = previewMountPrefix(base.pathname);
|
|
2402
|
+
if (mountPrefix) {
|
|
2403
|
+
const requested = new URL(rawUrl, base.origin);
|
|
2404
|
+
base.pathname = joinMountedRoutePath(mountPrefix, requested.pathname);
|
|
2405
|
+
base.search = requested.search;
|
|
2406
|
+
base.hash = requested.hash;
|
|
2407
|
+
return base.href;
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2388
2410
|
return baseUrl ? new URL(rawUrl, baseUrl).href : new URL(rawUrl).href;
|
|
2389
2411
|
} catch {
|
|
2390
2412
|
return rawUrl;
|
|
@@ -3753,7 +3775,9 @@ async function setupActionScope(action, timeout) {
|
|
|
3753
3775
|
return { ok: true, context: frame, frame_selector: frameSelector, frame_index: frameIndex, frame_count: frameCount };
|
|
3754
3776
|
}
|
|
3755
3777
|
async function setupLocatorText(locator, index) {
|
|
3756
|
-
|
|
3778
|
+
const target = locator.nth(index);
|
|
3779
|
+
return await target.innerText({ timeout: 1000 })
|
|
3780
|
+
.catch(async () => await target.textContent({ timeout: 1000 }).catch(() => ""));
|
|
3757
3781
|
}
|
|
3758
3782
|
function compactSetupResultText(value) {
|
|
3759
3783
|
const text = String(value || "").replace(/\s+/g, " ").trim();
|
package/dist/profile.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveRiddleProofProfileTimeoutSec,
|
|
20
20
|
slugifyRiddleProofProfileName,
|
|
21
21
|
summarizeRiddleProofProfileResult
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VO5U4I7F.js";
|
|
23
23
|
export {
|
|
24
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
25
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|