@tiny-fish/cli 0.37.1-next.296 → 0.37.1-next.298

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.
@@ -1,7 +1,7 @@
1
1
  import spawn from 'cross-spawn';
2
2
  import { apiKeyStatus } from '../lib/auth.js';
3
3
  import { CLI_VERSION } from '../lib/constants.js';
4
- import { DOCTOR_COULD_NOT_RUN, DOCTOR_SCHEMA_VERSION, doctorReportSchema, exitCodeFor, renderPretty, verdictFor, } from '../lib/doctor-report.js';
4
+ import { DOCTOR_COULD_NOT_RUN, DOCTOR_INVALID_INPUT, DOCTOR_SCHEMA_VERSION, doctorReportSchema, exitCodeFor, renderPretty, verdictFor, } from '../lib/doctor-report.js';
5
5
  import { ALL_HARNESSES, AuthMode, Registered } from '../lib/harness-detect.js';
6
6
  import { detectHumanInitiated } from '../lib/harness.js';
7
7
  import { err, errLine, out, outLine } from '../lib/output.js';
@@ -488,8 +488,8 @@ export function registerDoctor(program) {
488
488
  .option('--yes', 'Allow --fix to run without a terminal (unattended-safe repairs only)')
489
489
  .action(async (options) => {
490
490
  if (options.harness && !ALL_HARNESSES.includes(options.harness)) {
491
- err({ error: `Unknown --harness value: ${options.harness}` });
492
- process.exitCode = DOCTOR_COULD_NOT_RUN;
491
+ err({ error: `Unknown --harness value: ${options.harness}`, valid: ALL_HARNESSES });
492
+ process.exitCode = DOCTOR_INVALID_INPUT;
493
493
  return;
494
494
  }
495
495
  const doctorOptions = {
@@ -153,6 +153,8 @@ export type DoctorRepair = z.infer<typeof doctorRepairSchema>;
153
153
  export type DoctorReport = z.infer<typeof doctorReportSchema>;
154
154
  /** Doctor itself broke, which is a different claim from "your setup is broken". */
155
155
  export declare const DOCTOR_COULD_NOT_RUN = 2;
156
+ /** The invocation was wrong, not the machine; exit 2 stays "doctor broke". */
157
+ export declare const DOCTOR_INVALID_INPUT = 3;
156
158
  /** Skips never fail the run; a skip means not applicable, not broken. */
157
159
  export declare function verdictFor(checks: DoctorCheck[]): {
158
160
  ok_harnesses: boolean;
@@ -59,6 +59,8 @@ export const doctorReportSchema = z
59
59
  const GLYPHS = { pass: '✓', fail: '✗', warn: '⚠', skip: '…' };
60
60
  /** Doctor itself broke, which is a different claim from "your setup is broken". */
61
61
  export const DOCTOR_COULD_NOT_RUN = 2;
62
+ /** The invocation was wrong, not the machine; exit 2 stays "doctor broke". */
63
+ export const DOCTOR_INVALID_INPUT = 3;
62
64
  /** Skips never fail the run; a skip means not applicable, not broken. */
63
65
  export function verdictFor(checks) {
64
66
  return { ok_harnesses: !hasFailure(checks, 'harness'), ok_cli: !hasFailure(checks, 'cli') };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-fish/cli",
3
- "version": "0.37.1-next.296",
3
+ "version": "0.37.1-next.298",
4
4
  "description": "TinyFish CLI — run web automations from your terminal",
5
5
  "type": "module",
6
6
  "bin": {