mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 20:10:21 +00:00
refactor: untangle remaining plugin sdk boundaries
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import fs from "node:fs";
|
||||
import { loadJsonFile, saveJsonFile } from "../infra/json-file.js";
|
||||
import { writeJsonAtomic } from "../infra/json-files.js";
|
||||
import { safeParseJson } from "../utils.js";
|
||||
|
||||
/** Read small JSON blobs synchronously for token/state caches. */
|
||||
export { loadJsonFile };
|
||||
|
||||
/** Persist small JSON blobs synchronously with restrictive permissions. */
|
||||
export { saveJsonFile };
|
||||
|
||||
/** Read JSON from disk and fall back cleanly when the file is missing or invalid. */
|
||||
export async function readJsonFileWithFallback<T>(
|
||||
filePath: string,
|
||||
|
||||
Reference in New Issue
Block a user