mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:10:43 +00:00
refactor: trim config helper exports
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import path from "node:path";
|
||||
|
||||
export const CONFIG_BACKUP_COUNT = 5;
|
||||
const CONFIG_BACKUP_COUNT = 5;
|
||||
|
||||
export interface BackupRotationFs {
|
||||
interface BackupRotationFs {
|
||||
unlink: (path: string) => Promise<void>;
|
||||
rename: (from: string, to: string) => Promise<void>;
|
||||
chmod?: (path: string, mode: number) => Promise<void>;
|
||||
readdir?: (path: string) => Promise<string[]>;
|
||||
}
|
||||
|
||||
export interface BackupMaintenanceFs extends BackupRotationFs {
|
||||
interface BackupMaintenanceFs extends BackupRotationFs {
|
||||
copyFile: (from: string, to: string) => Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export function isRouteBinding(binding: AgentBinding): binding is AgentRouteBind
|
||||
return normalizeBindingType(binding) === "route";
|
||||
}
|
||||
|
||||
export function isAcpBinding(binding: AgentBinding): binding is AgentAcpBinding {
|
||||
function isAcpBinding(binding: AgentBinding): binding is AgentAcpBinding {
|
||||
return normalizeBindingType(binding) === "acp";
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ type ExpiringMapCacheEntry<TValue> = {
|
||||
value: TValue;
|
||||
};
|
||||
|
||||
export type ExpiringMapCache<TKey, TValue> = {
|
||||
type ExpiringMapCache<TKey, TValue> = {
|
||||
get: (key: TKey) => TValue | undefined;
|
||||
set: (key: TKey, value: TValue) => void;
|
||||
delete: (key: TKey) => void;
|
||||
@@ -141,7 +141,7 @@ export function createExpiringMapCache<TKey, TValue>(options: {
|
||||
};
|
||||
}
|
||||
|
||||
export type FileStatSnapshot = {
|
||||
type FileStatSnapshot = {
|
||||
mtimeMs: number;
|
||||
sizeBytes: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user