refactor: trim cli helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 22:05:15 +01:00
parent dabddb2165
commit 4def4073d4
4 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import path from "node:path";
export const DEFAULT_CLI_NAME = "openclaw";
const DEFAULT_CLI_NAME = "openclaw";
const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME]);
const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(openclaw)\b/;

View File

@@ -1,6 +1,6 @@
export type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch";
type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch";
export type ConfigSetModeResolution =
type ConfigSetModeResolution =
| {
ok: true;
mode: ConfigSetMode;

View File

@@ -2,7 +2,7 @@ import { readSecretFromFile } from "../acp/secret-file.js";
import { defaultRuntime } from "../runtime.js";
import { normalizeOptionalString } from "../shared/string-coerce.js";
export function resolveGatewaySecretOption(params: {
function resolveGatewaySecretOption(params: {
direct?: unknown;
file?: unknown;
directFlag: string;
@@ -20,7 +20,7 @@ export function resolveGatewaySecretOption(params: {
return direct || undefined;
}
export function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void {
function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void {
defaultRuntime.error(
`Warning: ${flag} can be exposed via process listings. Prefer ${flag}-file or environment variables.`,
);

View File

@@ -2,11 +2,11 @@ import { theme } from "../terminal/theme.js";
export type HelpExample = readonly [command: string, description: string];
export function formatHelpExample(command: string, description: string): string {
function formatHelpExample(command: string, description: string): string {
return ` ${theme.command(command)}\n ${theme.muted(description)}`;
}
export function formatHelpExampleLine(command: string, description: string): string {
function formatHelpExampleLine(command: string, description: string): string {
if (!description) {
return ` ${theme.command(command)}`;
}