Skip to content

Commit c401852

Browse files
authored
Merge pull request #171 from Flow-Works/feat/switch-uv-to-version-1011
[➕] (#168) use UV version 1.0.11
2 parents ff9630c + ad38f19 commit c401852

16 files changed

+43626
-41269
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowos",
3-
"version": "2.1.1",
3+
"version": "2.2.0",
44
"description": "The most aesthetic webOS.",
55
"main": "src/bootloader.ts",
66
"scripts": {

public/uv-sw.js

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
// @ts-nocheck
1+
/*global UVServiceWorker,__uv$config*/
2+
/*
3+
* Stock service worker script.
4+
* Users can provide their own sw.js if they need to extend the functionality of the service worker.
5+
* Ideally, this will be registered under the scope in uv.config.js so it will not need to be modified.
6+
* However, if a user changes the location of uv.bundle.js/uv.config.js or sw.js is not relative to them, they will need to modify this script locally.
7+
*/
28

3-
importScripts('/uv/uv.sw.js');
9+
10+
importScripts(`uv.config.js`);
411

512
const params = new URL(self.location.href).searchParams
613
const serverURL = atob(params.get('url'));
7-
const sw = new UVServiceWorker(serverURL);
14+
self.__uv$config.bare = `${serverURL}/bare/`
15+
16+
importScripts('uv.bundle.js');
17+
importScripts(__uv$config.sw || 'uv.sw.js');
18+
19+
const sw = new UVServiceWorker();
820

9-
self.addEventListener('fetch', event => event.respondWith(sw.fetch(event)));
21+
self.addEventListener('fetch', (event) => event.respondWith(sw.fetch(event)));

0 commit comments

Comments
 (0)