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

Function resolveOptions

src/utils/workspace-filesystem-lifecycle.ts:130–164  ·  view source on GitHub ↗
(
  options: WorkspaceFilesystemLifecycleOptions,
)

Source from the content-addressed store, hash-verified

128}
129
130function resolveOptions(
131 options: WorkspaceFilesystemLifecycleOptions,
132): ResolvedWorkspaceFilesystemLifecycleOptions {
133 const workspaceKey = resolveWorkspaceKey(options);
134 const layout = options.logDir ? null : getWorkspaceFilesystemLayout(workspaceKey);
135 const logDir = options.logDir ?? layout?.logs;
136 if (!logDir) {
137 throw new Error('Workspace filesystem lifecycle requires a log directory');
138 }
139
140 return {
141 workspaceKey,
142 trigger: options.trigger,
143 logDir,
144 markerPath:
145 options.markerPath ??
146 layout?.filesystemLifecycle.markerPath ??
147 path.join(logDir, FALLBACK_MARKER_FILE),
148 lockDir:
149 options.lockDir ??
150 layout?.filesystemLifecycle.lockDir ??
151 path.join(logDir, FALLBACK_LOCK_DIR_NAME),
152 resultBundleDir: layout?.resultBundles ?? null,
153 now: options.now ?? Date.now(),
154 maxAgeMs: options.maxAgeMs ?? WORKSPACE_FILESYSTEM_LIFECYCLE_LOG_MAX_AGE_MS,
155 maxFiles: options.maxFiles ?? WORKSPACE_FILESYSTEM_LIFECYCLE_LOG_MAX_FILES,
156 cooldownMs: options.cooldownMs ?? WORKSPACE_FILESYSTEM_LIFECYCLE_COOLDOWN_MS,
157 force: options.force ?? false,
158 minVisibleMs: options.minVisibleMs ?? WORKSPACE_FILESYSTEM_LIFECYCLE_MIN_VISIBLE_MS,
159 protectedLogPaths: options.protectedLogPaths ?? [],
160 timeoutMs: options.timeoutMs ?? 1000,
161 lockPurpose: options.lockPurpose ?? 'filesystem-lifecycle',
162 daemonCleanup: options.daemonCleanup,
163 };
164}
165
166async function shouldSkipForCooldown(
167 markerPath: string,

Calls 2

resolveWorkspaceKeyFunction · 0.70

Tested by

no test coverage detected