MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / deleteProfile

Function deleteProfile

src/lib/credentials.ts:117–128  ·  view source on GitHub ↗
(profile: string, options: CredentialsOptions = {})

Source from the content-addressed store, hash-verified

115}
116
117export function deleteProfile(profile: string, options: CredentialsOptions = {}): boolean {
118 const path = resolvePath(options);
119 const file = readCredentialsFile(options);
120 if (!(profile in file)) return false;
121 delete file[profile];
122 if (Object.keys(file).length === 0) {
123 writeCredentialsAtomic(path, {});
124 } else {
125 writeCredentialsAtomic(path, file);
126 }
127 return true;
128}
129
130export function ensureRestrictiveMode(path: string): void {
131 if (!existsSync(path)) return;

Callers 2

runLogoutFunction · 0.85

Calls 3

resolvePathFunction · 0.85
readCredentialsFileFunction · 0.85
writeCredentialsAtomicFunction · 0.85

Tested by

no test coverage detected