Remove dead exports found by knip
- Un-export HOMEBREW_COMMANDS, systemSetupHost, ToolKind, BinaryArchitecture, HopperDiagnostic -- only consumed within their own files - Remove unused HopperUnavailableError class (never instantiated) - Reformat knip.json entry/project arrays to multi-line
This commit is contained in:
parent
4c9224990e
commit
4dec415fc8
14
knip.json
14
knip.json
|
|
@ -1,7 +1,17 @@
|
||||||
{
|
{
|
||||||
"$schema": "./node_modules/knip/schema.json",
|
"$schema": "./node_modules/knip/schema.json",
|
||||||
"entry": ["src/main.ts", "src/cli.ts", "scripts/rea.mjs", "scripts/scan-todos.mjs"],
|
"entry": [
|
||||||
"project": ["src/**/*.ts", "tests/**/*.ts", "scripts/**/*.mjs", "vitest.config.ts"],
|
"src/main.ts",
|
||||||
|
"src/cli.ts",
|
||||||
|
"scripts/rea.mjs",
|
||||||
|
"scripts/scan-todos.mjs"
|
||||||
|
],
|
||||||
|
"project": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
"tests/**/*.ts",
|
||||||
|
"scripts/**/*.mjs",
|
||||||
|
"vitest.config.ts"
|
||||||
|
],
|
||||||
"ignore": ["dist/**", "docs/**", ".codex/**", ".devin/**"],
|
"ignore": ["dist/**", "docs/**", ".codex/**", ".devin/**"],
|
||||||
"ignoreDependencies": [],
|
"ignoreDependencies": [],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ export const runSetup = async (
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Production setup effects for macOS, Homebrew, JSON MCP clients, and the canonical skill directory. */
|
/** Production setup effects for macOS, Homebrew, JSON MCP clients, and the canonical skill directory. */
|
||||||
export const systemSetupHost = (): SetupHost => {
|
const systemSetupHost = (): SetupHost => {
|
||||||
const doctorHost = systemDoctorHost();
|
const doctorHost = systemDoctorHost();
|
||||||
return {
|
return {
|
||||||
platform: process.platform,
|
platform: process.platform,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/** Standard executable names and locations used to discover Homebrew. */
|
/** Standard executable names and locations used to discover Homebrew. */
|
||||||
export const HOMEBREW_COMMANDS = [
|
const HOMEBREW_COMMANDS = [
|
||||||
"brew",
|
"brew",
|
||||||
"/opt/homebrew/bin/brew",
|
"/opt/homebrew/bin/brew",
|
||||||
"/usr/local/bin/brew",
|
"/usr/local/bin/brew",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const caseSensitive = z
|
||||||
.describe("Whether to match case");
|
.describe("Whether to match case");
|
||||||
|
|
||||||
/** Adapter family responsible for implementing a public MCP tool. */
|
/** Adapter family responsible for implementing a public MCP tool. */
|
||||||
export type ToolKind = "official-proxy" | "enhanced" | "session";
|
type ToolKind = "official-proxy" | "enhanced" | "session";
|
||||||
|
|
||||||
/** Single source of truth for a public tool's name, description, and input. */
|
/** Single source of truth for a public tool's name, description, and input. */
|
||||||
export interface ToolContract {
|
export interface ToolContract {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { BinaryTargetError } from "./errors.js";
|
||||||
import { err, ok, type Result } from "./result.js";
|
import { err, ok, type Result } from "./result.js";
|
||||||
|
|
||||||
/** CPU families understood by the supported executable loaders. */
|
/** CPU families understood by the supported executable loaders. */
|
||||||
export type BinaryArchitecture = "x86" | "x86_64" | "arm" | "arm64";
|
type BinaryArchitecture = "x86" | "x86_64" | "arm" | "arm64";
|
||||||
/**
|
/**
|
||||||
* A canonical local target plus deterministic Hopper loader arguments.
|
* A canonical local target plus deterministic Hopper loader arguments.
|
||||||
* Explicit loader and architecture flags prevent Hopper from presenting modal
|
* Explicit loader and architecture flags prevent Hopper from presenting modal
|
||||||
|
|
|
||||||
|
|
@ -47,17 +47,6 @@ export class HopperProcessError extends HopperError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Hopper did not make the repository bridge available after launch. */
|
|
||||||
export class HopperUnavailableError extends HopperError {
|
|
||||||
readonly _tag = "HopperUnavailableError";
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super(
|
|
||||||
"Hopper did not start the analysis bridge. Check the target and loader architecture options, then retry.",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Hopper or the repository bridge could not be started. */
|
/** Hopper or the repository bridge could not be started. */
|
||||||
export class HopperStartError extends HopperError {
|
export class HopperStartError extends HopperError {
|
||||||
readonly _tag = "HopperStartError";
|
readonly _tag = "HopperStartError";
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export interface HopperClientOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Safe launcher telemetry; stderr content is intentionally never exposed. */
|
/** Safe launcher telemetry; stderr content is intentionally never exposed. */
|
||||||
export type HopperDiagnostic =
|
type HopperDiagnostic =
|
||||||
| { readonly type: "launcher-stderr"; readonly bytes: number }
|
| { readonly type: "launcher-stderr"; readonly bytes: number }
|
||||||
| { readonly type: "launcher-exit"; readonly code: number | null };
|
| { readonly type: "launcher-exit"; readonly code: number | null };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue