refactor: remove forwarding exports and redundant aliases
This commit is contained in:
@@ -3,7 +3,7 @@ import type {
|
||||
ProviderIdentity,
|
||||
} from "../application/AnalysisProvider.js";
|
||||
import { createAnalysisProfile } from "../domain/analysisProfile.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import { AnalysisCancelledError } from "../domain/analysisErrorCore.js";
|
||||
import { ProviderAdapterError } from "../domain/providerAdapterError.js";
|
||||
import { type AnalysisError } from "../domain/analysisErrorBase.js";
|
||||
|
||||
@@ -6,7 +6,8 @@ import { AnalysisError } from "../domain/analysisErrorBase.js";
|
||||
import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import { ProviderCleanupError } from "../domain/providerCleanupError.js";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import { silentLogger, type Logger } from "../logger.js";
|
||||
import { silentLogger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import { PendingOperations } from "../process/PendingOperations.js";
|
||||
import { PrivateRuntimeRoot } from "../process/PrivateRuntimeRoot.js";
|
||||
import { ProviderStartupDeadline } from "../process/ProviderDeadline.js";
|
||||
@@ -51,13 +52,6 @@ import { completeGhidraStartupHandshake } from "./GhidraClientStartup.js";
|
||||
const SHUTDOWN_TIMEOUT_MS = 10_000;
|
||||
const SESSION_ROOT = tmpdir();
|
||||
|
||||
export type {
|
||||
GhidraClientOptions,
|
||||
GhidraDiagnostic,
|
||||
GhidraRequestOptions,
|
||||
GhidraStartResult,
|
||||
} from "./GhidraClientTypes.js";
|
||||
|
||||
/** Closed Java-bridge operation union callable after the exact handshake. */
|
||||
export type GhidraOperation =
|
||||
| GhidraInventoryOperation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Logger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import type { Result } from "../domain/result.js";
|
||||
import type { GhidraLauncher } from "./GhidraLauncher.js";
|
||||
import type { GhidraSessionError } from "./GhidraSessionError.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Socket } from "node:net";
|
||||
|
||||
import type { JsonValue } from "../domain/jsonValue.js";
|
||||
import { err, type Result } from "../domain/result.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import type { PendingOperations } from "../process/PendingOperations.js";
|
||||
import type { GhidraRequestOptions } from "./GhidraClientTypes.js";
|
||||
import type {
|
||||
|
||||
@@ -4,11 +4,13 @@ import { projectGhidraDoctorInspection } from "./GhidraDoctor.js";
|
||||
import {
|
||||
ghidraJavaEnvironment,
|
||||
inspectGhidraInstallation,
|
||||
SUPPORTED_GHIDRA_JAVA_MAJOR,
|
||||
SUPPORTED_GHIDRA_VERSION,
|
||||
type GhidraInstallationHost,
|
||||
type GhidraJavaObservation,
|
||||
} from "./GhidraInstallation.js";
|
||||
import {
|
||||
SUPPORTED_GHIDRA_JAVA_MAJOR,
|
||||
SUPPORTED_GHIDRA_VERSION,
|
||||
} from "./GhidraInstallationPolicy.js";
|
||||
|
||||
const INSTALL = "/opt/ghidra";
|
||||
const PROPERTIES = `${INSTALL}/Ghidra/application.properties`;
|
||||
|
||||
@@ -21,8 +21,6 @@ import {
|
||||
type GhidraJavaRequirement,
|
||||
} from "./GhidraInstallationPolicy.js";
|
||||
|
||||
export { SUPPORTED_GHIDRA_JAVA_MAJOR, SUPPORTED_GHIDRA_VERSION };
|
||||
|
||||
const NATIVE_PLATFORMS: Readonly<
|
||||
Partial<
|
||||
Record<
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AnalysisOperation } from "../application/AnalysisProvider.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import type { AnalysisError } from "../domain/analysisErrorBase.js";
|
||||
import { jsonValueSchema, type JsonValue } from "../domain/jsonValue.js";
|
||||
import {
|
||||
|
||||
@@ -11,13 +11,11 @@ import { describe, expect, it } from "vitest";
|
||||
import { fixtureDosLoadImage } from "./GhidraLoadImage.fixture.js";
|
||||
import { jsonValueSchema } from "../domain/jsonValue.js";
|
||||
|
||||
import { parseConfig } from "../config.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import { parseExecutableHeader } from "../domain/binaryTarget.js";
|
||||
import {
|
||||
GhidraProvider,
|
||||
type GhidraProviderClientFactory,
|
||||
} from "./GhidraProvider.js";
|
||||
import { GhidraProvider } from "./GhidraProvider.js";
|
||||
import type { GhidraProviderClientFactory } from "./GhidraProviderClient.js";
|
||||
import type { GhidraInstallationHost } from "./GhidraInstallation.js";
|
||||
import { GHIDRA_SESSION_CAPABILITIES } from "./GhidraSessionValues.js";
|
||||
import { err, ok } from "../domain/result.js";
|
||||
|
||||
@@ -9,19 +9,19 @@ import {
|
||||
type ProviderIdentity,
|
||||
type ProviderTargetSupport,
|
||||
} from "../application/AnalysisProvider.js";
|
||||
import type { AppConfig } from "../config.js";
|
||||
import type { AppConfig } from "../config/types.js";
|
||||
import {
|
||||
createAnalysisProfile,
|
||||
type AnalysisProfileCommitment,
|
||||
} from "../domain/analysisProfile.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import {
|
||||
jsonObjectSchema,
|
||||
jsonValueSchema,
|
||||
type JsonValue,
|
||||
} from "../domain/jsonValue.js";
|
||||
import { ok } from "../domain/result.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import { GhidraClient } from "./GhidraClient.js";
|
||||
import {
|
||||
ghidraInstallationDiagnostics,
|
||||
@@ -47,9 +47,6 @@ import {
|
||||
windowsNativeCapabilities,
|
||||
} from "../process/WindowsAuthority.js";
|
||||
|
||||
export { GHIDRA_PROVIDER_IDENTITY, GHIDRA_OPERATIONS };
|
||||
export type { GhidraProviderClientFactory };
|
||||
|
||||
const SUPPORTED_ARCHITECTURES = new Set(["x86", "x86_64", "arm", "arm64"]);
|
||||
|
||||
/** Ghidra candidate backed by an isolated ephemeral headless import. */
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
type AnalysisClientContext,
|
||||
type AnalysisOperation,
|
||||
} from "../application/AnalysisProvider.js";
|
||||
import type { AppConfig } from "../config.js";
|
||||
import type { AppConfig } from "../config/types.js";
|
||||
import type { AnalysisProfileCommitment } from "../domain/analysisProfile.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import {
|
||||
AnalysisCancelledError,
|
||||
AnalysisArtifactChangedError,
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import { type AnalysisError } from "../domain/analysisErrorBase.js";
|
||||
import { ProviderAdapterError } from "../domain/providerAdapterError.js";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
import type { Logger } from "../logger.js";
|
||||
import type { Logger } from "pino";
|
||||
import { GhidraClient } from "./GhidraClient.js";
|
||||
import type { GhidraClientOptions } from "./GhidraClientTypes.js";
|
||||
import {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { createTestBinarySession } from "../../tests/fixtures/binarySession.js";
|
||||
import { parseConfig } from "../config.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTarget.js";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
import type { BinaryTarget } from "../domain/binaryTargetTypes.js";
|
||||
import { functionDossierSchema } from "../domain/hopperValues.js";
|
||||
import { ghidraFunctionDossier } from "../domain/ghidraValues.fixture.js";
|
||||
import { err, ok } from "../domain/result.js";
|
||||
|
||||
@@ -6,9 +6,9 @@ import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { parseConfig } from "../../config.js";
|
||||
import { parseConfig } from "../../config/parseConfig.js";
|
||||
import { projectAnalysisError } from "../../domain/analysisErrorProjection.js";
|
||||
import type { BinaryTarget } from "../../domain/binaryTarget.js";
|
||||
import type { BinaryTarget } from "../../domain/binaryTargetTypes.js";
|
||||
import {
|
||||
ghidraExtensionSchema,
|
||||
resolveGhidraExtensions,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { constants } from "node:fs";
|
||||
import { open, realpath, writeFile, mkdir } from "node:fs/promises";
|
||||
import { isAbsolute, join } from "node:path";
|
||||
import { z } from "zod";
|
||||
import type { AppConfig } from "../../config.js";
|
||||
import type { BinaryTarget } from "../../domain/binaryTarget.js";
|
||||
import type { AppConfig } from "../../config/types.js";
|
||||
import type { BinaryTarget } from "../../domain/binaryTargetTypes.js";
|
||||
import {
|
||||
AnalysisCancelledError,
|
||||
AnalysisCapabilityUnavailableError,
|
||||
|
||||
Reference in New Issue
Block a user