@reshotdev/screenshot 0.0.1-beta.22 → 0.0.1-beta.24
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/package.json
CHANGED
|
@@ -90,10 +90,32 @@ async function doctorTargetCommand(options = {}) {
|
|
|
90
90
|
: chalk.red(" ✖ Target contract check failed"),
|
|
91
91
|
);
|
|
92
92
|
for (const audit of report.readinessAudits) {
|
|
93
|
+
if (audit.ok) {
|
|
94
|
+
console.log(chalk.green(` ✔ ${audit.scenario}`));
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
// Build an actionable reason from whatever failed, instead of a bare ✖
|
|
98
|
+
// with no explanation (audit run-16 F4).
|
|
99
|
+
const reasons = [];
|
|
100
|
+
if (audit.contractFailure) reasons.push(audit.contractFailure);
|
|
101
|
+
if (typeof audit.status === "number" && audit.status >= 400) {
|
|
102
|
+
reasons.push(`HTTP ${audit.status}`);
|
|
103
|
+
}
|
|
104
|
+
if (audit.missingSelectors && audit.missingSelectors.length > 0) {
|
|
105
|
+
reasons.push(`missing selector(s): ${audit.missingSelectors.join(", ")}`);
|
|
106
|
+
}
|
|
107
|
+
if (audit.readyFailure) reasons.push(audit.readyFailure);
|
|
108
|
+
if (audit.ready === false && !audit.readyFailure) {
|
|
109
|
+
reasons.push("readiness signal not satisfied");
|
|
110
|
+
}
|
|
111
|
+
const reason = reasons.length > 0 ? reasons.join("; ") : "readiness check failed";
|
|
112
|
+
console.log(chalk.red(` ✖ ${audit.scenario} — ${reason}`));
|
|
113
|
+
}
|
|
114
|
+
if (!report.ok) {
|
|
93
115
|
console.log(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
chalk.gray(
|
|
117
|
+
" (Target doctor audits the opt-in certified-target pipeline; it does not block `run`/`publish`.)",
|
|
118
|
+
),
|
|
97
119
|
);
|
|
98
120
|
}
|
|
99
121
|
}
|
package/src/commands/status.js
CHANGED
|
@@ -134,8 +134,12 @@ async function displayConfig(configSummary) {
|
|
|
134
134
|
|
|
135
135
|
function renderJobs(jobs) {
|
|
136
136
|
if (jobs.length === 0) {
|
|
137
|
-
console.log(chalk.gray(" No sync jobs found."));
|
|
138
|
-
console.log(
|
|
137
|
+
console.log(chalk.gray(" No trace-sync jobs found."));
|
|
138
|
+
console.log(
|
|
139
|
+
chalk.gray(
|
|
140
|
+
" (This section tracks `reshot sync` trace jobs — your publishes appear in the dashboard Activity feed / `reshot pull`.)",
|
|
141
|
+
),
|
|
142
|
+
);
|
|
139
143
|
return;
|
|
140
144
|
}
|
|
141
145
|
|
package/src/lib/certification.js
CHANGED
|
@@ -464,11 +464,17 @@ async function runDoctorTarget(options = {}) {
|
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
|
|
467
|
+
// A strict app-owned readiness CONTRACT is only required for the "certified"
|
|
468
|
+
// tier. For self-serve/local (custom) targets, the actual page-readiness
|
|
469
|
+
// audit below is what matters — don't fail the scenario (with no reason)
|
|
470
|
+
// just because it lacks a deterministic ready contract (audit run-18 R18-1).
|
|
471
|
+
const requireReadyContract = target.tier === "certified";
|
|
472
|
+
let readyContractOk = !requireReadyContract || hasDeterministicReadyContract(scenario);
|
|
468
473
|
let contractFailure = null;
|
|
469
|
-
if (
|
|
474
|
+
if (requireReadyContract && !hasDeterministicReadyContract(scenario)) {
|
|
475
|
+
readyContractOk = false;
|
|
470
476
|
contractFailure = "Scenario is missing an app-owned readiness contract.";
|
|
471
|
-
} else if (
|
|
477
|
+
} else if (requireReadyContract && usesSleepOnlyReadiness(scenario)) {
|
|
472
478
|
readyContractOk = false;
|
|
473
479
|
contractFailure = "Scenario relies on waits without a deterministic ready contract.";
|
|
474
480
|
}
|