2024.11.0-yumechinokuni.7 #41

Merged
yume merged 45 commits from develop into master 2024-11-22 10:16:03 -06:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit 8d48909e4f - Show all commits

View file

@ -61,7 +61,6 @@ export class DownloadService {
request: operationTimeout, // whole operation timeout
},
agent: {
http: this.httpRequestService.httpAgent,
https: this.httpRequestService.httpsAgent,
},
http2: false, // default

View file

@ -118,7 +118,6 @@ export class UrlPreviewService {
private fetchSummary(url: string, meta: MiMeta, lang?: string): Promise<SummalyResult> {
const agent = this.config.proxy
? {
http: this.httpRequestService.httpAgent,
https: this.httpRequestService.httpsAgent,
}
: undefined;

View file

@ -43,7 +43,7 @@ async function cacheWithFallback(cache, paths) {
globalThis.addEventListener('install', (ev) => {
ev.waitUntil((async () => {
const storage = await requestStorage();
registerFetchHandler(storage);
await registerFetchHandler(storage);
const cache = await caches.open(STATIC_CACHE_NAME);
await cacheWithFallback(cache, PATHS_TO_CACHE);
await globalThis.skipWaiting();
@ -75,6 +75,12 @@ async function offlineContentHTML() {
async function registerFetchHandler(root: FileSystemDirectoryHandle | null) {
console.debug('rootfs:', root);
const state = await root?.getFileHandle('state.json', { create: true })
await state?.createWritable().then(async writable => {
await writable.write(JSON.stringify({ started: Date.now() }));
await writable.close();
});
globalThis.addEventListener('fetch', ev => {
const shouldCache = PATHS_TO_CACHE.some(path => ev.request.url.includes(path));