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

Method withLockAsync

src/runtime/config.ts:417–424  ·  view source on GitHub ↗
(fn: (current: string | undefined) => Promise<LockResult<T>>)

Source from the content-addressed store, hash-verified

415 const current = this.readAuthJson();
416 const { result, next } = fn(current);
417 if (next !== undefined) {
418 this.writeAuthJson(next);
419 }
420 return result;
421 }
422
423 async withLockAsync<T>(fn: (current: string | undefined) => Promise<LockResult<T>>): Promise<T> {
424 const current = this.readAuthJson();
425 const { result, next } = await fn(current);
426 if (next !== undefined) {
427 this.writeAuthJson(next);

Callers

nothing calls this directly

Calls 2

readAuthJsonMethod · 0.95
writeAuthJsonMethod · 0.95

Tested by

no test coverage detected