MCPcopy
hub / github.com/coder/mux / readStoreFile

Function readStoreFile

src/node/services/mcpOauthService.test.ts:50–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 });
49
50 async function readStoreFile(): Promise<unknown> {
51 const raw = await fs.readFile(getStoreFilePath(muxHome), "utf-8");
52 return JSON.parse(raw) as unknown;
53 }
54
55 test("reading corrupt JSON store self-heals to empty", async () => {
56 await fs.writeFile(getStoreFilePath(muxHome), "{ definitely not valid json", "utf-8");

Callers 1

Calls 3

getStoreFilePathFunction · 0.85
readFileMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected