refactor: remove thin runtime and tools error wrappers

This commit is contained in:
Tom Boucher
2026-05-04 20:23:34 -04:00
parent 5aaf0dbea5
commit deb4477375
2 changed files with 3 additions and 7 deletions

View File

@@ -107,10 +107,6 @@ export class GSDTools {
return resolveQueryCommand(command, args, this.registry);
}
private toToolsError(command: string, args: string[], err: unknown): GSDToolsError {
return toToolsErrorFromUnknown(command, args, err);
}
private async dispatchNativeHotpath(
legacyCommand: string,
legacyArgs: string[],
@@ -133,7 +129,7 @@ export class GSDTools {
return await work();
} catch (err) {
if (err instanceof GSDToolsError) throw err;
throw this.toToolsError(command, args, err);
throw toToolsErrorFromUnknown(command, args, err);
}
}

View File

@@ -52,8 +52,8 @@ export function createGSDToolsRuntime(opts: {
request.registryCommand,
request.registryArgs,
),
execSubprocessJson: async (legacyCommand, legacyArgs) => subprocessAdapter.execJson(legacyCommand, legacyArgs),
execSubprocessRaw: async (legacyCommand, legacyArgs) => subprocessAdapter.execRaw(legacyCommand, legacyArgs),
execSubprocessJson: (legacyCommand, legacyArgs) => subprocessAdapter.execJson(legacyCommand, legacyArgs),
execSubprocessRaw: (legacyCommand, legacyArgs) => subprocessAdapter.execRaw(legacyCommand, legacyArgs),
formatNativeRaw: (registryCommand, data) => formatQueryRawOutput(registryCommand, data),
});