Skip to content

Commit

Permalink
Refreshed gh-pages from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Yqnn committed Mar 30, 2024
1 parent ae8bedb commit 1b37105
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 62 deletions.
6 changes: 3 additions & 3 deletions 3rdpartylicenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MIT
MIT
The MIT License

Copyright (c) 2023 Google LLC.
Copyright (c) 2024 Google LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -39,7 +39,7 @@ MIT
MIT
The MIT License

Copyright (c) 2023 Google LLC.
Copyright (c) 2024 Google LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -276,7 +276,7 @@ zone.js
MIT
The MIT License

Copyright (c) 2010-2022 Google LLC. https://angular.io/license
Copyright (c) 2010-2023 Google LLC. https://angular.io/license

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 9 additions & 8 deletions index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions main.67aed32d0b64c21e.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion main.86812b6a119cef3d.js

This file was deleted.

49 changes: 30 additions & 19 deletions ngsw-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,19 @@ ${error.stack}`;
return UpdateCacheStatus.CACHED;
}
async getCacheNames() {
const [cache, metadata] = await Promise.all([
this.cache,
this.metadata
]);
const [cache, metadata] = await Promise.all([this.cache, this.metadata]);
return [cache.name, metadata.cacheName];
}
async handleFetch(req, _event) {
const url = this.adapter.normalizeUrl(req.url);
if (this.urls.indexOf(url) !== -1 || this.patterns.some((pattern) => pattern.test(url))) {
const cache = await this.cache;
const cachedResponse = await cache.match(req, this.config.cacheQueryOptions);
let cachedResponse;
try {
cachedResponse = await cache.match(req, this.config.cacheQueryOptions);
} catch (error) {
throw new SwCriticalError(`Cache is throwing while looking for a match: ${error}`);
}
if (cachedResponse !== void 0) {
if (this.hashes.has(url)) {
return cachedResponse;
Expand Down Expand Up @@ -518,7 +520,12 @@ ${error.stack}`;
await this.urls.reduce(async (previous, url) => {
await previous;
const req = this.adapter.newRequest(url);
const alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0;
let alreadyCached = false;
try {
alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0;
} catch (error) {
throw new SwCriticalError(`Cache is throwing while looking for a match in a PrefetchAssetGroup: ${error}`);
}
if (alreadyCached) {
return;
}
Expand Down Expand Up @@ -555,7 +562,12 @@ ${error.stack}`;
await this.urls.reduce(async (previous, url) => {
await previous;
const req = this.adapter.newRequest(url);
const alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0;
let alreadyCached = false;
try {
alreadyCached = await cache.match(req, this.config.cacheQueryOptions) !== void 0;
} catch (error) {
throw new SwCriticalError(`Cache is throwing while looking for a match in a LazyAssetGroup: ${error}`);
}
if (alreadyCached) {
return;
}
Expand Down Expand Up @@ -883,8 +895,8 @@ ${error.stack}`;
this.manifest = manifest;
this.manifestHash = manifestHash;
this.hashTable = /* @__PURE__ */ new Map();
this.indexUrl = this.adapter.normalizeUrl(this.manifest.index);
this._okay = true;
this.indexUrl = this.adapter.normalizeUrl(this.manifest.index);
Object.keys(manifest.hashTable).forEach((url) => {
this.hashTable.set(adapter2.normalizeUrl(url), manifest.hashTable[url]);
});
Expand Down Expand Up @@ -1017,7 +1029,7 @@ ${error.stack}`;
};

// bazel-out/darwin_arm64-fastbuild-ST-2e5f3376adb5/bin/packages/service-worker/worker/src/debug.mjs
var SW_VERSION = "15.2.9";
var SW_VERSION = "17.3.2";
var DEBUG_LOG_BUFFER_SIZE = 100;
var DebugHandler = class {
constructor(driver, adapter2) {
Expand Down Expand Up @@ -1222,8 +1234,8 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
this.lastUpdateCheck = null;
this.scheduledNavUpdateCheck = false;
this.loggedInvalidOnlyIfCachedRequest = false;
this.ngswStatePath = this.adapter.parseUrl("ngsw/state", this.scope.registration.scope).path;
this.controlTable = this.db.open("control");
this.ngswStatePath = this.adapter.parseUrl("ngsw/state", this.scope.registration.scope).path;
this.scope.addEventListener("install", (event) => {
event.waitUntil(this.scope.skipWaiting());
});
Expand Down Expand Up @@ -1414,12 +1426,6 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
this.clientVersionMap.set(client.id, this.latestHash);
await this.sync();
const current = this.versions.get(this.latestHash);
const notice = {
type: "UPDATE_ACTIVATED",
previous,
current: this.mergeHashWithAppData(current.manifest, this.latestHash)
};
client.postMessage(notice);
return true;
}
async handleFetch(event) {
Expand Down Expand Up @@ -1516,7 +1522,6 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
await this.scheduleInitialization(this.versions.get(hash));
} catch (err) {
this.debugger.log(err, `initialize: schedule init of ${hash}`);
return false;
}
}));
}
Expand Down Expand Up @@ -1752,7 +1757,10 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
await this.initialized;
const clients = await this.scope.clients.matchAll();
await Promise.all(clients.map(async (client) => {
client.postMessage({ type: "NO_NEW_VERSION_DETECTED", version: this.mergeHashWithAppData(manifest, hash) });
client.postMessage({
type: "NO_NEW_VERSION_DETECTED",
version: this.mergeHashWithAppData(manifest, hash)
});
}));
}
async notifyClientsAboutVersionDetected(manifest, hash) {
Expand All @@ -1763,7 +1771,10 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
if (version === void 0) {
return;
}
client.postMessage({ type: "VERSION_DETECTED", version: this.mergeHashWithAppData(manifest, hash) });
client.postMessage({
type: "VERSION_DETECTED",
version: this.mergeHashWithAppData(manifest, hash)
});
}));
}
async notifyClientsAboutVersionReady(manifest, hash) {
Expand Down
20 changes: 10 additions & 10 deletions ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1697834128528,
"timestamp": 1711805581109,
"index": "/svg-path-editor/index.html",
"assetGroups": [
{
Expand All @@ -13,11 +13,11 @@
"urls": [
"/svg-path-editor/favicon.ico",
"/svg-path-editor/index.html",
"/svg-path-editor/main.86812b6a119cef3d.js",
"/svg-path-editor/main.67aed32d0b64c21e.js",
"/svg-path-editor/manifest.webmanifest",
"/svg-path-editor/polyfills.6954bcde41cd7edd.js",
"/svg-path-editor/runtime.475b568e549c271a.js",
"/svg-path-editor/styles.870b03837e682d94.css"
"/svg-path-editor/polyfills.5820c91972767167.js",
"/svg-path-editor/runtime.6f6474d711a7c88e.js",
"/svg-path-editor/styles.21acdd5be62e2565.css"
],
"patterns": []
},
Expand Down Expand Up @@ -70,12 +70,12 @@
"/svg-path-editor/assets/zoom_in.svg": "bf3ac558a23c8e5de36d2526618eac96e867af4a",
"/svg-path-editor/assets/zoom_out.svg": "2e7c0be5fb00f1468a89685dc13139a63d34588d",
"/svg-path-editor/favicon.ico": "5e89bcef8dcf5abfb8442b0a182fbe76dfbf61a9",
"/svg-path-editor/index.html": "0371bf55aa2599338b259ee4c47f7dae7afad302",
"/svg-path-editor/main.86812b6a119cef3d.js": "b48e00d516a5eb5e4d15666e9648d38fd0d3d7b1",
"/svg-path-editor/index.html": "42c1b6950a4d0f2476b4463502b4b312767ab6c9",
"/svg-path-editor/main.67aed32d0b64c21e.js": "daba210c00e415b7f1eb6452520352efe231d4e4",
"/svg-path-editor/manifest.webmanifest": "80b98f13afc36553e06626b0f03032fcaac82c58",
"/svg-path-editor/polyfills.6954bcde41cd7edd.js": "ba7b2cd5a633cdc491ef082aac06e5878982fade",
"/svg-path-editor/runtime.475b568e549c271a.js": "b629dfd16d3594d4bc6db722c44b57ab44687c92",
"/svg-path-editor/styles.870b03837e682d94.css": "9f6b126a26de1d815ab49b876df9238e23da5148"
"/svg-path-editor/polyfills.5820c91972767167.js": "5e471303cd49a9258d3da265a20132093f86364b",
"/svg-path-editor/runtime.6f6474d711a7c88e.js": "2fb0c339e14f24885ee4118a95a4513ce37011a6",
"/svg-path-editor/styles.21acdd5be62e2565.css": "b471f65f061405a2b89cdba97f60231f12b2e8f6"
},
"navigationUrls": [
{
Expand Down
1 change: 1 addition & 0 deletions polyfills.5820c91972767167.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion polyfills.6954bcde41cd7edd.js

This file was deleted.

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

22 changes: 13 additions & 9 deletions safety-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@

// tslint:disable:no-console

self.addEventListener('install', event => {
self.addEventListener('install', (event) => {
self.skipWaiting();
});

self.addEventListener('activate', event => {
self.addEventListener('activate', (event) => {
event.waitUntil(self.clients.claim());

event.waitUntil(self.registration.unregister().then(() => {
console.log('NGSW Safety Worker - unregistered old service worker');
}));
event.waitUntil(
self.registration.unregister().then(() => {
console.log('NGSW Safety Worker - unregistered old service worker');
}),
);

event.waitUntil(caches.keys().then(cacheNames => {
const ngswCacheNames = cacheNames.filter(name => /^ngsw:/.test(name));
return Promise.all(ngswCacheNames.map(name => caches.delete(name)));
}));
event.waitUntil(
caches.keys().then((cacheNames) => {
const ngswCacheNames = cacheNames.filter((name) => /^ngsw:/.test(name));
return Promise.all(ngswCacheNames.map((name) => caches.delete(name)));
}),
);
});
1 change: 1 addition & 0 deletions styles.21acdd5be62e2565.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion styles.870b03837e682d94.css

This file was deleted.

22 changes: 13 additions & 9 deletions worker-basic.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@

// tslint:disable:no-console

self.addEventListener('install', event => {
self.addEventListener('install', (event) => {
self.skipWaiting();
});

self.addEventListener('activate', event => {
self.addEventListener('activate', (event) => {
event.waitUntil(self.clients.claim());

event.waitUntil(self.registration.unregister().then(() => {
console.log('NGSW Safety Worker - unregistered old service worker');
}));
event.waitUntil(
self.registration.unregister().then(() => {
console.log('NGSW Safety Worker - unregistered old service worker');
}),
);

event.waitUntil(caches.keys().then(cacheNames => {
const ngswCacheNames = cacheNames.filter(name => /^ngsw:/.test(name));
return Promise.all(ngswCacheNames.map(name => caches.delete(name)));
}));
event.waitUntil(
caches.keys().then((cacheNames) => {
const ngswCacheNames = cacheNames.filter((name) => /^ngsw:/.test(name));
return Promise.all(ngswCacheNames.map((name) => caches.delete(name)));
}),
);
});

0 comments on commit 1b37105

Please sign in to comment.