fix(core): update
This commit is contained in:
parent
96a88911a7
commit
8f1464c97e
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@api.global/typedserver',
|
||||
version: '3.0.43',
|
||||
version: '3.0.44',
|
||||
description: 'A TypeScript-based project for easy serving of static files with support for live reloading, compression, and typed requests.'
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './lele-serviceworker.plugins.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as interfaces from '../dist_ts_interfaces/index.js';
|
||||
import { logger } from './serviceworker.logging.js';
|
||||
import { logger } from './logging.js';
|
||||
|
||||
/**
|
||||
* MessageManager implements two ways of serviceworker communication
|
@ -1,9 +1,9 @@
|
||||
import * as plugins from './lele-serviceworker.plugins.js';
|
||||
import { LosslessServiceworker } from './lele-serviceworker.classes.serviceworker.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import { ServiceworkerClient } from './classes.serviceworkerclient.js';
|
||||
|
||||
export class GlobalSW {
|
||||
losslessSw: LosslessServiceworker;
|
||||
constructor(losslessServiceWorkerInstanceArg: LosslessServiceworker) {
|
||||
losslessSw: ServiceworkerClient;
|
||||
constructor(losslessServiceWorkerInstanceArg: ServiceworkerClient) {
|
||||
this.losslessSw = losslessServiceWorkerInstanceArg;
|
||||
globalThis.globalSw = this;
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './lele-serviceworker.plugins.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as interfaces from '../dist_ts_interfaces/index.js';
|
||||
import { logger } from "./serviceworker.logging.js";
|
||||
import { logger } from "./logging.js";
|
||||
|
||||
export class NotificationManager {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import * as plugins from './lele-serviceworker.plugins.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as interfaces from '../dist_ts_interfaces/index.js';
|
||||
import { logger } from "./serviceworker.logging.js";
|
||||
import { NotificationManager } from './lele-serviceworker.classes.notificationmanager.js';
|
||||
import { ActionManager } from './lele-serviceworker.classes.actionmanager.js';
|
||||
import { GlobalSW } from './lele-serviceworker.classes.globalsw.js'
|
||||
import { logger } from "./logging.js";
|
||||
import { NotificationManager } from './classes.notificationmanager.js';
|
||||
import { ActionManager } from './classes.actionmanager.js';
|
||||
import { GlobalSW } from './classes.globalsw.js'
|
||||
|
||||
export class LosslessServiceworker {
|
||||
export class ServiceworkerClient {
|
||||
// STATIC
|
||||
public static async createServiceWorker(): Promise<LosslessServiceworker> {
|
||||
public static async createServiceWorker(): Promise<ServiceworkerClient> {
|
||||
if ('serviceWorker' in navigator) {
|
||||
try {
|
||||
logger.log('info', 'trying to register serviceworker');
|
||||
@ -31,7 +31,7 @@ export class LosslessServiceworker {
|
||||
await navigator.serviceWorker.ready;
|
||||
logger.log('ok', 'serviceworker is ready!');
|
||||
await this.waitForController();
|
||||
const losslessServiceWorkerInstance = new LosslessServiceworker();
|
||||
const losslessServiceWorkerInstance = new ServiceworkerClient();
|
||||
return losslessServiceWorkerInstance;
|
||||
} catch (err) {
|
||||
// sentry integration here
|
@ -8,17 +8,17 @@ export type {
|
||||
// imports
|
||||
// ====================================
|
||||
|
||||
import { logger } from './serviceworker.logging.js';
|
||||
import { logger } from './logging.js';
|
||||
logger.log('note', 'mainthread console initialized!');
|
||||
|
||||
import { LosslessServiceworker } from './lele-serviceworker.classes.serviceworker.js';
|
||||
import { ServiceworkerClient } from './classes.serviceworkerclient.js';
|
||||
|
||||
export type {
|
||||
LosslessServiceworker
|
||||
ServiceworkerClient as LosslessServiceworker
|
||||
}
|
||||
|
||||
export const getServiceWorker = async () => {
|
||||
const losslessServiceWorkerInstance = await LosslessServiceworker.createServiceWorker(); // lets setup the service worker
|
||||
const losslessServiceWorkerInstance = await ServiceworkerClient.createServiceWorker(); // lets setup the service worker
|
||||
logger.log('ok', 'service worker ready!'); // and wait for it to be ready
|
||||
return losslessServiceWorkerInstance;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user