mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 17:51:22 +00:00
refactor: dedupe secrets record helper
This commit is contained in:
@@ -8,6 +8,8 @@ import type {
|
||||
} from "./runtime-shared.js";
|
||||
import { pushInactiveSurfaceWarning, pushWarning } from "./runtime-shared.js";
|
||||
import type { RuntimeWebDiagnostic, RuntimeWebDiagnosticCode } from "./runtime-web-tools.types.js";
|
||||
export { isRecord } from "./shared.js";
|
||||
import { isRecord } from "./shared.js";
|
||||
|
||||
type RuntimeWebWarningCode = Extract<RuntimeWebDiagnosticCode, SecretResolverWarningCode>;
|
||||
export type SecretResolutionResult<TSource extends string> = {
|
||||
@@ -76,10 +78,6 @@ export type RuntimeWebProviderSelectionParams<
|
||||
}) => Promise<void>;
|
||||
};
|
||||
|
||||
export function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
export function ensureObject(
|
||||
target: Record<string, unknown>,
|
||||
key: string,
|
||||
|
||||
Reference in New Issue
Block a user