@riddledc/riddle-proof 0.8.70 → 0.8.72
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 +6 -0
- package/dist/{chunk-EX7TO4I5.js → chunk-GG2D3MFZ.js} +57 -3
- package/dist/{chunk-5Y4V2IXI.js → chunk-UE4I7RTI.js} +1 -1
- package/dist/{chunk-RJVA5KKM.js → chunk-XIJI62DC.js} +42 -2
- package/dist/cli/index.js +3 -3
- package/dist/cli.cjs +106 -0
- package/dist/cli.js +3 -3
- package/dist/index.cjs +59 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/profile/index.cjs +59 -3
- package/dist/profile/index.d.cts +1 -1
- package/dist/profile/index.d.ts +1 -1
- package/dist/profile/index.js +5 -1
- package/dist/profile-suggestions.js +2 -2
- package/dist/profile.cjs +59 -3
- package/dist/profile.d.cts +16 -2
- package/dist/profile.d.ts +16 -2
- package/dist/profile.js +5 -1
- package/examples/neutral-fixture-site/README.md +19 -0
- package/examples/neutral-fixture-site/index.html +23 -0
- package/examples/neutral-fixture-site/pass.html +35 -0
- package/examples/neutral-fixture-site/styles.css +110 -0
- package/examples/profiles/neutral-fixture-pass.json +30 -0
- package/examples/profiles/neutral-fixture-product-regression.json +27 -0
- package/examples/story-matrices/README.md +5 -0
- package/examples/story-matrices/riddle-proof-bounded-loop.json +95 -0
- package/examples/story-matrices/riddle-proof-neutral-public-state-fixtures.json +144 -0
- package/examples/story-matrices/riddle-proof-ux-coverage.csv +5 -0
- package/package.json +1 -1
package/dist/profile/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/profile/index.ts
|
|
21
21
|
var profile_exports = {};
|
|
22
22
|
__export(profile_exports, {
|
|
23
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
23
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
24
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: () => RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
25
26
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES: () => RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -40,6 +41,7 @@ __export(profile_exports, {
|
|
|
40
41
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
41
42
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
42
43
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
44
|
+
preflightRiddleProofProfileRunnerArtifacts: () => preflightRiddleProofProfileRunnerArtifacts,
|
|
43
45
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
44
46
|
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
45
47
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
@@ -3537,6 +3539,35 @@ function profileStatusFromEvidence(profile, evidence, checks) {
|
|
|
3537
3539
|
if (checks.some((check) => check.status === "failed")) return "product_regression";
|
|
3538
3540
|
return "passed";
|
|
3539
3541
|
}
|
|
3542
|
+
var RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS = [
|
|
3543
|
+
"screenshot",
|
|
3544
|
+
"console",
|
|
3545
|
+
"dom_summary",
|
|
3546
|
+
"proof_json"
|
|
3547
|
+
];
|
|
3548
|
+
function preflightRiddleProofProfileRunnerArtifacts(profile, runner) {
|
|
3549
|
+
const requested = uniqueNonEmptyStrings(profile.artifacts || []);
|
|
3550
|
+
if (runner !== "riddle") {
|
|
3551
|
+
return {
|
|
3552
|
+
ok: true,
|
|
3553
|
+
runner,
|
|
3554
|
+
requested,
|
|
3555
|
+
local_only: [],
|
|
3556
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS]
|
|
3557
|
+
};
|
|
3558
|
+
}
|
|
3559
|
+
const localOnly = requested.filter(profileArtifactIsHostedLocalOnly);
|
|
3560
|
+
const subject = localOnly.join(", ");
|
|
3561
|
+
const message = localOnly.length ? `${subject} ${localOnly.length === 1 ? "is" : "are"} local-runner output; hosted runs produce proof_json, console, dom_summary, and screenshots. Remove ${localOnly.length === 1 ? "it" : "them"} from profile.artifacts for --runner riddle.` : void 0;
|
|
3562
|
+
return {
|
|
3563
|
+
ok: localOnly.length === 0,
|
|
3564
|
+
runner,
|
|
3565
|
+
requested,
|
|
3566
|
+
local_only: localOnly,
|
|
3567
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS],
|
|
3568
|
+
message
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3540
3571
|
function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
|
|
3541
3572
|
const required = profileRequiredArtifactKeys(profile, result);
|
|
3542
3573
|
const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
|
|
@@ -3601,6 +3632,16 @@ function normalizeProfileArtifactRole(input) {
|
|
|
3601
3632
|
if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
|
|
3602
3633
|
return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
|
|
3603
3634
|
}
|
|
3635
|
+
function profileArtifactIsHostedLocalOnly(input) {
|
|
3636
|
+
const raw = input.trim().toLowerCase();
|
|
3637
|
+
const normalized = raw.replace(/[\s-]+/g, "_");
|
|
3638
|
+
const role = normalizeProfileArtifactRole(input);
|
|
3639
|
+
return [
|
|
3640
|
+
raw,
|
|
3641
|
+
normalized,
|
|
3642
|
+
role
|
|
3643
|
+
].some((value) => value === "artifact_manifest" || value === "artifact_manifest.json" || value === "artifact-manifest" || value === "artifact-manifest.json");
|
|
3644
|
+
}
|
|
3604
3645
|
function profileArtifactKeyPresent(key, artifacts) {
|
|
3605
3646
|
if (key.startsWith("screenshot:")) {
|
|
3606
3647
|
const label = key.slice("screenshot:".length);
|
|
@@ -3692,19 +3733,32 @@ function profileStatusExitCode(profile, status) {
|
|
|
3692
3733
|
if (status === "passed") return 0;
|
|
3693
3734
|
return profile.failure_policy[status] === "neutral" ? 0 : 1;
|
|
3694
3735
|
}
|
|
3695
|
-
function createRiddleProofProfileConfigurationError(
|
|
3736
|
+
function createRiddleProofProfileConfigurationError(profileOrName, error, runner = "riddle", options = {}) {
|
|
3737
|
+
const profile = typeof profileOrName === "string" ? void 0 : profileOrName;
|
|
3738
|
+
const name = profile ? profile.name : String(profileOrName);
|
|
3696
3739
|
const message = error instanceof Error ? error.message : String(error);
|
|
3740
|
+
let requested = "";
|
|
3741
|
+
if (profile) {
|
|
3742
|
+
try {
|
|
3743
|
+
requested = resolveRiddleProofProfileTargetUrl(profile);
|
|
3744
|
+
} catch {
|
|
3745
|
+
requested = "";
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3697
3748
|
return {
|
|
3698
3749
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
3699
3750
|
profile_name: name,
|
|
3700
3751
|
runner,
|
|
3701
3752
|
status: "configuration_error",
|
|
3702
|
-
baseline_policy: "invariant_only",
|
|
3703
|
-
route: { requested
|
|
3753
|
+
baseline_policy: profile?.baseline_policy || "invariant_only",
|
|
3754
|
+
route: { requested, observed: "", matched: false, error: message },
|
|
3704
3755
|
artifacts: { screenshots: [], proof_json: "proof.json" },
|
|
3705
3756
|
checks: [],
|
|
3706
3757
|
summary: `${name} has a profile configuration error.`,
|
|
3707
3758
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3759
|
+
metadata: profile?.metadata,
|
|
3760
|
+
warnings: options.warnings?.length ? options.warnings : void 0,
|
|
3761
|
+
configuration_blocker: options.configurationBlocker,
|
|
3708
3762
|
error: message
|
|
3709
3763
|
};
|
|
3710
3764
|
}
|
|
@@ -9600,6 +9654,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9600
9654
|
}
|
|
9601
9655
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9602
9656
|
0 && (module.exports = {
|
|
9657
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
9603
9658
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
9604
9659
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
9605
9660
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -9620,6 +9675,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9620
9675
|
extractRiddleProofProfileResult,
|
|
9621
9676
|
normalizeRiddleProofProfile,
|
|
9622
9677
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
9678
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
9623
9679
|
profileStatusExitCode,
|
|
9624
9680
|
resolveRiddleProofProfileRouteUrl,
|
|
9625
9681
|
resolveRiddleProofProfileTargetUrl,
|
package/dist/profile/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.cjs';
|
|
1
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.cjs';
|
|
2
2
|
import '../types.cjs';
|
|
3
3
|
import '../public-state.cjs';
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.js';
|
|
1
|
+
export { NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, RiddleProofArtifactBodyAssertionInput, RiddleProofArtifactBodyAssertionResult, RiddleProofProfile, RiddleProofProfileArtifactCompleteness, RiddleProofProfileArtifactRef, RiddleProofProfileBaselinePolicy, RiddleProofProfileBoundsOffender, RiddleProofProfileCheck, RiddleProofProfileCheckResult, RiddleProofProfileCheckType, RiddleProofProfileEvidence, RiddleProofProfileFailureAction, RiddleProofProfileHttpStatusBodyJsonAssertion, RiddleProofProfileHttpStatusBodyJsonAssertionResult, RiddleProofProfileHttpStatusPreflightCheckResult, RiddleProofProfileHttpStatusPreflightFetch, RiddleProofProfileHttpStatusPreflightFetchResponse, RiddleProofProfileHttpStatusPreflightOptions, RiddleProofProfileHttpStatusPreflightResult, RiddleProofProfileJsonValueType, RiddleProofProfileNetworkAbortErrorCode, RiddleProofProfileNetworkMock, RiddleProofProfileNetworkMockResponse, RiddleProofProfileResult, RiddleProofProfileReturnSummaryField, RiddleProofProfileRouteEvidence, RiddleProofProfileRouteInventoryRoute, RiddleProofProfileRunner, RiddleProofProfileRunnerArtifactPreflight, RiddleProofProfileSetupAction, RiddleProofProfileSetupActionType, RiddleProofProfileStatus, RiddleProofProfileTarget, RiddleProofProfileViewport, RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult } from '../profile.js';
|
|
2
2
|
import '../types.js';
|
|
3
3
|
import '../public-state.js';
|
package/dist/profile/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
2
3
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
3
4
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
4
5
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -19,15 +20,17 @@ import {
|
|
|
19
20
|
extractRiddleProofProfileResult,
|
|
20
21
|
normalizeRiddleProofProfile,
|
|
21
22
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
23
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
22
24
|
profileStatusExitCode,
|
|
23
25
|
resolveRiddleProofProfileRouteUrl,
|
|
24
26
|
resolveRiddleProofProfileTargetUrl,
|
|
25
27
|
resolveRiddleProofProfileTimeoutSec,
|
|
26
28
|
slugifyRiddleProofProfileName,
|
|
27
29
|
summarizeRiddleProofProfileResult
|
|
28
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-GG2D3MFZ.js";
|
|
29
31
|
import "../chunk-MLKGABMK.js";
|
|
30
32
|
export {
|
|
33
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
31
34
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
32
35
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
33
36
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -48,6 +51,7 @@ export {
|
|
|
48
51
|
extractRiddleProofProfileResult,
|
|
49
52
|
normalizeRiddleProofProfile,
|
|
50
53
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
54
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
51
55
|
profileStatusExitCode,
|
|
52
56
|
resolveRiddleProofProfileRouteUrl,
|
|
53
57
|
resolveRiddleProofProfileTargetUrl,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
|
|
3
3
|
suggestRiddleProofProfileChecks
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-UE4I7RTI.js";
|
|
5
|
+
import "./chunk-GG2D3MFZ.js";
|
|
6
6
|
import "./chunk-MLKGABMK.js";
|
|
7
7
|
export {
|
|
8
8
|
RIDDLE_PROOF_PROFILE_SUGGESTIONS_VERSION,
|
package/dist/profile.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/profile.ts
|
|
21
21
|
var profile_exports = {};
|
|
22
22
|
__export(profile_exports, {
|
|
23
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: () => RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
23
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES: () => RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
24
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: () => RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
25
26
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES: () => RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -40,6 +41,7 @@ __export(profile_exports, {
|
|
|
40
41
|
extractRiddleProofProfileResult: () => extractRiddleProofProfileResult,
|
|
41
42
|
normalizeRiddleProofProfile: () => normalizeRiddleProofProfile,
|
|
42
43
|
preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
|
|
44
|
+
preflightRiddleProofProfileRunnerArtifacts: () => preflightRiddleProofProfileRunnerArtifacts,
|
|
43
45
|
profileStatusExitCode: () => profileStatusExitCode,
|
|
44
46
|
resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
|
|
45
47
|
resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
|
|
@@ -3535,6 +3537,35 @@ function profileStatusFromEvidence(profile, evidence, checks) {
|
|
|
3535
3537
|
if (checks.some((check) => check.status === "failed")) return "product_regression";
|
|
3536
3538
|
return "passed";
|
|
3537
3539
|
}
|
|
3540
|
+
var RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS = [
|
|
3541
|
+
"screenshot",
|
|
3542
|
+
"console",
|
|
3543
|
+
"dom_summary",
|
|
3544
|
+
"proof_json"
|
|
3545
|
+
];
|
|
3546
|
+
function preflightRiddleProofProfileRunnerArtifacts(profile, runner) {
|
|
3547
|
+
const requested = uniqueNonEmptyStrings(profile.artifacts || []);
|
|
3548
|
+
if (runner !== "riddle") {
|
|
3549
|
+
return {
|
|
3550
|
+
ok: true,
|
|
3551
|
+
runner,
|
|
3552
|
+
requested,
|
|
3553
|
+
local_only: [],
|
|
3554
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS]
|
|
3555
|
+
};
|
|
3556
|
+
}
|
|
3557
|
+
const localOnly = requested.filter(profileArtifactIsHostedLocalOnly);
|
|
3558
|
+
const subject = localOnly.join(", ");
|
|
3559
|
+
const message = localOnly.length ? `${subject} ${localOnly.length === 1 ? "is" : "are"} local-runner output; hosted runs produce proof_json, console, dom_summary, and screenshots. Remove ${localOnly.length === 1 ? "it" : "them"} from profile.artifacts for --runner riddle.` : void 0;
|
|
3560
|
+
return {
|
|
3561
|
+
ok: localOnly.length === 0,
|
|
3562
|
+
runner,
|
|
3563
|
+
requested,
|
|
3564
|
+
local_only: localOnly,
|
|
3565
|
+
hosted_artifacts: [...RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS],
|
|
3566
|
+
message
|
|
3567
|
+
};
|
|
3568
|
+
}
|
|
3538
3569
|
function assessRiddleProofProfileArtifactCompleteness(profile, result, artifacts) {
|
|
3539
3570
|
const required = profileRequiredArtifactKeys(profile, result);
|
|
3540
3571
|
const missing = required.filter((key) => !profileArtifactKeyPresent(key, artifacts));
|
|
@@ -3599,6 +3630,16 @@ function normalizeProfileArtifactRole(input) {
|
|
|
3599
3630
|
if (normalized === "proof" || normalized === "proof_json" || normalized === "proof.json") return "proof.json";
|
|
3600
3631
|
return normalizeRiddleProfileArtifactName(input.trim()).toLowerCase();
|
|
3601
3632
|
}
|
|
3633
|
+
function profileArtifactIsHostedLocalOnly(input) {
|
|
3634
|
+
const raw = input.trim().toLowerCase();
|
|
3635
|
+
const normalized = raw.replace(/[\s-]+/g, "_");
|
|
3636
|
+
const role = normalizeProfileArtifactRole(input);
|
|
3637
|
+
return [
|
|
3638
|
+
raw,
|
|
3639
|
+
normalized,
|
|
3640
|
+
role
|
|
3641
|
+
].some((value) => value === "artifact_manifest" || value === "artifact_manifest.json" || value === "artifact-manifest" || value === "artifact-manifest.json");
|
|
3642
|
+
}
|
|
3602
3643
|
function profileArtifactKeyPresent(key, artifacts) {
|
|
3603
3644
|
if (key.startsWith("screenshot:")) {
|
|
3604
3645
|
const label = key.slice("screenshot:".length);
|
|
@@ -3690,19 +3731,32 @@ function profileStatusExitCode(profile, status) {
|
|
|
3690
3731
|
if (status === "passed") return 0;
|
|
3691
3732
|
return profile.failure_policy[status] === "neutral" ? 0 : 1;
|
|
3692
3733
|
}
|
|
3693
|
-
function createRiddleProofProfileConfigurationError(
|
|
3734
|
+
function createRiddleProofProfileConfigurationError(profileOrName, error, runner = "riddle", options = {}) {
|
|
3735
|
+
const profile = typeof profileOrName === "string" ? void 0 : profileOrName;
|
|
3736
|
+
const name = profile ? profile.name : String(profileOrName);
|
|
3694
3737
|
const message = error instanceof Error ? error.message : String(error);
|
|
3738
|
+
let requested = "";
|
|
3739
|
+
if (profile) {
|
|
3740
|
+
try {
|
|
3741
|
+
requested = resolveRiddleProofProfileTargetUrl(profile);
|
|
3742
|
+
} catch {
|
|
3743
|
+
requested = "";
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3695
3746
|
return {
|
|
3696
3747
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
3697
3748
|
profile_name: name,
|
|
3698
3749
|
runner,
|
|
3699
3750
|
status: "configuration_error",
|
|
3700
|
-
baseline_policy: "invariant_only",
|
|
3701
|
-
route: { requested
|
|
3751
|
+
baseline_policy: profile?.baseline_policy || "invariant_only",
|
|
3752
|
+
route: { requested, observed: "", matched: false, error: message },
|
|
3702
3753
|
artifacts: { screenshots: [], proof_json: "proof.json" },
|
|
3703
3754
|
checks: [],
|
|
3704
3755
|
summary: `${name} has a profile configuration error.`,
|
|
3705
3756
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3757
|
+
metadata: profile?.metadata,
|
|
3758
|
+
warnings: options.warnings?.length ? options.warnings : void 0,
|
|
3759
|
+
configuration_blocker: options.configurationBlocker,
|
|
3706
3760
|
error: message
|
|
3707
3761
|
};
|
|
3708
3762
|
}
|
|
@@ -9598,6 +9652,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9598
9652
|
}
|
|
9599
9653
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9600
9654
|
0 && (module.exports = {
|
|
9655
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
9601
9656
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
9602
9657
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
9603
9658
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -9618,6 +9673,7 @@ function extractRiddleProofProfileResult(input) {
|
|
|
9618
9673
|
extractRiddleProofProfileResult,
|
|
9619
9674
|
normalizeRiddleProofProfile,
|
|
9620
9675
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
9676
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
9621
9677
|
profileStatusExitCode,
|
|
9622
9678
|
resolveRiddleProofProfileRouteUrl,
|
|
9623
9679
|
resolveRiddleProofProfileTargetUrl,
|
package/dist/profile.d.cts
CHANGED
|
@@ -431,6 +431,7 @@ interface RiddleProofProfileResult {
|
|
|
431
431
|
}>;
|
|
432
432
|
};
|
|
433
433
|
environment_blocker?: Record<string, JsonValue>;
|
|
434
|
+
configuration_blocker?: Record<string, JsonValue>;
|
|
434
435
|
error?: string;
|
|
435
436
|
}
|
|
436
437
|
interface RiddleProofProfileArtifactRef {
|
|
@@ -459,6 +460,16 @@ interface RiddleProofProfileArtifactCompleteness {
|
|
|
459
460
|
observed: string[];
|
|
460
461
|
missing: string[];
|
|
461
462
|
}
|
|
463
|
+
declare const RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: readonly ["screenshot", "console", "dom_summary", "proof_json"];
|
|
464
|
+
interface RiddleProofProfileRunnerArtifactPreflight {
|
|
465
|
+
ok: boolean;
|
|
466
|
+
runner: RiddleProofProfileRunner;
|
|
467
|
+
requested: string[];
|
|
468
|
+
local_only: string[];
|
|
469
|
+
hosted_artifacts: string[];
|
|
470
|
+
message?: string;
|
|
471
|
+
}
|
|
472
|
+
declare function preflightRiddleProofProfileRunnerArtifacts(profile: RiddleProofProfile, runner: RiddleProofProfileRunner): RiddleProofProfileRunnerArtifactPreflight;
|
|
462
473
|
declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
|
|
463
474
|
declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
|
|
464
475
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
@@ -473,7 +484,10 @@ declare function summarizeRiddleProofProfileResult(input: {
|
|
|
473
484
|
viewports: RiddleProofProfileViewportEvidence[];
|
|
474
485
|
}): string;
|
|
475
486
|
declare function profileStatusExitCode(profile: RiddleProofProfile, status: RiddleProofProfileStatus): 0 | 1;
|
|
476
|
-
declare function createRiddleProofProfileConfigurationError(
|
|
487
|
+
declare function createRiddleProofProfileConfigurationError(profileOrName: RiddleProofProfile | string, error: unknown, runner?: RiddleProofProfileRunner, options?: {
|
|
488
|
+
warnings?: string[];
|
|
489
|
+
configurationBlocker?: Record<string, JsonValue>;
|
|
490
|
+
}): RiddleProofProfileResult;
|
|
477
491
|
declare function createRiddleProofProfileEnvironmentBlockedResult(input: {
|
|
478
492
|
profile: RiddleProofProfile;
|
|
479
493
|
runner?: RiddleProofProfileRunner;
|
|
@@ -493,4 +507,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
493
507
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
494
508
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
495
509
|
|
|
496
|
-
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
510
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileRunnerArtifactPreflight, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.d.ts
CHANGED
|
@@ -431,6 +431,7 @@ interface RiddleProofProfileResult {
|
|
|
431
431
|
}>;
|
|
432
432
|
};
|
|
433
433
|
environment_blocker?: Record<string, JsonValue>;
|
|
434
|
+
configuration_blocker?: Record<string, JsonValue>;
|
|
434
435
|
error?: string;
|
|
435
436
|
}
|
|
436
437
|
interface RiddleProofProfileArtifactRef {
|
|
@@ -459,6 +460,16 @@ interface RiddleProofProfileArtifactCompleteness {
|
|
|
459
460
|
observed: string[];
|
|
460
461
|
missing: string[];
|
|
461
462
|
}
|
|
463
|
+
declare const RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS: readonly ["screenshot", "console", "dom_summary", "proof_json"];
|
|
464
|
+
interface RiddleProofProfileRunnerArtifactPreflight {
|
|
465
|
+
ok: boolean;
|
|
466
|
+
runner: RiddleProofProfileRunner;
|
|
467
|
+
requested: string[];
|
|
468
|
+
local_only: string[];
|
|
469
|
+
hosted_artifacts: string[];
|
|
470
|
+
message?: string;
|
|
471
|
+
}
|
|
472
|
+
declare function preflightRiddleProofProfileRunnerArtifacts(profile: RiddleProofProfile, runner: RiddleProofProfileRunner): RiddleProofProfileRunnerArtifactPreflight;
|
|
462
473
|
declare function assessRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[]): RiddleProofProfileArtifactCompleteness;
|
|
463
474
|
declare function applyRiddleProofProfileArtifactCompleteness(profile: RiddleProofProfile, result: RiddleProofProfileResult, artifacts: RiddleProofProfileArtifactRef[] | undefined): RiddleProofProfileResult;
|
|
464
475
|
declare function assessRiddleProofProfileEvidence(profile: RiddleProofProfile, evidence: RiddleProofProfileEvidence | undefined, options?: {
|
|
@@ -473,7 +484,10 @@ declare function summarizeRiddleProofProfileResult(input: {
|
|
|
473
484
|
viewports: RiddleProofProfileViewportEvidence[];
|
|
474
485
|
}): string;
|
|
475
486
|
declare function profileStatusExitCode(profile: RiddleProofProfile, status: RiddleProofProfileStatus): 0 | 1;
|
|
476
|
-
declare function createRiddleProofProfileConfigurationError(
|
|
487
|
+
declare function createRiddleProofProfileConfigurationError(profileOrName: RiddleProofProfile | string, error: unknown, runner?: RiddleProofProfileRunner, options?: {
|
|
488
|
+
warnings?: string[];
|
|
489
|
+
configurationBlocker?: Record<string, JsonValue>;
|
|
490
|
+
}): RiddleProofProfileResult;
|
|
477
491
|
declare function createRiddleProofProfileEnvironmentBlockedResult(input: {
|
|
478
492
|
profile: RiddleProofProfile;
|
|
479
493
|
runner?: RiddleProofProfileRunner;
|
|
@@ -493,4 +507,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
493
507
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
494
508
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
495
509
|
|
|
496
|
-
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
510
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileRunnerArtifactPreflight, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
2
3
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
3
4
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
4
5
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -19,15 +20,17 @@ import {
|
|
|
19
20
|
extractRiddleProofProfileResult,
|
|
20
21
|
normalizeRiddleProofProfile,
|
|
21
22
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
23
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
22
24
|
profileStatusExitCode,
|
|
23
25
|
resolveRiddleProofProfileRouteUrl,
|
|
24
26
|
resolveRiddleProofProfileTargetUrl,
|
|
25
27
|
resolveRiddleProofProfileTimeoutSec,
|
|
26
28
|
slugifyRiddleProofProfileName,
|
|
27
29
|
summarizeRiddleProofProfileResult
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GG2D3MFZ.js";
|
|
29
31
|
import "./chunk-MLKGABMK.js";
|
|
30
32
|
export {
|
|
33
|
+
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
31
34
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
32
35
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
33
36
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -48,6 +51,7 @@ export {
|
|
|
48
51
|
extractRiddleProofProfileResult,
|
|
49
52
|
normalizeRiddleProofProfile,
|
|
50
53
|
preflightRiddleProofProfileHttpStatusChecks,
|
|
54
|
+
preflightRiddleProofProfileRunnerArtifacts,
|
|
51
55
|
profileStatusExitCode,
|
|
52
56
|
resolveRiddleProofProfileRouteUrl,
|
|
53
57
|
resolveRiddleProofProfileTargetUrl,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Riddle Proof Neutral Fixture Site
|
|
2
|
+
|
|
3
|
+
This static fixture is a non-Riddle target for Riddle Proof experience-matrix
|
|
4
|
+
runs. It exists so contract and browser checks can exercise a deterministic
|
|
5
|
+
page without using the Riddle Proof docs as both subject and verifier.
|
|
6
|
+
|
|
7
|
+
Typical local use:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
python3 -m http.server 4179 --directory packages/riddle-proof/examples/neutral-fixture-site
|
|
11
|
+
packages/riddle-proof-runner-playwright/bin/riddle-proof-playwright run-profile \
|
|
12
|
+
--profile packages/riddle-proof/examples/profiles/neutral-fixture-pass.json \
|
|
13
|
+
--url http://127.0.0.1:4179 \
|
|
14
|
+
--output artifacts/riddle-proof/neutral-fixture-pass-local
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The sibling `neutral-fixture-product-regression.json` profile intentionally
|
|
18
|
+
looks for a missing selector. A correct Riddle Proof run reports
|
|
19
|
+
`product_regression`, not `passed`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Riddle Proof Neutral Fixture</title>
|
|
7
|
+
<link rel="stylesheet" href="./styles.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main class="fixture-shell" data-rp-fixture="index">
|
|
11
|
+
<p class="eyebrow">Neutral fixture</p>
|
|
12
|
+
<h1>Riddle Proof Fixture Matrix</h1>
|
|
13
|
+
<p>
|
|
14
|
+
This static target is intentionally small and brand-neutral. It gives
|
|
15
|
+
local and hosted runners a deterministic page to prove without relying
|
|
16
|
+
on Riddle Proof docs as the target.
|
|
17
|
+
</p>
|
|
18
|
+
<nav aria-label="Fixture pages">
|
|
19
|
+
<a href="./pass.html">Passing fixture page</a>
|
|
20
|
+
</nav>
|
|
21
|
+
</main>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Neutral Fixture Pass</title>
|
|
7
|
+
<link rel="stylesheet" href="./styles.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main class="fixture-shell" data-rp-fixture="pass">
|
|
11
|
+
<p class="eyebrow">Experience matrix row</p>
|
|
12
|
+
<h1>Neutral fixture passed</h1>
|
|
13
|
+
<p class="lead">
|
|
14
|
+
This page is stable on purpose: the expected text, selector, route, and
|
|
15
|
+
viewport layout should pass in both local and hosted browser runners.
|
|
16
|
+
</p>
|
|
17
|
+
<section class="evidence-panel" aria-label="Evidence facts">
|
|
18
|
+
<dl>
|
|
19
|
+
<div>
|
|
20
|
+
<dt>Contract</dt>
|
|
21
|
+
<dd>Browser-visible evidence</dd>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<dt>Status</dt>
|
|
25
|
+
<dd data-rp-fixture-status="passed">passed</dd>
|
|
26
|
+
</div>
|
|
27
|
+
<div>
|
|
28
|
+
<dt>Fixture</dt>
|
|
29
|
+
<dd>neutral-fixture-pass</dd>
|
|
30
|
+
</div>
|
|
31
|
+
</dl>
|
|
32
|
+
</section>
|
|
33
|
+
</main>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
font-family:
|
|
4
|
+
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
5
|
+
sans-serif;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
color: #172033;
|
|
8
|
+
background: #f6f8fb;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
* {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
a {
|
|
21
|
+
color: #165d73;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fixture-shell {
|
|
26
|
+
width: min(100% - 32px, 760px);
|
|
27
|
+
margin: 0 auto;
|
|
28
|
+
padding: clamp(32px, 8vw, 80px) 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.eyebrow {
|
|
32
|
+
margin: 0 0 10px;
|
|
33
|
+
color: #5a6475;
|
|
34
|
+
font-size: 0.82rem;
|
|
35
|
+
font-weight: 800;
|
|
36
|
+
letter-spacing: 0;
|
|
37
|
+
text-transform: uppercase;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
h1 {
|
|
41
|
+
margin: 0;
|
|
42
|
+
max-width: 12ch;
|
|
43
|
+
font-size: 3rem;
|
|
44
|
+
line-height: 1.05;
|
|
45
|
+
letter-spacing: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
p {
|
|
49
|
+
max-width: 64ch;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lead {
|
|
53
|
+
margin-top: 18px;
|
|
54
|
+
font-size: 1.08rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.evidence-panel {
|
|
58
|
+
margin-top: 28px;
|
|
59
|
+
border: 1px solid #c9d5df;
|
|
60
|
+
border-radius: 8px;
|
|
61
|
+
background: #fff;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
dl {
|
|
65
|
+
display: grid;
|
|
66
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
dl > div {
|
|
71
|
+
min-width: 0;
|
|
72
|
+
padding: 18px;
|
|
73
|
+
border-right: 1px solid #dce5ec;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
dl > div:last-child {
|
|
77
|
+
border-right: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
dt {
|
|
81
|
+
color: #687386;
|
|
82
|
+
font-size: 0.78rem;
|
|
83
|
+
font-weight: 800;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
dd {
|
|
88
|
+
margin: 4px 0 0;
|
|
89
|
+
overflow-wrap: anywhere;
|
|
90
|
+
font-weight: 700;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (max-width: 640px) {
|
|
94
|
+
h1 {
|
|
95
|
+
font-size: 2.25rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
dl {
|
|
99
|
+
grid-template-columns: 1fr;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
dl > div {
|
|
103
|
+
border-right: 0;
|
|
104
|
+
border-bottom: 1px solid #dce5ec;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
dl > div:last-child {
|
|
108
|
+
border-bottom: 0;
|
|
109
|
+
}
|
|
110
|
+
}
|