( pluginIds: string[], )
| 170 | * After 48 hours from seenAt, entries are auto-cleared on next load. |
| 171 | */ |
| 172 | export async function markFlaggedPluginsSeen( |
| 173 | pluginIds: string[], |
| 174 | ): Promise<void> { |
| 175 | if (cache === null) { |
| 176 | cache = await readFromDisk() |
| 177 | } |
| 178 | const now = new Date().toISOString() |
| 179 | let changed = false |
| 180 | |
| 181 | const updated = { ...cache } |
| 182 | for (const id of pluginIds) { |
| 183 | const entry = updated[id] |
| 184 | if (entry && !entry.seenAt) { |
| 185 | updated[id] = { ...entry, seenAt: now } |
| 186 | changed = true |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | if (changed) { |
| 191 | await writeToDisk(updated) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * Remove a plugin from the flagged list. Called when the user dismisses |
no test coverage detected