wicked-crew 0.16.12 → 0.16.13
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 +2 -1
- package/dist/api/chat-history.d.ts +6 -0
- package/dist/api/chat-history.d.ts.map +1 -1
- package/dist/api/chat-history.js +21 -0
- package/dist/api/chat-history.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +61 -6
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +252 -24
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/routes.d.ts +14 -2
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +119 -9
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +18 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +34 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +100 -1
- package/dist/api/server.js.map +1 -1
- package/dist/apps/spec.d.ts +3009 -0
- package/dist/apps/spec.d.ts.map +1 -0
- package/dist/apps/spec.js +870 -0
- package/dist/apps/spec.js.map +1 -0
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/core/run-boot-resume.d.ts +4 -1
- package/dist/core/run-boot-resume.d.ts.map +1 -1
- package/dist/core/run-boot-resume.js +6 -1
- package/dist/core/run-boot-resume.js.map +1 -1
- package/dist/editors/csp.d.ts +24 -4
- package/dist/editors/csp.d.ts.map +1 -1
- package/dist/editors/csp.js +35 -8
- package/dist/editors/csp.js.map +1 -1
- package/dist/editors/routes.d.ts +4 -1
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +30 -3
- package/dist/editors/routes.js.map +1 -1
- package/dist/editors/webrtc-guard.d.ts +94 -0
- package/dist/editors/webrtc-guard.d.ts.map +1 -0
- package/dist/editors/webrtc-guard.js +506 -0
- package/dist/editors/webrtc-guard.js.map +1 -0
- package/dist/interactive/bridge-pool.d.ts +11 -2
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +10 -1
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/doc-binding.d.ts +156 -0
- package/dist/interactive/doc-binding.d.ts.map +1 -0
- package/dist/interactive/doc-binding.js +277 -0
- package/dist/interactive/doc-binding.js.map +1 -0
- package/dist/interactive/doc-delete-routes.d.ts +3 -0
- package/dist/interactive/doc-delete-routes.d.ts.map +1 -1
- package/dist/interactive/doc-delete-routes.js +4 -0
- package/dist/interactive/doc-delete-routes.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +89 -3
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +438 -27
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/edit-events.d.ts +2 -0
- package/dist/interactive/edit-events.d.ts.map +1 -1
- package/dist/interactive/edit-events.js +11 -0
- package/dist/interactive/edit-events.js.map +1 -1
- package/dist/interactive/proposal-create.d.ts +143 -0
- package/dist/interactive/proposal-create.d.ts.map +1 -0
- package/dist/interactive/proposal-create.js +318 -0
- package/dist/interactive/proposal-create.js.map +1 -0
- package/dist/interactive/proxy-routes.d.ts +60 -3
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +209 -3
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +126 -0
- package/dist/interactive/source-packet.d.ts.map +1 -0
- package/dist/interactive/source-packet.js +482 -0
- package/dist/interactive/source-packet.js.map +1 -0
- package/dist/studio/assets/{index-C_UIgTiy.js → index-u4O_7N-b.js} +1 -1
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +1 -1
- package/dist/studio/editors/wicked-doc/editor.json +1 -1
- package/dist/studio/editors/wicked-doc/index.html +1 -1
- package/dist/studio/editors/wicked-insights/editor.json +1 -1
- package/dist/studio/editors/wicked-insights/index.html +1 -1
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/editors/wicked-video/editor.json +1 -1
- package/dist/studio/editors/wicked-video/index.html +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/studio/testid-inventory.json +1 -1
- package/endpoint-manifest.json +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No WebRTC in an editor frame.
|
|
3
|
+
*
|
|
4
|
+
* An editor bundle's policy says `connect-src 'none'` (`csp.ts`), which stops fetch, XHR, WebSocket, EventSource and
|
|
5
|
+
* beacons, but no browser applies `connect-src` to WebRTC. A script in the frame could open an `RTCPeerConnection` with
|
|
6
|
+
* a STUN or TURN server of its choosing, and ICE then sends UDP there (Chromium ignores `webrtc 'block'`). A third-party
|
|
7
|
+
* editor could carry what it reads out of the artifact that way.
|
|
8
|
+
*
|
|
9
|
+
* So crew puts {@link WEBRTC_PRELUDE} at the start of every inline script of every bundle it serves (after the
|
|
10
|
+
* script's hashbang and its directive prologue: those are inert, and moving them would turn strict mode off; a
|
|
11
|
+
* directive ended by automatic semicolon insertion is kept too, with crew's own `;` before the prelude). The
|
|
12
|
+
* prelude defines each WebRTC global as a non-writable, non-configurable `undefined` before any of the editor's own
|
|
13
|
+
* statements run. It has no `try`: if it cannot do that it throws, and the rest of that script never runs. It names no
|
|
14
|
+
* global a script can shadow and calls nothing a script can define first. A module's own `function window(){}` is
|
|
15
|
+
* bound before its first statement runs, so the prelude checks that `window` really is the window. It takes `Object`
|
|
16
|
+
* from an object literal, and its failure path throws a string (not `new TypeError`, which a hoisted declaration
|
|
17
|
+
* could replace).
|
|
18
|
+
*
|
|
19
|
+
* For a third-party editor, the bundle's `script-src` is then exactly the hashes {@link guardBundle} returns, with no
|
|
20
|
+
* `'unsafe-inline'`. A new JavaScript realm could otherwise bring the constructors back: a `srcdoc` child, a
|
|
21
|
+
* `javascript:` URL, or a `blob:`/`data:` document the frame navigates itself to. Every one of those documents inherits
|
|
22
|
+
* the bundle's policy, so the only scripts that can run in them are copies of crew's prefixed scripts, and the prelude
|
|
23
|
+
* runs first there too. `javascript:` URLs, inline event handlers and new script text are refused.
|
|
24
|
+
*
|
|
25
|
+
* The scanner below finds inline scripts the way an HTML parser does, closely enough for real bundles. For a
|
|
26
|
+
* third-party bundle its accuracy is not what keeps the guard sound: every hash crew issues is of text that crew itself
|
|
27
|
+
* built with the prelude first (after an inert prologue). A script the scanner misreads gets a hash the browser doesn't
|
|
28
|
+
* compute, so it doesn't run. The editor breaks visibly, and nothing runs without the prelude. A first-party bundle
|
|
29
|
+
* keeps `'unsafe-inline'` (it is studio's own code), so there the prelude is only where the scanner finds a script.
|
|
30
|
+
*
|
|
31
|
+
* Every script gains the prelude and a hash in one response header, so a third-party bundle may hold at most
|
|
32
|
+
* {@link MAX_INLINE_SCRIPTS} inline scripts; past that crew refuses to serve it, with the reason.
|
|
33
|
+
*/
|
|
34
|
+
import { createHash } from 'node:crypto';
|
|
35
|
+
/** The WebRTC globals Chromium, Firefox and Safari expose, by name. The prelude also takes any other `RTC*`/`webkitRTC*`
|
|
36
|
+
* global the browser has, so a new interface is covered without a crew release. */
|
|
37
|
+
export const WEBRTC_GLOBALS = [
|
|
38
|
+
'RTCPeerConnection',
|
|
39
|
+
'webkitRTCPeerConnection',
|
|
40
|
+
'mozRTCPeerConnection',
|
|
41
|
+
'RTCDataChannel',
|
|
42
|
+
'RTCIceTransport',
|
|
43
|
+
'RTCDtlsTransport',
|
|
44
|
+
'RTCSctpTransport',
|
|
45
|
+
'RTCRtpSender',
|
|
46
|
+
'RTCRtpReceiver',
|
|
47
|
+
'RTCRtpTransceiver',
|
|
48
|
+
'RTCIceCandidate',
|
|
49
|
+
'RTCSessionDescription',
|
|
50
|
+
'RTCCertificate',
|
|
51
|
+
];
|
|
52
|
+
/** The prelude's one failure message (thrown as a string: see the module comment). */
|
|
53
|
+
export const WEBRTC_PRELUDE_REFUSAL = 'WebRTC is not available in an editor frame';
|
|
54
|
+
/**
|
|
55
|
+
* The prelude: one line of ES5, ending in a newline so the editor's own first line stays its own statement. It holds no
|
|
56
|
+
* `<` at all, so it can never end, open or escape the `<script>` it sits in. `w` must be the window itself (a module's
|
|
57
|
+
* hoisted `function window(){}` is a function, a `var window` is undefined, a `let`/`class` is not yet initialized).
|
|
58
|
+
* It takes the listed names always, and any other `RTC*`/`webkitRTC*`/`mozRTC*` global the browser defines (an
|
|
59
|
+
* interface object is configurable; a script's own `var RTCConfig` is not, and is left alone).
|
|
60
|
+
*/
|
|
61
|
+
export const WEBRTC_PRELUDE = '(function(w,o){if(typeof w!=="object"||w===null||w.window!==w)throw ' + JSON.stringify(WEBRTC_PRELUDE_REFUSAL) + ';var n=' +
|
|
62
|
+
JSON.stringify(WEBRTC_GLOBALS) +
|
|
63
|
+
',k=o.getOwnPropertyNames(w),i,d;for(i=0;i!==k.length;i++)if(/^(webkit|moz)?RTC/.test(k[i])&&(d=o.getOwnPropertyDescriptor(w,k[i]))&&d.configurable)n.push(k[i]);' +
|
|
64
|
+
'for(i=0;i!==n.length;i++){o.defineProperty(w,n[i],{value:void 0,writable:false,configurable:false});' +
|
|
65
|
+
'if(w[n[i]]!==void 0)throw ' + JSON.stringify(WEBRTC_PRELUDE_REFUSAL) + '}})(window,({}).constructor);\n';
|
|
66
|
+
/** The most inline scripts a third-party bundle may hold: each gains the prelude and is one hash in the policy header. */
|
|
67
|
+
export const MAX_INLINE_SCRIPTS = 200;
|
|
68
|
+
const LINE_END = /[\n\r\u2028\u2029]/;
|
|
69
|
+
const SPACE = /\s/;
|
|
70
|
+
const IDENTIFIER_PART = /[\w$\\\u0080-\uFFFF]/; // `\` too: an identifier may be written with escapes
|
|
71
|
+
/**
|
|
72
|
+
* Whether a directive with no `;` ends before `text[i]` by automatic semicolon insertion: a line ended after it, and
|
|
73
|
+
* what follows cannot continue the expression (end of text, a statement-starting word other than `in`/`instanceof`, a
|
|
74
|
+
* number, a string, a block, a unary `!` or `~`, or `++`/`--`, which may not follow a line end). Any binary operator,
|
|
75
|
+
* bracket, dot or template continues it, so it does not count.
|
|
76
|
+
*/
|
|
77
|
+
function endsByAsi(text, i) {
|
|
78
|
+
if (i >= text.length)
|
|
79
|
+
return true;
|
|
80
|
+
const c = text[i];
|
|
81
|
+
if (c === '"' || c === "'" || c === '{' || c === '~' || /[0-9]/.test(c))
|
|
82
|
+
return true;
|
|
83
|
+
if (c === '!')
|
|
84
|
+
return text[i + 1] !== '=';
|
|
85
|
+
// `.5` is a number, and `\u0074op` an identifier written with an escape (an escaped `in` is no keyword).
|
|
86
|
+
if (c === '.')
|
|
87
|
+
return /[0-9]/.test(text[i + 1] ?? '');
|
|
88
|
+
if (c === '\\')
|
|
89
|
+
return true;
|
|
90
|
+
if (c === '+' || c === '-')
|
|
91
|
+
return text[i + 1] === c;
|
|
92
|
+
if (!IDENTIFIER_PART.test(c))
|
|
93
|
+
return false;
|
|
94
|
+
let j = i;
|
|
95
|
+
while (j < text.length && IDENTIFIER_PART.test(text[j]) && !SPACE.test(text[j]))
|
|
96
|
+
j++; // NBSP, LS... end a name
|
|
97
|
+
const word = text.slice(i, j);
|
|
98
|
+
return word !== 'in' && word !== 'instanceof';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Where the prelude goes in a script's text, read the way a JavaScript lexer reads it: past a hashbang line and a
|
|
102
|
+
* directive prologue (string-literal statements, each ended by its own `;` or by automatic semicolon insertion), with
|
|
103
|
+
* whitespace and comments between. No regular expression does this: a backtracking pattern can be made to end a
|
|
104
|
+
* comment early or late. Here a block comment ends at its first `*\/` and a line comment at the end of its line, exactly
|
|
105
|
+
* as in JavaScript, so nothing before the place found is code. `semicolon` says the last directive ended by insertion,
|
|
106
|
+
* so the prelude must be written after a `;` of its own.
|
|
107
|
+
*/
|
|
108
|
+
export function prologueEnd(text) {
|
|
109
|
+
const n = text.length;
|
|
110
|
+
let i = 0;
|
|
111
|
+
let at = 0;
|
|
112
|
+
let afterHashbang = false;
|
|
113
|
+
let semicolon = false;
|
|
114
|
+
if (text.startsWith('#!')) {
|
|
115
|
+
while (i < n && !LINE_END.test(text[i]))
|
|
116
|
+
i++;
|
|
117
|
+
at = i;
|
|
118
|
+
afterHashbang = true;
|
|
119
|
+
}
|
|
120
|
+
let crossed = false;
|
|
121
|
+
// At the start of a line (only whitespace and comments since the last line end): where a classic script's `-->`
|
|
122
|
+
// opens a line comment.
|
|
123
|
+
let lineStart = true;
|
|
124
|
+
// HTML-like comments (`<!--`, a line-leading `-->`) are comments only in a classic script. In a module, after an
|
|
125
|
+
// operand, `<!--x` is `< !--x`: code. So they are taken only before the first directive, where in a module they can
|
|
126
|
+
// only be a syntax error (nothing runs) and in a classic script they are comments. This must not depend on whether
|
|
127
|
+
// the script is classic or a module: a hash does not bind the type, so the same prefixed text can be run as either
|
|
128
|
+
// (a classic script copied into a child as a module), and what stands before the prelude must be inert under both.
|
|
129
|
+
let beforeDirectives = true;
|
|
130
|
+
/** Past whitespace and whole comments (noting a line end); false at a block comment that never closes. */
|
|
131
|
+
const skip = () => {
|
|
132
|
+
for (;;) {
|
|
133
|
+
while (i < n && SPACE.test(text[i])) {
|
|
134
|
+
if (LINE_END.test(text[i])) {
|
|
135
|
+
crossed = true;
|
|
136
|
+
lineStart = true;
|
|
137
|
+
}
|
|
138
|
+
i++;
|
|
139
|
+
}
|
|
140
|
+
if (beforeDirectives && lineStart && text.startsWith('-->', i)) {
|
|
141
|
+
while (i < n && !LINE_END.test(text[i]))
|
|
142
|
+
i++;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (text.startsWith('/*', i)) {
|
|
146
|
+
const close = text.indexOf('*/', i + 2);
|
|
147
|
+
if (close < 0)
|
|
148
|
+
return false;
|
|
149
|
+
if (LINE_END.test(text.slice(i, close))) {
|
|
150
|
+
crossed = true;
|
|
151
|
+
lineStart = true;
|
|
152
|
+
}
|
|
153
|
+
i = close + 2;
|
|
154
|
+
}
|
|
155
|
+
else if (text.startsWith('//', i) || (beforeDirectives && text.startsWith('<!--', i))) {
|
|
156
|
+
// `<!--` opens a comment to the end of its line in a classic script (it is a syntax error in a module).
|
|
157
|
+
while (i < n && !LINE_END.test(text[i]))
|
|
158
|
+
i++;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
while (skip()) {
|
|
166
|
+
const quote = text[i];
|
|
167
|
+
if (quote !== '"' && quote !== "'")
|
|
168
|
+
break;
|
|
169
|
+
beforeDirectives = false;
|
|
170
|
+
let j = i + 1;
|
|
171
|
+
let closed = false;
|
|
172
|
+
while (j < n) {
|
|
173
|
+
const c = text[j];
|
|
174
|
+
if (c === '\\') {
|
|
175
|
+
j += 2;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (c === quote) {
|
|
179
|
+
closed = true;
|
|
180
|
+
j += 1;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
if (c === '\n' || c === '\r')
|
|
184
|
+
break;
|
|
185
|
+
j += 1;
|
|
186
|
+
}
|
|
187
|
+
if (!closed)
|
|
188
|
+
break;
|
|
189
|
+
lineStart = false;
|
|
190
|
+
const end = j;
|
|
191
|
+
i = j;
|
|
192
|
+
crossed = false;
|
|
193
|
+
if (!skip())
|
|
194
|
+
break;
|
|
195
|
+
if (text[i] === ';') {
|
|
196
|
+
i += 1;
|
|
197
|
+
lineStart = false;
|
|
198
|
+
at = i;
|
|
199
|
+
semicolon = false;
|
|
200
|
+
}
|
|
201
|
+
else if (text.startsWith('<!--', i)) {
|
|
202
|
+
// A comment in a classic script, code in a module (`"a" < !--x`): end the directive here with crew's own `;`
|
|
203
|
+
// and stop, so the prelude stands before this text either way (a module then fails on it; a classic script keeps
|
|
204
|
+
// its strict mode).
|
|
205
|
+
at = end;
|
|
206
|
+
semicolon = true;
|
|
207
|
+
afterHashbang = false;
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
else if ((crossed || i >= n) && endsByAsi(text, i)) {
|
|
211
|
+
at = end;
|
|
212
|
+
semicolon = true;
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
afterHashbang = false;
|
|
218
|
+
}
|
|
219
|
+
return { at, afterHashbang, semicolon };
|
|
220
|
+
}
|
|
221
|
+
/** `text` with the prelude before its first statement (see {@link prologueEnd}): after a `;` of its own when the last
|
|
222
|
+
* directive ended by insertion, and on its own line after a lone hashbang. */
|
|
223
|
+
export function withPrelude(text) {
|
|
224
|
+
const { at, afterHashbang, semicolon } = prologueEnd(text);
|
|
225
|
+
return text.slice(0, at) + (semicolon ? ';' : '') + (afterHashbang ? '\n' : '') + WEBRTC_PRELUDE + text.slice(at);
|
|
226
|
+
}
|
|
227
|
+
/** The essences HTML runs as a classic script (HTML "JavaScript MIME type essence match"). */
|
|
228
|
+
const JS_TYPES = new Set([
|
|
229
|
+
'application/ecmascript', 'application/javascript', 'application/x-ecmascript', 'application/x-javascript',
|
|
230
|
+
'text/ecmascript', 'text/javascript', 'text/javascript1.0', 'text/javascript1.1', 'text/javascript1.2',
|
|
231
|
+
'text/javascript1.3', 'text/javascript1.4', 'text/javascript1.5', 'text/jscript', 'text/livescript',
|
|
232
|
+
'text/x-ecmascript', 'text/x-javascript',
|
|
233
|
+
]);
|
|
234
|
+
/** Elements whose content is text up to their own end tag (scripting is on in the frame, so `noscript` is one). */
|
|
235
|
+
const RAW_TEXT = new Set(['style', 'xmp', 'iframe', 'noembed', 'noframes', 'noscript', 'textarea', 'title']);
|
|
236
|
+
const WS = /[\t\n\f\r ]/;
|
|
237
|
+
const TAG_END = /[\t\n\f\r />]/;
|
|
238
|
+
const NAMED_REFS = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", sol: '/', period: '.', plus: '+', lowbar: '_', colon: ':', semi: ';', comma: ',', Tab: '\t', NewLine: '\n' };
|
|
239
|
+
/** An attribute value as the parser hands it on: numeric character references, and the named ones a script type can
|
|
240
|
+
* use. One it does not know stays as written, so the script reads as a data block and is refused, never run unguarded. */
|
|
241
|
+
export function decodeAttribute(v) {
|
|
242
|
+
return v
|
|
243
|
+
.replace(/&#(?:[xX]([0-9a-fA-F]+)|([0-9]+));?/g, (_m, hex, dec) => {
|
|
244
|
+
const cp = hex !== undefined ? parseInt(hex, 16) : parseInt(dec, 10);
|
|
245
|
+
return cp > 0 && cp <= 0x10ffff && !(cp >= 0xd800 && cp <= 0xdfff) ? String.fromCodePoint(cp) : '\uFFFD';
|
|
246
|
+
})
|
|
247
|
+
.replace(/&([A-Za-z]+);/g, (m, name) => NAMED_REFS[name] ?? m);
|
|
248
|
+
}
|
|
249
|
+
/** Whether `<script …>` with these attributes runs its text as a classic or module script (HTML "prepare the script
|
|
250
|
+
* element"); a `src` makes it external (`href` or `xlink:href` for an SVG script), and an unknown type makes it a
|
|
251
|
+
* data block. */
|
|
252
|
+
function runsInline(attrs, svg) {
|
|
253
|
+
if (svg ? attrs.has('href') || attrs.has('xlink:href') : attrs.has('src'))
|
|
254
|
+
return false;
|
|
255
|
+
const language = svg ? undefined : attrs.get('language'); // `language` is HTML's legacy fallback, not SVG's
|
|
256
|
+
const raw = attrs.has('type') ? attrs.get('type') : language !== undefined && language !== '' ? `text/${language}` : '';
|
|
257
|
+
if (raw === '')
|
|
258
|
+
return true;
|
|
259
|
+
// A JavaScript MIME type is matched with surrounding whitespace stripped; `module` exactly as written (Chromium).
|
|
260
|
+
if (raw.toLowerCase() === 'module')
|
|
261
|
+
return true;
|
|
262
|
+
return JS_TYPES.has(raw.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g, '').toLowerCase());
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* The inline scripts of `html` (already newline-normalized), in document order. A tokenizer cut down to what decides
|
|
266
|
+
* where a script's text is: comments, doctypes and bogus comments, quoted attribute values, raw-text elements, and
|
|
267
|
+
* the script-data escape states (`<!--`, `<script`, `-->` inside a script).
|
|
268
|
+
*/
|
|
269
|
+
export function inlineScripts(html) {
|
|
270
|
+
const s = html;
|
|
271
|
+
const n = s.length;
|
|
272
|
+
const out = [];
|
|
273
|
+
const at = (p, word) => s.slice(p, p + word.length).toLowerCase() === word;
|
|
274
|
+
const delimited = (p) => p < n && TAG_END.test(s[p]);
|
|
275
|
+
/** Attributes from `p` (just after the tag name) to the tag's `>`; `end` is past the `>`, or -1 at end of file. */
|
|
276
|
+
const attributes = (p) => {
|
|
277
|
+
const attrs = new Map();
|
|
278
|
+
let j = p;
|
|
279
|
+
while (j < n) {
|
|
280
|
+
const from = j;
|
|
281
|
+
while (j < n && (WS.test(s[j]) || s[j] === '/'))
|
|
282
|
+
j++;
|
|
283
|
+
if (j >= n)
|
|
284
|
+
break;
|
|
285
|
+
// Self-closing is a `/` between attributes right before `>`, never the last character of an unquoted value.
|
|
286
|
+
if (s[j] === '>')
|
|
287
|
+
return { end: j + 1, attrs, selfClosing: j > from && s[j - 1] === '/' };
|
|
288
|
+
let k = j + 1; // a name may start with `=`
|
|
289
|
+
while (k < n && !TAG_END.test(s[k]) && s[k] !== '=')
|
|
290
|
+
k++;
|
|
291
|
+
const name = s.slice(j, k).toLowerCase();
|
|
292
|
+
let m = k;
|
|
293
|
+
while (m < n && WS.test(s[m]))
|
|
294
|
+
m++;
|
|
295
|
+
let value = '';
|
|
296
|
+
if (s[m] === '=') {
|
|
297
|
+
m++;
|
|
298
|
+
while (m < n && WS.test(s[m]))
|
|
299
|
+
m++;
|
|
300
|
+
const q = s[m];
|
|
301
|
+
if (q === '"' || q === "'") {
|
|
302
|
+
const close = s.indexOf(q, m + 1);
|
|
303
|
+
if (close < 0)
|
|
304
|
+
return { end: -1, attrs, selfClosing: false };
|
|
305
|
+
value = s.slice(m + 1, close);
|
|
306
|
+
j = close + 1;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
let e = m;
|
|
310
|
+
while (e < n && !WS.test(s[e]) && s[e] !== '>')
|
|
311
|
+
e++;
|
|
312
|
+
value = s.slice(m, e);
|
|
313
|
+
j = e;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
j = m;
|
|
318
|
+
}
|
|
319
|
+
if (!attrs.has(name))
|
|
320
|
+
attrs.set(name, decodeAttribute(value));
|
|
321
|
+
}
|
|
322
|
+
return { end: -1, attrs, selfClosing: false };
|
|
323
|
+
};
|
|
324
|
+
/** Where a script's text ends (the `<` of its end tag, or end of file), from `p` just after its start tag. */
|
|
325
|
+
// The next `-->`, `--!>` from where the scan is: found once and kept while it is still ahead, so a long run of `<`
|
|
326
|
+
// after an open `<!--` costs one search, not one per `<` (the scan stays linear in the bundle's size).
|
|
327
|
+
const ahead = { close: -2, bang: -2 };
|
|
328
|
+
const nextFrom = (key, needle, from) => {
|
|
329
|
+
if (ahead[key] === -2 || (ahead[key] !== -1 && ahead[key] < from))
|
|
330
|
+
ahead[key] = s.indexOf(needle, from);
|
|
331
|
+
return ahead[key];
|
|
332
|
+
};
|
|
333
|
+
const scriptTextEnd = (p) => {
|
|
334
|
+
let state = 'data';
|
|
335
|
+
let i = p;
|
|
336
|
+
while (i < n) {
|
|
337
|
+
if (state === 'data') {
|
|
338
|
+
const lt = s.indexOf('<', i);
|
|
339
|
+
if (lt < 0)
|
|
340
|
+
return n;
|
|
341
|
+
if (at(lt, '</script') && delimited(lt + 8))
|
|
342
|
+
return lt;
|
|
343
|
+
if (at(lt, '<!--')) {
|
|
344
|
+
state = 'escaped';
|
|
345
|
+
i = lt + 2;
|
|
346
|
+
continue;
|
|
347
|
+
} // `<!-->` closes again at once
|
|
348
|
+
i = lt + 1;
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
const lt = s.indexOf('<', i);
|
|
352
|
+
const close = nextFrom('close', '-->', i);
|
|
353
|
+
if (close >= 0 && (lt < 0 || close < lt)) {
|
|
354
|
+
state = 'data';
|
|
355
|
+
i = close + 3;
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
if (lt < 0)
|
|
359
|
+
return n;
|
|
360
|
+
if (at(lt, '</script') && delimited(lt + 8)) {
|
|
361
|
+
if (state === 'escaped')
|
|
362
|
+
return lt;
|
|
363
|
+
state = 'escaped';
|
|
364
|
+
i = lt + 8;
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
if (state === 'escaped' && at(lt, '<script') && delimited(lt + 7)) {
|
|
368
|
+
state = 'double';
|
|
369
|
+
i = lt + 7;
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
i = lt + 1;
|
|
373
|
+
}
|
|
374
|
+
return n;
|
|
375
|
+
};
|
|
376
|
+
// Inside <svg> or <math> (foreign content) `style`, `title` and the like are ordinary elements, not raw text, and a
|
|
377
|
+
// self-closing `<script/>` is empty.
|
|
378
|
+
let foreign = 0;
|
|
379
|
+
let i = 0;
|
|
380
|
+
while (i < n) {
|
|
381
|
+
const lt = s.indexOf('<', i);
|
|
382
|
+
if (lt < 0)
|
|
383
|
+
break;
|
|
384
|
+
const c = s[lt + 1] ?? '';
|
|
385
|
+
if (at(lt, '<!--')) {
|
|
386
|
+
if (s[lt + 4] === '>') {
|
|
387
|
+
i = lt + 5;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
if (s.startsWith('->', lt + 4)) {
|
|
391
|
+
i = lt + 6;
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
const a = nextFrom('close', '-->', lt + 4);
|
|
395
|
+
const b = nextFrom('bang', '--!>', lt + 4);
|
|
396
|
+
const end = a < 0 ? (b < 0 ? -1 : b + 4) : b < 0 || a < b ? a + 3 : b + 4;
|
|
397
|
+
if (end < 0)
|
|
398
|
+
break;
|
|
399
|
+
i = end;
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
if (c === '!' || c === '?') {
|
|
403
|
+
const end = s.indexOf('>', lt + 2);
|
|
404
|
+
if (end < 0)
|
|
405
|
+
break;
|
|
406
|
+
i = end + 1;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (c === '/') {
|
|
410
|
+
if (!/[A-Za-z]/.test(s[lt + 2] ?? '')) {
|
|
411
|
+
const end = s.indexOf('>', lt + 2); // `</>` is nothing; `</ x>` a bogus comment
|
|
412
|
+
if (end < 0)
|
|
413
|
+
break;
|
|
414
|
+
i = end + 1;
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
let k = lt + 2;
|
|
418
|
+
while (k < n && !TAG_END.test(s[k]))
|
|
419
|
+
k++;
|
|
420
|
+
const closing = s.slice(lt + 2, k).toLowerCase();
|
|
421
|
+
if (foreign > 0 && (closing === 'svg' || closing === 'math'))
|
|
422
|
+
foreign--;
|
|
423
|
+
const { end } = attributes(k);
|
|
424
|
+
if (end < 0)
|
|
425
|
+
break;
|
|
426
|
+
i = end;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
if (!/[A-Za-z]/.test(c)) {
|
|
430
|
+
i = lt + 1;
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
let k = lt + 1;
|
|
434
|
+
while (k < n && !TAG_END.test(s[k]))
|
|
435
|
+
k++;
|
|
436
|
+
const name = s.slice(lt + 1, k).toLowerCase();
|
|
437
|
+
const { end, attrs, selfClosing } = attributes(k);
|
|
438
|
+
if (end < 0)
|
|
439
|
+
break; // end of file inside a tag: the parser drops it
|
|
440
|
+
if ((name === 'svg' || name === 'math') && !selfClosing) {
|
|
441
|
+
foreign++;
|
|
442
|
+
i = end;
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
if (name === 'script' && foreign > 0 && selfClosing) {
|
|
446
|
+
i = end;
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
if (name === 'script') {
|
|
450
|
+
const textEnd = scriptTextEnd(end);
|
|
451
|
+
out.push({ start: end, end: textEnd, runs: runsInline(attrs, foreign > 0) });
|
|
452
|
+
if (textEnd >= n)
|
|
453
|
+
break;
|
|
454
|
+
const after = attributes(textEnd + 8);
|
|
455
|
+
if (after.end < 0)
|
|
456
|
+
break;
|
|
457
|
+
i = after.end;
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
if (RAW_TEXT.has(name) && foreign === 0) {
|
|
461
|
+
let j = end;
|
|
462
|
+
for (;;) {
|
|
463
|
+
const close = s.indexOf('</', j);
|
|
464
|
+
if (close < 0) {
|
|
465
|
+
j = n;
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
if (at(close + 2, name) && delimited(close + 2 + name.length)) {
|
|
469
|
+
j = close;
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
j = close + 2;
|
|
473
|
+
}
|
|
474
|
+
i = j;
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
if (name === 'plaintext')
|
|
478
|
+
break;
|
|
479
|
+
i = end;
|
|
480
|
+
}
|
|
481
|
+
return out;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* The bundle as crew serves it: the prelude first in every inline script that runs, and those scripts' hashes.
|
|
485
|
+
* Newlines are normalized first (the HTML parser turns CRLF and CR into LF before anything else, so the DOM is the same
|
|
486
|
+
* and a script's text is what crew hashes). A NUL in a script's text reaches the parser as U+FFFD, so crew writes it so.
|
|
487
|
+
*/
|
|
488
|
+
export function guardBundle(bytes, maxScripts = Number.POSITIVE_INFINITY) {
|
|
489
|
+
const html = bytes.toString('utf8').replace(/\r\n?/g, '\n');
|
|
490
|
+
const scripts = inlineScripts(html).filter((x) => x.runs);
|
|
491
|
+
// Counted before anything is built: each script gains the prelude, so many small ones would multiply the body.
|
|
492
|
+
if (scripts.length > maxScripts)
|
|
493
|
+
return { body: Buffer.alloc(0), scriptHashes: [], tooMany: scripts.length };
|
|
494
|
+
const parts = [];
|
|
495
|
+
const scriptHashes = [];
|
|
496
|
+
let last = 0;
|
|
497
|
+
for (const script of scripts) {
|
|
498
|
+
const text = withPrelude(html.slice(script.start, script.end).replace(/\0/g, '\uFFFD'));
|
|
499
|
+
parts.push(html.slice(last, script.start), text);
|
|
500
|
+
last = script.end;
|
|
501
|
+
scriptHashes.push(createHash('sha256').update(text, 'utf8').digest('base64'));
|
|
502
|
+
}
|
|
503
|
+
parts.push(html.slice(last));
|
|
504
|
+
return { body: Buffer.from(parts.join(''), 'utf8'), scriptHashes };
|
|
505
|
+
}
|
|
506
|
+
//# sourceMappingURL=webrtc-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc-guard.js","sourceRoot":"","sources":["../../src/editors/webrtc-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;oFACoF;AACpF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,gBAAgB;CACR,CAAC;AAEX,sFAAsF;AACtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,4CAA4C,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,sEAAsE,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,SAAS;IAC3H,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;IAC9B,kKAAkK;IAClK,sGAAsG;IACtG,4BAA4B,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,iCAAiC,CAAC;AAE5G,0HAA0H;AAC1H,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,MAAM,QAAQ,GAAG,oBAAoB,CAAC;AACtC,MAAM,KAAK,GAAG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,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QACjD,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;QAClB,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;AACrE,CAAC"}
|
|
@@ -94,11 +94,20 @@ export declare const LINEAGE_MAX_HOPS = 16;
|
|
|
94
94
|
* (`PUT /d/:doc/api/theme/source`) in 0.14.0, which was tagged but never published; 0.14.1 is the first
|
|
95
95
|
* build with both. A caret on 0.x pins the minor, so `^0.12.0` spawned 0.12.x, which has neither route.
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
/**
|
|
98
|
+
* 0.15.0 (wicked-interactive#323, slice I1): a `draft.completed` with `expect_head` lands only on that
|
|
99
|
+
* head (a moved head lands nothing and emits `draft.conflict`), and every landed version records
|
|
100
|
+
* `kind` + `run_id`. A chat-made document's draft (A3) sends `expect_head`; a 0.14.x bridge ignores it
|
|
101
|
+
* and lands on whatever the head is, over a person's edit. The caret pins the minor, so `^0.14.1` never
|
|
102
|
+
* spawned 0.15.0: the floor follows. As with every floor that adds no env key, a 0.14.x bridge that is
|
|
103
|
+
* adopted (a sidecar that names it, a matching env) keeps serving until it restarts; the previous
|
|
104
|
+
* daemon's shutdown reaps the bridges it spawned, so a normal upgrade starts a 0.15.x one.
|
|
105
|
+
*/
|
|
106
|
+
export declare const INTERACTIVE_DEFAULT_RANGE = "^0.15.0";
|
|
98
107
|
/** The env override of the RANGE (not the package). */
|
|
99
108
|
export declare const INTERACTIVE_SPEC_ENV = "WICKED_INTERACTIVE_SPEC";
|
|
100
109
|
/** The default spec — what the daemon spawns with no override. */
|
|
101
|
-
export declare const INTERACTIVE_SPEC = "wicked-interactive@^0.
|
|
110
|
+
export declare const INTERACTIVE_SPEC = "wicked-interactive@^0.15.0";
|
|
102
111
|
/** A semver RANGE this daemon will resolve: one comparator, or a space-separated intersection of
|
|
103
112
|
* them (`>=0.9.1 <1.0.0`). Tags (`latest`), `x`-ranges, `||` unions, paths and `pkg@range` spellings
|
|
104
113
|
* are refused — the override names a floor within the package, nothing else. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-pool.d.ts","sourceRoot":"","sources":["../../src/interactive/bridge-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAM5C,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAC1C,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,oGAAoG;AACpG,eAAO,MAAM,eAAe,OAAO,CAAC;AACpC,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAsEnC,wEAAwE;AACxE;;;;GAIG;AACH;;;;GAIG;AACH;;;;;GAKG;AACH;;;;;GAKG;AACH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
|
|
@@ -167,7 +167,16 @@ const INTERACTIVE_PACKAGE = 'wicked-interactive';
|
|
|
167
167
|
* (`PUT /d/:doc/api/theme/source`) in 0.14.0, which was tagged but never published; 0.14.1 is the first
|
|
168
168
|
* build with both. A caret on 0.x pins the minor, so `^0.12.0` spawned 0.12.x, which has neither route.
|
|
169
169
|
*/
|
|
170
|
-
|
|
170
|
+
/**
|
|
171
|
+
* 0.15.0 (wicked-interactive#323, slice I1): a `draft.completed` with `expect_head` lands only on that
|
|
172
|
+
* head (a moved head lands nothing and emits `draft.conflict`), and every landed version records
|
|
173
|
+
* `kind` + `run_id`. A chat-made document's draft (A3) sends `expect_head`; a 0.14.x bridge ignores it
|
|
174
|
+
* and lands on whatever the head is, over a person's edit. The caret pins the minor, so `^0.14.1` never
|
|
175
|
+
* spawned 0.15.0: the floor follows. As with every floor that adds no env key, a 0.14.x bridge that is
|
|
176
|
+
* adopted (a sidecar that names it, a matching env) keeps serving until it restarts; the previous
|
|
177
|
+
* daemon's shutdown reaps the bridges it spawned, so a normal upgrade starts a 0.15.x one.
|
|
178
|
+
*/
|
|
179
|
+
export const INTERACTIVE_DEFAULT_RANGE = '^0.15.0';
|
|
171
180
|
/** The env override of the RANGE (not the package). */
|
|
172
181
|
export const INTERACTIVE_SPEC_ENV = 'WICKED_INTERACTIVE_SPEC';
|
|
173
182
|
/** The default spec — what the daemon spawns with no override. */
|