refactor(config): prune unused format wrappers and launcher export

This commit is contained in:
morluto
2026-10-09 03:13:27 +08:00
parent d1c904bac7
commit 81ae838567
3 changed files with 2 additions and 77 deletions
@@ -38,37 +38,6 @@ export const configureClientConfiguration = (
return configureClientDocument(client, environment, command, client.format);
};
/** @deprecated Use configureClientConfiguration with the client's declared format. */
export const configureJsonClient = (
client: SetupClient,
environment: SetupProviderEnvironment = {},
command: readonly string[] = defaultCommand(),
): Promise<ClientConfigurationResult> =>
configureClientWithFormat(client, "json", environment, command);
/** @deprecated Use configureClientConfiguration with the client's declared format. */
export const configureTomlClient = (
client: SetupClient,
environment: SetupProviderEnvironment = {},
command: readonly string[] = defaultCommand(),
): Promise<ClientConfigurationResult> =>
configureClientWithFormat(client, "toml", environment, command);
const configureClientWithFormat = (
client: SetupClient,
format: "json" | "toml",
environment: SetupProviderEnvironment,
command: readonly string[],
): Promise<ClientConfigurationResult> => {
if (client.format !== undefined && client.format !== format)
return Promise.resolve({ status: "failed", reason: "readback" });
return configureClientConfiguration(
{ ...client, format: client.format ?? format },
environment,
command,
);
};
const configureClientDocument = async (
client: SetupClient,
environment: SetupProviderEnvironment,