@reshotdev/screenshot 0.0.1-beta.26 ā 0.0.1-beta.27
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
|
@@ -84,11 +84,21 @@ async function doctorTargetCommand(options = {}) {
|
|
|
84
84
|
} else {
|
|
85
85
|
console.log(chalk.cyan("\n𩺠Certified Target Doctor\n"));
|
|
86
86
|
console.log(chalk.gray(`Target: ${report.target.displayName} (${report.target.tier})`));
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
if (report.scenarioCount === 0) {
|
|
88
|
+
// Nothing was audited ā don't show a green "healthy" that misleads a
|
|
89
|
+
// first-time user who hasn't configured scenarios yet (audit run-20 M-2).
|
|
90
|
+
console.log(
|
|
91
|
+
chalk.yellow(
|
|
92
|
+
" ā No scenarios configured ā nothing to audit. Add scenarios to reshot.config.json (or run `reshot run` to capture one), then re-run.",
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
} else {
|
|
96
|
+
console.log(
|
|
97
|
+
report.ok
|
|
98
|
+
? chalk.green(" ā Target contract is healthy")
|
|
99
|
+
: chalk.red(" ā Target contract check failed"),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
92
102
|
for (const audit of report.readinessAudits) {
|
|
93
103
|
if (audit.ok) {
|
|
94
104
|
console.log(chalk.green(` ā ${audit.scenario}`));
|
package/src/lib/certification.js
CHANGED
|
@@ -597,6 +597,10 @@ async function runDoctorTarget(options = {}) {
|
|
|
597
597
|
captureSafe,
|
|
598
598
|
routeAudits,
|
|
599
599
|
readinessAudits,
|
|
600
|
+
// Surface how many scenarios were actually audited so callers don't read a
|
|
601
|
+
// vacuously-true "healthy" (every([]) === true) as a real pass when nothing
|
|
602
|
+
// was configured to check (audit run-20 M-2).
|
|
603
|
+
scenarioCount: scenarios.length,
|
|
600
604
|
summary: buildSummary(blockingIssues, advisories, info),
|
|
601
605
|
ok,
|
|
602
606
|
};
|