@proappstore/compliance 0.2.1 → 0.2.2
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/checks/pwa-offline-assets.d.ts +16 -0
- package/dist/checks/pwa-offline-assets.d.ts.map +1 -0
- package/dist/checks/pwa-offline-assets.js +59 -0
- package/dist/checks/pwa-offline-assets.js.map +1 -0
- package/dist/checks/pwa-offline-workbox.d.ts +35 -0
- package/dist/checks/pwa-offline-workbox.d.ts.map +1 -0
- package/dist/checks/pwa-offline-workbox.js +113 -0
- package/dist/checks/pwa-offline-workbox.js.map +1 -0
- package/dist/checks/pwa-offline.d.ts.map +1 -1
- package/dist/checks/pwa-offline.js +2 -168
- package/dist/checks/pwa-offline.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FileSource } from '../lib/file-source.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walks web/public/ (one level deep is enough — workbox precache
|
|
4
|
+
* resolves the pattern recursively, but most public assets sit at the
|
|
5
|
+
* top level or one level down), returns extensions not in `covered`.
|
|
6
|
+
* Ignores the manifest icons and favicons we already know are listed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function findUncoveredAssets(source: FileSource, dir: string, covered: Set<string>): Promise<string[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Best-effort scan of web/src/ entry points for a manual
|
|
11
|
+
* `serviceWorker.register` call. Doesn't recurse into the whole src
|
|
12
|
+
* tree — we only care about top-level entry files (main, index,
|
|
13
|
+
* registerSW) where this conventionally lives.
|
|
14
|
+
*/
|
|
15
|
+
export declare function sourceHasSwRegistration(source: FileSource): Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=pwa-offline-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-offline-assets.d.ts","sourceRoot":"","sources":["../../src/checks/pwa-offline-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAKnB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAclF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { extOf } from './pwa-offline-workbox.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walks web/public/ (one level deep is enough — workbox precache
|
|
4
|
+
* resolves the pattern recursively, but most public assets sit at the
|
|
5
|
+
* top level or one level down), returns extensions not in `covered`.
|
|
6
|
+
* Ignores the manifest icons and favicons we already know are listed.
|
|
7
|
+
*/
|
|
8
|
+
export async function findUncoveredAssets(source, dir, covered) {
|
|
9
|
+
if (!source.listDir)
|
|
10
|
+
return [];
|
|
11
|
+
const seen = new Set();
|
|
12
|
+
await walkPublic(source, dir, seen, covered, 0);
|
|
13
|
+
return [...seen].sort();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Best-effort scan of web/src/ entry points for a manual
|
|
17
|
+
* `serviceWorker.register` call. Doesn't recurse into the whole src
|
|
18
|
+
* tree — we only care about top-level entry files (main, index,
|
|
19
|
+
* registerSW) where this conventionally lives.
|
|
20
|
+
*/
|
|
21
|
+
export async function sourceHasSwRegistration(source) {
|
|
22
|
+
const candidates = [
|
|
23
|
+
'web/src/main.tsx',
|
|
24
|
+
'web/src/main.ts',
|
|
25
|
+
'web/src/index.tsx',
|
|
26
|
+
'web/src/index.ts',
|
|
27
|
+
'web/src/registerSW.ts',
|
|
28
|
+
'web/src/registerSW.js',
|
|
29
|
+
];
|
|
30
|
+
for (const p of candidates) {
|
|
31
|
+
const text = await source.read(p);
|
|
32
|
+
if (text !== null && /serviceWorker\.register/.test(text))
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
async function walkPublic(source, dir, seen, covered, depth) {
|
|
38
|
+
if (depth > 3)
|
|
39
|
+
return;
|
|
40
|
+
if (!source.listDir)
|
|
41
|
+
return;
|
|
42
|
+
const entries = await source.listDir(dir);
|
|
43
|
+
if (entries === null)
|
|
44
|
+
return;
|
|
45
|
+
for (const name of entries) {
|
|
46
|
+
const full = `${dir}/${name}`;
|
|
47
|
+
if (name.includes('.')) {
|
|
48
|
+
const ext = extOf(name);
|
|
49
|
+
if (!ext || covered.has(ext))
|
|
50
|
+
continue;
|
|
51
|
+
seen.add(name);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
// Probably a subdirectory — recurse. listDir returns null if it's actually a file.
|
|
55
|
+
await walkPublic(source, full, seen, covered, depth + 1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=pwa-offline-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-offline-assets.js","sourceRoot":"","sources":["../../src/checks/pwa-offline-assets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAkB,EAClB,GAAW,EACX,OAAoB;IAEpB,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAChD,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC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,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse the numeric value assigned to `maximumFileSizeToCacheInBytes`.
|
|
3
|
+
* Handles simple integer literals (`10485760`), underscore separators
|
|
4
|
+
* (`10_485_760`), and `A * B * C` arithmetic chains that workbox docs
|
|
5
|
+
* recommend (`10 * 1024 * 1024`). Returns null if the key isn't present
|
|
6
|
+
* or the value isn't a recognisable arithmetic literal.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseBundleCap(workbox: string): number | null;
|
|
9
|
+
/**
|
|
10
|
+
* Extracts the `{ ... }` body that follows the first match of `opener`,
|
|
11
|
+
* walking the source character-by-character to balance braces.
|
|
12
|
+
*
|
|
13
|
+
* Two source views are required:
|
|
14
|
+
* - `src` — the real source, used for the returned substring.
|
|
15
|
+
* - `code` — the stripped view (comments/strings blanked) with the
|
|
16
|
+
* same character offsets as `src`. Used for matching the opener and
|
|
17
|
+
* counting braces, so that `}` in a string doesn't close the block.
|
|
18
|
+
*
|
|
19
|
+
* Regex alone can't handle this because workbox blocks contain nested
|
|
20
|
+
* objects (`options: { expiration: {...} }`) and regex doesn't balance.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractBalancedBlock(src: string, code: string, opener: RegExp): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Parses every string literal in the workbox block, finds those that
|
|
25
|
+
* look like glob patterns with a brace-expansion (e.g.
|
|
26
|
+
* `**\/*.{js,css,wasm}`), and unions their extensions. Returns null if
|
|
27
|
+
* no `globPatterns:` key is present at all.
|
|
28
|
+
*
|
|
29
|
+
* Bracket-balances the array body on a string-stripped view so that
|
|
30
|
+
* glob bracket expressions like `**\/[abc]/*` don't truncate the array
|
|
31
|
+
* — that `]` lives inside a string literal and isn't the array's close.
|
|
32
|
+
*/
|
|
33
|
+
export declare function extractCoveredExtensions(workbox: string): Set<string> | null;
|
|
34
|
+
export declare function extOf(filename: string): string;
|
|
35
|
+
//# sourceMappingURL=pwa-offline-workbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-offline-workbox.d.ts","sourceRoot":"","sources":["../../src/checks/pwa-offline-workbox.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAgBf;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAmC5E;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { stripCommentsAndStrings } from '../lib/strip.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse the numeric value assigned to `maximumFileSizeToCacheInBytes`.
|
|
4
|
+
* Handles simple integer literals (`10485760`), underscore separators
|
|
5
|
+
* (`10_485_760`), and `A * B * C` arithmetic chains that workbox docs
|
|
6
|
+
* recommend (`10 * 1024 * 1024`). Returns null if the key isn't present
|
|
7
|
+
* or the value isn't a recognisable arithmetic literal.
|
|
8
|
+
*/
|
|
9
|
+
export function parseBundleCap(workbox) {
|
|
10
|
+
const m = workbox.match(/maximumFileSizeToCacheInBytes\s*:\s*([^,\n}]+)/);
|
|
11
|
+
if (!m)
|
|
12
|
+
return null;
|
|
13
|
+
const expr = (m[1] ?? '').trim().replace(/_/g, '');
|
|
14
|
+
// Strict: only digits, *, whitespace. Anything else (variable
|
|
15
|
+
// reference, function call) → can't evaluate, treat as unknown.
|
|
16
|
+
if (!/^[\d*\s]+$/.test(expr))
|
|
17
|
+
return null;
|
|
18
|
+
const parts = expr.split('*').map((s) => Number(s.trim()));
|
|
19
|
+
if (parts.some((n) => !Number.isFinite(n) || n < 0))
|
|
20
|
+
return null;
|
|
21
|
+
return parts.reduce((a, b) => a * b, 1);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Extracts the `{ ... }` body that follows the first match of `opener`,
|
|
25
|
+
* walking the source character-by-character to balance braces.
|
|
26
|
+
*
|
|
27
|
+
* Two source views are required:
|
|
28
|
+
* - `src` — the real source, used for the returned substring.
|
|
29
|
+
* - `code` — the stripped view (comments/strings blanked) with the
|
|
30
|
+
* same character offsets as `src`. Used for matching the opener and
|
|
31
|
+
* counting braces, so that `}` in a string doesn't close the block.
|
|
32
|
+
*
|
|
33
|
+
* Regex alone can't handle this because workbox blocks contain nested
|
|
34
|
+
* objects (`options: { expiration: {...} }`) and regex doesn't balance.
|
|
35
|
+
*/
|
|
36
|
+
export function extractBalancedBlock(src, code, opener) {
|
|
37
|
+
const m = code.match(opener);
|
|
38
|
+
if (!m || m.index === undefined)
|
|
39
|
+
return null;
|
|
40
|
+
let i = m.index + m[0].length; // start just after the `{`
|
|
41
|
+
let depth = 1;
|
|
42
|
+
const start = i;
|
|
43
|
+
while (i < code.length) {
|
|
44
|
+
const c = code[i];
|
|
45
|
+
if (c === '{')
|
|
46
|
+
depth++;
|
|
47
|
+
else if (c === '}') {
|
|
48
|
+
depth--;
|
|
49
|
+
if (depth === 0)
|
|
50
|
+
return src.slice(start, i);
|
|
51
|
+
}
|
|
52
|
+
i++;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parses every string literal in the workbox block, finds those that
|
|
58
|
+
* look like glob patterns with a brace-expansion (e.g.
|
|
59
|
+
* `**\/*.{js,css,wasm}`), and unions their extensions. Returns null if
|
|
60
|
+
* no `globPatterns:` key is present at all.
|
|
61
|
+
*
|
|
62
|
+
* Bracket-balances the array body on a string-stripped view so that
|
|
63
|
+
* glob bracket expressions like `**\/[abc]/*` don't truncate the array
|
|
64
|
+
* — that `]` lives inside a string literal and isn't the array's close.
|
|
65
|
+
*/
|
|
66
|
+
export function extractCoveredExtensions(workbox) {
|
|
67
|
+
const workboxCode = stripCommentsAndStrings(workbox);
|
|
68
|
+
const keyMatch = workboxCode.match(/globPatterns\s*:\s*\[/);
|
|
69
|
+
if (!keyMatch || keyMatch.index === undefined)
|
|
70
|
+
return null;
|
|
71
|
+
// Walk the stripped view to find the matching `]` for this `[`.
|
|
72
|
+
let i = keyMatch.index + keyMatch[0].length;
|
|
73
|
+
const start = i;
|
|
74
|
+
let depth = 1;
|
|
75
|
+
while (i < workboxCode.length && depth > 0) {
|
|
76
|
+
const c = workboxCode[i];
|
|
77
|
+
if (c === '[')
|
|
78
|
+
depth++;
|
|
79
|
+
else if (c === ']')
|
|
80
|
+
depth--;
|
|
81
|
+
if (depth === 0)
|
|
82
|
+
break;
|
|
83
|
+
i++;
|
|
84
|
+
}
|
|
85
|
+
if (depth !== 0)
|
|
86
|
+
return null;
|
|
87
|
+
// Pull the real (un-stripped) array body so we still see the
|
|
88
|
+
// quoted patterns.
|
|
89
|
+
const arrayBody = workbox.slice(start, i);
|
|
90
|
+
const covered = new Set();
|
|
91
|
+
for (const m of arrayBody.matchAll(/["']([^"']+)["']/g)) {
|
|
92
|
+
const pattern = m[1] ?? '';
|
|
93
|
+
const brace = pattern.match(/\{([^}]+)\}/);
|
|
94
|
+
if (brace) {
|
|
95
|
+
for (const ext of brace[1].split(',')) {
|
|
96
|
+
covered.add(ext.trim().toLowerCase());
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
// Bare pattern like "**/*.wasm" — extract the extension after the
|
|
101
|
+
// last `.` (or the entire pattern if it's literally `**/*.wasm`).
|
|
102
|
+
const ext = pattern.match(/\.([a-zA-Z0-9]+)$/);
|
|
103
|
+
if (ext)
|
|
104
|
+
covered.add(ext[1].toLowerCase());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return covered;
|
|
108
|
+
}
|
|
109
|
+
export function extOf(filename) {
|
|
110
|
+
const dot = filename.lastIndexOf('.');
|
|
111
|
+
return dot === -1 ? '' : filename.slice(dot + 1).toLowerCase();
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=pwa-offline-workbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-offline-workbox.js","sourceRoot":"","sources":["../../src/checks/pwa-offline-workbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC1E,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACnD,8DAA8D;IAC9D,gEAAgE;IAChE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;;;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;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pwa-offline.d.ts","sourceRoot":"","sources":["../../src/checks/pwa-offline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"pwa-offline.d.ts","sourceRoot":"","sources":["../../src/checks/pwa-offline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgB/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAwM9E"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { stripCommentsAndStrings, stripHtmlComments } from '../lib/strip.js';
|
|
2
|
+
import { findUncoveredAssets, sourceHasSwRegistration, } from './pwa-offline-assets.js';
|
|
3
|
+
import { extOf, extractBalancedBlock, extractCoveredExtensions, parseBundleCap, } from './pwa-offline-workbox.js';
|
|
2
4
|
const VITE_CONFIG = 'web/vite.config.ts';
|
|
3
5
|
const INDEX_HTML = 'web/index.html';
|
|
4
6
|
const PUBLIC_DIR = 'web/public';
|
|
@@ -217,172 +219,4 @@ export async function checkPwaOffline(source) {
|
|
|
217
219
|
suggestions,
|
|
218
220
|
};
|
|
219
221
|
}
|
|
220
|
-
/**
|
|
221
|
-
* Parse the numeric value assigned to `maximumFileSizeToCacheInBytes`.
|
|
222
|
-
* Handles simple integer literals (`10485760`), underscore separators
|
|
223
|
-
* (`10_485_760`), and `A * B * C` arithmetic chains that workbox docs
|
|
224
|
-
* recommend (`10 * 1024 * 1024`). Returns null if the key isn't present
|
|
225
|
-
* or the value isn't a recognisable arithmetic literal.
|
|
226
|
-
*/
|
|
227
|
-
function parseBundleCap(workbox) {
|
|
228
|
-
const m = workbox.match(/maximumFileSizeToCacheInBytes\s*:\s*([^,\n}]+)/);
|
|
229
|
-
if (!m)
|
|
230
|
-
return null;
|
|
231
|
-
const expr = (m[1] ?? '').trim().replace(/_/g, '');
|
|
232
|
-
// Strict: only digits, *, whitespace. Anything else (variable
|
|
233
|
-
// reference, function call) → can't evaluate, treat as unknown.
|
|
234
|
-
if (!/^[\d*\s]+$/.test(expr))
|
|
235
|
-
return null;
|
|
236
|
-
const parts = expr.split('*').map((s) => Number(s.trim()));
|
|
237
|
-
if (parts.some((n) => !Number.isFinite(n) || n < 0))
|
|
238
|
-
return null;
|
|
239
|
-
return parts.reduce((a, b) => a * b, 1);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Extracts the `{ ... }` body that follows the first match of `opener`,
|
|
243
|
-
* walking the source character-by-character to balance braces.
|
|
244
|
-
*
|
|
245
|
-
* Two source views are required:
|
|
246
|
-
* - `src` — the real source, used for the returned substring.
|
|
247
|
-
* - `code` — the stripped view (comments/strings blanked) with the
|
|
248
|
-
* same character offsets as `src`. Used for matching the opener and
|
|
249
|
-
* counting braces, so that `}` in a string doesn't close the block.
|
|
250
|
-
*
|
|
251
|
-
* Regex alone can't handle this because workbox blocks contain nested
|
|
252
|
-
* objects (`options: { expiration: {...} }`) and regex doesn't balance.
|
|
253
|
-
*/
|
|
254
|
-
function extractBalancedBlock(src, code, opener) {
|
|
255
|
-
const m = code.match(opener);
|
|
256
|
-
if (!m || m.index === undefined)
|
|
257
|
-
return null;
|
|
258
|
-
let i = m.index + m[0].length; // start just after the `{`
|
|
259
|
-
let depth = 1;
|
|
260
|
-
const start = i;
|
|
261
|
-
while (i < code.length) {
|
|
262
|
-
const c = code[i];
|
|
263
|
-
if (c === '{')
|
|
264
|
-
depth++;
|
|
265
|
-
else if (c === '}') {
|
|
266
|
-
depth--;
|
|
267
|
-
if (depth === 0)
|
|
268
|
-
return src.slice(start, i);
|
|
269
|
-
}
|
|
270
|
-
i++;
|
|
271
|
-
}
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Parses every string literal in the workbox block, finds those that
|
|
276
|
-
* look like glob patterns with a brace-expansion (e.g.
|
|
277
|
-
* `**\/*.{js,css,wasm}`), and unions their extensions. Returns null if
|
|
278
|
-
* no `globPatterns:` key is present at all.
|
|
279
|
-
*
|
|
280
|
-
* Bracket-balances the array body on a string-stripped view so that
|
|
281
|
-
* glob bracket expressions like `**\/[abc]/*` don't truncate the array
|
|
282
|
-
* — that `]` lives inside a string literal and isn't the array's close.
|
|
283
|
-
*/
|
|
284
|
-
function extractCoveredExtensions(workbox) {
|
|
285
|
-
const workboxCode = stripCommentsAndStrings(workbox);
|
|
286
|
-
const keyMatch = workboxCode.match(/globPatterns\s*:\s*\[/);
|
|
287
|
-
if (!keyMatch || keyMatch.index === undefined)
|
|
288
|
-
return null;
|
|
289
|
-
// Walk the stripped view to find the matching `]` for this `[`.
|
|
290
|
-
let i = keyMatch.index + keyMatch[0].length;
|
|
291
|
-
const start = i;
|
|
292
|
-
let depth = 1;
|
|
293
|
-
while (i < workboxCode.length && depth > 0) {
|
|
294
|
-
const c = workboxCode[i];
|
|
295
|
-
if (c === '[')
|
|
296
|
-
depth++;
|
|
297
|
-
else if (c === ']')
|
|
298
|
-
depth--;
|
|
299
|
-
if (depth === 0)
|
|
300
|
-
break;
|
|
301
|
-
i++;
|
|
302
|
-
}
|
|
303
|
-
if (depth !== 0)
|
|
304
|
-
return null;
|
|
305
|
-
// Pull the real (un-stripped) array body so we still see the
|
|
306
|
-
// quoted patterns.
|
|
307
|
-
const arrayBody = workbox.slice(start, i);
|
|
308
|
-
const covered = new Set();
|
|
309
|
-
for (const m of arrayBody.matchAll(/["']([^"']+)["']/g)) {
|
|
310
|
-
const pattern = m[1] ?? '';
|
|
311
|
-
const brace = pattern.match(/\{([^}]+)\}/);
|
|
312
|
-
if (brace) {
|
|
313
|
-
for (const ext of brace[1].split(',')) {
|
|
314
|
-
covered.add(ext.trim().toLowerCase());
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
// Bare pattern like "**/*.wasm" — extract the extension after the
|
|
319
|
-
// last `.` (or the entire pattern if it's literally `**/*.wasm`).
|
|
320
|
-
const ext = pattern.match(/\.([a-zA-Z0-9]+)$/);
|
|
321
|
-
if (ext)
|
|
322
|
-
covered.add(ext[1].toLowerCase());
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return covered;
|
|
326
|
-
}
|
|
327
|
-
function extOf(filename) {
|
|
328
|
-
const dot = filename.lastIndexOf('.');
|
|
329
|
-
return dot === -1 ? '' : filename.slice(dot + 1).toLowerCase();
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Walks web/public/ (one level deep is enough — workbox precache
|
|
333
|
-
* resolves the pattern recursively, but most public assets sit at the
|
|
334
|
-
* top level or one level down), returns extensions not in `covered`.
|
|
335
|
-
* Ignores the manifest icons and favicons we already know are listed.
|
|
336
|
-
*/
|
|
337
|
-
async function findUncoveredAssets(source, dir, covered) {
|
|
338
|
-
if (!source.listDir)
|
|
339
|
-
return [];
|
|
340
|
-
const seen = new Set();
|
|
341
|
-
await walkPublic(source, dir, seen, covered, 0);
|
|
342
|
-
return [...seen].sort();
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Best-effort scan of web/src/ entry points for a manual
|
|
346
|
-
* `serviceWorker.register` call. Doesn't recurse into the whole src
|
|
347
|
-
* tree — we only care about top-level entry files (main, index,
|
|
348
|
-
* registerSW) where this conventionally lives.
|
|
349
|
-
*/
|
|
350
|
-
async function sourceHasSwRegistration(source) {
|
|
351
|
-
const candidates = [
|
|
352
|
-
'web/src/main.tsx',
|
|
353
|
-
'web/src/main.ts',
|
|
354
|
-
'web/src/index.tsx',
|
|
355
|
-
'web/src/index.ts',
|
|
356
|
-
'web/src/registerSW.ts',
|
|
357
|
-
'web/src/registerSW.js',
|
|
358
|
-
];
|
|
359
|
-
for (const p of candidates) {
|
|
360
|
-
const text = await source.read(p);
|
|
361
|
-
if (text !== null && /serviceWorker\.register/.test(text))
|
|
362
|
-
return true;
|
|
363
|
-
}
|
|
364
|
-
return false;
|
|
365
|
-
}
|
|
366
|
-
async function walkPublic(source, dir, seen, covered, depth) {
|
|
367
|
-
if (depth > 3)
|
|
368
|
-
return;
|
|
369
|
-
if (!source.listDir)
|
|
370
|
-
return;
|
|
371
|
-
const entries = await source.listDir(dir);
|
|
372
|
-
if (entries === null)
|
|
373
|
-
return;
|
|
374
|
-
for (const name of entries) {
|
|
375
|
-
const full = `${dir}/${name}`;
|
|
376
|
-
if (name.includes('.')) {
|
|
377
|
-
const ext = extOf(name);
|
|
378
|
-
if (!ext || covered.has(ext))
|
|
379
|
-
continue;
|
|
380
|
-
seen.add(name);
|
|
381
|
-
}
|
|
382
|
-
else {
|
|
383
|
-
// Probably a subdirectory — recurse. listDir returns null if it's actually a file.
|
|
384
|
-
await walkPublic(source, full, seen, covered, depth + 1);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
222
|
//# sourceMappingURL=pwa-offline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pwa-offline.js","sourceRoot":"","sources":["../../src/checks/pwa-offline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,iB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