MCPcopy
hub / github.com/upstash/context7 / writeStateFilePath

Function writeStateFilePath

packages/cli/src/utils/update-check.ts:66–72  ·  view source on GitHub ↗
(stateFile?: string)

Source from the content-addressed store, hash-verified

64
65// Writes always target the XDG path; migrate the legacy file first if present.
66async function writeStateFilePath(stateFile?: string): Promise<string> {
67 const path = getStateFilePath(stateFile);
68 if (!stateFile) {
69 await migrateLegacyFile(UPDATE_STATE_FILE_NAME, path);
70 }
71 return path;
72}
73
74async function readUpdateState(stateFile?: string): Promise<UpdateState> {
75 try {

Callers 1

writeUpdateStateFunction · 0.85

Calls 2

getStateFilePathFunction · 0.85
migrateLegacyFileFunction · 0.85

Tested by

no test coverage detected