@ai-ecoverse/slicc-browsers 1.18.20 → 1.18.22
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/catalog.json +1 -1
- package/corpus.json +36 -13
- package/guard-vectors.json +8 -8
- package/package.json +5 -5
- package/protected-error-page.mjs +29 -17
package/catalog.json
CHANGED
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
"seven": {
|
|
643
643
|
"originScheme": "https",
|
|
644
644
|
"originHostPattern": "^([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)\\.sliccy\\.ai$",
|
|
645
|
-
"excludedLabels": ["
|
|
645
|
+
"excludedLabels": ["vault", "vault-preview", "get", "mcpcat", "echo"],
|
|
646
646
|
"excludedLabelPrefixes": ["vault-"],
|
|
647
647
|
"sitePattern": "[*.]sliccy.ai",
|
|
648
648
|
"switches": [
|
package/corpus.json
CHANGED
|
@@ -763,6 +763,11 @@
|
|
|
763
763
|
"id": "P1",
|
|
764
764
|
"url": "https://lars.sliccy.ai",
|
|
765
765
|
"title": "https://lars.sliccy.ai"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"id": "P3",
|
|
769
|
+
"url": "https://www.sliccy.ai",
|
|
770
|
+
"title": "https://www.sliccy.ai"
|
|
766
771
|
}
|
|
767
772
|
],
|
|
768
773
|
"tabs": [
|
|
@@ -2105,7 +2110,7 @@
|
|
|
2105
2110
|
{
|
|
2106
2111
|
"name": "seven-tabs",
|
|
2107
2112
|
"case": {
|
|
2108
|
-
"description": "sevenOpen needs a page target on https://<label>.sliccy.ai
|
|
2113
|
+
"description": "sevenOpen needs a page target on https://<label>.sliccy.ai, including www; excluded labels such as vault, the apex, other schemes, nested labels and non-page targets don't count",
|
|
2109
2114
|
"needs": [
|
|
2110
2115
|
"flag"
|
|
2111
2116
|
],
|
|
@@ -2180,6 +2185,13 @@
|
|
|
2180
2185
|
"url": "https://lars.sliccy.ai/",
|
|
2181
2186
|
"title": "worker",
|
|
2182
2187
|
"webSocketDebuggerUrl": "ws://127.0.0.1/devtools/page/T8"
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
"id": "T9",
|
|
2191
|
+
"type": "page",
|
|
2192
|
+
"url": "https://vault.sliccy.ai/",
|
|
2193
|
+
"title": "vault",
|
|
2194
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1/devtools/page/T9"
|
|
2183
2195
|
}
|
|
2184
2196
|
]
|
|
2185
2197
|
},
|
|
@@ -2255,6 +2267,11 @@
|
|
|
2255
2267
|
"url": "https://lars.sliccy.ai",
|
|
2256
2268
|
"title": "https://lars.sliccy.ai"
|
|
2257
2269
|
},
|
|
2270
|
+
{
|
|
2271
|
+
"id": "T2",
|
|
2272
|
+
"url": "https://www.sliccy.ai",
|
|
2273
|
+
"title": "https://www.sliccy.ai"
|
|
2274
|
+
},
|
|
2258
2275
|
{
|
|
2259
2276
|
"id": "T6",
|
|
2260
2277
|
"url": "https://seven.sliccy.ai",
|
|
@@ -2264,14 +2281,14 @@
|
|
|
2264
2281
|
}
|
|
2265
2282
|
},
|
|
2266
2283
|
{
|
|
2267
|
-
"id": "cdp:127.0.0.1:
|
|
2284
|
+
"id": "cdp:127.0.0.1:9322",
|
|
2268
2285
|
"kind": "endpoint",
|
|
2269
2286
|
"tier": 1,
|
|
2270
2287
|
"name": "Chrome",
|
|
2271
2288
|
"version": "154.0.8037.98",
|
|
2272
2289
|
"endpoint": {
|
|
2273
|
-
"cdp": "http://127.0.0.1:
|
|
2274
|
-
"webSocketDebuggerUrl": "ws://127.0.0.1:
|
|
2290
|
+
"cdp": "http://127.0.0.1:9322",
|
|
2291
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1:9322/devtools/browser/s2",
|
|
2275
2292
|
"name": "Chrome",
|
|
2276
2293
|
"version": "154.0.8037.98",
|
|
2277
2294
|
"product": "Chrome/154.0.8037.98",
|
|
@@ -2280,29 +2297,35 @@
|
|
|
2280
2297
|
"sevenOpen": true,
|
|
2281
2298
|
"sevenTabs": [
|
|
2282
2299
|
{
|
|
2283
|
-
"id": "
|
|
2284
|
-
"url": "https://
|
|
2285
|
-
"title": "https://
|
|
2300
|
+
"id": "U1",
|
|
2301
|
+
"url": "https://www.sliccy.ai",
|
|
2302
|
+
"title": "https://www.sliccy.ai"
|
|
2286
2303
|
}
|
|
2287
2304
|
]
|
|
2288
2305
|
}
|
|
2289
2306
|
},
|
|
2290
2307
|
{
|
|
2291
|
-
"id": "cdp:127.0.0.1:
|
|
2308
|
+
"id": "cdp:127.0.0.1:9323",
|
|
2292
2309
|
"kind": "endpoint",
|
|
2293
|
-
"tier":
|
|
2310
|
+
"tier": 1,
|
|
2294
2311
|
"name": "Chrome",
|
|
2295
2312
|
"version": "154.0.8037.98",
|
|
2296
2313
|
"endpoint": {
|
|
2297
|
-
"cdp": "http://127.0.0.1:
|
|
2298
|
-
"webSocketDebuggerUrl": "ws://127.0.0.1:
|
|
2314
|
+
"cdp": "http://127.0.0.1:9323",
|
|
2315
|
+
"webSocketDebuggerUrl": "ws://127.0.0.1:9323/devtools/browser/s3",
|
|
2299
2316
|
"name": "Chrome",
|
|
2300
2317
|
"version": "154.0.8037.98",
|
|
2301
2318
|
"product": "Chrome/154.0.8037.98",
|
|
2302
2319
|
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.8037.98 Safari/537.36",
|
|
2303
2320
|
"source": "flag",
|
|
2304
|
-
"sevenOpen":
|
|
2305
|
-
"sevenTabs": [
|
|
2321
|
+
"sevenOpen": true,
|
|
2322
|
+
"sevenTabs": [
|
|
2323
|
+
{
|
|
2324
|
+
"id": "V1",
|
|
2325
|
+
"url": "https://team-7.sliccy.ai",
|
|
2326
|
+
"title": "https://team-7.sliccy.ai"
|
|
2327
|
+
}
|
|
2328
|
+
]
|
|
2306
2329
|
}
|
|
2307
2330
|
}
|
|
2308
2331
|
]
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.18.
|
|
3
|
+
"setVersion": "1.18.22",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -1200,7 +1200,7 @@
|
|
|
1200
1200
|
}
|
|
1201
1201
|
},
|
|
1202
1202
|
"eventsRedacted": {
|
|
1203
|
-
"means": "protected error-page recover: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1203
|
+
"means": "protected error-page recover: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1204
1204
|
"requires": ["discovery"],
|
|
1205
1205
|
"check": {
|
|
1206
1206
|
"result": "errorPage",
|
|
@@ -1349,7 +1349,7 @@
|
|
|
1349
1349
|
}
|
|
1350
1350
|
},
|
|
1351
1351
|
"eventsRedacted": {
|
|
1352
|
-
"means": "protected error-page recover (query): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1352
|
+
"means": "protected error-page recover (query): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1353
1353
|
"requires": ["discovery"],
|
|
1354
1354
|
"check": {
|
|
1355
1355
|
"result": "errorPage",
|
|
@@ -1498,7 +1498,7 @@
|
|
|
1498
1498
|
}
|
|
1499
1499
|
},
|
|
1500
1500
|
"eventsRedacted": {
|
|
1501
|
-
"means": "protected error-page recover (fragment): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1501
|
+
"means": "protected error-page recover (fragment): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1502
1502
|
"requires": ["discovery"],
|
|
1503
1503
|
"check": {
|
|
1504
1504
|
"result": "errorPage",
|
|
@@ -1646,7 +1646,7 @@
|
|
|
1646
1646
|
}
|
|
1647
1647
|
},
|
|
1648
1648
|
"eventsRedacted": {
|
|
1649
|
-
"means": "protected error-page restore: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1649
|
+
"means": "protected error-page restore: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1650
1650
|
"requires": ["discovery"],
|
|
1651
1651
|
"check": {
|
|
1652
1652
|
"result": "errorPage",
|
|
@@ -1827,7 +1827,7 @@
|
|
|
1827
1827
|
}
|
|
1828
1828
|
},
|
|
1829
1829
|
"eventsRedacted": {
|
|
1830
|
-
"means": "protected error-page sticky: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1830
|
+
"means": "protected error-page sticky: every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
1831
1831
|
"requires": ["discovery"],
|
|
1832
1832
|
"check": {
|
|
1833
1833
|
"result": "errorPage",
|
|
@@ -2020,7 +2020,7 @@
|
|
|
2020
2020
|
}
|
|
2021
2021
|
},
|
|
2022
2022
|
"eventsRedacted": {
|
|
2023
|
-
"means": "protected error-page sticky (query): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
2023
|
+
"means": "protected error-page sticky (query): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
2024
2024
|
"requires": ["discovery"],
|
|
2025
2025
|
"check": {
|
|
2026
2026
|
"result": "errorPage",
|
|
@@ -2213,7 +2213,7 @@
|
|
|
2213
2213
|
}
|
|
2214
2214
|
},
|
|
2215
2215
|
"eventsRedacted": {
|
|
2216
|
-
"means": "protected error-page sticky (fragment): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
2216
|
+
"means": "protected error-page sticky (fragment): every discovery event for the tab shows, decoded as often as it takes and without the characters the URL parser ignores, the failed URL's origin only, a masked or absent url, or a url off the protected host, wrappers such as blob: unwrapped, that names no other origin on that host, with a title that names the protected host, in any spelling the URL parser maps to it, if at all, only as that bare origin, and no url or title carries the failed URL, its path, query or fragment; no discovery event for another or no target carries the row's tag; reporting no event for the tab also passes",
|
|
2217
2217
|
"requires": ["discovery"],
|
|
2218
2218
|
"check": {
|
|
2219
2219
|
"result": "errorPage",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-browsers",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.22",
|
|
4
4
|
"description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"validate": "node scripts/validate.mjs",
|
|
69
69
|
"lint": "slicc-lint && test -z \"$(gofmt -l .)\" && go mod tidy -diff && go vet ./... && GOOS=darwin go vet ./... && GOOS=windows go vet ./... && golangci-lint run && cargo fmt --check && cargo clippy --all-features --all-targets -- -D warnings && cargo check --target wasm32-wasip1 --no-default-features && cargo check --target wasm32-wasip1 --features serde && cargo check --target wasm32-wasip1 --all-features",
|
|
70
70
|
"format": "biome check --write . && gofmt -w . && cargo fmt",
|
|
71
|
-
"test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/self-contained.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/workflows.test.mjs test/integration/guard-sweep-union.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-apex.test.mjs test/integration/guard-sweep-others.test.mjs",
|
|
71
|
+
"test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/self-contained.test.mjs test/integration/seven-corpus.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/workflows.test.mjs test/integration/guard-sweep-union.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-apex.test.mjs test/integration/guard-sweep-others.test.mjs",
|
|
72
72
|
"test:unit": "mkdir -p coverage/unit && node --experimental-test-coverage --test --test-concurrency=1 --test-reporter=lcov --test-reporter-destination=coverage/unit/lcov.info test/unit/*.test.mjs && go test -race -cover ./...",
|
|
73
73
|
"build": "go build ./... && cargo build --all-features && cargo build --target wasm32-wasip1 --all-features && npm pack --dry-run",
|
|
74
74
|
"prepublishOnly": "node scripts/set-crate-version.mjs \"$npm_package_version\"",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"test:unit:guard": "mkdir -p coverage/unit && node --experimental-vm-modules --no-warnings --experimental-test-coverage --test --test-concurrency=1 --test-coverage-include=guard-runner.mjs --test-coverage-include=guard-driver.mjs --test-coverage-include=fixture-server.mjs --test-coverage-include=fixture-client.mjs --test-coverage-include=observer-target.mjs --test-coverage-include=frame-read.mjs --test-coverage-include=bfcache-restore.mjs --test-coverage-include=protected-error-page.mjs --test-coverage-include=unparseable-url.mjs --test-coverage-include=scripts/browser-runner.mjs --test-coverage-include=scripts/validate.mjs --test-reporter=lcov --test-reporter-destination=coverage/unit/guard.lcov test/unit/guard-*.test.mjs && slicc-diff-cover coverage/unit/guard.lcov"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@ai-ecoverse/slicc-cdp": "1.
|
|
83
|
-
"@ai-ecoverse/slicc-shared-web": "2.13.
|
|
84
|
-
"@biomejs/biome": "2.6.
|
|
82
|
+
"@ai-ecoverse/slicc-cdp": "1.44.2",
|
|
83
|
+
"@ai-ecoverse/slicc-shared-web": "2.13.8",
|
|
84
|
+
"@biomejs/biome": "2.6.3",
|
|
85
85
|
"ajv": "8.20.0",
|
|
86
86
|
"ajv-formats": "3.0.1",
|
|
87
87
|
"lefthook": "2.2.2",
|
package/protected-error-page.mjs
CHANGED
|
@@ -80,6 +80,19 @@ const readings = (value) =>
|
|
|
80
80
|
return out;
|
|
81
81
|
});
|
|
82
82
|
const layers = (value) => readings(value).flat();
|
|
83
|
+
const inner = (u) => (u && !u.host ? inner(parseURL(u.pathname)) : u);
|
|
84
|
+
const pattern = /(?:[a-z][a-z\d+.-]*:)+[\\/]*[^\\/?#&\s]*|[\\/]{2}[^\\/?#&\s]*/g;
|
|
85
|
+
const spaced = (form) => Array.from(form, (c) => (c > ' ' ? c : ' ')).join('');
|
|
86
|
+
const mapped = new Map();
|
|
87
|
+
const hostChar = (c) => {
|
|
88
|
+
if (!mapped.has(c)) {
|
|
89
|
+
const host = parseURL(`http://a${c}a/`)?.hostname;
|
|
90
|
+
mapped.set(c, host && !host.includes('xn--') ? host.slice(1, -1) : c);
|
|
91
|
+
}
|
|
92
|
+
return mapped.get(c);
|
|
93
|
+
};
|
|
94
|
+
const folded = (form) =>
|
|
95
|
+
Array.from(form, (c) => (c.charCodeAt(0) < 128 ? c : hostChar(c))).join('');
|
|
83
96
|
const unschemed = (value) => value.replace(/^[a-z][a-z\d+.-]*:\/\//, '');
|
|
84
97
|
|
|
85
98
|
const encoded = (url) =>
|
|
@@ -107,41 +120,40 @@ function failureRules({ failedURL, tag }) {
|
|
|
107
120
|
.filter((part) => part && part !== '/')
|
|
108
121
|
.map(plain);
|
|
109
122
|
const leaks = (value) => layers(value).some((form) => parts.some((part) => form.includes(part)));
|
|
110
|
-
const
|
|
111
|
-
|
|
123
|
+
const onHost = (u) => u?.hostname.replace(/\.$/, '') === hostname;
|
|
124
|
+
const refs = (text) =>
|
|
125
|
+
Array.from(text.matchAll(pattern), ([ref]) =>
|
|
126
|
+
inner(parseURL(ref, /^[\\/]/.test(ref) ? origin : undefined))
|
|
127
|
+
);
|
|
128
|
+
const mentions = (form) =>
|
|
129
|
+
folded(form).includes(hostname) || [form, spaced(form)].some((text) => refs(text).some(onHost));
|
|
130
|
+
const names = (value) => layers(value).some(mentions) || parseURL(value)?.origin === origin;
|
|
112
131
|
const carries = (value) => layers(value).some((form) => form.includes(plain(tag)));
|
|
113
|
-
return { failed, leaks, names, carries };
|
|
132
|
+
return { failed, leaks, names, carries, mentions, onHost, refs };
|
|
114
133
|
}
|
|
115
134
|
|
|
116
135
|
function discoveryRules({ failedURL, tag, trigger }) {
|
|
117
|
-
const { failed, leaks, names, carries } = failureRules({
|
|
136
|
+
const { failed, leaks, names, carries, mentions, onHost, refs } = failureRules({
|
|
137
|
+
failedURL,
|
|
138
|
+
tag,
|
|
139
|
+
});
|
|
118
140
|
const { origin, host, hostname } = failed;
|
|
119
141
|
const named = [hostname, host, origin];
|
|
120
142
|
const cleanTitle = ({ title, url }) =>
|
|
121
143
|
!leaks(title) &&
|
|
122
144
|
(!names(title) ||
|
|
123
145
|
named.includes(lower(title)) ||
|
|
124
|
-
(!layers(url).
|
|
146
|
+
(!layers(url).some((form) => onHost(inner(parseURL(form)))) && referenced(title)));
|
|
125
147
|
const ownTitle = ({ url, title }) =>
|
|
126
148
|
plain(title) !== '' && [plain(url), unschemed(plain(url))].includes(plain(title));
|
|
127
|
-
const
|
|
128
|
-
const onHost = (u) => u?.hostname.replace(/\.$/, '') === hostname;
|
|
129
|
-
const pattern = /(?:[a-z][a-z\d+.-]*:)+[\\/]*[^\\/?#&\s]*|[\\/]{2}[^\\/?#&\s]*/g;
|
|
130
|
-
const spaced = (form) => Array.from(form, (c) => (c > ' ' ? c : ' ')).join('');
|
|
131
|
-
const resolve = (ref) => inner(parseURL(ref, /^[\\/]/.test(ref) ? origin : undefined));
|
|
132
|
-
const fine = (text) =>
|
|
133
|
-
Array.from(text.matchAll(pattern), ([ref]) => resolve(ref)).every(
|
|
134
|
-
(u) => !onHost(u) || u.origin === origin
|
|
135
|
-
);
|
|
149
|
+
const fine = (text) => refs(text).every((u) => !onHost(u) || u.origin === origin);
|
|
136
150
|
const exact = (form) =>
|
|
137
151
|
form === origin || (!onHost(inner(parseURL(form))) && fine(form) && fine(spaced(form)));
|
|
138
152
|
const only = (ref, at, text) =>
|
|
139
153
|
parseURL(ref, /^[\\/]/.test(ref) ? origin : undefined)?.href === `${origin}/` &&
|
|
140
154
|
!/[\\/?#]/.test(text[at + ref.length] ?? '');
|
|
141
155
|
const bare = (form) =>
|
|
142
|
-
!spaced(form)
|
|
143
|
-
.replace(pattern, (ref, at, text) => (only(ref, at, text) ? ref.replace(hostname, ' ') : ref))
|
|
144
|
-
.includes(hostname);
|
|
156
|
+
!mentions(spaced(form).replace(pattern, (ref, at, text) => (only(ref, at, text) ? ' ' : ref)));
|
|
145
157
|
const referenced = (title) =>
|
|
146
158
|
layers(title).every(exact) && readings(title).every((read) => bare(read.at(-1)));
|
|
147
159
|
const cleanURL = (url) => !leaks(url) && layers(url).every(exact);
|