serwist 9.4.1 → 9.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/printInstallDetails.js +1 -27
- package/dist/index.js +3 -2
- package/dist/index.legacy.js +2 -1
- package/package.json +4 -4
|
@@ -1398,32 +1398,6 @@ class RegExpRoute extends Route {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
|
-
const parallel = async (limit, array, func)=>{
|
|
1402
|
-
const work = array.map((item, index)=>({
|
|
1403
|
-
index,
|
|
1404
|
-
item
|
|
1405
|
-
}));
|
|
1406
|
-
const processor = async (res)=>{
|
|
1407
|
-
const results = [];
|
|
1408
|
-
while(true){
|
|
1409
|
-
const next = work.pop();
|
|
1410
|
-
if (!next) {
|
|
1411
|
-
return res(results);
|
|
1412
|
-
}
|
|
1413
|
-
const result = await func(next.item);
|
|
1414
|
-
results.push({
|
|
1415
|
-
result: result,
|
|
1416
|
-
index: next.index
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
};
|
|
1420
|
-
const queues = Array.from({
|
|
1421
|
-
length: limit
|
|
1422
|
-
}, ()=>new Promise(processor));
|
|
1423
|
-
const results = (await Promise.all(queues)).flat().sort((a, b)=>a.index < b.index ? -1 : 1).map((res)=>res.result);
|
|
1424
|
-
return results;
|
|
1425
|
-
};
|
|
1426
|
-
|
|
1427
1401
|
const setCacheNameDetails = (details)=>{
|
|
1428
1402
|
if (process.env.NODE_ENV !== "production") {
|
|
1429
1403
|
for (const key of Object.keys(details)){
|
|
@@ -1598,4 +1572,4 @@ const printInstallDetails = (urlsToPrecache, urlsAlreadyPrecached)=>{
|
|
|
1598
1572
|
}
|
|
1599
1573
|
};
|
|
1600
1574
|
|
|
1601
|
-
export { BackgroundSyncPlugin as B, NetworkFirst as N, PrecacheStrategy as P, Route as R, Strategy as S, NetworkOnly as a, NavigationRoute as b, cacheOkAndOpaquePlugin as c, disableDevLogs as d, enableNavigationPreload as e, createCacheKey as f, generateURLVariations as g, defaultMethod as h, PrecacheInstallReportPlugin as i,
|
|
1575
|
+
export { BackgroundSyncPlugin as B, NetworkFirst as N, PrecacheStrategy as P, Route as R, Strategy as S, NetworkOnly as a, NavigationRoute as b, cacheOkAndOpaquePlugin as c, disableDevLogs as d, enableNavigationPreload as e, createCacheKey as f, generateURLVariations as g, defaultMethod as h, PrecacheInstallReportPlugin as i, printInstallDetails as j, printCleanupDetails as k, copyResponse as l, messages as m, normalizeHandler as n, disableNavigationPreload as o, parseRoute as p, isNavigationPreloadSupported as q, StrategyHandler as r, setCacheNameDetails as s, RegExpRoute as t, BackgroundSyncQueue as u, BackgroundSyncQueueStore as v, StorableRequest as w };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { c as cacheNames$1, S as SerwistError, l as logger, f as finalAssertExports, t as timeout, g as getFriendlyURL, q as quotaErrorCallbacks, a as clientsClaim, b as cleanupOutdatedCaches, w as waitUntil } from './chunks/waitUntil.js';
|
|
2
|
-
import { B as BackgroundSyncPlugin, N as NetworkFirst, R as Route, a as NetworkOnly, S as Strategy, m as messages, c as cacheOkAndOpaquePlugin, g as generateURLVariations, P as PrecacheStrategy, e as enableNavigationPreload, s as setCacheNameDetails, b as NavigationRoute, d as disableDevLogs, f as createCacheKey, h as defaultMethod, n as normalizeHandler, p as parseRoute, i as PrecacheInstallReportPlugin, j as
|
|
3
|
-
export {
|
|
2
|
+
import { B as BackgroundSyncPlugin, N as NetworkFirst, R as Route, a as NetworkOnly, S as Strategy, m as messages, c as cacheOkAndOpaquePlugin, g as generateURLVariations, P as PrecacheStrategy, e as enableNavigationPreload, s as setCacheNameDetails, b as NavigationRoute, d as disableDevLogs, f as createCacheKey, h as defaultMethod, n as normalizeHandler, p as parseRoute, i as PrecacheInstallReportPlugin, j as printInstallDetails, k as printCleanupDetails } from './chunks/printInstallDetails.js';
|
|
3
|
+
export { u as BackgroundSyncQueue, v as BackgroundSyncQueueStore, t as RegExpRoute, w as StorableRequest, r as StrategyHandler, l as copyResponse, o as disableNavigationPreload, q as isNavigationPreloadSupported } from './chunks/printInstallDetails.js';
|
|
4
4
|
import { r as resultingClientExists } from './chunks/resultingClientExists.js';
|
|
5
5
|
import { deleteDB, openDB } from 'idb';
|
|
6
|
+
import { parallel } from '@serwist/utils';
|
|
6
7
|
|
|
7
8
|
const cacheNames = {
|
|
8
9
|
get googleAnalytics () {
|
package/dist/index.legacy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parallel } from '@serwist/utils';
|
|
2
|
+
import { P as PrecacheStrategy, f as createCacheKey, i as PrecacheInstallReportPlugin, j as printInstallDetails, k as printCleanupDetails, R as Route, g as generateURLVariations, h as defaultMethod, n as normalizeHandler, p as parseRoute, S as Strategy, b as NavigationRoute, B as BackgroundSyncPlugin, N as NetworkFirst, a as NetworkOnly, e as enableNavigationPreload, s as setCacheNameDetails, d as disableDevLogs } from './chunks/printInstallDetails.js';
|
|
2
3
|
import { c as cacheNames, f as finalAssertExports, S as SerwistError, l as logger, w as waitUntil, g as getFriendlyURL, b as cleanupOutdatedCaches, a as clientsClaim } from './chunks/waitUntil.js';
|
|
3
4
|
import 'idb';
|
|
4
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serwist",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Swiss Army knife for service workers.",
|
|
6
6
|
"files": [
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"./package.json": "./package.json"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"idb": "8.0.3"
|
|
52
|
+
"idb": "8.0.3",
|
|
53
|
+
"@serwist/utils": "9.4.3"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"rollup": "4.54.0",
|
|
56
57
|
"typescript": "5.9.3",
|
|
57
|
-
"@serwist/configs": "9.4.
|
|
58
|
-
"@serwist/utils": "9.4.1"
|
|
58
|
+
"@serwist/configs": "9.4.3"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"typescript": ">=5.0.0"
|