refactor: trim cli helper exports · openclaw/openclaw@4def407
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import path from "node:path"; |
2 | 2 | |
3 | | -export const DEFAULT_CLI_NAME = "openclaw"; |
| 3 | +const DEFAULT_CLI_NAME = "openclaw"; |
4 | 4 | |
5 | 5 | const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME]); |
6 | 6 | const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(openclaw)\b/; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch"; |
| 1 | +type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch"; |
2 | 2 | |
3 | | -export type ConfigSetModeResolution = |
| 3 | +type ConfigSetModeResolution = |
4 | 4 | | { |
5 | 5 | ok: true; |
6 | 6 | mode: ConfigSetMode; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import { readSecretFromFile } from "../acp/secret-file.js";
|
2 | 2 | import { defaultRuntime } from "../runtime.js"; |
3 | 3 | import { normalizeOptionalString } from "../shared/string-coerce.js"; |
4 | 4 | |
5 | | -export function resolveGatewaySecretOption(params: { |
| 5 | +function resolveGatewaySecretOption(params: { |
6 | 6 | direct?: unknown; |
7 | 7 | file?: unknown; |
8 | 8 | directFlag: string; |
@@ -20,7 +20,7 @@ export function resolveGatewaySecretOption(params: {
|
20 | 20 | return direct || undefined; |
21 | 21 | } |
22 | 22 | |
23 | | -export function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void { |
| 23 | +function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void { |
24 | 24 | defaultRuntime.error( |
25 | 25 | `Warning: ${flag} can be exposed via process listings. Prefer ${flag}-file or environment variables.`, |
26 | 26 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,11 +2,11 @@ import { theme } from "../terminal/theme.js";
|
2 | 2 | |
3 | 3 | export type HelpExample = readonly [command: string, description: string]; |
4 | 4 | |
5 | | -export function formatHelpExample(command: string, description: string): string { |
| 5 | +function formatHelpExample(command: string, description: string): string { |
6 | 6 | return ` ${theme.command(command)}\n ${theme.muted(description)}`; |
7 | 7 | } |
8 | 8 | |
9 | | -export function formatHelpExampleLine(command: string, description: string): string { |
| 9 | +function formatHelpExampleLine(command: string, description: string): string { |
10 | 10 | if (!description) { |
11 | 11 | return ` ${theme.command(command)}`; |
12 | 12 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。