MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / readAuthJson

Method readAuthJson

src/runtime/config.ts:380–392  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

378 if (!fs.existsSync(dir)) {
379 fs.mkdirSync(dir, { recursive: true });
380 }
381 if (!fs.existsSync(this.configPath)) {
382 fs.writeFileSync(this.configPath, "{}", "utf-8");
383 }
384 }
385
386 private readAuthJson(): string | undefined {
387 this.ensureFile();
388 try {
389 const raw = fs.readFileSync(this.configPath, "utf-8");
390 const config = JSON.parse(raw);
391 if (config._auth && typeof config._auth === "object") {
392 return JSON.stringify(config._auth);
393 }
394 return undefined;
395 } catch {

Callers 2

withLockMethod · 0.95
withLockAsyncMethod · 0.95

Calls 2

ensureFileMethod · 0.95
parseMethod · 0.80

Tested by

no test coverage detected