fix: eslint (#8185)

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
This commit is contained in:
Aaron 2025-12-05 17:33:51 +07:00 committed by GitHub
parent 82c970ac4b
commit 85d90030cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
138 changed files with 5054 additions and 4747 deletions

View file

@ -21,22 +21,20 @@ if (!self.define) {
const singleRequire = (uri, parentUri) => {
uri = new URL(uri + ".js", parentUri).href;
return registry[uri] || (
new Promise(resolve => {
if ("document" in self) {
const script = document.createElement("script");
script.src = uri;
script.onload = resolve;
document.head.appendChild(script);
} else {
nextDefineUri = uri;
importScripts(uri);
resolve();
}
})
.then(() => {
return (
registry[uri] ||
new Promise((resolve) => {
if ("document" in self) {
const script = document.createElement("script");
script.src = uri;
script.onload = resolve;
document.head.appendChild(script);
} else {
nextDefineUri = uri;
importScripts(uri);
resolve();
}
}).then(() => {
let promise = registry[uri];
if (!promise) {
throw new Error(`Module ${uri} didnt register its module`);
@ -53,49 +51,52 @@ if (!self.define) {
return;
}
let exports = {};
const require = depUri => singleRequire(depUri, uri);
const require = (depUri) => singleRequire(depUri, uri);
const specialDeps = {
module: { uri },
exports,
require
require,
};
registry[uri] = Promise.all(depsNames.map(
depName => specialDeps[depName] || require(depName)
)).then(deps => {
registry[uri] = Promise.all(depsNames.map((depName) => specialDeps[depName] || require(depName))).then((deps) => {
factory(...deps);
return exports;
});
};
}
define(['./workbox-9f2f79cf'], (function (workbox) { 'use strict';
define(["./workbox-9f2f79cf"], function (workbox) {
"use strict";
importScripts();
self.skipWaiting();
workbox.clientsClaim();
workbox.registerRoute("/", new workbox.NetworkFirst({
"cacheName": "start-url",
plugins: [{
cacheWillUpdate: async ({
request,
response,
event,
state
}) => {
if (response && response.type === 'opaqueredirect') {
return new Response(response.body, {
status: 200,
statusText: 'OK',
headers: response.headers
});
}
return response;
}
}]
}), 'GET');
workbox.registerRoute(/.*/i, new workbox.NetworkOnly({
"cacheName": "dev",
plugins: []
}), 'GET');
}));
workbox.registerRoute(
"/",
new workbox.NetworkFirst({
cacheName: "start-url",
plugins: [
{
cacheWillUpdate: async ({ request, response, event, state }) => {
if (response && response.type === "opaqueredirect") {
return new Response(response.body, {
status: 200,
statusText: "OK",
headers: response.headers,
});
}
return response;
},
},
],
}),
"GET"
);
workbox.registerRoute(
/.*/i,
new workbox.NetworkOnly({
cacheName: "dev",
plugins: [],
}),
"GET"
);
});
//# sourceMappingURL=sw.js.map

File diff suppressed because it is too large Load diff