MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / persistActiveSessionDefaultsProfile

Function persistActiveSessionDefaultsProfile

src/utils/config-store.ts:698–720  ·  view source on GitHub ↗
(
  profile: string | null,
)

Source from the content-addressed store, hash-verified

696}
697
698export async function persistActiveSessionDefaultsProfile(
699 profile: string | null,
700): Promise<{ path: string }> {
701 if (!storeState.initialized || !storeState.fs || !storeState.cwd) {
702 throw new Error('Config store has not been initialized.');
703 }
704
705 const normalizedProfile = normalizeSessionDefaultsProfileName(profile);
706
707 const result = await persistActiveSessionDefaultsProfileToProjectConfig({
708 fs: storeState.fs,
709 cwd: storeState.cwd,
710 profile: normalizedProfile,
711 });
712
713 storeState.fileConfig = applyActiveProfileToFileConfig({
714 fileConfig: getCurrentFileConfig(),
715 profile: normalizedProfile,
716 });
717 refreshResolvedSessionFields();
718
719 return result;
720}
721
722export function __resetConfigStoreForTests(): void {
723 storeState.initialized = false;

Tested by

no test coverage detected