Commit 0dbb69a
committed
fix(compartment-mapper): handle async parsers
This updates the code and types to handle async parsers. Currently, there are no async parsers in
`@endo/compartment-mapper`, which is a reasonable excuse for why they were not working.
While this looks like a much was changed, it is mostly type-related. Some extra guards were added
and code split out within `map-parser.js` to support both the async and sync parser use-cases,
while maximizing logic reuse.1 parent 0fb7919 commit 0dbb69a
5 files changed
Lines changed: 262 additions & 244 deletions
File tree
- packages/compartment-mapper/src
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
324 | 333 | | |
325 | 334 | | |
326 | 335 | | |
327 | | - | |
328 | | - | |
| 336 | + | |
329 | 337 | | |
330 | 338 | | |
331 | 339 | | |
| |||
839 | 847 | | |
840 | 848 | | |
841 | 849 | | |
842 | | - | |
| 850 | + | |
843 | 851 | | |
844 | 852 | | |
845 | 853 | | |
846 | 854 | | |
847 | 855 | | |
848 | 856 | | |
| 857 | + | |
849 | 858 | | |
850 | 859 | | |
851 | 860 | | |
| |||
924 | 933 | | |
925 | 934 | | |
926 | 935 | | |
927 | | - | |
| 936 | + | |
928 | 937 | | |
929 | 938 | | |
930 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| |||
0 commit comments