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

Function persistSessionDefaultsPatch

src/utils/config-store.ts:668–696  ·  view source on GitHub ↗
(opts: {
  patch: Partial<SessionDefaults>;
  deleteKeys?: (keyof SessionDefaults)[];
  profile?: string | null;
})

Source from the content-addressed store, hash-verified

666}
667
668export async function persistSessionDefaultsPatch(opts: {
669 patch: Partial<SessionDefaults>;
670 deleteKeys?: (keyof SessionDefaults)[];
671 profile?: string | null;
672}): Promise<{ path: string }> {
673 if (!storeState.initialized || !storeState.fs || !storeState.cwd) {
674 throw new Error('Config store has not been initialized.');
675 }
676
677 const normalizedProfile = normalizeSessionDefaultsProfileName(opts.profile);
678
679 const result = await persistSessionDefaultsToProjectConfig({
680 fs: storeState.fs,
681 cwd: storeState.cwd,
682 patch: opts.patch,
683 deleteKeys: opts.deleteKeys,
684 profile: normalizedProfile,
685 });
686
687 storeState.fileConfig = applySessionDefaultsPatchToFileConfig({
688 fileConfig: getCurrentFileConfig(),
689 profile: normalizedProfile,
690 patch: opts.patch,
691 deleteKeys: opts.deleteKeys,
692 });
693 refreshResolvedSessionFields();
694
695 return result;
696}
697
698export async function persistActiveSessionDefaultsProfile(
699 profile: string | null,

Callers 3

refreshSimulatorDefaultsFunction · 0.90

Tested by

no test coverage detected