@imolko/create-ultra-reporter 2.1.33-beta → 2.1.34-beta
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/bin/config/reader.js +7 -0
- package/bin/config/reader.js.map +1 -1
- package/bin/config/types.d.ts +2 -0
- package/bin/config/types.js.map +1 -1
- package/bin/pipeline/generate.d.ts +24 -0
- package/bin/pipeline/generate.js +82 -0
- package/bin/pipeline/generate.js.map +1 -1
- package/bin/reporters/data-transformation.d.ts +19 -1
- package/bin/reporters/data-transformation.js +79 -0
- package/bin/reporters/data-transformation.js.map +1 -1
- package/bin/reporters/readme-transform.d.ts +38 -0
- package/bin/reporters/readme-transform.js +110 -0
- package/bin/reporters/readme-transform.js.map +1 -0
- package/bin/reporters/types.d.ts +27 -0
- package/bin/scaffold/assembler.js +51 -29
- package/bin/scaffold/assembler.js.map +1 -1
- package/package.json +1 -1
- package/templates/documentation/src/components/HomepageFeatures/index.tsx +357 -28
- package/templates/documentation/src/components/HomepageFeatures/styles.module.css +4 -2
- package/templates/documentation/src/pages/index.module.css +10 -0
- package/templates/documentation/src/pages/index.tsx +40 -13
|
@@ -118,21 +118,27 @@ function copyTemplateFiles(srcDir, destDir) {
|
|
|
118
118
|
'docs/.gitkeep',
|
|
119
119
|
SCAFFOLD_VERSION_FILE,
|
|
120
120
|
]);
|
|
121
|
-
|
|
121
|
+
// Also skip test files from the template (they're for library testing, not user projects)
|
|
122
|
+
const skipPatterns = [/\.spec\./, /\.test\./];
|
|
123
|
+
copyDirRecursive(srcDir, destDir, skipFiles, skipPatterns);
|
|
122
124
|
}
|
|
123
|
-
function copyDirRecursive(src, dest, skipFiles) {
|
|
125
|
+
function copyDirRecursive(src, dest, skipFiles, skipPatterns = []) {
|
|
124
126
|
fs.mkdirSync(dest, { recursive: true });
|
|
125
127
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
126
128
|
for (const entry of entries) {
|
|
127
129
|
const srcPath = path.join(src, entry.name);
|
|
128
130
|
const destPath = path.join(dest, entry.name);
|
|
131
|
+
// Skip test files (spec, test) to prevent polluting user projects
|
|
132
|
+
if (!entry.isDirectory() && skipPatterns.some((p) => p.test(entry.name))) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
129
135
|
// Compute relative path for skip check
|
|
130
136
|
const relPath = path.relative(src, srcPath);
|
|
131
137
|
if (skipFiles.has(entry.name) || skipFiles.has(relPath)) {
|
|
132
138
|
continue;
|
|
133
139
|
}
|
|
134
140
|
if (entry.isDirectory()) {
|
|
135
|
-
copyDirRecursive(srcPath, destPath, skipFiles);
|
|
141
|
+
copyDirRecursive(srcPath, destPath, skipFiles, skipPatterns);
|
|
136
142
|
}
|
|
137
143
|
else {
|
|
138
144
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -147,14 +153,14 @@ function copyDirRecursive(src, dest, skipFiles) {
|
|
|
147
153
|
*/
|
|
148
154
|
function generateDocusaurusConfig(config, docusaurusDir) {
|
|
149
155
|
const domainName = config.domain.name;
|
|
150
|
-
const title = `${domainName.charAt(0).toUpperCase() + domainName.slice(1)}
|
|
156
|
+
const title = `${domainName.charAt(0).toUpperCase() + domainName.slice(1)}`;
|
|
151
157
|
const content = `import { themes as prismThemes } from "prism-react-renderer";
|
|
152
158
|
import type { Config } from "@docusaurus/types";
|
|
153
159
|
import type * as Preset from "@docusaurus/preset-classic";
|
|
154
160
|
|
|
155
161
|
const config: Config = {
|
|
156
162
|
title: "${title}",
|
|
157
|
-
tagline: "
|
|
163
|
+
tagline: "Domain Documentation",
|
|
158
164
|
favicon: "img/favicon.ico",
|
|
159
165
|
|
|
160
166
|
url: "https://your-docusaurus-site.example.com",
|
|
@@ -195,10 +201,9 @@ const config: Config = {
|
|
|
195
201
|
},
|
|
196
202
|
items: [
|
|
197
203
|
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
label: "Documentation",
|
|
204
|
+
to: '/docs/intro',
|
|
205
|
+
position: 'left',
|
|
206
|
+
label: 'Getting Started',
|
|
202
207
|
},
|
|
203
208
|
],
|
|
204
209
|
},
|
|
@@ -206,20 +211,24 @@ const config: Config = {
|
|
|
206
211
|
style: "dark",
|
|
207
212
|
links: [
|
|
208
213
|
{
|
|
209
|
-
title: "
|
|
214
|
+
title: "Explore",
|
|
210
215
|
items: [
|
|
216
|
+
{
|
|
217
|
+
label: "Context Overview",
|
|
218
|
+
to: "/docs/intro",
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "Use Cases",
|
|
222
|
+
to: "/docs/use-cases",
|
|
223
|
+
},
|
|
211
224
|
{
|
|
212
225
|
label: "Aggregates",
|
|
213
226
|
to: "/docs/aggregates",
|
|
214
227
|
},
|
|
215
228
|
{
|
|
216
|
-
label: "
|
|
229
|
+
label: "Artifacts",
|
|
217
230
|
to: "/docs/domain",
|
|
218
231
|
},
|
|
219
|
-
{
|
|
220
|
-
label: "Intro",
|
|
221
|
-
to: "/docs/intro",
|
|
222
|
-
},
|
|
223
232
|
],
|
|
224
233
|
},
|
|
225
234
|
],
|
|
@@ -290,10 +299,33 @@ function generateSidebars(config, docusaurusDir) {
|
|
|
290
299
|
const hasUserDocs = !!config.docs;
|
|
291
300
|
const docsDir = path.join(docusaurusDir, 'docs');
|
|
292
301
|
const sections = [];
|
|
293
|
-
//
|
|
302
|
+
// Project overview (README) section
|
|
303
|
+
if (config.includeReadme) {
|
|
304
|
+
sections.push(` {
|
|
305
|
+
type: 'doc' as const,
|
|
306
|
+
id: 'overview',
|
|
307
|
+
}`);
|
|
308
|
+
}
|
|
309
|
+
// Context Overview — always include as the entry point
|
|
294
310
|
sections.push(` {
|
|
311
|
+
type: 'doc' as const,
|
|
312
|
+
id: 'intro',
|
|
313
|
+
label: 'Context Overview',
|
|
314
|
+
}`);
|
|
315
|
+
// Use-cases section
|
|
316
|
+
if (hasUseCases) {
|
|
317
|
+
sections.push(` {
|
|
295
318
|
type: 'category' as const,
|
|
296
|
-
label: '
|
|
319
|
+
label: 'Use Cases',
|
|
320
|
+
items: [
|
|
321
|
+
${formatDocItems('use-cases', docsDir)}
|
|
322
|
+
],
|
|
323
|
+
}`);
|
|
324
|
+
}
|
|
325
|
+
// Aggregates section
|
|
326
|
+
sections.push(` {
|
|
327
|
+
type: 'category' as const,
|
|
328
|
+
label: 'Aggregates',
|
|
297
329
|
link: {
|
|
298
330
|
type: 'doc',
|
|
299
331
|
id: 'aggregates/index',
|
|
@@ -302,10 +334,10 @@ function generateSidebars(config, docusaurusDir) {
|
|
|
302
334
|
${formatDocItems('aggregates', docsDir)}
|
|
303
335
|
],
|
|
304
336
|
}`);
|
|
305
|
-
//
|
|
337
|
+
// Artifacts section
|
|
306
338
|
sections.push(` {
|
|
307
339
|
type: 'category' as const,
|
|
308
|
-
label: '
|
|
340
|
+
label: 'Artifacts',
|
|
309
341
|
link: {
|
|
310
342
|
type: 'doc',
|
|
311
343
|
id: 'domain/index',
|
|
@@ -314,16 +346,6 @@ ${formatDocItems('aggregates', docsDir)}
|
|
|
314
346
|
${formatDocItems('domain', docsDir)}
|
|
315
347
|
],
|
|
316
348
|
}`);
|
|
317
|
-
// Use-cases section
|
|
318
|
-
if (hasUseCases) {
|
|
319
|
-
sections.push(` {
|
|
320
|
-
type: 'category' as const,
|
|
321
|
-
label: '${config.useCases.title}',
|
|
322
|
-
items: [
|
|
323
|
-
${formatDocItems('use-cases', docsDir)}
|
|
324
|
-
],
|
|
325
|
-
}`);
|
|
326
|
-
}
|
|
327
349
|
// User docs section
|
|
328
350
|
if (hasUserDocs) {
|
|
329
351
|
sections.push(` {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembler.js","sourceRoot":"","sources":["../../src/scaffold/assembler.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,gCAAgC;AAChC,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,mDAAmD;AACnD,4DAA4D;AAC5D,8EAA8E;;;;;;;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}
|
package/package.json
CHANGED
|
@@ -1,77 +1,406 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
+
import Link from '@docusaurus/Link';
|
|
2
3
|
import Heading from '@theme/Heading';
|
|
3
4
|
import styles from './styles.module.css';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Types
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
5
10
|
|
|
6
11
|
type FeatureItem = {
|
|
7
12
|
title: string;
|
|
8
13
|
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
|
9
14
|
description: JSX.Element;
|
|
15
|
+
link?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type TypeBreakdownEntry = {
|
|
19
|
+
count: number;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type DashboardTestStats = {
|
|
24
|
+
total: number;
|
|
25
|
+
passed: number;
|
|
26
|
+
failed: number;
|
|
27
|
+
skipped: number;
|
|
28
|
+
todo: number;
|
|
29
|
+
suites: number;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
type DashboardSummary = {
|
|
33
|
+
artifactCount: number;
|
|
34
|
+
contextCount: number;
|
|
35
|
+
testStats: DashboardTestStats;
|
|
36
|
+
typeBreakdown: Record<string, TypeBreakdownEntry>;
|
|
37
|
+
tags: Record<string, number>;
|
|
38
|
+
readmeHtml?: string;
|
|
39
|
+
readmeExcerptHtml?: string;
|
|
10
40
|
};
|
|
11
41
|
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Static quick-link cards
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
|
|
12
46
|
const FeatureList: FeatureItem[] = [
|
|
13
47
|
{
|
|
14
|
-
title: '
|
|
15
|
-
Svg: require('@site/static/img/
|
|
48
|
+
title: 'Context Overview',
|
|
49
|
+
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
|
|
16
50
|
description: (
|
|
17
51
|
<>
|
|
18
|
-
|
|
19
|
-
used to get your website up and running quickly.
|
|
52
|
+
Read the bounded context introduction and design decisions.
|
|
20
53
|
</>
|
|
21
54
|
),
|
|
55
|
+
link: '/docs/intro',
|
|
22
56
|
},
|
|
23
57
|
{
|
|
24
|
-
title: '
|
|
58
|
+
title: 'Use Cases',
|
|
59
|
+
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
|
|
60
|
+
description: (
|
|
61
|
+
<>
|
|
62
|
+
Review use cases and their test coverage.
|
|
63
|
+
</>
|
|
64
|
+
),
|
|
65
|
+
link: '/docs/use-cases',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: 'Aggregates',
|
|
25
69
|
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
|
|
26
70
|
description: (
|
|
27
71
|
<>
|
|
28
|
-
|
|
29
|
-
ahead and move your docs into the <code>docs</code> directory.
|
|
72
|
+
Explore aggregate roots and their lifecycle.
|
|
30
73
|
</>
|
|
31
74
|
),
|
|
75
|
+
link: '/docs/aggregates',
|
|
32
76
|
},
|
|
33
77
|
{
|
|
34
|
-
title: '
|
|
35
|
-
Svg: require('@site/static/img/
|
|
78
|
+
title: 'Artifacts',
|
|
79
|
+
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
|
|
36
80
|
description: (
|
|
37
81
|
<>
|
|
38
|
-
|
|
39
|
-
be extended while reusing the same header and footer.
|
|
82
|
+
Browse all value-objects, entities, aggregates, and domain events.
|
|
40
83
|
</>
|
|
41
84
|
),
|
|
85
|
+
link: '/docs/domain',
|
|
42
86
|
},
|
|
43
87
|
];
|
|
44
88
|
|
|
45
|
-
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// Feature card (with optional link wrapper)
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
function Feature({ title, Svg, description, link }: FeatureItem) {
|
|
94
|
+
const content = (
|
|
95
|
+
<div className="text--center">
|
|
96
|
+
<Svg className={styles.featureSvg} role="img" />
|
|
97
|
+
<Heading as="h3">{title}</Heading>
|
|
98
|
+
<p>{description}</p>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
|
|
46
102
|
return (
|
|
47
|
-
<div className={clsx('col col--
|
|
48
|
-
<div
|
|
49
|
-
|
|
103
|
+
<div className={clsx('col col--3')}>
|
|
104
|
+
<div
|
|
105
|
+
className="card"
|
|
106
|
+
style={{
|
|
107
|
+
padding: '2rem 1rem',
|
|
108
|
+
height: '100%',
|
|
109
|
+
transition: 'box-shadow 0.2s ease',
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
{link ? (
|
|
113
|
+
<Link
|
|
114
|
+
to={link}
|
|
115
|
+
style={{ textDecoration: 'none', color: 'inherit', display: 'block' }}
|
|
116
|
+
>
|
|
117
|
+
{content}
|
|
118
|
+
</Link>
|
|
119
|
+
) : (
|
|
120
|
+
content
|
|
121
|
+
)}
|
|
50
122
|
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ---------------------------------------------------------------------------
|
|
128
|
+
// Color map for artifact types
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
const TYPE_COLORS: Record<string, string> = {
|
|
132
|
+
'aggregate': '#2563eb',
|
|
133
|
+
'entity': '#0891b2',
|
|
134
|
+
'value-object': '#059669',
|
|
135
|
+
'event': '#6366f1',
|
|
136
|
+
'service': '#7c3aed',
|
|
137
|
+
'repository': '#0d9488',
|
|
138
|
+
'enum': '#4f46e5',
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function typeColor(key: string): string {
|
|
142
|
+
return TYPE_COLORS[key] ?? 'var(--ifm-color-emphasis-500)';
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
// Stat card
|
|
147
|
+
// ---------------------------------------------------------------------------
|
|
148
|
+
|
|
149
|
+
function StatCard({
|
|
150
|
+
value,
|
|
151
|
+
label,
|
|
152
|
+
detail,
|
|
153
|
+
icon,
|
|
154
|
+
barChart,
|
|
155
|
+
stackedBar,
|
|
156
|
+
}: {
|
|
157
|
+
value: string | number;
|
|
158
|
+
label: string;
|
|
159
|
+
detail?: string;
|
|
160
|
+
icon: string;
|
|
161
|
+
barChart?: { passed: number; failed: number; skipped: number; todo: number; total: number };
|
|
162
|
+
stackedBar?: { label: string; count: number; color: string }[];
|
|
163
|
+
}) {
|
|
164
|
+
return (
|
|
165
|
+
<div className="col col--4" style={{ display: 'flex' }}>
|
|
166
|
+
<div
|
|
167
|
+
className="card"
|
|
168
|
+
style={{
|
|
169
|
+
flex: 1,
|
|
170
|
+
textAlign: 'center',
|
|
171
|
+
padding: '1.5rem',
|
|
172
|
+
marginBottom: '1rem',
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
<div style={{ fontSize: '2.5rem', marginBottom: '0.5rem' }}>{icon}</div>
|
|
176
|
+
<div style={{ fontSize: '2rem', fontWeight: 'bold' }}>{value}</div>
|
|
177
|
+
<div style={{ color: 'var(--ifm-color-emphasis-700)', fontWeight: 500 }}>{label}</div>
|
|
178
|
+
{stackedBar && stackedBar.length > 0 && (() => {
|
|
179
|
+
const max = Math.max(...stackedBar.map((s) => s.count));
|
|
180
|
+
return (
|
|
181
|
+
<div style={{ marginTop: '0.75rem' }}>
|
|
182
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '2px' }}>
|
|
183
|
+
{stackedBar.map((seg) => (
|
|
184
|
+
<div key={seg.label} style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
185
|
+
<span style={{ fontSize: '0.75rem', minWidth: '5.5rem', textAlign: 'right', color: 'var(--ifm-color-emphasis-700)' }}>
|
|
186
|
+
{seg.label}
|
|
187
|
+
</span>
|
|
188
|
+
<div
|
|
189
|
+
style={{
|
|
190
|
+
flex: 1,
|
|
191
|
+
height: '0.5rem',
|
|
192
|
+
borderRadius: 'var(--ifm-global-radius)',
|
|
193
|
+
backgroundColor: seg.color,
|
|
194
|
+
width: max > 0 ? `${Math.round((seg.count / max) * 100)}%` : '0%',
|
|
195
|
+
transition: 'width 0.5s ease',
|
|
196
|
+
}}
|
|
197
|
+
/>
|
|
198
|
+
<span style={{ fontSize: '0.75rem', fontWeight: 600, minWidth: '1.5rem' }}>
|
|
199
|
+
{seg.count}
|
|
200
|
+
</span>
|
|
201
|
+
</div>
|
|
202
|
+
))}
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
);
|
|
206
|
+
})()}
|
|
207
|
+
{barChart && barChart.total > 0 && (
|
|
208
|
+
<div style={{ marginTop: '0.75rem' }}>
|
|
209
|
+
<div
|
|
210
|
+
style={{
|
|
211
|
+
display: 'flex',
|
|
212
|
+
height: '0.5rem',
|
|
213
|
+
borderRadius: 'var(--ifm-global-radius)',
|
|
214
|
+
overflow: 'hidden',
|
|
215
|
+
marginBottom: '0.5rem',
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
{barChart.passed > 0 && (
|
|
219
|
+
<div
|
|
220
|
+
style={{
|
|
221
|
+
width: `${Math.round((barChart.passed / barChart.total) * 100)}%`,
|
|
222
|
+
backgroundColor: 'var(--ifm-color-success)',
|
|
223
|
+
}}
|
|
224
|
+
/>
|
|
225
|
+
)}
|
|
226
|
+
{barChart.failed > 0 && (
|
|
227
|
+
<div
|
|
228
|
+
style={{
|
|
229
|
+
width: `${Math.round((barChart.failed / barChart.total) * 100)}%`,
|
|
230
|
+
backgroundColor: 'var(--ifm-color-danger)',
|
|
231
|
+
}}
|
|
232
|
+
/>
|
|
233
|
+
)}
|
|
234
|
+
{barChart.skipped > 0 && (
|
|
235
|
+
<div
|
|
236
|
+
style={{
|
|
237
|
+
width: `${Math.round((barChart.skipped / barChart.total) * 100)}%`,
|
|
238
|
+
backgroundColor: 'var(--ifm-color-warning)',
|
|
239
|
+
}}
|
|
240
|
+
/>
|
|
241
|
+
)}
|
|
242
|
+
{barChart.todo > 0 && (
|
|
243
|
+
<div
|
|
244
|
+
style={{
|
|
245
|
+
width: `${Math.round((barChart.todo / barChart.total) * 100)}%`,
|
|
246
|
+
backgroundColor: 'var(--ifm-color-emphasis-400)',
|
|
247
|
+
}}
|
|
248
|
+
/>
|
|
249
|
+
)}
|
|
250
|
+
</div>
|
|
251
|
+
<div style={{ fontSize: '0.8rem', color: 'var(--ifm-color-emphasis-600)' }}>
|
|
252
|
+
<span style={{ color: 'var(--ifm-color-success)', fontWeight: 600 }}>
|
|
253
|
+
{barChart.passed}
|
|
254
|
+
</span>
|
|
255
|
+
{' passed'}
|
|
256
|
+
{barChart.failed > 0 && (
|
|
257
|
+
<>
|
|
258
|
+
{' / '}
|
|
259
|
+
<span style={{ color: 'var(--ifm-color-danger)', fontWeight: 600 }}>
|
|
260
|
+
{barChart.failed}
|
|
261
|
+
</span>
|
|
262
|
+
{' failed'}
|
|
263
|
+
</>
|
|
264
|
+
)}
|
|
265
|
+
{barChart.skipped > 0 && (
|
|
266
|
+
<>
|
|
267
|
+
{' / '}
|
|
268
|
+
<span style={{ color: 'var(--ifm-color-warning)', fontWeight: 600 }}>
|
|
269
|
+
{barChart.skipped}
|
|
270
|
+
</span>
|
|
271
|
+
{' skipped'}
|
|
272
|
+
</>
|
|
273
|
+
)}
|
|
274
|
+
{barChart.todo > 0 && (
|
|
275
|
+
<>
|
|
276
|
+
{' / '}
|
|
277
|
+
<span style={{ color: 'var(--ifm-color-emphasis-600)', fontWeight: 600 }}>
|
|
278
|
+
{barChart.todo}
|
|
279
|
+
</span>
|
|
280
|
+
{' todo'}
|
|
281
|
+
</>
|
|
282
|
+
)}
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
)}
|
|
286
|
+
{detail && !barChart && (
|
|
287
|
+
<div
|
|
288
|
+
style={{
|
|
289
|
+
fontSize: '0.85rem',
|
|
290
|
+
color: 'var(--ifm-color-secondary-darkest)',
|
|
291
|
+
marginTop: '0.5rem',
|
|
292
|
+
}}
|
|
293
|
+
>
|
|
294
|
+
{detail}
|
|
295
|
+
</div>
|
|
296
|
+
)}
|
|
54
297
|
</div>
|
|
55
298
|
</div>
|
|
56
299
|
);
|
|
57
300
|
}
|
|
58
301
|
|
|
59
|
-
|
|
302
|
+
// ---------------------------------------------------------------------------
|
|
303
|
+
// Dashboard section (dynamic)
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
|
|
306
|
+
function DashboardSection() {
|
|
307
|
+
const [data, setData] = useState<DashboardSummary | null>(null);
|
|
308
|
+
const [loading, setLoading] = useState(true);
|
|
309
|
+
const [error, setError] = useState(false);
|
|
310
|
+
|
|
60
311
|
useEffect(() => {
|
|
61
|
-
(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
312
|
+
fetch('/data/dashboard-summary.json')
|
|
313
|
+
.then((res) => {
|
|
314
|
+
if (!res.ok) {
|
|
315
|
+
throw new Error(`HTTP ${res.status}`);
|
|
316
|
+
}
|
|
317
|
+
return res.json();
|
|
318
|
+
})
|
|
319
|
+
.then((json) => {
|
|
320
|
+
setData(json);
|
|
321
|
+
setLoading(false);
|
|
322
|
+
})
|
|
323
|
+
.catch(() => {
|
|
324
|
+
setError(true);
|
|
325
|
+
setLoading(false);
|
|
326
|
+
});
|
|
65
327
|
}, []);
|
|
328
|
+
|
|
329
|
+
if (loading) {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (error || !data) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const { artifactCount, contextCount, testStats, typeBreakdown } = data;
|
|
338
|
+
const artifactBars = Object.entries(typeBreakdown)
|
|
339
|
+
.sort(([, a], [, b]) => b.count - a.count)
|
|
340
|
+
.map(([type, entry]) => ({
|
|
341
|
+
label: entry.label,
|
|
342
|
+
count: entry.count,
|
|
343
|
+
color: typeColor(type),
|
|
344
|
+
}));
|
|
345
|
+
|
|
66
346
|
return (
|
|
67
347
|
<section className={styles.features}>
|
|
68
348
|
<div className="container">
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
349
|
+
{/* Stats row */}
|
|
350
|
+
<div className="row margin-bottom--lg">
|
|
351
|
+
<StatCard
|
|
352
|
+
value={contextCount}
|
|
353
|
+
label={`context${contextCount !== 1 ? 's' : ''}`}
|
|
354
|
+
icon="🧩"
|
|
355
|
+
/>
|
|
356
|
+
<StatCard
|
|
357
|
+
value={artifactCount}
|
|
358
|
+
label="artifacts"
|
|
359
|
+
icon="📦"
|
|
360
|
+
stackedBar={artifactBars}
|
|
361
|
+
/>
|
|
362
|
+
{testStats.total > 0 && (
|
|
363
|
+
<StatCard
|
|
364
|
+
value={testStats.total}
|
|
365
|
+
label="tests"
|
|
366
|
+
icon="🧪"
|
|
367
|
+
barChart={{
|
|
368
|
+
passed: testStats.passed,
|
|
369
|
+
failed: testStats.failed,
|
|
370
|
+
skipped: testStats.skipped,
|
|
371
|
+
todo: testStats.todo,
|
|
372
|
+
total: testStats.total,
|
|
373
|
+
}}
|
|
374
|
+
/>
|
|
375
|
+
)}
|
|
73
376
|
</div>
|
|
377
|
+
|
|
378
|
+
{/* README excerpt now lives in the hero banner (index.tsx) */}
|
|
74
379
|
</div>
|
|
75
380
|
</section>
|
|
76
381
|
);
|
|
77
382
|
}
|
|
383
|
+
|
|
384
|
+
// ---------------------------------------------------------------------------
|
|
385
|
+
// HomepageFeatures — static cards + dynamic dashboard
|
|
386
|
+
// ---------------------------------------------------------------------------
|
|
387
|
+
|
|
388
|
+
export default function HomepageFeatures(): JSX.Element {
|
|
389
|
+
return (
|
|
390
|
+
<>
|
|
391
|
+
{/* Static quick-link cards */}
|
|
392
|
+
<section className={styles.features}>
|
|
393
|
+
<div className="container">
|
|
394
|
+
<div className="row">
|
|
395
|
+
{FeatureList.map((props, idx) => (
|
|
396
|
+
<Feature key={idx} {...props} />
|
|
397
|
+
))}
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
</section>
|
|
401
|
+
|
|
402
|
+
{/* Dynamic dashboard section */}
|
|
403
|
+
<DashboardSection />
|
|
404
|
+
</>
|
|
405
|
+
);
|
|
406
|
+
}
|