Launches the updater as a stepper flow. The first step streams terminal-style
progress updates and then moves automatically to the ready step.
{
if (updaterRunning) {
return;
}
updaterRunning = true;
try {
const updater = await DeesUpdater.createAndShow({
currentVersion: '3.79.0',
updatedVersion: '3.80.0',
moreInfoUrl: 'https://code.foss.global/design.estate/dees-catalog',
changelogUrl: 'https://code.foss.global/design.estate/dees-catalog/-/blob/main/changelog.md',
successAction: 'close',
successDelayMs: 10000,
});
const progressFrames = [
{ line: 'Checking release manifest', percentage: 12, delay: 550 },
{ line: 'Downloading signed bundle', percentage: 33, delay: 700 },
{ line: 'Verifying checksum', percentage: 51, delay: 650 },
{ line: 'Applying update files', percentage: 74, delay: 800 },
{ line: 'Cleaning up previous release', percentage: 91, delay: 600 },
];
updater.updateProgress({
statusText: 'Checking release manifest...',
terminalLines: ['Checking release manifest'],
percentage: 12,
indeterminate: true,
});
for (const [index, progressFrame] of progressFrames.entries()) {
if (index > 0) {
updater.appendProgressLine(progressFrame.line);
updater.updateProgress({
percentage: progressFrame.percentage,
statusText: `${progressFrame.line}...`,
});
}
await waitForDemoStep(progressFrame.delay);
}
await updater.markUpdateReady();
await waitForDemoStep(10500);
} finally {
updaterRunning = false;
}
}}
>Show updater flow
`;
};