(settingsCwd?: string | undefined | null | undefined)
| 188 | } |
| 189 | |
| 190 | function markStaleForSettingsCwd(settingsCwd?: string | undefined | null | undefined) { |
| 191 | if (!settingsCwd?.trim()) return |
| 192 | const normalizedSettingsCwd = path.resolve(settingsCwd) |
| 193 | |
| 194 | for (const { runtimeKey, settingsCwd: runtimeSettingsCwd } of getRuntimeRecords()) { |
| 195 | if (!runtimeSettingsCwd || path.resolve(runtimeSettingsCwd) !== normalizedSettingsCwd) { |
| 196 | continue |
| 197 | } |
| 198 | |
| 199 | staleGenerations.set(runtimeKey, (staleGenerations.get(runtimeKey) ?? 0) + 1) |
| 200 | void reloadIfSafe(runtimeKey).catch(() => undefined) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | function isStale(sessionPath: string | null | undefined) { |
| 205 | const runtimeKey = getPersistedSessionPath(sessionPath ?? null) |
nothing calls this directly
no test coverage detected