This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Commit 19cd822
authored
Allow sources to be hidden in DevTools sources panel (#662)
Wrangler currently uses the non-standard `x_google_ignoreList` source
map field to hide middleware and injected code from the sources
panel. As part of the work to enable breakpoint debugging in
Wrangler, we now defer to Miniflare to serve local source maps. This
ensures source maps have the correct source paths on disk.
We'd like to keep this ignoring behaviour though. We could intercept
`Network.loadNetworkResource` and rewrite the source map in Wrangler,
but that feels wasteful, as we're already parsing/stringifying the
source map in Miniflare.
Instead, this change adds a `unsafeSourceMapIgnoreSourcePredicate`
option, that controls which sources, if any, are added to
`x_google_ignoreList`. This allows DevTools to fetch source maps
directly from Miniflare, without proxying through Wrangler.1 parent 0b7a470 commit 19cd822
File tree
4 files changed
+51
-6
lines changed- packages/miniflare
- src
- plugins
- core
- test/plugins/core/errors
4 files changed
+51
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
866 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
867 | 871 | | |
868 | 872 | | |
869 | 873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| |||
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
81 | | - | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
99 | 119 | | |
100 | 120 | | |
101 | 121 | | |
| |||
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
218 | 228 | | |
219 | 229 | | |
220 | 230 | | |
| |||
250 | 260 | | |
251 | 261 | | |
252 | 262 | | |
253 | | - | |
| 263 | + | |
254 | 264 | | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
258 | | - | |
259 | 268 | | |
260 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
261 | 279 | | |
262 | 280 | | |
263 | 281 | | |
0 commit comments