(projectPath?: string | undefined | null | undefined)
| 165 | } |
| 166 | |
| 167 | function markStaleForProject(projectPath?: string | undefined | null | undefined) { |
| 168 | if (projectPath !== null && projectPath !== undefined && projectPath.trim().length === 0) { |
| 169 | return |
| 170 | } |
| 171 | |
| 172 | const normalizedProjectPath = projectPath ? path.resolve(projectPath) : '' |
| 173 | for (const { runtimeKey, runtimePromise } of getRuntimeRecords()) { |
| 174 | void (async () => { |
| 175 | try { |
| 176 | const runtime = await runtimePromise |
| 177 | if (normalizedProjectPath && path.resolve(runtime.cwd) !== normalizedProjectPath) { |
| 178 | return |
| 179 | } |
| 180 | |
| 181 | staleGenerations.set(runtimeKey, (staleGenerations.get(runtimeKey) ?? 0) + 1) |
| 182 | await reloadIfSafe(runtimeKey) |
| 183 | } catch { |
| 184 | // Ignore stale runtime reload failures; a later refresh will retry. |
| 185 | } |
| 186 | })() |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | function markStaleForSettingsCwd(settingsCwd?: string | undefined | null | undefined) { |
| 191 | if (!settingsCwd?.trim()) return |
nothing calls this directly
no test coverage detected