mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 09:00:22 +00:00
refactor(core): extract shared dedup helpers
This commit is contained in:
19
src/plugin-sdk/allowlist-resolution.ts
Normal file
19
src/plugin-sdk/allowlist-resolution.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export type BasicAllowlistResolutionEntry = {
|
||||
input: string;
|
||||
resolved: boolean;
|
||||
id?: string;
|
||||
name?: string;
|
||||
note?: string;
|
||||
};
|
||||
|
||||
export function mapBasicAllowlistResolutionEntries(
|
||||
entries: BasicAllowlistResolutionEntry[],
|
||||
): BasicAllowlistResolutionEntry[] {
|
||||
return entries.map((entry) => ({
|
||||
input: entry.input,
|
||||
resolved: entry.resolved,
|
||||
id: entry.id,
|
||||
name: entry.name,
|
||||
note: entry.note,
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user