Skip to content

Commit

Permalink
Merge pull request #171 from Flow-Works/feat/switch-uv-to-version-1011
Browse files Browse the repository at this point in the history
[➕] (#168) use UV version 1.0.11
  • Loading branch information
ThinLiquid authored Jan 29, 2024
2 parents ff9630c + ad38f19 commit c401852
Show file tree
Hide file tree
Showing 16 changed files with 43,626 additions and 41,269 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flowos",
"version": "2.1.1",
"version": "2.2.0",
"description": "The most aesthetic webOS.",
"main": "src/bootloader.ts",
"scripts": {
Expand Down
20 changes: 16 additions & 4 deletions public/uv-sw.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
// @ts-nocheck
/*global UVServiceWorker,__uv$config*/
/*
* Stock service worker script.
* Users can provide their own sw.js if they need to extend the functionality of the service worker.
* Ideally, this will be registered under the scope in uv.config.js so it will not need to be modified.
* 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.
*/

importScripts('/uv/uv.sw.js');

importScripts(`uv.config.js`);

const params = new URL(self.location.href).searchParams
const serverURL = atob(params.get('url'));
const sw = new UVServiceWorker(serverURL);
self.__uv$config.bare = `${serverURL}/bare/`

importScripts('uv.bundle.js');
importScripts(__uv$config.sw || 'uv.sw.js');

const sw = new UVServiceWorker();

self.addEventListener('fetch', event => event.respondWith(sw.fetch(event)));
self.addEventListener('fetch', (event) => event.respondWith(sw.fetch(event)));
Loading

0 comments on commit c401852

Please sign in to comment.