@scenetest/vite-plugin 0.13.0 → 0.15.0
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/dist/analyze-app.d.ts +2 -4
- package/dist/analyze-app.d.ts.map +1 -1
- package/dist/analyze-app.js +6 -83
- package/dist/analyze-app.js.map +1 -1
- package/dist/dashboard.d.ts +2 -8
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +1135 -25
- package/dist/dashboard.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +2 -0
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +54 -219
- package/dist/middleware.js.map +1 -1
- package/dist/strip.js +1 -1
- package/dist/strip.js.map +1 -1
- package/dist-app/assets/index-C_QY29vh.css +1 -0
- package/dist-app/assets/index-Dc2U6bWz.js +17 -0
- package/dist-app/index.html +22 -0
- package/package.json +15 -15
- package/dist/panels/observer/audio.d.ts +0 -81
- package/dist/panels/observer/audio.d.ts.map +0 -1
- package/dist/panels/observer/audio.js +0 -296
- package/dist/panels/observer/audio.js.map +0 -1
- package/dist/panels/observer/auto.d.ts +0 -10
- package/dist/panels/observer/auto.d.ts.map +0 -1
- package/dist/panels/observer/auto.js +0 -11
- package/dist/panels/observer/auto.js.map +0 -1
- package/dist/panels/observer/fs-viewer.d.ts +0 -20
- package/dist/panels/observer/fs-viewer.d.ts.map +0 -1
- package/dist/panels/observer/fs-viewer.js +0 -536
- package/dist/panels/observer/fs-viewer.js.map +0 -1
- package/dist/panels/observer/fullscreen.d.ts +0 -24
- package/dist/panels/observer/fullscreen.d.ts.map +0 -1
- package/dist/panels/observer/fullscreen.js +0 -701
- package/dist/panels/observer/fullscreen.js.map +0 -1
- package/dist/panels/observer/history.d.ts +0 -41
- package/dist/panels/observer/history.d.ts.map +0 -1
- package/dist/panels/observer/history.js +0 -307
- package/dist/panels/observer/history.js.map +0 -1
- package/dist/panels/observer/index.d.ts +0 -33
- package/dist/panels/observer/index.d.ts.map +0 -1
- package/dist/panels/observer/index.js +0 -128
- package/dist/panels/observer/index.js.map +0 -1
- package/dist/panels/observer/panel.d.ts +0 -12
- package/dist/panels/observer/panel.d.ts.map +0 -1
- package/dist/panels/observer/panel.js +0 -461
- package/dist/panels/observer/panel.js.map +0 -1
- package/dist/panels/observer/render.d.ts +0 -109
- package/dist/panels/observer/render.d.ts.map +0 -1
- package/dist/panels/observer/render.js +0 -760
- package/dist/panels/observer/render.js.map +0 -1
- package/dist/panels/observer/state.d.ts +0 -57
- package/dist/panels/observer/state.d.ts.map +0 -1
- package/dist/panels/observer/state.js +0 -187
- package/dist/panels/observer/state.js.map +0 -1
- package/dist/panels/observer/styles.d.ts +0 -6
- package/dist/panels/observer/styles.d.ts.map +0 -1
- package/dist/panels/observer/styles.js +0 -1706
- package/dist/panels/observer/styles.js.map +0 -1
- package/dist/panels/observer/types.d.ts +0 -102
- package/dist/panels/observer/types.d.ts.map +0 -1
- package/dist/panels/observer/types.js +0 -5
- package/dist/panels/observer/types.js.map +0 -1
- package/dist/panels/observer/utils.d.ts +0 -45
- package/dist/panels/observer/utils.d.ts.map +0 -1
- package/dist/panels/observer/utils.js +0 -101
- package/dist/panels/observer/utils.js.map +0 -1
- package/dist/panels/recorder/auto.d.ts +0 -10
- package/dist/panels/recorder/auto.d.ts.map +0 -1
- package/dist/panels/recorder/auto.js +0 -11
- package/dist/panels/recorder/auto.js.map +0 -1
- package/dist/panels/recorder/capture.d.ts +0 -18
- package/dist/panels/recorder/capture.d.ts.map +0 -1
- package/dist/panels/recorder/capture.js +0 -218
- package/dist/panels/recorder/capture.js.map +0 -1
- package/dist/panels/recorder/index.d.ts +0 -41
- package/dist/panels/recorder/index.d.ts.map +0 -1
- package/dist/panels/recorder/index.js +0 -208
- package/dist/panels/recorder/index.js.map +0 -1
- package/dist/panels/recorder/panel.d.ts +0 -55
- package/dist/panels/recorder/panel.d.ts.map +0 -1
- package/dist/panels/recorder/panel.js +0 -284
- package/dist/panels/recorder/panel.js.map +0 -1
- package/dist/panels/recorder/reverse-selector.d.ts +0 -31
- package/dist/panels/recorder/reverse-selector.d.ts.map +0 -1
- package/dist/panels/recorder/reverse-selector.js +0 -116
- package/dist/panels/recorder/reverse-selector.js.map +0 -1
- package/dist/panels/recorder/styles.d.ts +0 -5
- package/dist/panels/recorder/styles.d.ts.map +0 -1
- package/dist/panels/recorder/styles.js +0 -300
- package/dist/panels/recorder/styles.js.map +0 -1
- package/dist/panels/recorder/types.d.ts +0 -51
- package/dist/panels/recorder/types.d.ts.map +0 -1
- package/dist/panels/recorder/types.js +0 -15
- package/dist/panels/recorder/types.js.map +0 -1
package/dist/analyze-app.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Self-contained
|
|
3
|
-
* `/__scenetest/runner` (the analyze view). The middleware serves the
|
|
4
|
-
* same HTML at both paths and the client routes on `location.pathname`.
|
|
2
|
+
* Self-contained interactive analyze app served at `/__scenetest/`.
|
|
5
3
|
*
|
|
6
4
|
* Uses Preact + htm via a `<script type="importmap">` that points each
|
|
7
5
|
* bare specifier ("preact", "preact/hooks", "htm") at a middleware route
|
|
8
6
|
* (see `middleware.ts`, VENDOR_MODULES) which serves the matching ESM
|
|
9
7
|
* bundle out of the plugin's own node_modules. No build step, no CDN.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
9
|
+
* Two views over the same RunReport shape:
|
|
12
10
|
* - "Log" — filterable / groupable scene list with copy-failures
|
|
13
11
|
* and a spec-snippet panel for reproducing manually.
|
|
14
12
|
* - "Waterfall" — links out to /__scenetest/dashboard (existing page).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-app.d.ts","sourceRoot":"","sources":["../src/analyze-app.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"analyze-app.d.ts","sourceRoot":"","sources":["../src/analyze-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAuB/C"}
|
package/dist/analyze-app.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Self-contained
|
|
3
|
-
* `/__scenetest/runner` (the analyze view). The middleware serves the
|
|
4
|
-
* same HTML at both paths and the client routes on `location.pathname`.
|
|
2
|
+
* Self-contained interactive analyze app served at `/__scenetest/`.
|
|
5
3
|
*
|
|
6
4
|
* Uses Preact + htm via a `<script type="importmap">` that points each
|
|
7
5
|
* bare specifier ("preact", "preact/hooks", "htm") at a middleware route
|
|
8
6
|
* (see `middleware.ts`, VENDOR_MODULES) which serves the matching ESM
|
|
9
7
|
* bundle out of the plugin's own node_modules. No build step, no CDN.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
9
|
+
* Two views over the same RunReport shape:
|
|
12
10
|
* - "Log" — filterable / groupable scene list with copy-failures
|
|
13
11
|
* and a spec-snippet panel for reproducing manually.
|
|
14
12
|
* - "Waterfall" — links out to /__scenetest/dashboard (existing page).
|
|
@@ -158,16 +156,11 @@ const STYLES = `
|
|
|
158
156
|
letter-spacing: 0.04em;
|
|
159
157
|
}
|
|
160
158
|
.row {
|
|
161
|
-
display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto
|
|
159
|
+
display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto;
|
|
162
160
|
gap: 10px; align-items: center;
|
|
163
161
|
padding: 6px 14px; border-bottom: 1px solid rgba(46, 49, 64, 0.4);
|
|
164
162
|
cursor: pointer;
|
|
165
163
|
}
|
|
166
|
-
.row .row-team {
|
|
167
|
-
color: var(--blue); font-size: 11px; white-space: nowrap;
|
|
168
|
-
padding: 1px 6px; border: 1px solid var(--border); border-radius: 3px;
|
|
169
|
-
background: rgba(59, 130, 246, 0.08);
|
|
170
|
-
}
|
|
171
164
|
.row:hover { background: rgba(255, 255, 255, 0.02); }
|
|
172
165
|
.row.selected { background: rgba(59, 130, 246, 0.08); }
|
|
173
166
|
.row .icon { font-weight: 700; }
|
|
@@ -235,22 +228,6 @@ const STYLES = `
|
|
|
235
228
|
}
|
|
236
229
|
pre.snippet .row-line { padding: 0 8px; white-space: pre; }
|
|
237
230
|
pre.snippet .row-line.hl { background: rgba(239, 68, 68, 0.12); }
|
|
238
|
-
|
|
239
|
-
.index { padding: 48px 32px; max-width: 720px; margin: 0 auto; }
|
|
240
|
-
.index h1 {
|
|
241
|
-
font-size: 22px; font-weight: 600;
|
|
242
|
-
display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
|
|
243
|
-
}
|
|
244
|
-
.index .lede { color: var(--text2); font-size: 13px; margin-bottom: 32px; }
|
|
245
|
-
.index .cards { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
|
|
246
|
-
.index .card {
|
|
247
|
-
display: block; padding: 20px; border: 1px solid var(--border);
|
|
248
|
-
border-radius: 8px; background: var(--bg2); text-decoration: none;
|
|
249
|
-
color: var(--text); transition: border-color 0.15s, background 0.15s;
|
|
250
|
-
}
|
|
251
|
-
.index .card:hover { border-color: var(--text2); background: var(--bg3); }
|
|
252
|
-
.index .card .name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
|
|
253
|
-
.index .card .desc { font-size: 12px; color: var(--text2); line-height: 1.5; }
|
|
254
231
|
`;
|
|
255
232
|
// ─── Client (Preact + htm) ──────────────────────────────────────────
|
|
256
233
|
//
|
|
@@ -305,8 +282,7 @@ function applyEvent(state, ev) {
|
|
|
305
282
|
line: ev.line, status: 'running',
|
|
306
283
|
assertions: [], warnings: [], consoleErrors: [], timeline: [],
|
|
307
284
|
actors: Object.fromEntries((ev.actors || []).map(r => [r, { key: r }])),
|
|
308
|
-
team:
|
|
309
|
-
duration: 0, error: undefined,
|
|
285
|
+
team: {}, teamIndex: 0, duration: 0, error: undefined,
|
|
310
286
|
}
|
|
311
287
|
const sceneActions = new Map(state.sceneActions)
|
|
312
288
|
sceneActions.set(ev.name, [])
|
|
@@ -359,12 +335,7 @@ function applyEvent(state, ev) {
|
|
|
359
335
|
const idx = state.scenes.findIndex(s => s.name === ev.name && s.status === 'running')
|
|
360
336
|
if (idx < 0) return state
|
|
361
337
|
const scenes = state.scenes.slice()
|
|
362
|
-
scenes[idx] = {
|
|
363
|
-
...scenes[idx],
|
|
364
|
-
status: ev.status, duration: ev.duration, error: ev.error,
|
|
365
|
-
...(ev.team ? { team: ev.team } : {}),
|
|
366
|
-
...(ev.teamIndex != null ? { teamIndex: ev.teamIndex } : {}),
|
|
367
|
-
}
|
|
338
|
+
scenes[idx] = { ...scenes[idx], status: ev.status, duration: ev.duration, error: ev.error }
|
|
368
339
|
const summary = { ...state.summary }
|
|
369
340
|
if (ev.status === 'completed') summary.completed = (summary.completed || 0) + 1
|
|
370
341
|
else summary.failed = (summary.failed || 0) + 1
|
|
@@ -602,9 +573,6 @@ function ListPane({ scenes, filters, onFilters, selected, onSelect, sceneActions
|
|
|
602
573
|
>
|
|
603
574
|
<span class=\${'icon ' + s.status}>\${statusIcon(s.status)}</span>
|
|
604
575
|
<span class="name">\${s.name}</span>
|
|
605
|
-
<span class="row-team" title="Team running this scene">
|
|
606
|
-
\${(s.team && s.team.name) || ('team ' + s.teamIndex)}
|
|
607
|
-
</span>
|
|
608
576
|
<span class="meta">
|
|
609
577
|
\${(s.assertions || []).filter(a => !a.result).length > 0
|
|
610
578
|
? html\`<span class="icon failed">✗</span> \`
|
|
@@ -833,52 +801,7 @@ function formatFailureReport(scenes, runId, sceneActions) {
|
|
|
833
801
|
return header.join('\\n') + '\\n' + target.map(s => formatScene(s, sceneActions)).join('\\n\\n')
|
|
834
802
|
}
|
|
835
803
|
|
|
836
|
-
// ── Index page ────────────────────────────────────────────────────
|
|
837
|
-
function Index() {
|
|
838
|
-
return html\`
|
|
839
|
-
<div class="index">
|
|
840
|
-
<h1><span class="logo">🎬</span> Scenetest</h1>
|
|
841
|
-
<p class="lede">Pick a view.</p>
|
|
842
|
-
<div class="cards">
|
|
843
|
-
<a class="card" href="/__scenetest/runner" onClick=\${navigate}>
|
|
844
|
-
<div class="name">Scene runner →</div>
|
|
845
|
-
<div class="desc">Live and past runs: scene tree, status, failure log, spec snippets.</div>
|
|
846
|
-
</a>
|
|
847
|
-
<a class="card" href="/__scenetest/dashboard">
|
|
848
|
-
<div class="name">Assertions dashboard →</div>
|
|
849
|
-
<div class="desc">Waterfall view of inline check() / should() assertions across actors.</div>
|
|
850
|
-
</a>
|
|
851
|
-
</div>
|
|
852
|
-
</div>
|
|
853
|
-
\`
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// ── Router ────────────────────────────────────────────────────────
|
|
857
|
-
// Same HTML at /__scenetest and /__scenetest/runner; switch by pathname.
|
|
858
|
-
function navigate(e) {
|
|
859
|
-
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button) return
|
|
860
|
-
const href = e.currentTarget.getAttribute('href')
|
|
861
|
-
if (!href || !href.startsWith('/__scenetest')) return
|
|
862
|
-
if (href === '/__scenetest/dashboard') return
|
|
863
|
-
e.preventDefault()
|
|
864
|
-
history.pushState(null, '', href)
|
|
865
|
-
window.dispatchEvent(new PopStateEvent('popstate'))
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
function Root() {
|
|
869
|
-
const [path, setPath] = useState(location.pathname)
|
|
870
|
-
useEffect(() => {
|
|
871
|
-
const onPop = () => setPath(location.pathname)
|
|
872
|
-
window.addEventListener('popstate', onPop)
|
|
873
|
-
return () => window.removeEventListener('popstate', onPop)
|
|
874
|
-
}, [])
|
|
875
|
-
if (path === '/__scenetest/runner' || path === '/__scenetest/runner/') {
|
|
876
|
-
return html\`<\${App} />\`
|
|
877
|
-
}
|
|
878
|
-
return html\`<\${Index} />\`
|
|
879
|
-
}
|
|
880
|
-
|
|
881
804
|
// ── Bootstrap ─────────────────────────────────────────────────────
|
|
882
|
-
render(h(
|
|
805
|
+
render(h(App, {}), document.getElementById('root'))
|
|
883
806
|
`;
|
|
884
807
|
//# sourceMappingURL=analyze-app.js.map
|
package/dist/analyze-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-app.js","sourceRoot":"","sources":["../src/analyze-app.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"analyze-app.js","sourceRoot":"","sources":["../src/analyze-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;WAME,MAAM;;;;;;;;;;;;;0BAaS,aAAa;;QAE/B,CAAA;AACR,CAAC;AAED,uEAAuE;AAEvE,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLd,CAAA;AAED,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAE1E,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0jBrB,CAAA"}
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* The dashboard UI itself lives in `@scenetest/dashboard` as a mountable
|
|
5
|
-
* widget (`mountDashboard`), shared with scenetest-cloud. This page is only a
|
|
6
|
-
* host: an importmap that points the widget's bare imports at the plugin's
|
|
7
|
-
* disk-served ESM (see the `/__scenetest/widget/*` and `/__scenetest/vendor/*`
|
|
8
|
-
* middleware routes), a mount point, and a one-line bootstrap that wires the
|
|
9
|
-
* widget to the dev transport (fetch + SSE against this same middleware).
|
|
2
|
+
* Self-contained HTML dashboard page with swim-lane timeline.
|
|
3
|
+
* Connects to /__scenetest/events via SSE for real-time updates.
|
|
10
4
|
*/
|
|
11
5
|
export declare function generateDashboardHtml(): string;
|
|
12
6
|
//# sourceMappingURL=dashboard.d.ts.map
|
package/dist/dashboard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA4nC9C"}
|