refactor: trim cli shape exports · openclaw/openclaw@5c7362f
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ type CliContainerParseResult =
|
10 | 10 | | { ok: true; container: string | null; argv: string[] } |
11 | 11 | | { ok: false; error: string }; |
12 | 12 | |
13 | | -export type CliContainerTargetResult = |
| 13 | +type CliContainerTargetResult = |
14 | 14 | | { handled: true; exitCode: number } |
15 | 15 | | { handled: false; argv: string[] }; |
16 | 16 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export const LEGACY_DAEMON_CLI_EXPORTS = [ |
| 1 | +const LEGACY_DAEMON_CLI_EXPORTS = [ |
2 | 2 | "registerDaemonCli", |
3 | 3 | "runDaemonInstall", |
4 | 4 | "runDaemonRestart", |
@@ -10,7 +10,7 @@ export const LEGACY_DAEMON_CLI_EXPORTS = [
|
10 | 10 | |
11 | 11 | type LegacyDaemonCliExport = (typeof LEGACY_DAEMON_CLI_EXPORTS)[number]; |
12 | 12 | type LegacyDaemonCliRunnerExport = Exclude<LegacyDaemonCliExport, "registerDaemonCli">; |
13 | | -export type LegacyDaemonCliAccessors = { |
| 13 | +type LegacyDaemonCliAccessors = { |
14 | 14 | registerDaemonCli: string; |
15 | 15 | runDaemonRestart: string; |
16 | 16 | } & Partial< |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ type TimingPayload = {
|
16 | 16 | type TimingWriter = (line: string) => void; |
17 | 17 | type NonPromise<T> = T extends PromiseLike<unknown> ? never : T; |
18 | 18 | |
19 | | -export type CliDebugTiming = { |
| 19 | +type CliDebugTiming = { |
20 | 20 | enabled: boolean; |
21 | 21 | mark: (phase: string, details?: TimingDetails) => void; |
22 | 22 | time: <T>( |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ import {
|
3 | 3 | normalizeOptionalString, |
4 | 4 | } from "../shared/string-coerce.js"; |
5 | 5 | |
6 | | -export type BytesParseOptions = { |
| 6 | +type BytesParseOptions = { |
7 | 7 | defaultUnit?: "b" | "kb" | "mb" | "gb" | "tb"; |
8 | 8 | }; |
9 | 9 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import { loadPluginManifest } from "../plugins/manifest.js";
|
6 | 6 | import { resolveUserPath } from "../utils.js"; |
7 | 7 | import { parseNpmPrefixSpec, resolveFileNpmSpecToLocalPath } from "./plugins-command-helpers.js"; |
8 | 8 | |
9 | | -export type PluginInstallInvalidConfigPolicy = "deny" | "allow-bundled-recovery"; |
| 9 | +type PluginInstallInvalidConfigPolicy = "deny" | "allow-bundled-recovery"; |
10 | 10 | |
11 | 11 | export type PluginInstallRequestContext = { |
12 | 12 | rawSpec: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import { isValidProfileName } from "./profile-utils.js";
|
11 | 11 | import { scanCliRootOptions } from "./root-option-scan.js"; |
12 | 12 | import { takeCliRootOptionValue } from "./root-option-value.js"; |
13 | 13 | |
14 | | -export type CliProfileParseResult = |
| 14 | +type CliProfileParseResult = |
15 | 15 | | { ok: true; profile: string | null; argv: string[] } |
16 | 16 | | { ok: false; error: string }; |
17 | 17 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { FLAG_TERMINATOR } from "../infra/cli-root-options.js"; |
2 | 2 | import { forwardConsumedCliRootOption } from "./root-option-forward.js"; |
3 | 3 | |
4 | | -export type CliRootOptionScanResult = { ok: true; argv: string[] } | { ok: false; error: string }; |
| 4 | +type CliRootOptionScanResult = { ok: true; argv: string[] } | { ok: false; error: string }; |
5 | 5 | |
6 | 6 | type CliRootOptionVisitResult = |
7 | 7 | | { kind: "pass" } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。