-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib_compiler_BridgeParser.js.html
More file actions
728 lines (654 loc) · 54.7 KB
/
Copy pathlib_compiler_BridgeParser.js.html
File metadata and controls
728 lines (654 loc) · 54.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: lib/compiler/BridgeParser.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: lib/compiler/BridgeParser.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @file BridgeParser.js
* @description Static analysis of Avenx bridge modules.
*
* A bridge is a normal ES module whose default export is a `bridge({...})`
* call. Because consumers reach it through an `import`, the compiler can read
* the whole picture from source alone: which bridges exist, what each one
* declares, which events it emits, and who imports it.
*
* This module answers those questions without a full JavaScript parser. It
* scans the `bridge({...})` argument with a brace/string-aware walker and reads
* only the top level of the object literal, which is all the declaration
* surface a bridge has.
*/
import fs from 'fs';
import path from 'path';
/**
* Module specifiers that resolve to the Avenx runtime.
* @type {RegExp}
*/
const RUNTIME_SPECIFIER = /^(avenx-core(\/(runtime|core))?|.*\/lib\/core(\/index\.js)?)$/;
/**
* Derives a bridge's name from its file name.
* `user-prefs.bridge.js` becomes `userPrefs`.
* @param {string} filePath - Path to the bridge module.
* @returns {string} The bridge name.
*/
export function bridgeNameFromFile(filePath) {
const base = path.basename(filePath).replace(/\.bridge\.js$/i, '');
return base
.split(/[-_.]/)
.filter(Boolean)
.map((part, index) => (index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)))
.join('');
}
/**
* Returns the identifier the compiled bundle uses for a bridge instance.
* @param {string} name - The bridge name.
* @returns {string} A valid JavaScript identifier.
*/
export function bridgeBindingName(name) {
return `__avx_bridge_${String(name).replace(/[^\w$]/g, '_')}`;
}
/**
* Walks source from an opening brace to its match, ignoring braces that appear
* inside strings, template literals or comments.
* @param {string} source - The source text.
* @param {number} openIndex - Index of the opening `{`.
* @returns {{ end: number, topLevelCommas: number[] }} The index of the matching
* `}` (or -1) and the offsets of commas at depth 1.
*/
function scanObjectLiteral(source, openIndex) {
let depth = 0;
let index = openIndex;
const topLevelCommas = [];
while (index < source.length) {
const char = source[index];
const next = source[index + 1];
// Comments
if (char === '/' && next === '/') {
const lineEnd = source.indexOf('\n', index);
index = lineEnd === -1 ? source.length : lineEnd;
continue;
}
if (char === '/' && next === '*') {
const blockEnd = source.indexOf('*/', index + 2);
index = blockEnd === -1 ? source.length : blockEnd + 2;
continue;
}
// Quoted strings
if (char === '"' || char === "'") {
index++;
while (index < source.length) {
if (source[index] === '\\') {
index += 2;
continue;
}
if (source[index] === char) break;
index++;
}
index++;
continue;
}
// Template literals, including ${...} substitutions
if (char === '`') {
index++;
while (index < source.length) {
if (source[index] === '\\') {
index += 2;
continue;
}
if (source[index] === '`') break;
if (source[index] === '$' && source[index + 1] === '{') {
let inner = 1;
index += 2;
while (index < source.length && inner > 0) {
if (source[index] === '{') inner++;
else if (source[index] === '}') inner--;
index++;
}
continue;
}
index++;
}
index++;
continue;
}
if (char === '{' || char === '[' || char === '(') {
depth++;
} else if (char === '}' || char === ']' || char === ')') {
depth--;
if (depth === 0) {
return { end: index, topLevelCommas };
}
} else if (char === ',' && depth === 1) {
topLevelCommas.push(index);
}
index++;
}
return { end: -1, topLevelCommas };
}
/**
* Matches the `: atomic(` that marks a bridge action as transactional.
* @type {RegExp}
*/
const ATOMIC_VALUE = /^\s*:\s*atomic\s*\(/;
/**
* Reads the member name that starts a top-level object-literal entry.
* @param {string} segment - Source of one entry, starting after `{` or `,`.
* @returns {{ name: string, kind: ('getter'|'action'|'property'), atomic: boolean= }|null}
* The parsed member, or null when the segment is not a recognisable declaration.
*/
function parseMember(segment) {
const match = segment.match(
/^\s*(?:\/\/[^\n]*\n|\/\*[\s\S]*?\*\/|\s)*(?:(get|set)\s+)?(?:async\s+)?\*?\s*(?:(['"])([^'"]+)\2|([A-Za-z_$][\w$]*))\s*([:(])/,
);
if (!match) {
return null;
}
const accessor = match[1];
const name = match[3] !== undefined ? match[3] : match[4];
const delimiter = match[5];
if (accessor === 'get') {
return { name, kind: 'getter' };
}
if (accessor === 'set') {
// Setters are not part of the Bridge surface; report them as properties so
// the caller can reject them with a clear message.
return { name, kind: 'property' };
}
if (delimiter === '(') {
return { name, kind: 'action' };
}
// `addQty: atomic(function (id, n) { ... })` is an action wearing a wrapper.
// Without this it reads as a plain property, which the Bridge API rejects
// and which would hide the body from Atlas.
if (delimiter === ':' && ATOMIC_VALUE.test(segment.slice(segment.indexOf(name) + name.length))) {
return { name, kind: 'action', atomic: true };
}
return { name, kind: 'property' };
}
/**
* Splits the top level of an object literal into member declarations.
* @param {string} source - The full source text.
* @param {number} openIndex - Index of the literal's opening `{`.
* @returns {{ members: Array<{name: string, kind: string, valueStart: number}>, end: number }}
* The declared members and the index of the closing brace.
*/
function parseObjectMembers(source, openIndex) {
const { end, topLevelCommas } = scanObjectLiteral(source, openIndex);
if (end === -1) {
return { members: [], end };
}
const boundaries = [openIndex, ...topLevelCommas];
const members = [];
for (let i = 0; i < boundaries.length; i++) {
const start = boundaries[i] + 1;
const stop = i + 1 < boundaries.length ? boundaries[i + 1] : end;
const segment = source.slice(start, stop);
const member = parseMember(segment);
if (member) {
members.push({ ...member, valueStart: start + segment.indexOf(member.name) });
}
}
return { members, end };
}
/**
* Skips past an `atomic(` wrapper following a member name.
* @param {string} source - The module source.
* @param {number} valueStart - Offset of the member's name.
* @returns {number} The offset just inside the wrapper's `(`, or -1 when the
* member is not wrapped.
*/
function unwrapAtomic(source, valueStart) {
const match = /^(?:['"][^'"]*['"]|[A-Za-z_$][\w$]*)\s*:\s*atomic\s*\(/.exec(source.slice(valueStart));
return match ? valueStart + match[0].length : -1;
}
/**
* Locates the body brace of a function expression that begins at an offset.
*
* The wrapper accepts every shape a bridge action is written in — `function
* (a, b) {`, `async function (a) {`, `(a, b) => {`, `a => {` — so the brace is
* found by depth rather than by matching each form. Parentheses and brackets
* opened by the parameter list raise the depth, so the first `{` seen at depth
* zero is the body.
* @param {string} source - The module source.
* @param {number} from - Where to start scanning.
* @returns {{start: number, end: number}|null} The body's inner span, exclusive
* of the braces, or null when no body could be located.
*/
function wrappedFunctionBodySpan(source, from) {
let depth = 0;
for (let i = from; i < source.length; i++) {
const char = source[i];
if (char === '(' || char === '[') {
depth++;
} else if (char === ')' || char === ']') {
if (depth === 0) return null;
depth--;
} else if (char === '{' && depth === 0) {
const { end } = scanObjectLiteral(source, i);
return end === -1 ? null : { start: i + 1, end };
}
}
return null;
}
/**
* Locates the body of a member declared as a function.
*
* An action (`addQty(id, n) { ... }`) and a getter (`get total() { ... }`)
* both put their code between the brace that follows their parameter list and
* its match. Atlas reads those bodies to record what a bridge action writes
* and what a getter reads; without a span it would have to re-parse the module.
* @param {string} source - The module source.
* @param {number} valueStart - Offset of the member's name.
* @returns {{start: number, end: number}|null} The body's inner span, exclusive
* of the braces, or null when the member has no function body.
*/
export function memberBodySpan(source, valueStart) {
const unwrapped = unwrapAtomic(source, valueStart);
if (unwrapped !== -1) {
return wrappedFunctionBodySpan(source, unwrapped);
}
const paren = source.indexOf('(', valueStart);
if (paren === -1) return null;
const { end: parenEnd } = scanObjectLiteral(source, paren);
if (parenEnd === -1) return null;
let i = parenEnd + 1;
while (i < source.length && /\s/.test(source[i])) i++;
if (source[i] !== '{') return null;
const { end: braceEnd } = scanObjectLiteral(source, i);
if (braceEnd === -1) return null;
return { start: i + 1, end: braceEnd };
}
/**
* Reads a member's parameter list.
*
* Slicing from the member name to the body and taking everything between the
* first `(` and the last `)` works for `addQty(id, n) {`, and breaks the
* moment a wrapper puts a paren in front of it: for
* `addQty: atomic(function (id, n) {` it yields `function (id, n`. Scanning
* backwards from the body brace instead finds the same parameter list in
* every shape, wrapper or not, including an arrow's.
*
* Parameters matter more than they look. `addBridgeUnit` hands them to the
* analyser as locals; without them every parameter reads as an unknown
* identifier, and an unknown identifier blocks a diagnostic.
* @param {string} source - The module source.
* @param {number} bodyStart - Offset just inside the body's `{`.
* @returns {string} The parameter text, without its parentheses. Empty when
* the member takes no parameters.
*/
export function memberParams(source, bodyStart) {
let i = bodyStart - 2; // step back over the `{`
while (i >= 0 && /\s/.test(source[i])) i--;
// An arrow sits between the parameter list and the body.
if (i >= 1 && source[i] === '>' && source[i - 1] === '=') {
i -= 2;
while (i >= 0 && /\s/.test(source[i])) i--;
}
if (i < 0) return '';
if (source[i] !== ')') {
// `n => { ... }` — one parameter, written without parentheses.
const end = i;
while (i >= 0 && /[\w$]/.test(source[i])) i--;
const name = source.slice(i + 1, end + 1);
return /^[A-Za-z_$][\w$]*$/.test(name) ? name : '';
}
let depth = 0;
for (let j = i; j >= 0; j--) {
const char = source[j];
if (char === ')') {
depth++;
} else if (char === '(') {
depth--;
if (depth === 0) return source.slice(j + 1, i);
}
}
return '';
}
/**
* Finds the `bridge(` call that produces the module's default export.
* @param {string} source - The module source.
* @returns {number} Index of the `{` opening the definition object, or -1.
*/
function findDefinitionBrace(source) {
const callRegex = /(^|[^\w$.])bridge\s*\(/g;
let match;
while ((match = callRegex.exec(source)) !== null) {
const parenIndex = source.indexOf('(', match.index + match[0].length - 1);
let cursor = parenIndex + 1;
while (cursor < source.length && /\s/.test(source[cursor])) cursor++;
if (source[cursor] === '{') {
return cursor;
}
}
return -1;
}
/**
* Extracts every event name emitted with a literal string, e.g. `this.emit('login')`.
* @param {string} source - The module source.
* @returns {string[]} Unique event names in source order.
*/
export function extractEmittedEvents(source) {
const events = new Set();
const regex = /\bemit\s*\(\s*(['"`])([^'"`\\]+)\1/g;
let match;
while ((match = regex.exec(source)) !== null) {
events.add(match[2]);
}
return [...events];
}
/**
* Extracts `<identifier>.on('event', ...)` subscriptions from source.
* @param {string} source - The source to scan.
* @returns {Array<{ target: string, event: string }>} The subscriptions found.
*/
export function extractSubscriptions(source) {
const found = [];
const regex = /\b([A-Za-z_$][\w$]*)\s*\.\s*on\s*\(\s*(['"`])([^'"`\\]+)\2/g;
let match;
while ((match = regex.exec(source)) !== null) {
found.push({ target: match[1], event: match[3] });
}
return found;
}
/**
* Replaces comments with spaces, preserving length and line structure.
* @param {string} source - The module source.
* @returns {string} The source with comments blanked.
*/
function blankComments(source) {
let out = '';
let i = 0;
while (i < source.length) {
const ch = source[i];
if (ch === '/' && source[i + 1] === '/') {
let j = i;
while (j < source.length && source[j] !== '\n') j++;
out += ' '.repeat(j - i);
i = j;
continue;
}
if (ch === '/' && source[i + 1] === '*') {
let j = i + 2;
while (j < source.length && !(source[j] === '*' && source[j + 1] === '/')) j++;
j = Math.min(j + 2, source.length);
out += source.slice(i, j).replace(/[^\n]/g, ' ');
i = j;
continue;
}
if (ch === '"' || ch === "'" || ch === '`') {
const quote = ch;
let j = i + 1;
while (j < source.length && source[j] !== quote) {
if (source[j] === '\\') j++;
j++;
}
j = Math.min(j + 1, source.length);
out += source.slice(i, j);
i = j;
continue;
}
out += ch;
i++;
}
return out;
}
/**
* Parses the import statements of a module.
* @param {string} source - The module source.
* @returns {Array<{ statement: string, specifier: string, defaultName: string|null, named: string[] }>}
* One entry per import statement.
*/
export function parseImports(source) {
const imports = [];
// Comments are blanked out first, keeping every offset and newline, so a
// documented example — the scaffolded bridge contains one — cannot be read
// as a real dependency. Before this, a bridge whose JSDoc showed how to
// import it declared an import of itself.
const scannable = blankComments(source);
const regex = /import\s+(?:([\s\S]*?)\s+from\s+)?['"]([^'"]+)['"];?/g;
let match;
while ((match = regex.exec(scannable)) !== null) {
const clause = (match[1] || '').trim();
const specifier = match[2];
let defaultName = null;
const named = [];
if (clause) {
const namedMatch = clause.match(/\{([\s\S]*?)\}/);
if (namedMatch) {
for (const part of namedMatch[1].split(',')) {
const cleaned = part.trim();
if (cleaned) {
named.push(cleaned.split(/\s+as\s+/)[0].trim());
}
}
}
const beforeBrace = clause.split('{')[0].replace(/,\s*$/, '').trim();
if (beforeBrace && !beforeBrace.startsWith('*')) {
defaultName = beforeBrace;
}
}
imports.push({ statement: source.slice(match.index, match.index + match[0].length), specifier, defaultName, named });
}
return imports;
}
/**
* Resolves a relative import specifier to a bridge module path, if it is one.
* @param {string} fromFile - The importing file.
* @param {string} specifier - The import specifier.
* @returns {string|null} Absolute path to the `.bridge.js` file, or null.
*/
export function resolveBridgeSpecifier(fromFile, specifier) {
if (!specifier || !specifier.startsWith('.')) {
return null;
}
const base = path.resolve(path.dirname(fromFile), specifier);
// A bridge import is explicit: the specifier names a `.bridge.js` module.
// Anything else (a child component, a helper) is not a bridge, and guessing
// otherwise would misread ordinary imports.
if (base.endsWith('.bridge.js')) {
return base;
}
if (base.endsWith('.bridge')) {
return `${base}.js`;
}
return null;
}
/**
* Collects the bridge imports of any module (component, page, bridge or main).
* @param {string} filePath - Absolute path to the importing file.
* @param {string} source - Its source text.
* @returns {Array<{ local: string, specifier: string, resolved: string }>} One entry
* per default-imported bridge.
*/
export function findBridgeImports(filePath, source) {
const results = [];
for (const entry of parseImports(source)) {
const resolved = resolveBridgeSpecifier(filePath, entry.specifier);
if (resolved && entry.defaultName) {
results.push({ local: entry.defaultName, specifier: entry.specifier, resolved });
}
}
return results;
}
/**
* Analyses a bridge module.
*
* A bridge module imports `bridge` from the Avenx runtime and exports the
* definition object it returns. Anything else in a `*.bridge.js` file is not a
* bridge, and is reported as such so the caller can raise a build error rather
* than emit a module the runtime cannot use.
* @param {string} filePath - Absolute path to the `.bridge.js` file.
* @param {string} source - The module source.
* @returns {object|null} A descriptor of the bridge, or null when the module is
* not built on the `bridge()` factory.
*/
export function analyzeBridge(filePath, source) {
const name = bridgeNameFromFile(filePath);
const imports = parseImports(source);
const importsFactory = imports.some(
(entry) => entry.named.includes('bridge') && RUNTIME_SPECIFIER.test(entry.specifier),
);
const braceIndex = findDefinitionBrace(source);
if (!importsFactory || braceIndex === -1) {
return null;
}
const descriptor = {
filePath,
name,
binding: bridgeBindingName(name),
stateKeys: [],
actions: [],
getters: [],
hasSetup: false,
events: [],
bridgeImports: [],
/**
* Actions declared with the `atomic()` wrapper, in declaration order.
* @type {string[]}
*/
atomicActions: [],
/**
* Where each member sits in the source, for consumers that need more than
* its name. Additive: nothing that only reads `stateKeys`, `getters` or
* `actions` is affected.
* @type {Array<{name: string, kind: string, valueStart: number, body: {start: number, end: number}|null}>}
*/
members: [],
};
const { members } = parseObjectMembers(source, braceIndex);
for (const member of members) {
if (member.kind === 'getter') {
descriptor.getters.push(member.name);
descriptor.members.push({ ...member, body: memberBodySpan(source, member.valueStart) });
continue;
}
if (member.name === 'setup') {
descriptor.hasSetup = true;
descriptor.members.push({ ...member, body: memberBodySpan(source, member.valueStart) });
continue;
}
if (member.name === 'state' && member.kind === 'property') {
const stateBrace = source.indexOf('{', member.valueStart + 'state'.length);
if (stateBrace !== -1) {
const { members: stateMembers } = parseObjectMembers(source, stateBrace);
descriptor.stateKeys = stateMembers.map((entry) => entry.name);
for (const entry of stateMembers) {
descriptor.members.push({ ...entry, kind: 'state', body: null });
}
}
continue;
}
if (member.kind === 'action') {
descriptor.actions.push(member.name);
if (member.atomic) {
descriptor.atomicActions.push(member.name);
}
descriptor.members.push({ ...member, body: memberBodySpan(source, member.valueStart) });
}
}
descriptor.events = extractEmittedEvents(source);
for (const entry of imports) {
if (RUNTIME_SPECIFIER.test(entry.specifier)) {
continue;
}
const resolved = resolveBridgeSpecifier(filePath, entry.specifier);
if (resolved && entry.defaultName) {
descriptor.bridgeImports.push({ local: entry.defaultName, specifier: entry.specifier, resolved });
}
// Anything else -- an npm package, a local helper -- used to be collected
// as an unsupported import and fail the build with AVX_C09, because the
// concatenator had no way to inline it. The bundler resolves it like any
// other specifier, so the only imports that fail now are the ones that
// resolve to nothing, and they fail with the reason.
}
return descriptor;
}
/**
* Reads and analyses a bridge module from disk.
* @param {string} filePath - Absolute path to the `.bridge.js` file.
* @param {function(string): string} [transform] - Optional source transform, used
* by the compiler to substitute environment variables.
* @returns {object|null} The descriptor, or null when the file cannot be read or
* is not built on the `bridge()` factory.
*/
export function analyzeBridgeFile(filePath, transform = (value) => value) {
if (!fs.existsSync(filePath)) {
return null;
}
return analyzeBridge(filePath, transform(fs.readFileSync(filePath, 'utf-8')));
}
/**
* Every member a consumer may legitimately read from a bridge instance.
* @param {object} descriptor - A bridge descriptor.
* @returns {string[]} The declared member names.
*/
export function declaredMembers(descriptor) {
return [...descriptor.stateKeys, ...descriptor.getters, ...descriptor.actions, 'on', '$dispose', '$name'];
}
/**
* Suggests the closest known name for a mistyped one, using edit distance.
* @param {string} name - The unknown name.
* @param {string[]} known - Candidate names.
* @returns {string} A " Did you mean ...?" fragment, or an empty string.
*/
export function suggestName(name, known) {
if (!name || !Array.isArray(known) || known.length === 0) {
return '';
}
const distance = (a, b) => {
const rows = [];
for (let i = 0; i <= a.length; i++) rows[i] = [i];
for (let j = 0; j <= b.length; j++) rows[0][j] = j;
for (let i = 1; i <= a.length; i++) {
for (let j = 1; j <= b.length; j++) {
rows[i][j] = Math.min(
rows[i - 1][j] + 1,
rows[i][j - 1] + 1,
rows[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1),
);
}
}
return rows[a.length][b.length];
};
let best = null;
let bestScore = Infinity;
const lower = name.toLowerCase();
for (const candidate of known) {
const score = distance(lower, String(candidate).toLowerCase());
if (score < bestScore) {
bestScore = score;
best = candidate;
}
}
// Only suggest when the names are genuinely close.
return best !== null && bestScore <= Math.max(2, Math.floor(name.length / 3))
? ` Did you mean "${best}"?`
: '';
}
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-lib_bundler.html">lib/bundler</a></li><li><a href="module-lib_bundler_emit.html">lib/bundler/emit</a></li><li><a href="module-lib_bundler_graph.html">lib/bundler/graph</a></li><li><a href="module-lib_bundler_minify.html">lib/bundler/minify</a></li><li><a href="module-lib_bundler_parseModule.html">lib/bundler/parseModule</a></li><li><a href="module-lib_bundler_resolve.html">lib/bundler/resolve</a></li><li><a href="module-lib_bundler_scanner.html">lib/bundler/scanner</a></li><li><a href="module-lib_bundler_treeshake.html">lib/bundler/treeshake</a></li><li><a href="module-lib_compiler_atlas_AppModel.html">lib/compiler/atlas/AppModel</a></li><li><a href="module-lib_compiler_atlas_build.html">lib/compiler/atlas/build</a></li><li><a href="module-lib_compiler_atlas_cache.html">lib/compiler/atlas/cache</a></li><li><a href="module-lib_compiler_atlas_diagnostics.html">lib/compiler/atlas/diagnostics</a></li><li><a href="module-lib_compiler_atlas_emit.html">lib/compiler/atlas/emit</a></li><li><a href="module-lib_compiler_atlas_query.html">lib/compiler/atlas/query</a></li><li><a href="module-lib_compiler_atlas_resolve.html">lib/compiler/atlas/resolve</a></li><li><a href="module-lib_compiler_atlas_routes.html">lib/compiler/atlas/routes</a></li><li><a href="module-lib_compiler_atlas_source.html">lib/compiler/atlas/source</a></li><li><a href="module-lib_compiler_bundle_validate.html">lib/compiler/bundle/validate</a></li><li><a href="module-lib_compiler_codegen_actions.html">lib/compiler/codegen/actions</a></li><li><a href="module-lib_compiler_codegen_collect.html">lib/compiler/codegen/collect</a></li><li><a href="module-lib_compiler_codegen_expression.html">lib/compiler/codegen/expression</a></li><li><a href="module-lib_compiler_codegen_table.html">lib/compiler/codegen/table</a></li><li><a href="module-lib_compiler_ir_build.html">lib/compiler/ir/build</a></li><li><a href="module-lib_compiler_ir_lower.html">lib/compiler/ir/lower</a></li><li><a href="module-lib_compiler_ir_nodes.html">lib/compiler/ir/nodes</a></li><li><a href="module-lib_compiler_modules.html">lib/compiler/modules</a></li><li><a href="module-lib_compiler_parser_declarations.html">lib/compiler/parser/declarations</a></li><li><a href="module-lib_compiler_parser_htmlTree.html">lib/compiler/parser/htmlTree</a></li><li><a href="module-lib_compiler_parser_tokenizer.html">lib/compiler/parser/tokenizer</a></li><li><a href="module-lib_compiler_render_program.html">lib/compiler/render/program</a></li><li><a href="module-lib_compiler_rewind_diagnostics.html">lib/compiler/rewind/diagnostics</a></li><li><a href="module-lib_compiler_rewind_effects.html">lib/compiler/rewind/effects</a></li><li><a href="module-lib_compiler_rewind_writeSet.html">lib/compiler/rewind/writeSet</a></li><li><a href="module-lib_compiler_sourceMapTrace.html">lib/compiler/sourceMapTrace</a></li><li><a href="module-lib_compiler_templateEvents.html">lib/compiler/templateEvents</a></li><li><a href="module-lib_compiler_validateExpressions.html">lib/compiler/validateExpressions</a></li><li><a href="module-lib_core_expression_compile.html">lib/core/expression/compile</a></li><li><a href="module-lib_core_expression_evaluator.html">lib/core/expression/evaluator</a></li><li><a href="module-lib_core_expression_fallback.html">lib/core/expression/fallback</a></li><li><a href="module-lib_core_expression_interpreter.html">lib/core/expression/interpreter</a></li><li><a href="module-lib_core_expression_ops.html">lib/core/expression/ops</a></li><li><a href="module-lib_core_expression_parser.html">lib/core/expression/parser</a></li><li><a href="module-lib_core_index.html">lib/core/index</a></li><li><a href="module-lib_core_reactive_journal.html">lib/core/reactive/journal</a></li><li><a href="module-lib_core_reactive_scopeProxy.html">lib/core/reactive/scopeProxy</a></li><li><a href="module-lib_core_reactive_symbols.html">lib/core/reactive/symbols</a></li><li><a href="module-lib_core_renderer_bindingScope.html">lib/core/renderer/bindingScope</a></li><li><a href="module-lib_core_renderer_installStringRenderer.html">lib/core/renderer/installStringRenderer</a></li><li><a href="module-lib_core_renderer_program_CompiledTemplate.html">lib/core/renderer/program/CompiledTemplate</a></li><li><a href="module-lib_core_renderer_program_TemplateInstance.html">lib/core/renderer/program/TemplateInstance</a></li><li><a href="module-lib_core_renderer_program_bindings.html">lib/core/renderer/program/bindings</a></li><li><a href="module-lib_core_renderer_program_blocks.html">lib/core/renderer/program/blocks</a></li><li><a href="module-lib_core_renderer_stringRenderer.html">lib/core/renderer/stringRenderer</a></li><li><a href="module-lib_core_runtime_AvenxGuard.html">lib/core/runtime/AvenxGuard</a></li><li><a href="module-lib_core_runtime_ComponentScope.html">lib/core/runtime/ComponentScope</a></li><li><a href="module-lib_core_runtime_atomic.html">lib/core/runtime/atomic</a></li><li><a href="module-lib_core_runtime_builtins.html">lib/core/runtime/builtins</a></li><li><a href="module-lib_core_runtime_installVirtualList.html">lib/core/runtime/installVirtualList</a></li><li><a href="module-lib_core_security_urlPolicy.html">lib/core/security/urlPolicy</a></li><li><a href="module-lib_core_testing.html">lib/core/testing</a></li><li><a href="module-lib_core_tooling.html">lib/core/tooling</a></li><li><a href="module-lib_core_tooling_loadComponent.html">lib/core/tooling/loadComponent</a></li><li><a href="module-lib_core_trace_capture.html">lib/core/trace/capture</a></li><li><a href="module-lib_core_trace_contracts.html">lib/core/trace/contracts</a></li><li><a href="module-lib_core_trace_derived.html">lib/core/trace/derived</a></li><li><a href="module-lib_core_trace_devtools.html">lib/core/trace/devtools</a></li><li><a href="module-lib_core_trace_dom.html">lib/core/trace/dom</a></li><li><a href="module-lib_core_trace_exportTest.html">lib/core/trace/exportTest</a></li><li><a href="module-lib_core_trace_format.html">lib/core/trace/format</a></li><li><a href="module-lib_core_trace_globals.html">lib/core/trace/globals</a></li><li><a href="module-lib_core_trace_reactive.html">lib/core/trace/reactive</a></li><li><a href="module-lib_core_trace_recorder.html">lib/core/trace/recorder</a></li><li><a href="module-lib_core_trace_redact.html">lib/core/trace/redact</a></li><li><a href="module-lib_core_trace_replay.html">lib/core/trace/replay</a></li><li><a href="module-lib_core_trace_resource.html">lib/core/trace/resource</a></li><li><a href="module-lib_core_trace_schema.html">lib/core/trace/schema</a></li><li><a href="module-lib_core_trace_store.html">lib/core/trace/store</a></li><li><a href="module-lib_core_trace_tracer.html">lib/core/trace/tracer</a></li><li><a href="module-lib_core_trace_transaction.html">lib/core/trace/transaction</a></li></ul><h3>Classes</h3><ul><li><a href="AvenxApp.html">AvenxApp</a></li><li><a href="AvenxCLI.html">AvenxCLI</a></li><li><a href="AvenxCompiler.html">AvenxCompiler</a></li><li><a href="AvenxComponent.html">AvenxComponent</a></li><li><a href="AvenxError.html">AvenxError</a></li><li><a href="AvenxLogger.html">AvenxLogger</a></li><li><a href="AvenxMock.html">AvenxMock</a></li><li><a href="AvenxPage.html">AvenxPage</a></li><li><a href="AvenxRouter.html">AvenxRouter</a></li><li><a href="AvenxSandbox.html">AvenxSandbox</a></li><li><a href="AvenxWatcher.html">AvenxWatcher</a></li><li><a href="BrowserNavigationDelegate.html">BrowserNavigationDelegate</a></li><li><a href="BuildError.html">BuildError</a></li><li><a href="CompilerError.html">CompilerError</a></li><li><a href="ComponentParser.html">ComponentParser</a></li><li><a href="ComputedRegistry.html">ComputedRegistry</a></li><li><a href="ContractValidator.html">ContractValidator</a></li><li><a href="DeadlockManager.html">DeadlockManager</a></li><li><a href="DeferManager.html">DeferManager</a></li><li><a href="DisposalScope.html">DisposalScope</a></li><li><a href="DomPatcher.html">DomPatcher</a></li><li><a href="DynamicEvaluator.html">DynamicEvaluator</a></li><li><a href="EventBinder.html">EventBinder</a></li><li><a href="EventExecutor.html">EventExecutor</a></li><li><a href="ExpressionParser.html">ExpressionParser</a></li><li><a href="HtmlDiff.html">HtmlDiff</a></li><li><a href="HtmlEscaper.html">HtmlEscaper</a></li><li><a href="LifecycleManager.html">LifecycleManager</a></li><li><a href="ListManager.html">ListManager</a></li><li><a href="LruCache.html">LruCache</a></li><li><a href="MemoryNavigationDelegate.html">MemoryNavigationDelegate</a></li><li><a href="NavigationDelegate.html">NavigationDelegate</a></li><li><a href="ProxyHandlerFactory.html">ProxyHandlerFactory</a></li><li><a href="Resource.html">Resource</a></li><li><a href="RouteMatcher.html">RouteMatcher</a></li><li><a href="SafeHtml.html">SafeHtml</a></li><li><a href="Sanitizer.html">Sanitizer</a></li><li><a href="StateFactory.html">StateFactory</a></li><li><a href="StyleCompilerError.html">StyleCompilerError</a></li><li><a href="StyleMountManager.html">StyleMountManager</a></li><li><a href="StyleProcessor.html">StyleProcessor</a></li><li><a href="TemplateRenderer.html">TemplateRenderer</a></li><li><a href="TemplateValidationError.html">TemplateValidationError</a></li><li><a href="VirtualList.html">VirtualList</a></li><li><a href="module-lib_bundler_emit.EmitError.html">EmitError</a></li><li><a href="module-lib_bundler_graph.BindingError.html">BindingError</a></li><li><a href="module-lib_bundler_graph.DynamicImportError.html">DynamicImportError</a></li><li><a href="module-lib_bundler_graph.ModuleGraph.html">ModuleGraph</a></li><li><a href="module-lib_bundler_parseModule.ModuleParseError.html">ModuleParseError</a></li><li><a href="module-lib_bundler_resolve.ResolveError.html">ResolveError</a></li><li><a href="module-lib_bundler_resolve.Resolver.html">Resolver</a></li><li><a href="module-lib_bundler_scanner.CodeMask.html">CodeMask</a></li><li><a href="module-lib_compiler_atlas_AppModel.AppModel.html">AppModel</a></li><li><a href="module-lib_compiler_codegen_actions-Scope.html">Scope</a></li><li><a href="module-lib_compiler_codegen_expression.ExpressionCodegenError.html">ExpressionCodegenError</a></li><li><a href="module-lib_compiler_codegen_expression-Bound.html">Bound</a></li><li><a href="module-lib_compiler_ir_lower-BlockBuilder.html">BlockBuilder</a></li><li><a href="module-lib_compiler_ir_lower-Interner.html">Interner</a></li><li><a href="module-lib_compiler_ir_nodes.IRRefusal.html">IRRefusal</a></li><li><a href="module-lib_compiler_parser_htmlTree.HTMLNode.html">HTMLNode</a></li><li><a href="module-lib_core_expression_evaluator-Frame.html">Frame</a></li><li><a href="module-lib_core_expression_parser.ExpressionParseError.html">ExpressionParseError</a></li><li><a href="module-lib_core_expression_parser-Parser.html">Parser</a></li><li><a href="module-lib_core_reactive_journal.JournalFrame.html">JournalFrame</a></li><li><a href="module-lib_core_reactive_journal-Journal.html">Journal</a></li><li><a href="module-lib_core_renderer_program_CompiledTemplate.CompiledTemplate.html">CompiledTemplate</a></li><li><a href="module-lib_core_renderer_program_TemplateInstance.TemplateInstance.html">TemplateInstance</a></li><li><a href="module-lib_core_renderer_program_blocks.DeferBinding.html">DeferBinding</a></li><li><a href="module-lib_core_renderer_program_blocks.ForBinding.html">ForBinding</a></li><li><a href="module-lib_core_renderer_program_blocks.IfBinding.html">IfBinding</a></li><li><a href="module-lib_core_renderer_program_blocks.RangeBinding.html">RangeBinding</a></li><li><a href="module-lib_core_renderer_program_blocks.SlotBinding.html">SlotBinding</a></li><li><a href="module-lib_core_renderer_program_blocks-BlockRange.html">BlockRange</a></li><li><a href="module-lib_core_runtime_AvenxGuard.AvenxGuard.html">AvenxGuard</a></li><li><a href="module-lib_core_runtime_AvenxGuard.GuardContext.html">GuardContext</a></li><li><a href="module-lib_core_runtime_ComponentScope.ComponentScope.html">ComponentScope</a></li><li><a href="module-lib_core_trace_recorder.TraceRecorder.html">TraceRecorder</a></li><li><a href="module-lib_core_trace_redact.Redactor.html">Redactor</a></li><li><a href="module-lib_core_trace_tracer-Tracer.html">Tracer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ALLOWED_GLOBALS">ALLOWED_GLOBALS</a></li><li><a href="global.html#ATOMIC_VALUE">ATOMIC_VALUE</a></li><li><a href="global.html#AvenxErrorCodes">AvenxErrorCodes</a></li><li><a href="global.html#AvenxErrorMessages">AvenxErrorMessages</a></li><li><a href="global.html#BOOLEAN_ATTRIBUTES">BOOLEAN_ATTRIBUTES</a></li><li><a href="global.html#BUILTIN_COMPONENT_MODULES">BUILTIN_COMPONENT_MODULES</a></li><li><a href="global.html#BUILTIN_TAGS">BUILTIN_TAGS</a></li><li><a href="global.html#BUNDLE_SIZE_WARNING_THRESHOLD_KB">BUNDLE_SIZE_WARNING_THRESHOLD_KB</a></li><li><a href="global.html#CONFIG_SCHEMA">CONFIG_SCHEMA</a></li><li><a href="global.html#CONFLICT_POLICIES">CONFLICT_POLICIES</a></li><li><a href="global.html#DEFAULT_ALLOWED_ATTRIBUTES">DEFAULT_ALLOWED_ATTRIBUTES</a></li><li><a href="global.html#DEFAULT_ALLOWED_TAGS">DEFAULT_ALLOWED_TAGS</a></li><li><a href="global.html#DIAGNOSTIC_CATALOGUE">DIAGNOSTIC_CATALOGUE</a></li><li><a href="global.html#FUNCTION_CONSTRUCTORS">FUNCTION_CONSTRUCTORS</a></li><li><a href="global.html#INSTANCE_API_KEYS">INSTANCE_API_KEYS</a></li><li><a href="global.html#INVALID_URL_PROTOCOL">INVALID_URL_PROTOCOL</a></li><li><a href="global.html#ISOLATION_VIOLATION_PATTERNS">ISOLATION_VIOLATION_PATTERNS</a></li><li><a href="global.html#IS_BRIDGE">IS_BRIDGE</a></li><li><a href="global.html#KNOWN_ELEMENTS">KNOWN_ELEMENTS</a></li><li><a href="global.html#LIVE_REGION_ID">LIVE_REGION_ID</a></li><li><a href="global.html#MAX_TRACE_BYTES">MAX_TRACE_BYTES</a></li><li><a href="global.html#NAMESPACE_GLOBAL">NAMESPACE_GLOBAL</a></li><li><a href="global.html#PROTECTED_PROTOTYPES">PROTECTED_PROTOTYPES</a></li><li><a href="global.html#PUBLIC_GLOBALS">PUBLIC_GLOBALS</a></li><li><a href="global.html#RESERVED_KEYS">RESERVED_KEYS</a></li><li><a href="global.html#RUNTIME_SPECIFIER">RUNTIME_SPECIFIER</a></li><li><a href="global.html#SET_NAME">SET_NAME</a></li><li><a href="global.html#STRIP_CONTENT_TAGS">STRIP_CONTENT_TAGS</a></li><li><a href="global.html#URL_ATTRIBUTES">URL_ATTRIBUTES</a></li><li><a href="global.html#VOID_ELEMENTS">VOID_ELEMENTS</a></li><li><a href="global.html#abortIfGeneratedPathExists">abortIfGeneratedPathExists</a></li><li><a href="global.html#actionLabel">actionLabel</a></li><li><a href="global.html#activeScope">activeScope</a></li><li><a href="global.html#activeWatcher">activeWatcher</a></li><li><a href="global.html#age">age</a></li><li><a href="global.html#analyzeBridge">analyzeBridge</a></li><li><a href="global.html#analyzeBridgeFile">analyzeBridgeFile</a></li><li><a href="global.html#analyzeStats">analyzeStats</a></li><li><a href="global.html#announce">announce</a></li><li><a href="global.html#applyCustomHeaders">applyCustomHeaders</a></li><li><a href="global.html#arrowParameters">arrowParameters</a></li><li><a href="global.html#assertNotFunctionConstructor">assertNotFunctionConstructor</a></li><li><a href="global.html#assertNotProtectedPrototype">assertNotProtectedPrototype</a></li><li><a href="global.html#assertSnapshot">assertSnapshot</a></li><li><a href="global.html#attachRequestLogger">attachRequestLogger</a></li><li><a href="global.html#belongsToComponent">belongsToComponent</a></li><li><a href="global.html#blankComments">blankComments</a></li><li><a href="global.html#blue">blue</a></li><li><a href="global.html#bold">bold</a></li><li><a href="global.html#bridge">bridge</a></li><li><a href="global.html#bridgeBindingName">bridgeBindingName</a></li><li><a href="global.html#bridgeNameFromFile">bridgeNameFromFile</a></li><li><a href="global.html#buildAstScope">buildAstScope</a></li><li><a href="global.html#buildAtomicSpec">buildAtomicSpec</a></li><li><a href="global.html#buildEventNode">buildEventNode</a></li><li><a href="global.html#buildModel">buildModel</a></li><li><a href="global.html#buildProject">buildProject</a></li><li><a href="global.html#byJobId">byJobId</a></li><li><a href="global.html#checkGitStatus">checkGitStatus</a></li><li><a href="global.html#checkProject">checkProject</a></li><li><a href="global.html#classTokensEqual">classTokensEqual</a></li><li><a href="global.html#cleanProject">cleanProject</a></li><li><a href="global.html#cleanupParentMap">cleanupParentMap</a></li><li><a href="global.html#clearCausationTrace">clearCausationTrace</a></li><li><a href="global.html#cloneInitial">cloneInitial</a></li><li><a href="global.html#collectImportBindings">collectImportBindings</a></li><li><a href="global.html#collectLoopBindings">collectLoopBindings</a></li><li><a href="global.html#collectSemantics">collectSemantics</a></li><li><a href="global.html#collectUnknownKeys">collectUnknownKeys</a></li><li><a href="global.html#compareVersions">compareVersions</a></li><li><a href="global.html#componentNameFromFile">componentNameFromFile</a></li><li><a href="global.html#composeBundleSourceMap">composeBundleSourceMap</a></li><li><a href="global.html#configCache">configCache</a></li><li><a href="global.html#consoleTransport">consoleTransport</a></li><li><a href="global.html#containsSlot">containsSlot</a></li><li><a href="global.html#createDeepMockProxy">createDeepMockProxy</a></li><li><a href="global.html#createInterpolationRegex">createInterpolationRegex</a></li><li><a href="global.html#createNavigationDelegate">createNavigationDelegate</a></li><li><a href="global.html#createRecursiveWatcherFallback">createRecursiveWatcherFallback</a></li><li><a href="global.html#createSeverityFormatter">createSeverityFormatter</a></li><li><a href="global.html#cyan">cyan</a></li><li><a href="global.html#deadlockHandlers">deadlockHandlers</a></li><li><a href="global.html#declarationCache">declarationCache</a></li><li><a href="global.html#declaredMembers">declaredMembers</a></li><li><a href="global.html#defaultFormatter">defaultFormatter</a></li><li><a href="global.html#defineBridgeName">defineBridgeName</a></li><li><a href="global.html#depMap">depMap</a></li><li><a href="global.html#describe">describe</a></li><li><a href="global.html#destroyBridge">destroyBridge</a></li><li><a href="global.html#destroyComponent">destroyComponent</a></li><li><a href="global.html#destroyGuard">destroyGuard</a></li><li><a href="global.html#destroyPage">destroyPage</a></li><li><a href="global.html#detectColorSupport">detectColorSupport</a></li><li><a href="global.html#dim">dim</a></li><li><a href="global.html#edgeLabel">edgeLabel</a></li><li><a href="global.html#encodeMapping">encodeMapping</a></li><li><a href="global.html#encodeVLQ">encodeVLQ</a></li><li><a href="global.html#escapeAttrValue">escapeAttrValue</a></li><li><a href="global.html#escapeTemplateMarkers">escapeTemplateMarkers</a></li><li><a href="global.html#escapeText">escapeText</a></li><li><a href="global.html#executionHistory">executionHistory</a></li><li><a href="global.html#explainDiagnostic">explainDiagnostic</a></li><li><a href="global.html#extractCycleChain">extractCycleChain</a></li><li><a href="global.html#extractEmittedEvents">extractEmittedEvents</a></li><li><a href="global.html#extractLintableTemplate">extractLintableTemplate</a></li><li><a href="global.html#extractRawTemplate">extractRawTemplate</a></li><li><a href="global.html#extractSubscriptions">extractSubscriptions</a></li><li><a href="global.html#fail">fail</a></li><li><a href="global.html#failProcess">failProcess</a></li><li><a href="global.html#findBridgeImports">findBridgeImports</a></li><li><a href="global.html#findComponentSource">findComponentSource</a></li><li><a href="global.html#findDefinitionBrace">findDefinitionBrace</a></li><li><a href="global.html#findInvalidComponentTags">findInvalidComponentTags</a></li><li><a href="global.html#findProjectRoot">findProjectRoot</a></li><li><a href="global.html#findRegisteredComponents">findRegisteredComponents</a></li><li><a href="global.html#fireEvent">fireEvent</a></li><li><a href="global.html#flushDepth">flushDepth</a></li><li><a href="global.html#flushJobs">flushJobs</a></li><li><a href="global.html#flushPromises">flushPromises</a></li><li><a href="global.html#formatBytes">formatBytes</a></li><li><a href="global.html#formatCodeFrame">formatCodeFrame</a></li><li><a href="global.html#formatContextTag">formatContextTag</a></li><li><a href="global.html#formatHtmlStringFallback">formatHtmlStringFallback</a></li><li><a href="global.html#formatMessage">formatMessage</a></li><li><a href="global.html#formatNode">formatNode</a></li><li><a href="global.html#formatRequestLog">formatRequestLog</a></li><li><a href="global.html#formatStatusCode">formatStatusCode</a></li><li><a href="global.html#formatValue">formatValue</a></li><li><a href="global.html#generateBridge">generateBridge</a></li><li><a href="global.html#generateComponent">generateComponent</a></li><li><a href="global.html#generateDiff">generateDiff</a></li><li><a href="global.html#generateGuard">generateGuard</a></li><li><a href="global.html#generatePage">generatePage</a></li><li><a href="global.html#generateTemplateSourceMap">generateTemplateSourceMap</a></li><li><a href="global.html#get">get</a></li><li><a href="global.html#getActiveCausationTrace">getActiveCausationTrace</a></li><li><a href="global.html#getAllFiles">getAllFiles</a></li><li><a href="global.html#getClosestKey">getClosestKey</a></li><li><a href="global.html#getComponentProfilingInfo">getComponentProfilingInfo</a></li><li><a href="global.html#getCustomVoidTags">getCustomVoidTags</a></li><li><a href="global.html#getDiagnostic">getDiagnostic</a></li><li><a href="global.html#getFieldName">getFieldName</a></li><li><a href="global.html#getHTML">getHTML</a></li><li><a href="global.html#getInitialHtml">getInitialHtml</a></li><li><a href="global.html#getInspectorData">getInspectorData</a></li><li><a href="global.html#getInspectorHtml">getInspectorHtml</a></li><li><a href="global.html#getLineAndColumn">getLineAndColumn</a></li><li><a href="global.html#getObsoleteSnapshots">getObsoleteSnapshots</a></li><li><a href="global.html#getOrCreateLiveRegion">getOrCreateLiveRegion</a></li><li><a href="global.html#getOwnPropertyDescriptor">getOwnPropertyDescriptor</a></li><li><a href="global.html#getPropertyPath">getPropertyPath</a></li><li><a href="global.html#getPrototypeOf">getPrototypeOf</a></li><li><a href="global.html#getSchedulerMaxFlushCount">getSchedulerMaxFlushCount</a></li><li><a href="global.html#getScope">getScope</a></li><li><a href="global.html#getSequence">getSequence</a></li><li><a href="global.html#getTimestamp">getTimestamp</a></li><li><a href="global.html#getTransitionDuration">getTransitionDuration</a></li><li><a href="global.html#gray">gray</a></li><li><a href="global.html#green">green</a></li><li><a href="global.html#handleDeadlock">handleDeadlock</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasDependentOnPath">hasDependentOnPath</a></li><li><a href="global.html#hasDirectivesHelper">hasDirectivesHelper</a></li><li><a href="global.html#html">html</a></li><li><a href="global.html#initInspector">initInspector</a></li><li><a href="global.html#initProject">initProject</a></li><li><a href="global.html#interpolateEnv">interpolateEnv</a></li><li><a href="global.html#isBooleanAttribute">isBooleanAttribute</a></li><li><a href="global.html#isBridge">isBridge</a></li><li><a href="global.html#isColorEnabled">isColorEnabled</a></li><li><a href="global.html#isDebugReactivityEnabled">isDebugReactivityEnabled</a></li><li><a href="global.html#isDeniedProjectPath">isDeniedProjectPath</a></li><li><a href="global.html#isInsideRoot">isInsideRoot</a></li><li><a href="global.html#isReactive">isReactive</a></li><li><a href="global.html#isReactiveTarget">isReactiveTarget</a></li><li><a href="global.html#isRestrictedGlobal">isRestrictedGlobal</a></li><li><a href="global.html#isSafeUrl">isSafeUrl</a></li><li><a href="global.html#isStaticNode">isStaticNode</a></li><li><a href="global.html#isUnused">isUnused</a></li><li><a href="global.html#jobExecutionCounts">jobExecutionCounts</a></li><li><a href="global.html#levenshtein">levenshtein</a></li><li><a href="global.html#listenWithPortFallback">listenWithPortFallback</a></li><li><a href="global.html#loadAvenxConfig">loadAvenxConfig</a></li><li><a href="global.html#loadConfig">loadConfig</a></li><li><a href="global.html#loadEnv">loadEnv</a></li><li><a href="global.html#loadSidecar">loadSidecar</a></li><li><a href="global.html#manageFocus">manageFocus</a></li><li><a href="global.html#markRaw">markRaw</a></li><li><a href="global.html#mask">mask</a></li><li><a href="global.html#maskSecret">maskSecret</a></li><li><a href="global.html#maxFlushCount">maxFlushCount</a></li><li><a href="global.html#memberBodySpan">memberBodySpan</a></li><li><a href="global.html#memberParams">memberParams</a></li><li><a href="global.html#mountTestComponent">mountTestComponent</a></li><li><a href="global.html#nextTick">nextTick</a></li><li><a href="global.html#normalizeCode">normalizeCode</a></li><li><a href="global.html#numericFlag">numericFlag</a></li><li><a href="global.html#onSchedulerDeadlock">onSchedulerDeadlock</a></li><li><a href="global.html#onScopeDispose">onScopeDispose</a></li><li><a href="global.html#openBrowser">openBrowser</a></li><li><a href="global.html#pad">pad</a></li><li><a href="global.html#parentMap">parentMap</a></li><li><a href="global.html#parseDiagnostic">parseDiagnostic</a></li><li><a href="global.html#parseEnv">parseEnv</a></li><li><a href="global.html#parseImports">parseImports</a></li><li><a href="global.html#parseMember">parseMember</a></li><li><a href="global.html#parseName">parseName</a></li><li><a href="global.html#parseObjectMembers">parseObjectMembers</a></li><li><a href="global.html#parseValidationRules">parseValidationRules</a></li><li><a href="global.html#parserInstance">parserInstance</a></li><li><a href="global.html#popWatcher">popWatcher</a></li><li><a href="global.html#positional">positional</a></li><li><a href="global.html#printCheck">printCheck</a></li><li><a href="global.html#printHelp">printHelp</a></li><li><a href="global.html#printNoTraces">printNoTraces</a></li><li><a href="global.html#printTree">printTree</a></li><li><a href="global.html#printUnresolved">printUnresolved</a></li><li><a href="global.html#processBindDirectives">processBindDirectives</a></li><li><a href="global.html#profile">profile</a></li><li><a href="global.html#promptQuestion">promptQuestion</a></li><li><a href="global.html#pushWatcher">pushWatcher</a></li><li><a href="global.html#queueFlush">queueFlush</a></li><li><a href="global.html#queueFlushCallback">queueFlushCallback</a></li><li><a href="global.html#queueJob">queueJob</a></li><li><a href="global.html#queued">queued</a></li><li><a href="global.html#readDeclarations">readDeclarations</a></li><li><a href="global.html#readEnvFileMeta">readEnvFileMeta</a></li><li><a href="global.html#readTemplate">readTemplate</a></li><li><a href="global.html#red">red</a></li><li><a href="global.html#registerInMainApp">registerInMainApp</a></li><li><a href="global.html#replaceEnvVariables">replaceEnvVariables</a></li><li><a href="global.html#reportAmbiguous">reportAmbiguous</a></li><li><a href="global.html#reportFatal">reportFatal</a></li><li><a href="global.html#reportRebuildFailure">reportRebuildFailure</a></li><li><a href="global.html#reportWarning">reportWarning</a></li><li><a href="global.html#resetScheduler">resetScheduler</a></li><li><a href="global.html#resolveBridgeSpecifier">resolveBridgeSpecifier</a></li><li><a href="global.html#resolveCallingTestFile">resolveCallingTestFile</a></li><li><a href="global.html#resolveComponentsDir">resolveComponentsDir</a></li><li><a href="global.html#resolveDoctorRoot">resolveDoctorRoot</a></li><li><a href="global.html#resolveMode">resolveMode</a></li><li><a href="global.html#resolvePathAlias">resolvePathAlias</a></li><li><a href="global.html#resolveRequestPath">resolveRequestPath</a></li><li><a href="global.html#resourceBodies">resourceBodies</a></li><li><a href="global.html#runAtlas">runAtlas</a></li><li><a href="global.html#runCheckPass">runCheckPass</a></li><li><a href="global.html#runDoctor">runDoctor</a></li><li><a href="global.html#runEnv">runEnv</a></li><li><a href="global.html#runHook">runHook</a></li><li><a href="global.html#runInScope">runInScope</a></li><li><a href="global.html#runInspect">runInspect</a></li><li><a href="global.html#runQuery">runQuery</a></li><li><a href="global.html#runStats">runStats</a></li><li><a href="global.html#runTrace">runTrace</a></li><li><a href="global.html#runWizard">runWizard</a></li><li><a href="global.html#sanitizeUrlsIn">sanitizeUrlsIn</a></li><li><a href="global.html#scanObjectLiteral">scanObjectLiteral</a></li><li><a href="global.html#scopeCustomProperties">scopeCustomProperties</a></li><li><a href="global.html#scopeSelectorList">scopeSelectorList</a></li><li><a href="global.html#serializeSafe">serializeSafe</a></li><li><a href="global.html#serializeSnapshot">serializeSnapshot</a></li><li><a href="global.html#serveProject">serveProject</a></li><li><a href="global.html#set">set</a></li><li><a href="global.html#setColorEnabled">setColorEnabled</a></li><li><a href="global.html#setDebugReactivity">setDebugReactivity</a></li><li><a href="global.html#setSchedulerMaxFlushCount">setSchedulerMaxFlushCount</a></li><li><a href="global.html#sharedParser">sharedParser</a></li><li><a href="global.html#shouldGenerateTest">shouldGenerateTest</a></li><li><a href="global.html#stripAnsi">stripAnsi</a></li><li><a href="global.html#stripCssComments">stripCssComments</a></li><li><a href="global.html#style">style</a></li><li><a href="global.html#styleMountManager">styleMountManager</a></li><li><a href="global.html#suggestCodes">suggestCodes</a></li><li><a href="global.html#suggestName">suggestName</a></li><li><a href="global.html#toPascalCase">toPascalCase</a></li><li><a href="global.html#toRaw">toRaw</a></li><li><a href="global.html#traceExport">traceExport</a></li><li><a href="global.html#traceList">traceList</a></li><li><a href="global.html#tracePrune">tracePrune</a></li><li><a href="global.html#traceView">traceView</a></li><li><a href="global.html#track">track</a></li><li><a href="global.html#transformDeepSelectors">transformDeepSelectors</a></li><li><a href="global.html#traverse">traverse</a></li><li><a href="global.html#trigger">trigger</a></li><li><a href="global.html#unescapeHtml">unescapeHtml</a></li><li><a href="global.html#unescapeTemplate">unescapeTemplate</a></li><li><a href="global.html#unescapeTemplateMarkers">unescapeTemplateMarkers</a></li><li><a href="global.html#unregisterFromMainApp">unregisterFromMainApp</a></li><li><a href="global.html#untracked">untracked</a></li><li><a href="global.html#unwrap">unwrap</a></li><li><a href="global.html#unwrapAtomic">unwrapAtomic</a></li><li><a href="global.html#updateValidationState">updateValidationState</a></li><li><a href="global.html#validateValue">validateValue</a></li><li><a href="global.html#wantsJson">wantsJson</a></li><li><a href="global.html#warnSanitized">warnSanitized</a></li><li><a href="global.html#warnSanitizedAttribute">warnSanitizedAttribute</a></li><li><a href="global.html#warnSanitizedTag">warnSanitizedTag</a></li><li><a href="global.html#watchDirectory">watchDirectory</a></li><li><a href="global.html#watchEffect">watchEffect</a></li><li><a href="global.html#watchProject">watchProject</a></li><li><a href="global.html#watcherStack">watcherStack</a></li><li><a href="global.html#wrapValue">wrapValue</a></li><li><a href="global.html#wrappedFunctionBodySpan">wrappedFunctionBodySpan</a></li><li><a href="global.html#yellow">yellow</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Wed Sep 16 2026 19:27:44 GMT+0000 (Coordinated Universal Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>