release: v2.1.12 reliability and security hardening
CI / verify (push) Waiting to run

Verify update artifacts with exact metadata and SHA-512, require host-confirmed upload completion before cleanup, harden credentials and backups, improve queue recovery and skipped-state reporting, expand Windows path coverage, and add CI packaging checks.
This commit is contained in:
Sucukdeluxe
2026-08-11 22:36:21 +02:00
parent 2c124c848c
commit 2ba0106ef0
47 changed files with 2069 additions and 1192 deletions
+51
View File
@@ -0,0 +1,51 @@
(function (root, factory) {
const api = factory();
if (typeof module === 'object' && module.exports) module.exports = api;
if (root) root.QueueStats = api;
})(typeof window !== 'undefined' ? window : globalThis, function () {
function calculateQueueStats(jobs) {
const items = Array.isArray(jobs) ? jobs : [];
let remaining = 0;
let inProgress = 0;
let done = 0;
let errors = 0;
let skipped = 0;
let aborted = 0;
let bytesRemaining = 0;
let totalSize = 0;
let remainingSize = 0;
let inProgressBytes = 0;
for (const job of items) {
const status = job?.status;
const totalBytes = Number(job?.bytesTotal) || 0;
const uploadedBytes = Number(job?.bytesUploaded) || 0;
const pendingBytes = Math.max(0, totalBytes - uploadedBytes);
totalSize += totalBytes;
if (status === 'uploading' || status === 'getting-server' || status === 'retrying') {
inProgress++;
remaining++;
inProgressBytes += uploadedBytes;
bytesRemaining += pendingBytes;
remainingSize += pendingBytes;
} else if (status === 'preview' || status === 'queued') {
remaining++;
bytesRemaining += pendingBytes;
remainingSize += pendingBytes;
} else if (status === 'done') {
done++;
} else if (status === 'error') {
errors++;
} else if (status === 'skipped') {
skipped++;
} else if (status === 'aborted') {
aborted++;
}
}
return { total: items.length, remaining, inProgress, done, errors, skipped, aborted, bytesRemaining, totalSize, remainingSize, inProgressBytes };
}
return { calculateQueueStats };
});