@testivai/witness 1.0.1 → 1.0.3
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 +44 -13
- package/dist/baselines/index.d.ts +6 -0
- package/dist/baselines/index.d.ts.map +1 -0
- package/dist/baselines/index.js +9 -0
- package/dist/baselines/index.js.map +1 -0
- package/dist/baselines/store.d.ts +100 -0
- package/dist/baselines/store.d.ts.map +1 -0
- package/dist/baselines/store.js +298 -0
- package/dist/baselines/store.js.map +1 -0
- package/dist/bin/testivai.js +2 -0
- package/dist/bin/testivai.js.map +1 -1
- package/dist/browser/binding.d.ts.map +1 -1
- package/dist/browser/binding.js +173 -42
- package/dist/browser/binding.js.map +1 -1
- package/dist/browser/capture.d.ts.map +1 -1
- package/dist/browser/capture.js +7 -4
- package/dist/browser/capture.js.map +1 -1
- package/dist/commands/approve.d.ts +3 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +94 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +53 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +98 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +14 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/local-config.d.ts +54 -0
- package/dist/config/local-config.d.ts.map +1 -0
- package/dist/config/local-config.js +130 -0
- package/dist/config/local-config.js.map +1 -0
- package/dist/diff/diff.d.ts +27 -0
- package/dist/diff/diff.d.ts.map +1 -0
- package/dist/diff/diff.js +216 -0
- package/dist/diff/diff.js.map +1 -0
- package/dist/diff/dom-diff.d.ts +85 -0
- package/dist/diff/dom-diff.d.ts.map +1 -0
- package/dist/diff/dom-diff.js +291 -0
- package/dist/diff/dom-diff.js.map +1 -0
- package/dist/diff/ignore.d.ts +22 -0
- package/dist/diff/ignore.d.ts.map +1 -0
- package/dist/diff/ignore.js +43 -0
- package/dist/diff/ignore.js.map +1 -0
- package/dist/diff/index.d.ts +18 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +25 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/minimap.d.ts +23 -0
- package/dist/diff/minimap.d.ts.map +1 -0
- package/dist/diff/minimap.js +43 -0
- package/dist/diff/minimap.js.map +1 -0
- package/dist/diff/regions.d.ts +23 -0
- package/dist/diff/regions.d.ts.map +1 -0
- package/dist/diff/regions.js +129 -0
- package/dist/diff/regions.js.map +1 -0
- package/dist/diff/resize.d.ts +27 -0
- package/dist/diff/resize.d.ts.map +1 -0
- package/dist/diff/resize.js +82 -0
- package/dist/diff/resize.js.map +1 -0
- package/dist/diff/types.d.ts +79 -0
- package/dist/diff/types.d.ts.map +1 -0
- package/dist/diff/types.js +10 -0
- package/dist/diff/types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/dist/report/compare.d.ts +18 -0
- package/dist/report/compare.d.ts.map +1 -0
- package/dist/report/compare.js +193 -0
- package/dist/report/compare.js.map +1 -0
- package/dist/report/generator.d.ts +31 -0
- package/dist/report/generator.d.ts.map +1 -0
- package/dist/report/generator.js +123 -0
- package/dist/report/generator.js.map +1 -0
- package/dist/report/index.d.ts +10 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +13 -0
- package/dist/report/index.js.map +1 -0
- package/dist/report/results.d.ts +56 -0
- package/dist/report/results.d.ts.map +1 -0
- package/dist/report/results.js +8 -0
- package/dist/report/results.js.map +1 -0
- package/dist/report/template.d.ts +14 -0
- package/dist/report/template.d.ts.map +1 -0
- package/dist/report/template.js +275 -0
- package/dist/report/template.js.map +1 -0
- package/package.json +58 -15
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TestivAI Report — HTML Template
|
|
4
|
+
*
|
|
5
|
+
* Single-file HTML with inlined CSS/JS.
|
|
6
|
+
* Dark navy sidebar, cyan accents, summary cards,
|
|
7
|
+
* Changed → New → Passed sections, 3-column diff view,
|
|
8
|
+
* approve command copy button, cloud upgrade CTA, image zoom overlay.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.renderHtml = renderHtml;
|
|
12
|
+
/**
|
|
13
|
+
* Render a standalone HTML report from report data.
|
|
14
|
+
*/
|
|
15
|
+
function renderHtml(data) {
|
|
16
|
+
const { summary, snapshots, version, timestamp } = data;
|
|
17
|
+
const changed = snapshots.filter((s) => s.status === 'changed');
|
|
18
|
+
const newSnapshots = snapshots.filter((s) => s.status === 'new');
|
|
19
|
+
const passed = snapshots.filter((s) => s.status === 'passed');
|
|
20
|
+
return `<!DOCTYPE html>
|
|
21
|
+
<html lang="en">
|
|
22
|
+
<head>
|
|
23
|
+
<meta charset="UTF-8">
|
|
24
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
25
|
+
<title>TestivAI Visual Report</title>
|
|
26
|
+
<style>
|
|
27
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
28
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0d1117; color: #e6edf3; display: flex; min-height: 100vh; }
|
|
29
|
+
|
|
30
|
+
/* Sidebar */
|
|
31
|
+
.sidebar { width: 260px; background: #08111f; padding: 24px 16px; flex-shrink: 0; border-right: 1px solid #21262d; position: fixed; height: 100vh; overflow-y: auto; }
|
|
32
|
+
.sidebar h1 { font-size: 18px; color: #00d4ff; margin-bottom: 4px; }
|
|
33
|
+
.sidebar .version { font-size: 12px; color: #8b949e; margin-bottom: 24px; }
|
|
34
|
+
.sidebar .timestamp { font-size: 11px; color: #8b949e; margin-bottom: 24px; }
|
|
35
|
+
|
|
36
|
+
/* Summary cards */
|
|
37
|
+
.summary-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
|
|
38
|
+
.card { padding: 12px; border-radius: 8px; background: #161b22; border: 1px solid #21262d; }
|
|
39
|
+
.card .label { font-size: 11px; text-transform: uppercase; color: #8b949e; letter-spacing: 0.5px; }
|
|
40
|
+
.card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
|
|
41
|
+
.card.total .value { color: #e6edf3; }
|
|
42
|
+
.card.changed .value { color: #f85149; }
|
|
43
|
+
.card.new .value { color: #f0883e; }
|
|
44
|
+
.card.passed .value { color: #3fb950; }
|
|
45
|
+
|
|
46
|
+
/* Nav */
|
|
47
|
+
.nav { list-style: none; margin-bottom: 24px; }
|
|
48
|
+
.nav li { margin-bottom: 2px; }
|
|
49
|
+
.nav a { display: block; padding: 8px 12px; border-radius: 6px; color: #8b949e; text-decoration: none; font-size: 13px; transition: all 0.15s; }
|
|
50
|
+
.nav a:hover { background: #161b22; color: #e6edf3; }
|
|
51
|
+
.nav a .count { float: right; background: #21262d; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
|
|
52
|
+
|
|
53
|
+
/* CTA */
|
|
54
|
+
.cta { background: linear-gradient(135deg, #0d419d 0%, #1158d9 100%); padding: 16px; border-radius: 8px; margin-top: auto; }
|
|
55
|
+
.cta h3 { font-size: 13px; color: #fff; margin-bottom: 6px; }
|
|
56
|
+
.cta p { font-size: 11px; color: #a5d6ff; line-height: 1.5; }
|
|
57
|
+
.cta a { display: inline-block; margin-top: 8px; padding: 6px 14px; background: #00d4ff; color: #08111f; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 600; }
|
|
58
|
+
|
|
59
|
+
/* Main content */
|
|
60
|
+
.main { margin-left: 260px; flex: 1; padding: 32px; }
|
|
61
|
+
.section { margin-bottom: 48px; }
|
|
62
|
+
.section-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #21262d; }
|
|
63
|
+
.section-title.changed { color: #f85149; }
|
|
64
|
+
.section-title.new { color: #f0883e; }
|
|
65
|
+
.section-title.passed { color: #3fb950; }
|
|
66
|
+
|
|
67
|
+
/* Snapshot card */
|
|
68
|
+
.snapshot { background: #161b22; border: 1px solid #21262d; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
|
|
69
|
+
.snapshot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
|
|
70
|
+
.snapshot-name { font-size: 16px; font-weight: 600; }
|
|
71
|
+
.snapshot-badge { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
|
|
72
|
+
.badge-changed { background: #f8514922; color: #f85149; }
|
|
73
|
+
.badge-new { background: #f0883e22; color: #f0883e; }
|
|
74
|
+
.badge-passed { background: #3fb95022; color: #3fb950; }
|
|
75
|
+
.snapshot-stats { font-size: 12px; color: #8b949e; margin-bottom: 16px; }
|
|
76
|
+
|
|
77
|
+
/* DOM noise hint */
|
|
78
|
+
.dom-hint { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
|
|
79
|
+
.dom-hint.noise { background: #1f6feb1a; border: 1px solid #1f6feb44; color: #79c0ff; }
|
|
80
|
+
.dom-hint.changed { background: #6e768166; border: 1px solid #8b949e44; color: #c9d1d9; }
|
|
81
|
+
.dom-hint .label { font-weight: 600; }
|
|
82
|
+
.dom-hint .summary { color: inherit; opacity: 0.85; }
|
|
83
|
+
|
|
84
|
+
/* 3-column diff view */
|
|
85
|
+
.diff-view { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
|
|
86
|
+
.diff-view.two-col { grid-template-columns: 1fr 1fr; }
|
|
87
|
+
.diff-view.one-col { grid-template-columns: 1fr; }
|
|
88
|
+
.diff-col { text-align: center; }
|
|
89
|
+
.diff-col label { display: block; font-size: 11px; color: #8b949e; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
|
|
90
|
+
.diff-col img { max-width: 100%; border-radius: 6px; border: 1px solid #21262d; cursor: zoom-in; transition: transform 0.2s; }
|
|
91
|
+
.diff-col img:hover { transform: scale(1.02); }
|
|
92
|
+
|
|
93
|
+
/* Approve command */
|
|
94
|
+
.approve-cmd { margin-top: 16px; background: #0d1117; border: 1px solid #21262d; border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
|
|
95
|
+
.approve-cmd code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; color: #00d4ff; }
|
|
96
|
+
.approve-cmd button { background: #21262d; border: 1px solid #30363d; color: #e6edf3; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: all 0.15s; }
|
|
97
|
+
.approve-cmd button:hover { background: #30363d; }
|
|
98
|
+
.approve-cmd button.copied { background: #3fb950; color: #0d1117; }
|
|
99
|
+
|
|
100
|
+
/* Zoom overlay */
|
|
101
|
+
.zoom-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 100; justify-content: center; align-items: center; cursor: zoom-out; }
|
|
102
|
+
.zoom-overlay.active { display: flex; }
|
|
103
|
+
.zoom-overlay img { max-width: 95%; max-height: 95%; border-radius: 8px; }
|
|
104
|
+
|
|
105
|
+
/* Empty state */
|
|
106
|
+
.empty { text-align: center; padding: 48px; color: #8b949e; }
|
|
107
|
+
.empty .icon { font-size: 48px; margin-bottom: 16px; }
|
|
108
|
+
</style>
|
|
109
|
+
</head>
|
|
110
|
+
<body>
|
|
111
|
+
<aside class="sidebar">
|
|
112
|
+
<h1>TestivAI</h1>
|
|
113
|
+
<div class="version">Visual Report v${escapeHtml(version)}</div>
|
|
114
|
+
<div class="timestamp">${escapeHtml(new Date(timestamp).toLocaleString())}</div>
|
|
115
|
+
|
|
116
|
+
<div class="summary-cards">
|
|
117
|
+
<div class="card total"><div class="label">Total</div><div class="value">${summary.total}</div></div>
|
|
118
|
+
<div class="card changed"><div class="label">Changed</div><div class="value">${summary.changed}</div></div>
|
|
119
|
+
<div class="card new"><div class="label">New</div><div class="value">${summary.newSnapshots}</div></div>
|
|
120
|
+
<div class="card passed"><div class="label">Passed</div><div class="value">${summary.passed}</div></div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<ul class="nav">
|
|
124
|
+
${summary.changed > 0 ? `<li><a href="#changed">Changed <span class="count">${summary.changed}</span></a></li>` : ''}
|
|
125
|
+
${summary.newSnapshots > 0 ? `<li><a href="#new">New <span class="count">${summary.newSnapshots}</span></a></li>` : ''}
|
|
126
|
+
${summary.passed > 0 ? `<li><a href="#passed">Passed <span class="count">${summary.passed}</span></a></li>` : ''}
|
|
127
|
+
</ul>
|
|
128
|
+
|
|
129
|
+
<div class="cta">
|
|
130
|
+
<h3>Need AI-powered analysis?</h3>
|
|
131
|
+
<p>TestivAI Cloud adds smart matching, AI verdicts, and team collaboration.</p>
|
|
132
|
+
<a href="https://testiv.ai" target="_blank">Learn More</a>
|
|
133
|
+
</div>
|
|
134
|
+
</aside>
|
|
135
|
+
|
|
136
|
+
<main class="main">
|
|
137
|
+
${summary.total === 0 ? `
|
|
138
|
+
<div class="empty">
|
|
139
|
+
<div class="icon">📸</div>
|
|
140
|
+
<h2>No snapshots found</h2>
|
|
141
|
+
<p>Run your tests to generate visual snapshots.</p>
|
|
142
|
+
</div>` : ''}
|
|
143
|
+
|
|
144
|
+
${changed.length > 0 ? `
|
|
145
|
+
<section class="section" id="changed">
|
|
146
|
+
<h2 class="section-title changed">Changed (${changed.length})</h2>
|
|
147
|
+
${changed.map((s) => renderSnapshot(s)).join('\n')}
|
|
148
|
+
</section>` : ''}
|
|
149
|
+
|
|
150
|
+
${newSnapshots.length > 0 ? `
|
|
151
|
+
<section class="section" id="new">
|
|
152
|
+
<h2 class="section-title new">New (${newSnapshots.length})</h2>
|
|
153
|
+
${newSnapshots.map((s) => renderSnapshot(s)).join('\n')}
|
|
154
|
+
</section>` : ''}
|
|
155
|
+
|
|
156
|
+
${passed.length > 0 ? `
|
|
157
|
+
<section class="section" id="passed">
|
|
158
|
+
<h2 class="section-title passed">Passed (${passed.length})</h2>
|
|
159
|
+
${passed.map((s) => renderSnapshot(s)).join('\n')}
|
|
160
|
+
</section>` : ''}
|
|
161
|
+
</main>
|
|
162
|
+
|
|
163
|
+
<div class="zoom-overlay" id="zoomOverlay">
|
|
164
|
+
<img id="zoomImage" src="" alt="Zoomed">
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<script>
|
|
168
|
+
// Image zoom
|
|
169
|
+
document.querySelectorAll('.diff-col img').forEach(img => {
|
|
170
|
+
img.addEventListener('click', () => {
|
|
171
|
+
document.getElementById('zoomImage').src = img.src;
|
|
172
|
+
document.getElementById('zoomOverlay').classList.add('active');
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
document.getElementById('zoomOverlay').addEventListener('click', () => {
|
|
176
|
+
document.getElementById('zoomOverlay').classList.remove('active');
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// Copy approve command
|
|
180
|
+
document.querySelectorAll('.copy-btn').forEach(btn => {
|
|
181
|
+
btn.addEventListener('click', () => {
|
|
182
|
+
const cmd = btn.dataset.cmd;
|
|
183
|
+
navigator.clipboard.writeText(cmd).then(() => {
|
|
184
|
+
btn.textContent = 'Copied!';
|
|
185
|
+
btn.classList.add('copied');
|
|
186
|
+
setTimeout(() => {
|
|
187
|
+
btn.textContent = 'Copy';
|
|
188
|
+
btn.classList.remove('copied');
|
|
189
|
+
}, 2000);
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
</script>
|
|
194
|
+
</body>
|
|
195
|
+
</html>`;
|
|
196
|
+
}
|
|
197
|
+
function renderSnapshot(snapshot) {
|
|
198
|
+
const badgeClass = snapshot.status === 'changed' ? 'badge-changed' : snapshot.status === 'new' ? 'badge-new' : 'badge-passed';
|
|
199
|
+
const hasBaseline = !!snapshot.baselinePath;
|
|
200
|
+
const hasDiff = !!snapshot.diffPath;
|
|
201
|
+
const hasCurrent = !!snapshot.currentPath;
|
|
202
|
+
let gridClass = 'diff-view';
|
|
203
|
+
if (hasBaseline && hasDiff && hasCurrent)
|
|
204
|
+
gridClass += '';
|
|
205
|
+
else if (hasCurrent && !hasBaseline)
|
|
206
|
+
gridClass += ' one-col';
|
|
207
|
+
else
|
|
208
|
+
gridClass += ' two-col';
|
|
209
|
+
return `
|
|
210
|
+
<div class="snapshot">
|
|
211
|
+
<div class="snapshot-header">
|
|
212
|
+
<span class="snapshot-name">${escapeHtml(snapshot.name)}</span>
|
|
213
|
+
<span class="snapshot-badge ${badgeClass}">${snapshot.status}</span>
|
|
214
|
+
</div>
|
|
215
|
+
${snapshot.status === 'changed' ? `<div class="snapshot-stats">Diff: ${snapshot.diffPercent.toFixed(2)}% (${snapshot.diffCount} pixels)</div>` : ''}
|
|
216
|
+
${renderDomHint(snapshot)}
|
|
217
|
+
<div class="${gridClass}">
|
|
218
|
+
${hasBaseline ? `<div class="diff-col"><label>Baseline</label><img src="${snapshot.baselinePath}" alt="Baseline"></div>` : ''}
|
|
219
|
+
${hasDiff ? `<div class="diff-col"><label>Diff</label><img src="${snapshot.diffPath}" alt="Diff"></div>` : ''}
|
|
220
|
+
${hasCurrent ? `<div class="diff-col"><label>Current</label><img src="${snapshot.currentPath}" alt="Current"></div>` : ''}
|
|
221
|
+
</div>
|
|
222
|
+
${snapshot.status === 'changed' || snapshot.status === 'new' ? `
|
|
223
|
+
<div class="approve-cmd">
|
|
224
|
+
<code>npx testivai approve ${escapeHtml(snapshot.name)}</code>
|
|
225
|
+
<button class="copy-btn" data-cmd="npx testivai approve ${escapeHtml(snapshot.name)}">Copy</button>
|
|
226
|
+
</div>` : ''}
|
|
227
|
+
</div>`;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Render the DOM noise-hint badge for a snapshot.
|
|
231
|
+
*
|
|
232
|
+
* Two states (DOM hint is only meaningful for `changed` snapshots that
|
|
233
|
+
* have DOM data captured on both sides):
|
|
234
|
+
* - noiseHint: pixels differ but DOM is unchanged → "likely render noise"
|
|
235
|
+
* - changed: pixels and DOM both differ → show counts so the reviewer
|
|
236
|
+
* can decide whether the change is intentional
|
|
237
|
+
*
|
|
238
|
+
* Returns empty string when no DOM data was captured (the adapter didn't
|
|
239
|
+
* record `dom.html`); we don't want to confuse the user with "no signal".
|
|
240
|
+
*/
|
|
241
|
+
function renderDomHint(snapshot) {
|
|
242
|
+
if (!snapshot.dom)
|
|
243
|
+
return '';
|
|
244
|
+
if (snapshot.dom.noiseHint) {
|
|
245
|
+
return `
|
|
246
|
+
<div class="dom-hint noise" title="DOM tree is identical between baseline and candidate; the pixel diff is likely render noise.">
|
|
247
|
+
<span class="label">DOM unchanged</span>
|
|
248
|
+
<span class="summary">— pixel diff is likely render noise (anti-aliasing, font hinting).</span>
|
|
249
|
+
</div>`;
|
|
250
|
+
}
|
|
251
|
+
const s = snapshot.dom.summary;
|
|
252
|
+
if (!s)
|
|
253
|
+
return '';
|
|
254
|
+
const parts = [];
|
|
255
|
+
if (s.added > 0)
|
|
256
|
+
parts.push(`${s.added} added`);
|
|
257
|
+
if (s.removed > 0)
|
|
258
|
+
parts.push(`${s.removed} removed`);
|
|
259
|
+
if (s.attributeChanges > 0)
|
|
260
|
+
parts.push(`${s.attributeChanges} attribute change${s.attributeChanges === 1 ? '' : 's'}`);
|
|
261
|
+
return `
|
|
262
|
+
<div class="dom-hint changed" title="Structural DOM changes detected alongside the pixel diff.">
|
|
263
|
+
<span class="label">DOM changed</span>
|
|
264
|
+
<span class="summary">— ${escapeHtml(parts.join(', ') || 'structural difference')}.</span>
|
|
265
|
+
</div>`;
|
|
266
|
+
}
|
|
267
|
+
function escapeHtml(str) {
|
|
268
|
+
return str
|
|
269
|
+
.replace(/&/g, '&')
|
|
270
|
+
.replace(/</g, '<')
|
|
271
|
+
.replace(/>/g, '>')
|
|
272
|
+
.replace(/"/g, '"')
|
|
273
|
+
.replace(/'/g, ''');
|
|
274
|
+
}
|
|
275
|
+
//# sour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|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Framework-agnostic visual regression testing CLI for TestivAI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./diff": {
|
|
13
|
+
"types": "./dist/diff/index.d.ts",
|
|
14
|
+
"default": "./dist/diff/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./baselines": {
|
|
17
|
+
"types": "./dist/baselines/index.d.ts",
|
|
18
|
+
"default": "./dist/baselines/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./config": {
|
|
21
|
+
"types": "./dist/config/index.d.ts",
|
|
22
|
+
"default": "./dist/config/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./report": {
|
|
25
|
+
"types": "./dist/report/index.d.ts",
|
|
26
|
+
"default": "./dist/report/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"typesVersions": {
|
|
30
|
+
"*": {
|
|
31
|
+
"diff": [
|
|
32
|
+
"dist/diff/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"baselines": [
|
|
35
|
+
"dist/baselines/index.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"config": [
|
|
38
|
+
"dist/config/index.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"report": [
|
|
41
|
+
"dist/report/index.d.ts"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
9
44
|
},
|
|
10
45
|
"bin": {
|
|
11
46
|
"testivai": "./dist/bin/testivai.js"
|
|
@@ -15,16 +50,6 @@
|
|
|
15
50
|
"README.md",
|
|
16
51
|
"LICENSE"
|
|
17
52
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
20
|
-
"clean": "rm -rf dist",
|
|
21
|
-
"dev": "tsc --watch",
|
|
22
|
-
"prepublishOnly": "npm run build",
|
|
23
|
-
"test": "jest",
|
|
24
|
-
"test:unit": "jest",
|
|
25
|
-
"test:watch": "jest --watch",
|
|
26
|
-
"test:coverage": "jest --coverage"
|
|
27
|
-
},
|
|
28
53
|
"keywords": [
|
|
29
54
|
"testivai",
|
|
30
55
|
"visual-regression",
|
|
@@ -38,18 +63,27 @@
|
|
|
38
63
|
],
|
|
39
64
|
"author": "TestivAI",
|
|
40
65
|
"license": "MIT",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/mcbuddy/testivai-oss.git",
|
|
69
|
+
"directory": "packages/witness"
|
|
70
|
+
},
|
|
71
|
+
"bugs": {
|
|
72
|
+
"url": "https://github.com/mcbuddy/testivai-oss/issues"
|
|
73
|
+
},
|
|
74
|
+
"homepage": "https://github.com/mcbuddy/testivai-oss/tree/main/packages/witness#readme",
|
|
41
75
|
"publishConfig": {
|
|
42
76
|
"access": "public"
|
|
43
77
|
},
|
|
44
78
|
"dependencies": {
|
|
45
|
-
"@testivai/common": "^0.2.0",
|
|
46
79
|
"chalk": "^4.1.2",
|
|
47
80
|
"chrome-remote-interface": "^0.33.0",
|
|
48
81
|
"commander": "^11.0.0",
|
|
49
82
|
"inquirer": "^8.2.6",
|
|
50
83
|
"ora": "^7.0.0",
|
|
51
84
|
"simple-git": "^3.20.0",
|
|
52
|
-
"ws": "^8.0.0"
|
|
85
|
+
"ws": "^8.0.0",
|
|
86
|
+
"@testivai/common": "0.2.2"
|
|
53
87
|
},
|
|
54
88
|
"devDependencies": {
|
|
55
89
|
"@types/inquirer": "^8.2.10",
|
|
@@ -62,5 +96,14 @@
|
|
|
62
96
|
},
|
|
63
97
|
"engines": {
|
|
64
98
|
"node": ">=18.0.0"
|
|
99
|
+
},
|
|
100
|
+
"scripts": {
|
|
101
|
+
"build": "tsc",
|
|
102
|
+
"clean": "rm -rf dist",
|
|
103
|
+
"dev": "tsc --watch",
|
|
104
|
+
"test": "jest",
|
|
105
|
+
"test:unit": "jest",
|
|
106
|
+
"test:watch": "jest --watch",
|
|
107
|
+
"test:coverage": "jest --coverage"
|
|
65
108
|
}
|
|
66
|
-
}
|
|
109
|
+
}
|