@christianriedl/utils 1.0.170 → 1.0.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iOpenAI.d.ts +11 -1
- package/dist/marshalBE.d.ts +1 -1
- package/dist/marshalBE.js.map +1 -1
- package/dist/marshalLE.d.ts +1 -1
- package/dist/marshalLE.js.map +1 -1
- package/package.json +1 -2
- package/src/components/OpenAI.vue +6 -6
- package/src/components/OpenAIConfig.vue +10 -10
- package/src/components/OpenAIFilter.vue +6 -6
- package/src/components/OpenAIMetaData.vue +2 -2
- package/src/components/SettingsLine.vue +3 -3
- package/src/components/TextToSpeech.vue +4 -4
- package/src/components/ThemeSettings.vue +3 -3
- package/src/views/SettingsPage.vue +2 -2
- package/dist/logger/src/iLogger.d.ts +0 -62
- package/dist/logger/src/iLogger.js +0 -10
- package/dist/logger/src/iLogger.js.map +0 -1
- package/dist/useSpeechRecognition.d.ts +0 -104
- package/dist/useSpeechRecognition.js +0 -79
- package/dist/useSpeechRecognition.js.map +0 -1
- package/dist/useSpeechSynthesis.d.ts +0 -49
- package/dist/useSpeechSynthesis.js +0 -96
- package/dist/useSpeechSynthesis.js.map +0 -1
- package/dist/utils/src/helper.d.ts +0 -28
- package/dist/utils/src/helper.js +0 -144
- package/dist/utils/src/helper.js.map +0 -1
- package/dist/utils/src/iLocalStorage.d.ts +0 -7
- package/dist/utils/src/iLocalStorage.js +0 -2
- package/dist/utils/src/iLocalStorage.js.map +0 -1
- package/dist/utils/src/index.d.ts +0 -4
- package/dist/utils/src/index.js +0 -5
- package/dist/utils/src/index.js.map +0 -1
- package/dist/utils/src/localStorage.d.ts +0 -20
- package/dist/utils/src/localStorage.js +0 -57
- package/dist/utils/src/localStorage.js.map +0 -1
- package/dist/utils/src/reactiveStorage.d.ts +0 -18
- package/dist/utils/src/reactiveStorage.js +0 -49
- package/dist/utils/src/reactiveStorage.js.map +0 -1
- package/dist/utils/src/registerServiceWorker.d.ts +0 -31
- package/dist/utils/src/registerServiceWorker.js +0 -251
- package/dist/utils/src/registerServiceWorker.js.map +0 -1
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
// Register a service worker to serve assets from local cache.
|
|
2
|
-
// This lets the app load faster on subsequent visits in production, and gives
|
|
3
|
-
// it offline capabilities. However, it also means that developers (and users)
|
|
4
|
-
// will only see deployed updates on the "N+1" visit to a page, since previously
|
|
5
|
-
// cached resources are updated in the background.
|
|
6
|
-
const isLocalhost = Boolean(window.location.hostname === 'localhost' ||
|
|
7
|
-
// [::1] is the IPv6 localhost address.
|
|
8
|
-
window.location.hostname === '[::1]' ||
|
|
9
|
-
// 127.0.0.1/8 is considered localhost for IPv4.
|
|
10
|
-
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
|
11
|
-
export class RegisterServiceWorker {
|
|
12
|
-
applicationServerPublicKey;
|
|
13
|
-
isOnline;
|
|
14
|
-
isSubscribed;
|
|
15
|
-
static instance;
|
|
16
|
-
_rsw = null;
|
|
17
|
-
_hook;
|
|
18
|
-
constructor(hook, applicationServerPublicKey) {
|
|
19
|
-
RegisterServiceWorker.instance = this;
|
|
20
|
-
this._hook = hook;
|
|
21
|
-
this.isOnline = navigator.onLine;
|
|
22
|
-
this.applicationServerPublicKey = applicationServerPublicKey;
|
|
23
|
-
this._hook.online(this.isOnline);
|
|
24
|
-
window.ononline = (ev) => {
|
|
25
|
-
this._hook.online(true);
|
|
26
|
-
this.isOnline = true;
|
|
27
|
-
};
|
|
28
|
-
window.onoffline = (ev) => {
|
|
29
|
-
this._hook.online(false);
|
|
30
|
-
this.isOnline = false;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
get registration() {
|
|
34
|
-
return this._rsw;
|
|
35
|
-
}
|
|
36
|
-
register(swUrl, scope) {
|
|
37
|
-
const self = this;
|
|
38
|
-
if ('serviceWorker' in navigator) {
|
|
39
|
-
this._hook.log.info('Register service worker');
|
|
40
|
-
window.addEventListener('load', () => {
|
|
41
|
-
if (isLocalhost) {
|
|
42
|
-
// This is running on localhost. Lets check if a service worker still exists or not.
|
|
43
|
-
self.checkValidServiceWorker(swUrl);
|
|
44
|
-
navigator.serviceWorker.ready
|
|
45
|
-
.then(() => {
|
|
46
|
-
this._hook.ready();
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
// Is not local host. Just register service worker
|
|
51
|
-
self.registerValidSW(swUrl, scope);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
registerValidSW(swUrl, scope) {
|
|
57
|
-
const self = this;
|
|
58
|
-
navigator.serviceWorker
|
|
59
|
-
.register(swUrl, { scope: scope })
|
|
60
|
-
.then(registration => {
|
|
61
|
-
self._rsw = registration;
|
|
62
|
-
if (navigator.serviceWorker.onmessage != null) {
|
|
63
|
-
navigator.serviceWorker.addEventListener('message', (swevent) => {
|
|
64
|
-
const reply = self.processMessage(swevent.data);
|
|
65
|
-
if (swevent.ports !== null)
|
|
66
|
-
swevent.ports[0].postMessage(reply);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
registration.onupdatefound = () => {
|
|
70
|
-
const installingWorker = registration.installing;
|
|
71
|
-
self._hook.log.info('Update found');
|
|
72
|
-
if (installingWorker !== null) {
|
|
73
|
-
installingWorker.onstatechange = () => {
|
|
74
|
-
if (installingWorker) {
|
|
75
|
-
self._hook.log.info('State changed ' + installingWorker.state);
|
|
76
|
-
if (installingWorker.state === 'installed') {
|
|
77
|
-
if (navigator.serviceWorker.controller) {
|
|
78
|
-
// At this point, the old content will have been purged and
|
|
79
|
-
// the fresh content will have been added to the cache.
|
|
80
|
-
// It's the perfect time to display a "New content is
|
|
81
|
-
// available; please refresh." message in your web app.
|
|
82
|
-
self._hook.updated();
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
// At this point, everything has been precached.
|
|
86
|
-
// It's the perfect time to display a
|
|
87
|
-
// "Content is cached for offline use." message.
|
|
88
|
-
self._hook.cached();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
self._hook.log.info('Registered at scope ' + registration.scope);
|
|
96
|
-
self._hook.registered();
|
|
97
|
-
})
|
|
98
|
-
.catch(error => {
|
|
99
|
-
self._hook.error(error);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
processMessage(msgObj) {
|
|
103
|
-
try {
|
|
104
|
-
this._hook.log.info("Message " + JSON.stringify(msgObj));
|
|
105
|
-
if (msgObj.type === 1) {
|
|
106
|
-
this.notify(msgObj.message);
|
|
107
|
-
return "received";
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
catch (err) {
|
|
111
|
-
this._hook.log.warning("Message " + JSON.stringify(err));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
notify(msg) {
|
|
115
|
-
if (!("Notification" in window)) {
|
|
116
|
-
alert("This browser does not support desktop notification");
|
|
117
|
-
}
|
|
118
|
-
else if (Notification.permission === "granted") {
|
|
119
|
-
// If it's okay let's create a notification
|
|
120
|
-
const notification = new Notification(msg);
|
|
121
|
-
}
|
|
122
|
-
else if (Notification.permission !== "denied") {
|
|
123
|
-
Notification.requestPermission(function (permission) {
|
|
124
|
-
// If the user accepts, let's create a notification
|
|
125
|
-
if (permission === "granted") {
|
|
126
|
-
const notification = new Notification(msg);
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
checkValidServiceWorker(swUrl) {
|
|
132
|
-
// Check if the service worker can be found.
|
|
133
|
-
const self = this;
|
|
134
|
-
fetch(swUrl)
|
|
135
|
-
.then(response => {
|
|
136
|
-
// Ensure service worker exists, and that we really are getting a JS file.
|
|
137
|
-
if (response.status === 404 || response.headers.get('content-type').indexOf('javascript') === -1) {
|
|
138
|
-
// No service worker found.
|
|
139
|
-
self._hook.error(`Service worker not found at ${swUrl}`);
|
|
140
|
-
self.unregister();
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
// Service worker found. Proceed as normal.
|
|
144
|
-
this.registerValidSW(swUrl);
|
|
145
|
-
}
|
|
146
|
-
})
|
|
147
|
-
.catch(error => {
|
|
148
|
-
if (!navigator.onLine) {
|
|
149
|
-
self._hook.online(false);
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
self._hook.error(error);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
unregister() {
|
|
157
|
-
if ('serviceWorker' in navigator) {
|
|
158
|
-
this._hook.log.info('Unregister service worker');
|
|
159
|
-
navigator.serviceWorker.ready
|
|
160
|
-
.then(registration => registration.unregister());
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
getSubscription() {
|
|
164
|
-
this._hook.log.trace('get subscription');
|
|
165
|
-
const self = this;
|
|
166
|
-
const promise = new Promise(function (resolve, reject) {
|
|
167
|
-
if (self._rsw === null) {
|
|
168
|
-
reject(new Error('No service worker registered'));
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
self.registration.pushManager.getSubscription()
|
|
172
|
-
.then(subscription => {
|
|
173
|
-
resolve(subscription);
|
|
174
|
-
self.isSubscribed = subscription !== null;
|
|
175
|
-
if (self._hook.subscribed)
|
|
176
|
-
self._hook.subscribed(self.isSubscribed);
|
|
177
|
-
})
|
|
178
|
-
.catch(error => reject(error));
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
return promise;
|
|
182
|
-
}
|
|
183
|
-
subscribeUser() {
|
|
184
|
-
this._hook.log.info('subscribe user');
|
|
185
|
-
const self = this;
|
|
186
|
-
const promise = new Promise(function (resolve, reject) {
|
|
187
|
-
if (!self.applicationServerPublicKey) {
|
|
188
|
-
reject(new Error("Application server public key missing"));
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
const applicationServerKey = RegisterServiceWorker.urlB64ToUint8Array(self.applicationServerPublicKey);
|
|
192
|
-
if (self._rsw === null) {
|
|
193
|
-
reject(new Error('No service worker registered'));
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
const options = {
|
|
197
|
-
userVisibleOnly: true,
|
|
198
|
-
applicationServerKey: applicationServerKey
|
|
199
|
-
};
|
|
200
|
-
self.registration.pushManager.subscribe(options)
|
|
201
|
-
.then(subscription => {
|
|
202
|
-
resolve(subscription);
|
|
203
|
-
self.isSubscribed = subscription !== null;
|
|
204
|
-
if (self._hook.subscribed)
|
|
205
|
-
self._hook.subscribed(self.isSubscribed);
|
|
206
|
-
})
|
|
207
|
-
.catch(err => reject(err));
|
|
208
|
-
});
|
|
209
|
-
return promise;
|
|
210
|
-
}
|
|
211
|
-
unsubscribeUser() {
|
|
212
|
-
this._hook.log.info('unsubscribe user');
|
|
213
|
-
const self = this;
|
|
214
|
-
const promise = new Promise(function (resolve, reject) {
|
|
215
|
-
if (self._rsw === null) {
|
|
216
|
-
reject(new Error('No service worker registered'));
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
self.registration.pushManager.getSubscription()
|
|
220
|
-
.then(subscription => {
|
|
221
|
-
if (subscription !== null) {
|
|
222
|
-
subscription.unsubscribe()
|
|
223
|
-
.then((res) => {
|
|
224
|
-
resolve(subscription);
|
|
225
|
-
if (res) {
|
|
226
|
-
self.isSubscribed = false;
|
|
227
|
-
if (self._hook.subscribed)
|
|
228
|
-
self._hook.subscribed(self.isSubscribed);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
})
|
|
233
|
-
.catch(error => reject(error));
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
return promise;
|
|
237
|
-
}
|
|
238
|
-
static urlB64ToUint8Array(base64String) {
|
|
239
|
-
const padding = '='.repeat((4 - base64String.length % 4) % 4);
|
|
240
|
-
const base64 = (base64String + padding)
|
|
241
|
-
.replace(/\-/g, '+')
|
|
242
|
-
.replace(/_/g, '/');
|
|
243
|
-
const rawData = window.atob(base64);
|
|
244
|
-
const outputArray = new Uint8Array(rawData.length);
|
|
245
|
-
for (let i = 0; i < rawData.length; ++i) {
|
|
246
|
-
outputArray[i] = rawData.charCodeAt(i);
|
|
247
|
-
}
|
|
248
|
-
return outputArray;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
//# sourceMappingURL=registerServiceWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerServiceWorker.js","sourceRoot":"","sources":["../../../src/registerServiceWorker.ts"],"names":[],"mappings":"AAEA,8DAA8D;AAE9D,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,kDAAkD;AAElD,MAAM,WAAW,GAAG,OAAO,CACvB,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,WAAW;IACxC,uCAAuC;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO;IACpC,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAC1B,wDAAwD,CAC3D,CACJ,CAAA;AAaD,MAAM,OAAQ,qBAAqB;IAC/B,0BAA0B,CAAoB;IAC9C,QAAQ,CAAU;IAClB,YAAY,CAAW;IAEvB,MAAM,CAAC,QAAQ,CAAwB;IAE/B,IAAI,GAAqC,IAAI,CAAC;IAC9C,KAAK,CAAQ;IAErB,YAAY,IAAW,EAAE,0BAAmC;QACxD,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAO,EAAE,EAAE;YAC1B,IA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