refactor: trim config helper exports · openclaw/openclaw@35a9785
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 CONFIG_BACKUP_COUNT = 5; |
| 3 | +const CONFIG_BACKUP_COUNT = 5; |
4 | 4 | |
5 | | -export interface BackupRotationFs { |
| 5 | +interface BackupRotationFs { |
6 | 6 | unlink: (path: string) => Promise<void>; |
7 | 7 | rename: (from: string, to: string) => Promise<void>; |
8 | 8 | chmod?: (path: string, mode: number) => Promise<void>; |
9 | 9 | readdir?: (path: string) => Promise<string[]>; |
10 | 10 | } |
11 | 11 | |
12 | | -export interface BackupMaintenanceFs extends BackupRotationFs { |
| 12 | +interface BackupMaintenanceFs extends BackupRotationFs { |
13 | 13 | copyFile: (from: string, to: string) => Promise<void>; |
14 | 14 | } |
15 | 15 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ export function isRouteBinding(binding: AgentBinding): binding is AgentRouteBind
|
9 | 9 | return normalizeBindingType(binding) === "route"; |
10 | 10 | } |
11 | 11 | |
12 | | -export function isAcpBinding(binding: AgentBinding): binding is AgentAcpBinding { |
| 12 | +function isAcpBinding(binding: AgentBinding): binding is AgentAcpBinding { |
13 | 13 | return normalizeBindingType(binding) === "acp"; |
14 | 14 | } |
15 | 15 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,7 +27,7 @@ type ExpiringMapCacheEntry<TValue> = {
|
27 | 27 | value: TValue; |
28 | 28 | }; |
29 | 29 | |
30 | | -export type ExpiringMapCache<TKey, TValue> = { |
| 30 | +type ExpiringMapCache<TKey, TValue> = { |
31 | 31 | get: (key: TKey) => TValue | undefined; |
32 | 32 | set: (key: TKey, value: TValue) => void; |
33 | 33 | delete: (key: TKey) => void; |
@@ -141,7 +141,7 @@ export function createExpiringMapCache<TKey, TValue>(options: {
|
141 | 141 | }; |
142 | 142 | } |
143 | 143 | |
144 | | -export type FileStatSnapshot = { |
| 144 | +type FileStatSnapshot = { |
145 | 145 | mtimeMs: number; |
146 | 146 | sizeBytes: number; |
147 | 147 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。