@ai-ecoverse/slicc-browsers 1.50.0 → 1.51.0
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/README.md +7 -7
- package/catalog.json +10 -2
- package/engine/engine-wasm.mjs +1 -1
- package/engine/engine.wasm +0 -0
- package/engine-vectors.json +12 -7
- package/engine.mjs +17 -10
- package/guard-vectors.json +10 -10
- package/package.json +1 -1
- package/protected-worker.mjs +10 -0
- package/protected.json +429 -40
- package/protected.mjs +1 -1
- package/schema/catalog.schema.json +7 -1
- package/schema/protected.schema.json +29 -1
package/engine/engine.wasm
CHANGED
|
Binary file
|
package/engine-vectors.json
CHANGED
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
"id": "capture.about-lookalike",
|
|
583
583
|
"op": "capture",
|
|
584
584
|
"frame": { "url": "about:srcdoc", "securityOrigin": "ABOUT://x" },
|
|
585
|
-
"expect": "
|
|
585
|
+
"expect": "allow"
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"id": "capture.extension-hidden",
|
|
@@ -1668,10 +1668,10 @@
|
|
|
1668
1668
|
"op": "page",
|
|
1669
1669
|
"page": "about-lookalike",
|
|
1670
1670
|
"expect": {
|
|
1671
|
-
"mixed":
|
|
1671
|
+
"mixed": false,
|
|
1672
1672
|
"frames": {
|
|
1673
1673
|
"top": { "role": "ordinary", "protected": false, "capture": "allow" },
|
|
1674
|
-
"child": { "role": "
|
|
1674
|
+
"child": { "role": "ordinary", "protected": false, "capture": "allow" }
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
},
|
|
@@ -1700,15 +1700,20 @@
|
|
|
1700
1700
|
"expect": {
|
|
1701
1701
|
"result": {
|
|
1702
1702
|
"frameTree": {
|
|
1703
|
-
"frame": {
|
|
1703
|
+
"frame": {
|
|
1704
|
+
"id": "top",
|
|
1705
|
+
"loaderId": "L1",
|
|
1706
|
+
"url": "https://example.test/page"
|
|
1707
|
+
},
|
|
1704
1708
|
"childFrames": [
|
|
1705
1709
|
{
|
|
1706
1710
|
"frame": {
|
|
1707
1711
|
"id": "child",
|
|
1708
1712
|
"parentId": "top",
|
|
1709
1713
|
"loaderId": "L2",
|
|
1710
|
-
"url": "",
|
|
1711
|
-
"securityOrigin": ""
|
|
1714
|
+
"url": "about:blank",
|
|
1715
|
+
"securityOrigin": "://",
|
|
1716
|
+
"name": "withheld"
|
|
1712
1717
|
}
|
|
1713
1718
|
}
|
|
1714
1719
|
]
|
|
@@ -1916,7 +1921,7 @@
|
|
|
1916
1921
|
"id": "capture.uppercase-about",
|
|
1917
1922
|
"op": "capture",
|
|
1918
1923
|
"frame": { "url": "about:srcdoc", "securityOrigin": "ABOUT://" },
|
|
1919
|
-
"expect": "
|
|
1924
|
+
"expect": "allow"
|
|
1920
1925
|
},
|
|
1921
1926
|
{
|
|
1922
1927
|
"id": "capture.ordinary-url-vault-context",
|
package/engine.mjs
CHANGED
|
@@ -19,6 +19,8 @@ const record = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
|
19
19
|
|
|
20
20
|
function valid(request, result) {
|
|
21
21
|
switch (request.op) {
|
|
22
|
+
case 'targetClass':
|
|
23
|
+
case 'frameClass':
|
|
22
24
|
case 'urlClass':
|
|
23
25
|
return (
|
|
24
26
|
typeof result?.protected === 'boolean' &&
|
|
@@ -89,19 +91,20 @@ function encode(value) {
|
|
|
89
91
|
);
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
function
|
|
94
|
+
function preserveFailedURL(request) {
|
|
93
95
|
if (
|
|
94
|
-
|
|
95
|
-
typeof request.url !== 'string'
|
|
96
|
-
typeof request.unreachableURL !== 'string'
|
|
96
|
+
!['target', 'frame', 'targetClass', 'frameClass'].includes(request?.op) ||
|
|
97
|
+
typeof request.url !== 'string'
|
|
97
98
|
)
|
|
98
99
|
return request;
|
|
100
|
+
const failed = request.unreachableURL ?? request.unreachableUrl;
|
|
99
101
|
if (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
typeof failed !== 'string' ||
|
|
103
|
+
failed === request.url ||
|
|
104
|
+
failed.toWellFormed() !== request.url.toWellFormed()
|
|
102
105
|
)
|
|
103
|
-
return
|
|
104
|
-
return request;
|
|
106
|
+
return request;
|
|
107
|
+
return { ...request, documentURL: undefined };
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
function binding(module, config) {
|
|
@@ -119,8 +122,8 @@ function binding(module, config) {
|
|
|
119
122
|
instance ??= create();
|
|
120
123
|
const wire =
|
|
121
124
|
request.op === 'batch' && Array.isArray(request.calls)
|
|
122
|
-
? { ...request, calls: request.calls.map(
|
|
123
|
-
:
|
|
125
|
+
? { ...request, calls: request.calls.map(preserveFailedURL) }
|
|
126
|
+
: preserveFailedURL(request);
|
|
124
127
|
const result = exchange(instance, 'engine_call', encode(wire));
|
|
125
128
|
const ok =
|
|
126
129
|
request.op === 'batch'
|
|
@@ -143,11 +146,15 @@ function binding(module, config) {
|
|
|
143
146
|
page: (facts) => call({ ...facts, op: 'page' }),
|
|
144
147
|
capture: (facts) => call({ ...facts, op: 'capture' }),
|
|
145
148
|
reply: (facts) => call({ ...facts, op: 'reply' }),
|
|
149
|
+
frame: (facts) => call({ ...facts, op: 'frame' }),
|
|
150
|
+
targetClass: (facts) => call({ ...facts, op: 'targetClass' }),
|
|
151
|
+
frameClass: (facts) => call({ ...facts, op: 'frameClass' }),
|
|
146
152
|
kept: (url) => call({ op: 'kept', url }),
|
|
147
153
|
keptTarget: (facts) => call({ ...facts, op: 'keptTarget' }),
|
|
148
154
|
unparseable: (url) => call({ op: 'unparseable', url }),
|
|
149
155
|
cookieDomain: (domain) => call({ op: 'cookieDomain', domain }),
|
|
150
156
|
storageKey: (key) => call({ op: 'storageKey', key }),
|
|
157
|
+
foreignWorld: (origin) => call({ op: 'foreignWorld', origin }),
|
|
151
158
|
extensionFrame: (url) => call({ op: 'extensionFrame', url }),
|
|
152
159
|
har: (url) => call({ op: 'har', url }),
|
|
153
160
|
zoneHost: (host) => call({ op: 'zoneHost', host }),
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.
|
|
3
|
+
"setVersion": "1.51.0",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -2065,9 +2065,9 @@
|
|
|
2065
2065
|
"reload": true,
|
|
2066
2066
|
"blank": true,
|
|
2067
2067
|
"restored": true,
|
|
2068
|
-
"evaluateRefused":
|
|
2069
|
-
"attachRefused":
|
|
2070
|
-
"closeRefused":
|
|
2068
|
+
"evaluateRefused": false,
|
|
2069
|
+
"attachRefused": false,
|
|
2070
|
+
"closeRefused": false,
|
|
2071
2071
|
"closed": true,
|
|
2072
2072
|
"stickyError": true,
|
|
2073
2073
|
"attachRedacted": true,
|
|
@@ -2279,9 +2279,9 @@
|
|
|
2279
2279
|
"reload": true,
|
|
2280
2280
|
"blank": true,
|
|
2281
2281
|
"restored": true,
|
|
2282
|
-
"evaluateRefused":
|
|
2283
|
-
"attachRefused":
|
|
2284
|
-
"closeRefused":
|
|
2282
|
+
"evaluateRefused": false,
|
|
2283
|
+
"attachRefused": false,
|
|
2284
|
+
"closeRefused": false,
|
|
2285
2285
|
"closed": true,
|
|
2286
2286
|
"stickyError": true,
|
|
2287
2287
|
"attachRedacted": true,
|
|
@@ -2493,9 +2493,9 @@
|
|
|
2493
2493
|
"reload": true,
|
|
2494
2494
|
"blank": true,
|
|
2495
2495
|
"restored": true,
|
|
2496
|
-
"evaluateRefused":
|
|
2497
|
-
"attachRefused":
|
|
2498
|
-
"closeRefused":
|
|
2496
|
+
"evaluateRefused": false,
|
|
2497
|
+
"attachRefused": false,
|
|
2498
|
+
"closeRefused": false,
|
|
2499
2499
|
"closed": true,
|
|
2500
2500
|
"stickyError": true,
|
|
2501
2501
|
"attachRedacted": true,
|
package/package.json
CHANGED
package/protected-worker.mjs
CHANGED
|
@@ -100,6 +100,16 @@ async function framedEvaluate(reader, sessionId, pageUrl, budget, sessions) {
|
|
|
100
100
|
);
|
|
101
101
|
const iframeSession = attached.result.sessionId;
|
|
102
102
|
sessions.push(iframeSession);
|
|
103
|
+
await reader.send(
|
|
104
|
+
'Target.setAutoAttach',
|
|
105
|
+
{
|
|
106
|
+
autoAttach: true,
|
|
107
|
+
waitForDebuggerOnStart: false,
|
|
108
|
+
flatten: true,
|
|
109
|
+
filter: [{ type: 'worker' }, { exclude: true }],
|
|
110
|
+
},
|
|
111
|
+
iframeSession
|
|
112
|
+
);
|
|
103
113
|
await outcome(reader.send('Runtime.runIfWaitingForDebugger', {}, iframeSession));
|
|
104
114
|
await outcome(reader.send('Page.enable', {}, iframeSession));
|
|
105
115
|
await outcome(reader.send('Runtime.enable', {}, iframeSession));
|