Release / release (push) Waiting to run
The project's only runtime dependency is PyUSB (BSD-3-Clause) and it bundles no third-party code (the PWA's DES/3DES is written from the FIPS 46-3 tables, AES uses WebCrypto, the decoders come from the ISO 7816/ETSI/3GPP specs), so nothing forced GPL; the GPL-2.0-or-later declaration is replaced with MIT. - LICENSE: the MIT text, Copyright (c) 2026 Anton Troshin. - pyproject: license = "MIT" + license-files = ["LICENSE"] (PEP 639), and the build requirement moves to setuptools>=77 for the SPDX form. The wheel now carries dist-info/licenses/LICENSE and License-Expression: MIT, the sdist and the runtime zip carry LICENSE at the top. - READMEs (EN/RU): a License section (original decoders/DES implementation, PyUSB as the only runtime dependency). - tests: the packaging test pins the MIT declaration and the LICENSE text; the release-zip test requires LICENSE in the archive. - version 2.7.13; SW cache v95. Copies published before this tag (v2.7.10-v2.7.12) remain under the license they were released with.
49 lines
1.4 KiB
JavaScript
49 lines
1.4 KiB
JavaScript
const CACHE = 'simtrace-analyser-v95';
|
|
|
|
const PRECACHE = [
|
|
'index.html',
|
|
'manifest.json',
|
|
'icon-192.png',
|
|
'icon-512.png',
|
|
'favicon.png',
|
|
'sim-analyser.svg',
|
|
'sim-analyser-light.svg',
|
|
];
|
|
|
|
self.addEventListener('install', e => {
|
|
self.skipWaiting();
|
|
e.waitUntil(
|
|
caches.open(CACHE)
|
|
.then(cache => cache.addAll(PRECACHE))
|
|
.then(() => console.log('SW: precache done'))
|
|
.catch(err => console.error('SW: precache failed', err))
|
|
);
|
|
});
|
|
|
|
self.addEventListener('activate', e => {
|
|
e.waitUntil(
|
|
caches.keys()
|
|
.then(keys => Promise.all(
|
|
keys.filter(k => k !== CACHE).map(k => caches.delete(k))
|
|
))
|
|
.then(() => self.clients.claim())
|
|
.then(() => console.log('SW: activated, controlling clients'))
|
|
);
|
|
});
|
|
|
|
self.addEventListener('fetch', e => {
|
|
// Network-first: the local server is always up, so always serve fresh
|
|
// content and fall back to cache only when offline.
|
|
if (!e.request.url.startsWith('http')) return;
|
|
if (e.request.method !== 'GET') return;
|
|
e.respondWith(
|
|
fetch(e.request)
|
|
.then(r => {
|
|
const clone = r.clone();
|
|
caches.open(CACHE).then(c => c.put(e.request, clone)).catch(() => {});
|
|
return r;
|
|
})
|
|
.catch(() => caches.match(e.request))
|
|
);
|
|
});
|