Compare commits

...

10 Commits

Author SHA1 Message Date
511de8040a 3.0.50 2024-05-25 03:06:18 +02:00
952e95f82f fix(core): update 2024-05-25 03:06:17 +02:00
42115cb6be 3.0.49 2024-05-25 03:04:25 +02:00
e1206bdf4c fix(core): update 2024-05-25 03:04:25 +02:00
e32e7272ba 3.0.48 2024-05-25 02:49:46 +02:00
3f317fffd5 fix(core): update 2024-05-25 02:49:46 +02:00
a49309566c 3.0.47 2024-05-25 02:35:24 +02:00
0fb1d54e06 fix(core): update 2024-05-25 02:35:23 +02:00
f31ca98b2c 3.0.46 2024-05-25 02:34:44 +02:00
dfcda87196 fix(core): update 2024-05-25 02:34:43 +02:00
5 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@api.global/typedserver",
"version": "3.0.45",
"version": "3.0.50",
"description": "A TypeScript-based project for easy serving of static files with support for live reloading, compression, and typed requests.",
"type": "module",
"exports": {

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedserver',
version: '3.0.45',
version: '3.0.50',
description: 'A TypeScript-based project for easy serving of static files with support for live reloading, compression, and typed requests.'
}

View File

@ -38,7 +38,7 @@ export const addServiceWorkerRoute = (
swVersionInfo = swDataFunc();
// the basic stuff
typedserverInstance.server.addRoute('/serviceworker.js*', serviceworkerHandler);
typedserverInstance.server.addRoute('/serviceworker.*', serviceworkerHandler);
// the typed stuff
const typedrouter = new plugins.typedrequest.TypedRouter();

View File

@ -13,7 +13,7 @@ export class ServiceworkerClient {
logger.log('info', 'trying to register serviceworker');
// this is some magic for Parcel to not pick up the serviceworker
const serviceworkerInNavigator: ServiceWorkerContainer = navigator.serviceWorker;
const swRegistration: ServiceWorkerRegistration = await serviceworkerInNavigator.register('/lsw.js', {
const swRegistration: ServiceWorkerRegistration = await serviceworkerInNavigator.register('/serviceworker.bundle.js', {
scope: '/',
updateViaCache: 'none'
});

View File

@ -14,11 +14,11 @@ logger.log('note', 'mainthread console initialized!');
import { ServiceworkerClient } from './classes.serviceworkerclient.js';
export type {
ServiceworkerClient as LosslessServiceworker
ServiceworkerClient
}
export const getServiceWorker = async () => {
const losslessServiceWorkerInstance = await ServiceworkerClient.createServiceWorker(); // lets setup the service worker
export const getServiceworkerClient = async () => {
const swClient = await ServiceworkerClient.createServiceWorker(); // lets setup the service worker
logger.log('ok', 'service worker ready!'); // and wait for it to be ready
return losslessServiceWorkerInstance;
return swClient;
};