@reshotdev/screenshot 0.0.1-beta.26 ā 0.0.1-beta.28
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/commands/publish.js
CHANGED
|
@@ -1635,8 +1635,12 @@ async function publishCommand(options = {}) {
|
|
|
1635
1635
|
visuals: true,
|
|
1636
1636
|
};
|
|
1637
1637
|
|
|
1638
|
-
// Get git information
|
|
1639
|
-
|
|
1638
|
+
// Get git information. The explicit `-m/--message` is the user's stated
|
|
1639
|
+
// intent for THIS publish ā prefer it over the repo's HEAD commit subject,
|
|
1640
|
+
// which is whatever unrelated change last landed in the captured repo and
|
|
1641
|
+
// would otherwise show up as the (misleading) audit-trail message (run-21 H-1).
|
|
1642
|
+
const { commitHash, commitMessage: gitCommitMessage } = getGitInfo();
|
|
1643
|
+
const commitMessage = message || gitCommitMessage;
|
|
1640
1644
|
|
|
1641
1645
|
// Generate unique session ID for this publish run
|
|
1642
1646
|
const publishSessionId = crypto.randomUUID();
|
package/src/commands/pull.js
CHANGED
|
@@ -193,7 +193,7 @@ function validateAssetMap(assets) {
|
|
|
193
193
|
function generateTypeScript(assets, includeMetadata = false) {
|
|
194
194
|
const lines = [
|
|
195
195
|
"// GENERATED BY RESHOT - DO NOT EDIT",
|
|
196
|
-
"// Run 'npx
|
|
196
|
+
"// Run 'npx @reshotdev/screenshot pull' to regenerate this file",
|
|
197
197
|
"",
|
|
198
198
|
];
|
|
199
199
|
|
|
@@ -551,7 +551,7 @@ async function pullCommand(options = {}) {
|
|
|
551
551
|
console.log(chalk.white("Add to your local workflow:\n"));
|
|
552
552
|
console.log(chalk.cyan(" # package.json"));
|
|
553
553
|
console.log(chalk.cyan(' "scripts": {'));
|
|
554
|
-
console.log(chalk.cyan(` "prebuild": "npx
|
|
554
|
+
console.log(chalk.cyan(` "prebuild": "npx @reshotdev/screenshot pull --format=${format}${output ? ` --output=${output}` : ''}"`));
|
|
555
555
|
console.log(chalk.cyan(' }\n'));
|
|
556
556
|
console.log(chalk.gray(" This ensures your build always uses the latest approved visuals."));
|
|
557
557
|
console.log(chalk.gray(" If a visual is deleted, your build will fail (preventing broken images).\n"));
|
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
|
};
|