@atolljs/devtools 0.1.7 → 0.1.8
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 +408 -71
- package/app/api.js +68 -0
- package/app/index.html +161 -2
- package/app/main.js +877 -127
- package/app/panels/actions.js +324 -0
- package/app/panels/audit-rules.js +728 -0
- package/app/panels/audits.js +438 -0
- package/app/panels/inspect-island.js +351 -0
- package/app/panels/memory-values.js +287 -0
- package/app/panels/performance.js +304 -0
- package/app/panels/reactivity.js +271 -0
- package/app/panels/recorder.js +344 -0
- package/app/panels/recording-format.js +166 -0
- package/app/panels/route.d.ts +44 -0
- package/app/panels/route.js +264 -0
- package/app/panels/shell.js +789 -0
- package/app/panels/toast.js +38 -0
- package/dist/bin.js +704 -5
- package/dist/chunk-57NGHQUL.js +344 -0
- package/dist/{chunk-4N3NBFL3.js → chunk-AGT6VNZI.js} +179 -217
- package/dist/chunk-WIL2P7HG.js +661 -0
- package/dist/client.d.ts +7 -0
- package/dist/control.d.ts +4 -0
- package/dist/index.js +2 -1
- package/dist/node.js +2 -1
- package/dist/nodeWs.d.ts +1 -0
- package/dist/otel.d.ts +35 -0
- package/dist/otel.js +87 -0
- package/dist/otelMap.d.ts +232 -0
- package/dist/otelTransport.d.ts +69 -0
- package/dist/overlay.d.ts +16 -2
- package/dist/probes.d.ts +7 -0
- package/dist/protocol.d.ts +46 -4
- package/dist/server.d.ts +19 -0
- package/dist/server.js +61 -3
- package/package.json +6 -2
- package/src/bin.ts +27 -2
- package/src/broadcast.ts +6 -0
- package/src/client.ts +26 -2
- package/src/control.ts +51 -0
- package/src/nodeWs.ts +7 -1
- package/src/otel.ts +140 -0
- package/src/otelMap.ts +661 -0
- package/src/otelTransport.ts +286 -0
- package/src/overlay.ts +153 -27
- package/src/probes.ts +155 -0
- package/src/protocol.ts +52 -4
- package/src/server.ts +83 -3
package/app/index.html
CHANGED
|
@@ -116,6 +116,19 @@
|
|
|
116
116
|
padding: 3px 10px; cursor: pointer; font: inherit; font-size: 11px;
|
|
117
117
|
}
|
|
118
118
|
.subnav button.on { color: #c9d1d9; border-color: #58a6ff; background: #161b22; }
|
|
119
|
+
/* panel plumbing (api.js): nav count badges, inspector action rows */
|
|
120
|
+
.nbadge:not(:empty) {
|
|
121
|
+
display: inline-block; margin-left: 6px; min-width: 16px; padding: 0 5px; border-radius: 8px;
|
|
122
|
+
background: #da3633; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
|
|
123
|
+
}
|
|
124
|
+
.actions:not(:empty) { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
|
|
125
|
+
.actions button, button.act {
|
|
126
|
+
background: #21262d; border: 1px solid #30363d; color: #c9d1d9; border-radius: 6px;
|
|
127
|
+
padding: 3px 10px; cursor: pointer; font: inherit; font-size: 11px;
|
|
128
|
+
}
|
|
129
|
+
.actions button:hover, button.act:hover { border-color: #58a6ff; }
|
|
130
|
+
.actions button.danger, button.act.danger { border-color: #f8514966; color: #ff7b72; }
|
|
131
|
+
.actions button:disabled, button.act:disabled { opacity: .45; cursor: not-allowed; }
|
|
119
132
|
.fwicon { width: 16px; height: 16px; vertical-align: middle; margin-top: -2px; }
|
|
120
133
|
.subview { display: none; } .subview.on { display: block; }
|
|
121
134
|
pre.body {
|
|
@@ -167,13 +180,123 @@
|
|
|
167
180
|
body.mini #pools th:first-child, body.mini #pools td:first-child { display: none; }
|
|
168
181
|
body.mini .grid2 { grid-template-columns: 1fr; gap: 8px; }
|
|
169
182
|
body.mini nav button { padding: 3px 8px; font-size: 11px; }
|
|
183
|
+
|
|
184
|
+
/* ── shell (panels/shell.js): header, responsive nav, palette, help,
|
|
185
|
+
intros, onboarding. Must hold from ~380px (flyout, DevTools panel)
|
|
186
|
+
to wide screens, and never assume a top-level window. ── */
|
|
187
|
+
header { align-items: center; min-width: 0; }
|
|
188
|
+
header h1, #conn { white-space: nowrap; }
|
|
189
|
+
#counts { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
190
|
+
#toolbar {
|
|
191
|
+
margin-left: auto; display: flex; gap: 6px; align-items: center;
|
|
192
|
+
flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin;
|
|
193
|
+
}
|
|
194
|
+
#toolbar > * { flex: none; white-space: nowrap; }
|
|
195
|
+
button.act.icon { padding: 2px 8px; min-width: 26px; }
|
|
196
|
+
#sideToggle { display: none; }
|
|
197
|
+
body:not(.local):not(.mini) #sideToggle { display: inline-block; }
|
|
198
|
+
body.noside main { grid-template-columns: 1fr; }
|
|
199
|
+
body.noside aside { display: none; }
|
|
200
|
+
.panels > nav { overflow: hidden; flex-wrap: nowrap; }
|
|
201
|
+
.panels > nav > button { flex: none; white-space: nowrap; }
|
|
202
|
+
.panels > nav > button.sh-ovf { display: none; }
|
|
203
|
+
.panels > nav > .sh-more { margin-left: auto; }
|
|
204
|
+
.subnav { overflow-x: auto; scrollbar-width: thin; }
|
|
205
|
+
.subnav button { flex: none; white-space: nowrap; }
|
|
206
|
+
.sh-tscroll { overflow-x: auto; max-width: 100%; }
|
|
207
|
+
.sh-menu {
|
|
208
|
+
position: fixed; z-index: 30; min-width: 170px; max-height: 70vh; overflow-y: auto;
|
|
209
|
+
background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px #0009;
|
|
210
|
+
}
|
|
211
|
+
.sh-menu button {
|
|
212
|
+
display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
|
|
213
|
+
background: none; border: 0; color: #c9d1d9; font: inherit; font-size: 12px; text-align: left;
|
|
214
|
+
padding: 5px 8px; border-radius: 5px; cursor: pointer;
|
|
215
|
+
}
|
|
216
|
+
.sh-menu button:hover, .sh-menu button:focus-visible { background: #21262d; outline: none; text-decoration: none; }
|
|
217
|
+
.sh-menu button.on { color: #58a6ff; }
|
|
218
|
+
.sh-modal {
|
|
219
|
+
position: fixed; inset: 0; z-index: 40; background: #01040999;
|
|
220
|
+
display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px;
|
|
221
|
+
}
|
|
222
|
+
.sh-modal[hidden] { display: none; }
|
|
223
|
+
body.mini .sh-modal { padding-top: 10px; }
|
|
224
|
+
.sh-card {
|
|
225
|
+
width: min(600px, 100%); max-height: 100%; display: flex; flex-direction: column;
|
|
226
|
+
background: #0d1117; border: 1px solid #30363d; border-radius: 10px; box-shadow: 0 16px 48px #000c; overflow: hidden;
|
|
227
|
+
}
|
|
228
|
+
.sh-card.wide { width: min(880px, 100%); }
|
|
229
|
+
.sh-card > input {
|
|
230
|
+
width: 100%; background: #010409; border: 0; border-bottom: 1px solid #21262d; color: #c9d1d9;
|
|
231
|
+
font: inherit; font-size: 14px; padding: 10px 12px; outline: none;
|
|
232
|
+
}
|
|
233
|
+
.sh-list { overflow-y: auto; padding: 2px 0 6px; min-height: 0; }
|
|
234
|
+
.sh-grp { padding: 7px 12px 2px; font-size: 10px; color: #8b949e; text-transform: uppercase; letter-spacing: .06em; }
|
|
235
|
+
.sh-item { display: flex; align-items: center; gap: 10px; padding: 5px 12px; cursor: pointer; min-width: 0; }
|
|
236
|
+
.sh-item .t { flex: none; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
237
|
+
.sh-item .h { flex: 1; min-width: 0; color: #8b949e; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
238
|
+
.sh-item mark { background: none; color: #58a6ff; font-weight: 600; }
|
|
239
|
+
.sh-item.on { background: #1f6feb33; box-shadow: inset 2px 0 #58a6ff; }
|
|
240
|
+
.sh-item kbd { flex: none; }
|
|
241
|
+
.sh-none { padding: 14px 12px; color: #8b949e; }
|
|
242
|
+
.sh-foot {
|
|
243
|
+
display: flex; gap: 12px; flex-wrap: wrap; padding: 6px 12px; border-top: 1px solid #21262d;
|
|
244
|
+
color: #8b949e; font-size: 11px;
|
|
245
|
+
}
|
|
246
|
+
kbd {
|
|
247
|
+
display: inline-block; min-width: 18px; padding: 0 5px; border: 1px solid #30363d; border-bottom-width: 2px;
|
|
248
|
+
border-radius: 4px; background: #161b22; color: #c9d1d9; font: 10px/16px ui-monospace, monospace; text-align: center;
|
|
249
|
+
}
|
|
250
|
+
.sh-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #21262d; font-weight: 600; }
|
|
251
|
+
.sh-head .sh-x { margin-left: auto; }
|
|
252
|
+
.sh-help {
|
|
253
|
+
overflow-y: auto; padding: 0 14px 14px; display: grid;
|
|
254
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 22px;
|
|
255
|
+
}
|
|
256
|
+
.sh-help h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8b949e; margin: 12px 0 6px; font-weight: normal; }
|
|
257
|
+
.sh-help td { border: 0; padding: 2px 8px 2px 0; vertical-align: top; font-size: 12px; }
|
|
258
|
+
.sh-help td:first-child { white-space: nowrap; width: 1%; }
|
|
259
|
+
.sh-help .about { color: #8b949e; font-size: 11px; }
|
|
260
|
+
.sh-intro, .sh-wait {
|
|
261
|
+
display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 5px 10px;
|
|
262
|
+
border: 1px solid #1f6feb44; border-radius: 6px; background: #0d1d33; color: #9fb4cc; font-size: 11px;
|
|
263
|
+
}
|
|
264
|
+
.sh-wait { border-color: #d2992255; background: #241c0b; color: #d8c08a; }
|
|
265
|
+
.sh-intro > span, .sh-wait > span { flex: 1; min-width: 0; }
|
|
266
|
+
.sh-intro code, .sh-wait code { color: #e6edf3; }
|
|
267
|
+
body.mini .sh-intro, body.mini .sh-wait { margin-bottom: 6px; padding: 4px 8px; }
|
|
268
|
+
.sh-x {
|
|
269
|
+
background: none; border: 0; color: #8b949e; cursor: pointer; font: inherit; font-size: 14px;
|
|
270
|
+
line-height: 1; padding: 0 3px; border-radius: 4px;
|
|
271
|
+
}
|
|
272
|
+
.sh-x:hover, .sh-x:focus-visible { color: #c9d1d9; background: #21262d; text-decoration: none; }
|
|
273
|
+
.sh-tip {
|
|
274
|
+
position: fixed; z-index: 35; left: 50%; bottom: 14px; transform: translateX(-50%);
|
|
275
|
+
width: min(480px, calc(100% - 20px)); display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap;
|
|
276
|
+
background: #161b22; border: 1px solid #58a6ff; border-radius: 8px; padding: 8px 12px;
|
|
277
|
+
box-shadow: 0 8px 28px #000a; font-size: 12px;
|
|
278
|
+
}
|
|
279
|
+
.sh-tip > span { flex: 1 1 220px; }
|
|
280
|
+
@media (max-width: 760px) {
|
|
281
|
+
main { grid-template-columns: 1fr; }
|
|
282
|
+
aside { border-right: 0; border-bottom: 1px solid #21262d; max-height: 34vh; overflow-y: auto; }
|
|
283
|
+
header { gap: 8px; padding: 6px 10px; }
|
|
284
|
+
.panels { padding: 8px 10px 20px; }
|
|
285
|
+
}
|
|
286
|
+
@media (max-width: 480px) {
|
|
287
|
+
header h1, #counts { display: none; }
|
|
288
|
+
.panels > nav button { padding: 5px 9px; }
|
|
289
|
+
.kpis { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
|
|
290
|
+
}
|
|
170
291
|
</style>
|
|
171
292
|
</head>
|
|
172
293
|
<body>
|
|
173
294
|
<header>
|
|
295
|
+
<button id="sideToggle" class="act icon" type="button" title="Toggle the sessions sidebar" aria-label="Toggle the sessions sidebar" aria-controls="sessions" aria-expanded="true">☰</button>
|
|
174
296
|
<h1>atoll devtools</h1>
|
|
175
297
|
<span id="conn" class="off">connecting…</span>
|
|
176
298
|
<span class="muted" id="counts"></span>
|
|
299
|
+
<div id="toolbar"></div>
|
|
177
300
|
</header>
|
|
178
301
|
<main>
|
|
179
302
|
<aside>
|
|
@@ -206,7 +329,8 @@
|
|
|
206
329
|
<div class="grid2" style="margin-top:14px">
|
|
207
330
|
<div>
|
|
208
331
|
<h2>Task throughput <span class="muted">/s, last 60s</span></h2>
|
|
209
|
-
<
|
|
332
|
+
<div class="muted" id="tput-stats" style="font-size:12px;margin:-4px 0 6px"></div>
|
|
333
|
+
<canvas id="tput" width="560" height="110" style="width:100%"></canvas>
|
|
210
334
|
</div>
|
|
211
335
|
<div>
|
|
212
336
|
<h2>Attention needed</h2>
|
|
@@ -234,6 +358,7 @@
|
|
|
234
358
|
</div>
|
|
235
359
|
<div class="subview" id="tv-worker">
|
|
236
360
|
<h2 id="wkTitle">Worker inspector</h2>
|
|
361
|
+
<div class="actions" id="wkActions"></div>
|
|
237
362
|
<div class="kpis" id="wkKpis"></div>
|
|
238
363
|
<h2 style="margin-top:14px">Task lane <span class="muted" id="wkrange"></span></h2>
|
|
239
364
|
<canvas id="wklane" style="width:100%;height:120px;display:block;border:1px solid #21262d;border-radius:8px;background:#010409;cursor:crosshair"></canvas>
|
|
@@ -258,7 +383,9 @@
|
|
|
258
383
|
</div>
|
|
259
384
|
<div class="subview" id="tv-island">
|
|
260
385
|
<h2 id="inspTitle">Island inspector</h2>
|
|
386
|
+
<div class="actions" id="inspActions"></div>
|
|
261
387
|
<div class="kpis" id="inspKpis"></div>
|
|
388
|
+
<div id="inspExtra"></div>
|
|
262
389
|
<div class="grid2" style="margin-top:14px">
|
|
263
390
|
<div>
|
|
264
391
|
<h2>Op traffic <span class="muted">— batch size over time, colored by call</span></h2>
|
|
@@ -378,7 +505,39 @@
|
|
|
378
505
|
</section>
|
|
379
506
|
|
|
380
507
|
<section class="view" id="view-log">
|
|
381
|
-
<
|
|
508
|
+
<style>
|
|
509
|
+
#view-log .logbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
|
|
510
|
+
#view-log .logbar input, #view-log .logbar select {
|
|
511
|
+
background: #0d1117; border: 1px solid #30363d; color: #c9d1d9; border-radius: 6px;
|
|
512
|
+
padding: 3px 8px; font: inherit; font-size: 11px;
|
|
513
|
+
}
|
|
514
|
+
#view-log .logbar input { width: 220px; }
|
|
515
|
+
#view-log .logbar button.on { border-color: #d29922; color: #d29922; }
|
|
516
|
+
#logchips { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; }
|
|
517
|
+
#logchips button {
|
|
518
|
+
background: none; border: 1px solid #21262d; color: #484f58; border-radius: 10px;
|
|
519
|
+
padding: 1px 8px; cursor: pointer; font: inherit; font-size: 10px;
|
|
520
|
+
}
|
|
521
|
+
#logchips button.on { color: #c9d1d9; border-color: #30363d; background: #161b22; }
|
|
522
|
+
#logchips button i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
|
|
523
|
+
#logchips button.sep { border-style: dashed; }
|
|
524
|
+
#log > div { cursor: pointer; }
|
|
525
|
+
#log > div.open { white-space: normal; }
|
|
526
|
+
#log > div > pre { margin: 4px 0 6px; cursor: text; }
|
|
527
|
+
#log .ll-trace { color: #6e7681; } #log .ll-debug { color: #8b949e; }
|
|
528
|
+
#log .ll-info b { color: #58a6ff; } #log .ll-warn { color: #d29922; } #log .ll-error { color: #f85149; }
|
|
529
|
+
#log .logx { color: #58a6ff; font-size: 10px; }
|
|
530
|
+
</style>
|
|
531
|
+
<div class="logbar">
|
|
532
|
+
<input id="logq" type="search" placeholder="filter text (type, scope, message, payload)…">
|
|
533
|
+
<select id="logsess" style="display:none"><option value="">all sessions</option></select>
|
|
534
|
+
<button class="act" id="logpause" title="stop appending; incoming lines are held until resume">pause</button>
|
|
535
|
+
<button class="act" id="logclear">clear</button>
|
|
536
|
+
<span class="muted" id="logstat"></span>
|
|
537
|
+
</div>
|
|
538
|
+
<div id="logchips" title="click: toggle · shift/alt-click: solo">
|
|
539
|
+
<button class="sep" data-all="1">all</button><button class="sep" data-all="0">none</button>
|
|
540
|
+
</div>
|
|
382
541
|
<div id="log"></div>
|
|
383
542
|
</section>
|
|
384
543
|
</div>
|