MCPcopy Create free account
hub / github.com/EvilFreelancer/openapi-to-cli / getCurrentProfileName

Method getCurrentProfileName

src/profile-store.ts:41–49  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

39 }
40
41 getCurrentProfileName(cwd: string): string {
42 const configPaths = this.getConfigPaths(cwd);
43 const currentPath = path.join(configPaths.configDir, "current");
44 if (!this.fs.existsSync(currentPath)) {
45 return "default";
46 }
47 const raw = this.fs.readFileSync(currentPath, "utf-8").trim();
48 return raw || "default";
49 }
50
51 getCurrentProfile(cwd: string): Profile | undefined {
52 const currentName = this.getCurrentProfileName(cwd);

Callers 4

getCurrentProfileMethod · 0.95
removeProfileMethod · 0.95
cli.test.tsFile · 0.80

Calls 3

getConfigPathsMethod · 0.95
existsSyncMethod · 0.65
readFileSyncMethod · 0.65

Tested by

no test coverage detected