v1.0.21: auto-updater removes legacy SVG icons on update

Staff machines still had idle.svg/running.svg in their installed plugin
folder (Stream Deck merges rather than replaces on reinstall), causing
the old SVGs to shadow the new PNG icons added in v1.0.15. The
auto-updater now explicitly deletes these legacy files when applying an
update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
pdmarf
2026-04-23 20:43:24 +01:00
parent 3df4468605
commit ad776c9aa9
5 changed files with 17 additions and 3 deletions

View File

@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
}
// src/plugin.ts
var CURRENT_VERSION = "1.0.20";
var CURRENT_VERSION = "1.0.21";
var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/master";
var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
@@ -6510,6 +6510,13 @@ async function checkForUpdates(sendStatus) {
}
fs3.writeFileSync(path5.join(pluginRoot, ASSETS[i]), Buffer.from(await assetResps[i].arrayBuffer()));
}
const LEGACY = ["imgs/idle.svg", "imgs/running.svg"];
for (const f of LEGACY) {
try {
fs3.unlinkSync(path5.join(pluginRoot, f));
} catch {
}
}
plugin_default.logger.info(`Updated to ${version}, restarting\u2026`);
process.exit(0);
} catch (err) {