@reshotdev/screenshot 0.0.1-beta.21 → 0.0.1-beta.23

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reshotdev/screenshot",
3
- "version": "0.0.1-beta.21",
3
+ "version": "0.0.1-beta.23",
4
4
  "description": "Screenshot and video capture CLI",
5
5
  "author": "Reshot <hello@reshot.dev>",
6
6
  "license": "MIT",
@@ -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
- audit.ok
95
- ? chalk.green(` ✔ ${audit.scenario}`)
96
- : chalk.red(` ✖ ${audit.scenario}${audit.contractFailure ? ` — ${audit.contractFailure}` : ""}`),
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
  }
@@ -1569,6 +1569,12 @@ async function publishCommand(options = {}) {
1569
1569
  // Validate storage configuration
1570
1570
  const validation = validateStorageConfig(storageConfig);
1571
1571
 
1572
+ // Print informational notices (e.g. "using platform mode") as gray info, not
1573
+ // alarming ⚠ warnings (audit run-15 F4).
1574
+ for (const note of validation.info || []) {
1575
+ console.log(chalk.gray(` ℹ ${note}`));
1576
+ }
1577
+
1572
1578
  // Print warnings
1573
1579
  for (const warning of validation.warnings) {
1574
1580
  console.log(chalk.yellow(` ⚠ ${warning}`));
@@ -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(chalk.gray(" Run `reshot sync` to upload traces."));
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
 
@@ -32,7 +32,14 @@ function validateStorageConfig(config) {
32
32
  const warnings = [];
33
33
 
34
34
  if (!config || !config.type) {
35
- return { valid: true, errors: [], warnings: ['No storage configuration - using platform mode (requires auth)'] };
35
+ // Platform mode is the default/happy path (Reshot-hosted R2), not a
36
+ // misconfiguration — surface it as info, not a ⚠ warning (audit run-15 F4).
37
+ return {
38
+ valid: true,
39
+ errors: [],
40
+ warnings: [],
41
+ info: ["Using Reshot-hosted storage (platform mode)."],
42
+ };
36
43
  }
37
44
 
38
45
  switch (config.type) {