docstodev 2.0.0 → 2.1.1
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/ai/analyzer.d.ts +25 -1
- package/dist/ai/analyzer.d.ts.map +1 -1
- package/dist/ai/analyzer.js +205 -20
- package/dist/ai/analyzer.js.map +1 -1
- package/dist/cli/index.js +8 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +128 -78
- package/dist/commands/run.js.map +1 -1
- package/dist/exporters/html.d.ts.map +1 -1
- package/dist/exporters/html.js +273 -29
- package/dist/exporters/html.js.map +1 -1
- package/docs/docs-to-dev.md +47 -62
- package/docs/report.html +3 -3
- package/docs/summary.md +1 -1
- package/package.json +2 -2
- package/src/cli/index.ts +8 -7
package/dist/exporters/html.js
CHANGED
|
@@ -78,6 +78,9 @@ export function exportToHTML(docsDir, markdownContent, mermaidGraph, lang = "fr"
|
|
|
78
78
|
const cleanMermaidGraph = sanitizeMermaidGraph(mermaidGraph || "graph TD\n Root[Projet]");
|
|
79
79
|
const hierarchyGraph = fileTree ? generateHierarchyGraph(fileTree) : getDefaultHierarchyGraph();
|
|
80
80
|
const dataFlowGraph = generateDataFlowGraph();
|
|
81
|
+
// Extraire les sections spéciales de markdownContent
|
|
82
|
+
const projectGoalMatch = markdownContent.match(/(?:But du Projet|Project Goal)[:\s]*\n+([\s\S]*?)(?=\n#{2,}|$)/i);
|
|
83
|
+
const risksMatch = markdownContent.match(/(?:Risques Identifiés|Identified Risks)[:\s]*\n+([\s\S]*?)(?=\n#{2,}|$)/i);
|
|
81
84
|
const html = `<!DOCTYPE html>
|
|
82
85
|
<html lang="${lang}" data-theme="dark">
|
|
83
86
|
<head>
|
|
@@ -272,10 +275,18 @@ h3 {
|
|
|
272
275
|
margin-bottom: 1.5rem;
|
|
273
276
|
}
|
|
274
277
|
|
|
278
|
+
.component p,
|
|
279
|
+
.component .list-item {
|
|
280
|
+
word-wrap: break-word;
|
|
281
|
+
overflow-wrap: break-word;
|
|
282
|
+
word-break: break-word;
|
|
283
|
+
}
|
|
284
|
+
|
|
275
285
|
.tree-line {
|
|
276
286
|
font-family: "Fira Code", monospace;
|
|
277
287
|
font-size: 0.85rem;
|
|
278
|
-
white-space: pre;
|
|
288
|
+
white-space: pre-wrap;
|
|
289
|
+
word-wrap: break-word;
|
|
279
290
|
color: var(--muted);
|
|
280
291
|
line-height: 1.8;
|
|
281
292
|
}
|
|
@@ -309,12 +320,15 @@ table {
|
|
|
309
320
|
width: 100%;
|
|
310
321
|
border-collapse: collapse;
|
|
311
322
|
font-size: 0.9rem;
|
|
323
|
+
table-layout: fixed;
|
|
312
324
|
}
|
|
313
325
|
|
|
314
326
|
th, td {
|
|
315
327
|
border-bottom: 1px solid var(--border);
|
|
316
328
|
padding: 0.75rem 1rem;
|
|
317
329
|
text-align: left;
|
|
330
|
+
word-wrap: break-word;
|
|
331
|
+
overflow-wrap: break-word;
|
|
318
332
|
}
|
|
319
333
|
|
|
320
334
|
th {
|
|
@@ -336,6 +350,8 @@ code {
|
|
|
336
350
|
padding: 0.2rem 0.4rem;
|
|
337
351
|
font-size: 0.9em;
|
|
338
352
|
color: var(--accent);
|
|
353
|
+
word-wrap: break-word;
|
|
354
|
+
overflow-wrap: break-word;
|
|
339
355
|
}
|
|
340
356
|
|
|
341
357
|
.list-item {
|
|
@@ -397,6 +413,133 @@ mark {
|
|
|
397
413
|
font-size: 0.9rem;
|
|
398
414
|
}
|
|
399
415
|
|
|
416
|
+
.project-goal-section {
|
|
417
|
+
background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
|
|
418
|
+
padding: 2rem;
|
|
419
|
+
margin: 2rem 0;
|
|
420
|
+
border-radius: 8px;
|
|
421
|
+
border-left: 4px solid var(--accent);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.project-goal-section h2 {
|
|
425
|
+
color: #ffffff;
|
|
426
|
+
border-bottom: none;
|
|
427
|
+
margin: 0 0 1rem 0;
|
|
428
|
+
font-size: 1.8rem;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.project-goal-section p {
|
|
432
|
+
color: rgba(255, 255, 255, 0.95);
|
|
433
|
+
font-size: 1.1rem;
|
|
434
|
+
line-height: 1.8;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.risks-section {
|
|
438
|
+
background: var(--card);
|
|
439
|
+
border: 1px solid var(--border);
|
|
440
|
+
border-left: 4px solid #f85149;
|
|
441
|
+
padding: 1.5rem;
|
|
442
|
+
margin: 2rem 0;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.risks-section h3 {
|
|
446
|
+
color: #f85149;
|
|
447
|
+
margin-bottom: 1rem;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.risk-item {
|
|
451
|
+
padding: 0.75rem;
|
|
452
|
+
margin: 0.5rem 0;
|
|
453
|
+
border-radius: 4px;
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: flex-start;
|
|
456
|
+
gap: 0.75rem;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.risk-item.critical {
|
|
460
|
+
background: rgba(248, 81, 73, 0.1);
|
|
461
|
+
border-left: 3px solid #f85149;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.risk-item.medium {
|
|
465
|
+
background: rgba(251, 191, 36, 0.1);
|
|
466
|
+
border-left: 3px solid #fbbf24;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.risk-item.low {
|
|
470
|
+
background: rgba(34, 197, 94, 0.1);
|
|
471
|
+
border-left: 3px solid #22c55e;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.risk-icon {
|
|
475
|
+
font-size: 1.2rem;
|
|
476
|
+
flex-shrink: 0;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.recommendations-section {
|
|
480
|
+
background: var(--card);
|
|
481
|
+
border: 1px solid var(--border);
|
|
482
|
+
border-left: 4px solid #22c55e;
|
|
483
|
+
padding: 1.5rem;
|
|
484
|
+
margin: 2rem 0;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.recommendations-section h3 {
|
|
488
|
+
color: #22c55e;
|
|
489
|
+
margin-bottom: 1rem;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.recommendation-item {
|
|
493
|
+
padding: 0.75rem;
|
|
494
|
+
margin: 0.5rem 0;
|
|
495
|
+
background: rgba(34, 197, 94, 0.05);
|
|
496
|
+
border-radius: 4px;
|
|
497
|
+
padding-left: 2rem;
|
|
498
|
+
position: relative;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.recommendation-item::before {
|
|
502
|
+
content: "💡";
|
|
503
|
+
position: absolute;
|
|
504
|
+
left: 0.5rem;
|
|
505
|
+
top: 0.75rem;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.design-system-section {
|
|
509
|
+
background: var(--card);
|
|
510
|
+
border: 1px solid var(--border);
|
|
511
|
+
padding: 1.5rem;
|
|
512
|
+
margin: 2rem 0;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.color-palette {
|
|
516
|
+
display: flex;
|
|
517
|
+
gap: 1rem;
|
|
518
|
+
flex-wrap: wrap;
|
|
519
|
+
margin: 1rem 0;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.color-swatch {
|
|
523
|
+
display: flex;
|
|
524
|
+
flex-direction: column;
|
|
525
|
+
align-items: center;
|
|
526
|
+
gap: 0.5rem;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.color-box {
|
|
530
|
+
width: 60px;
|
|
531
|
+
height: 60px;
|
|
532
|
+
border-radius: 8px;
|
|
533
|
+
border: 2px solid var(--border);
|
|
534
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.color-label {
|
|
538
|
+
font-size: 0.75rem;
|
|
539
|
+
font-family: "Fira Code", monospace;
|
|
540
|
+
color: var(--muted);
|
|
541
|
+
}
|
|
542
|
+
|
|
400
543
|
@media print {
|
|
401
544
|
.controls {
|
|
402
545
|
display: none;
|
|
@@ -427,6 +570,15 @@ mark {
|
|
|
427
570
|
<body>
|
|
428
571
|
<div class="container">
|
|
429
572
|
|
|
573
|
+
${projectGoalMatch ? `
|
|
574
|
+
<div class="project-goal-section">
|
|
575
|
+
<h2>🎯 ${lang === 'fr' ? 'But du Projet' : 'Project Goal'}</h2>
|
|
576
|
+
<p>${formatText(projectGoalMatch[1]?.trim() || "")}</p>
|
|
577
|
+
</div>
|
|
578
|
+
` : ''}
|
|
579
|
+
|
|
580
|
+
${risksMatch ? formatRisksSection(risksMatch[1] || "", lang) : ''}
|
|
581
|
+
|
|
430
582
|
<div class="controls">
|
|
431
583
|
<input id="search" placeholder="${lang === 'fr' ? 'Rechercher dans la documentation...' : 'Search in documentation...'}" type="text">
|
|
432
584
|
<button onclick="toggleTheme()">
|
|
@@ -499,14 +651,13 @@ document.getElementById("search").addEventListener("input", e => {
|
|
|
499
651
|
return;
|
|
500
652
|
}
|
|
501
653
|
|
|
502
|
-
const regex = new RegExp("(" + term.replace(/[
|
|
654
|
+
const regex = new RegExp("(" + term.replace(/[.*+?\\\${}()|[\\]\\\\]/g, "\\\\$&") + ")", "gi");
|
|
503
655
|
container.innerHTML = originalHTML.replace(regex, "<mark>$1</mark>");
|
|
504
656
|
|
|
505
657
|
const first = container.querySelector("mark");
|
|
506
658
|
if (first) first.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
507
659
|
});
|
|
508
660
|
|
|
509
|
-
// Gestion d'erreur Mermaid
|
|
510
661
|
window.addEventListener('load', () => {
|
|
511
662
|
setTimeout(() => {
|
|
512
663
|
document.querySelectorAll('.mermaid').forEach(el => {
|
|
@@ -526,50 +677,111 @@ window.addEventListener('load', () => {
|
|
|
526
677
|
writeFileSync(path.join(docsDir, "report.html"), html);
|
|
527
678
|
}
|
|
528
679
|
function sanitizeMermaidGraph(graph) {
|
|
529
|
-
// Nettoyer les caractères problématiques
|
|
530
680
|
let cleaned = graph
|
|
531
681
|
.replace(/[""]/g, '"')
|
|
532
682
|
.replace(/['']/g, "'")
|
|
533
|
-
.replace(/\u00A0/g, ' ')
|
|
683
|
+
.replace(/\u00A0/g, ' ')
|
|
534
684
|
.trim();
|
|
535
|
-
// Vérifier que le graphe a une déclaration valide
|
|
536
685
|
if (!cleaned.match(/^(graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|gantt|pie|erDiagram)/)) {
|
|
537
686
|
cleaned = "graph TD\n " + cleaned;
|
|
538
687
|
}
|
|
539
|
-
// Limiter la complexité si trop de nœuds
|
|
540
688
|
const lines = cleaned.split('\n');
|
|
541
|
-
|
|
542
|
-
|
|
689
|
+
let enrichedGraph = lines[0] + '\n';
|
|
690
|
+
for (let i = 1; i < Math.min(lines.length, 40); i++) {
|
|
691
|
+
const line = lines[i]?.trim();
|
|
692
|
+
if (!line || line.startsWith('classDef'))
|
|
693
|
+
continue;
|
|
694
|
+
let styledLine = line;
|
|
695
|
+
if (line.includes('_js') || line.includes('.js"')) {
|
|
696
|
+
styledLine = line + ':::jsFileStyle';
|
|
697
|
+
}
|
|
698
|
+
else if (line.includes('_ts') || line.includes('.ts"')) {
|
|
699
|
+
styledLine = line + ':::tsFileStyle';
|
|
700
|
+
}
|
|
701
|
+
else if (line.includes('Analyzer') || line.includes('analyzer')) {
|
|
702
|
+
styledLine = line + ':::analyzerStyle';
|
|
703
|
+
}
|
|
704
|
+
else if (line.includes('Component') || line.includes('component')) {
|
|
705
|
+
styledLine = line + ':::componentStyle';
|
|
706
|
+
}
|
|
707
|
+
else if (line.match(/\(\)/)) {
|
|
708
|
+
styledLine = line + ':::functionStyle';
|
|
709
|
+
}
|
|
710
|
+
else if (line.includes('Service') || line.includes('service')) {
|
|
711
|
+
styledLine = line + ':::serviceStyle';
|
|
712
|
+
}
|
|
713
|
+
else if (line.includes('Config') || line.includes('config')) {
|
|
714
|
+
styledLine = line + ':::configStyle';
|
|
715
|
+
}
|
|
716
|
+
enrichedGraph += ' ' + styledLine + '\n';
|
|
543
717
|
}
|
|
544
|
-
|
|
718
|
+
enrichedGraph += `
|
|
719
|
+
classDef jsFileStyle fill:#f7df1e,stroke:#c9b003,stroke-width:2px,color:#000
|
|
720
|
+
classDef tsFileStyle fill:#3178c6,stroke:#235a97,stroke-width:2px,color:#fff
|
|
721
|
+
classDef analyzerStyle fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff
|
|
722
|
+
classDef componentStyle fill:#06b6d4,stroke:#0891b2,stroke-width:2px,color:#fff
|
|
723
|
+
classDef functionStyle fill:#ec4899,stroke:#be185d,stroke-width:2px,color:#fff
|
|
724
|
+
classDef serviceStyle fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
|
|
725
|
+
classDef configStyle fill:#6e7681,stroke:#484f58,stroke-width:2px,color:#fff`;
|
|
726
|
+
return enrichedGraph;
|
|
545
727
|
}
|
|
546
|
-
function generateHierarchyGraph(tree, maxDepth =
|
|
728
|
+
function generateHierarchyGraph(tree, maxDepth = 4) {
|
|
547
729
|
let graph = "graph TD\n";
|
|
548
730
|
let nodeId = 0;
|
|
549
|
-
const nodeMap = new Map();
|
|
550
731
|
function sanitizeLabel(label) {
|
|
551
|
-
return label.replace(/["\[\]]/g, '');
|
|
732
|
+
return label.replace(/["\[\]]/g, '').replace(/\//g, '');
|
|
733
|
+
}
|
|
734
|
+
function getFileExtension(filename) {
|
|
735
|
+
const parts = filename.split('.');
|
|
736
|
+
return parts.length > 1 ? parts[parts.length - 1] ?? "" : '';
|
|
552
737
|
}
|
|
553
|
-
function
|
|
738
|
+
function getNodeStyle(key, isFolder) {
|
|
739
|
+
if (isFolder) {
|
|
740
|
+
return ':::folderStyle';
|
|
741
|
+
}
|
|
742
|
+
const ext = getFileExtension(key);
|
|
743
|
+
const styleMap = {
|
|
744
|
+
'ts': ':::tsStyle',
|
|
745
|
+
'tsx': ':::tsStyle',
|
|
746
|
+
'js': ':::jsStyle',
|
|
747
|
+
'jsx': ':::jsStyle',
|
|
748
|
+
'json': ':::configStyle',
|
|
749
|
+
'html': ':::htmlStyle',
|
|
750
|
+
'css': ':::cssStyle',
|
|
751
|
+
'md': ':::docStyle'
|
|
752
|
+
};
|
|
753
|
+
return styleMap[ext] || ':::fileStyle';
|
|
754
|
+
}
|
|
755
|
+
function traverse(obj, parentId, depth) {
|
|
554
756
|
if (depth > maxDepth)
|
|
555
757
|
return;
|
|
556
|
-
const entries = Object.entries(obj)
|
|
758
|
+
const entries = Object.entries(obj);
|
|
557
759
|
entries.forEach(([key, value]) => {
|
|
558
760
|
const currentId = `node${nodeId++}`;
|
|
559
761
|
const isFolder = value && typeof value === 'object' && Object.keys(value).length > 0;
|
|
560
|
-
const label = sanitizeLabel(
|
|
561
|
-
|
|
562
|
-
|
|
762
|
+
const label = sanitizeLabel(key);
|
|
763
|
+
const displayLabel = isFolder ? `📁 ${label}` : `📄 ${label}`;
|
|
764
|
+
const style = getNodeStyle(key, isFolder || false);
|
|
765
|
+
graph += ` ${currentId}["${displayLabel}"]${style}\n`;
|
|
563
766
|
if (parentId) {
|
|
564
767
|
graph += ` ${parentId} --> ${currentId}\n`;
|
|
565
768
|
}
|
|
566
769
|
if (isFolder && value && depth < maxDepth) {
|
|
567
|
-
traverse(value, currentId, depth + 1
|
|
770
|
+
traverse(value, currentId, depth + 1);
|
|
568
771
|
}
|
|
569
772
|
});
|
|
570
773
|
}
|
|
571
774
|
try {
|
|
572
775
|
traverse(tree, null, 0);
|
|
776
|
+
graph += `
|
|
777
|
+
classDef folderStyle fill:#58a6ff,stroke:#1f6feb,stroke-width:2px,color:#fff
|
|
778
|
+
classDef tsStyle fill:#3178c6,stroke:#235a97,stroke-width:2px,color:#fff
|
|
779
|
+
classDef jsStyle fill:#f7df1e,stroke:#c9b003,stroke-width:2px,color:#000
|
|
780
|
+
classDef configStyle fill:#6e7681,stroke:#484f58,stroke-width:2px,color:#fff
|
|
781
|
+
classDef htmlStyle fill:#e34c26,stroke:#b83c1f,stroke-width:2px,color:#fff
|
|
782
|
+
classDef cssStyle fill:#264de4,stroke:#1b3ba3,stroke-width:2px,color:#fff
|
|
783
|
+
classDef docStyle fill:#22c55e,stroke:#16a34a,stroke-width:2px,color:#fff
|
|
784
|
+
classDef fileStyle fill:#8b949e,stroke:#6e7681,stroke-width:2px,color:#fff`;
|
|
573
785
|
return graph || getDefaultHierarchyGraph();
|
|
574
786
|
}
|
|
575
787
|
catch (e) {
|
|
@@ -579,18 +791,50 @@ function generateHierarchyGraph(tree, maxDepth = 3) {
|
|
|
579
791
|
}
|
|
580
792
|
function getDefaultHierarchyGraph() {
|
|
581
793
|
return `graph TD
|
|
582
|
-
A["Root"] --> B["src"]
|
|
583
|
-
A --> C["config"]
|
|
584
|
-
B --> D["components"]
|
|
585
|
-
B --> E["utils"]
|
|
586
|
-
B --> F["services"]
|
|
794
|
+
A["📁 Root"]:::folderStyle --> B["📁 src"]:::folderStyle
|
|
795
|
+
A --> C["📁 config"]:::folderStyle
|
|
796
|
+
B --> D["📁 components"]:::folderStyle
|
|
797
|
+
B --> E["📁 utils"]:::folderStyle
|
|
798
|
+
B --> F["📁 services"]:::folderStyle
|
|
799
|
+
|
|
800
|
+
classDef folderStyle fill:#58a6ff,stroke:#1f6feb,stroke-width:2px,color:#fff`;
|
|
587
801
|
}
|
|
588
802
|
function generateDataFlowGraph() {
|
|
589
803
|
return `graph LR
|
|
590
|
-
A["Input"] --> B["Analyzer"]
|
|
591
|
-
B --> C["Parser"]
|
|
592
|
-
C --> D["Generator"]
|
|
593
|
-
D --> E["Exporter"]
|
|
594
|
-
E --> F["Output"]
|
|
804
|
+
A["📥 Input<br/>(fichiers source)"]:::inputStyle --> B["🔍 Analyzer<br/>(analyse code)"]:::analyzerStyle
|
|
805
|
+
B --> C["📊 Parser<br/>(extraction données)"]:::parserStyle
|
|
806
|
+
C --> D["⚙️ Generator<br/>(génération docs)"]:::generatorStyle
|
|
807
|
+
D --> E["📤 Exporter<br/>(export HTML/PDF)"]:::exporterStyle
|
|
808
|
+
E --> F["✅ Output<br/>(documentation)"]:::outputStyle
|
|
809
|
+
|
|
810
|
+
classDef inputStyle fill:#3b82f6,stroke:#1d4ed8,stroke-width:2px,color:#fff
|
|
811
|
+
classDef analyzerStyle fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff
|
|
812
|
+
classDef parserStyle fill:#ec4899,stroke:#be185d,stroke-width:2px,color:#fff
|
|
813
|
+
classDef generatorStyle fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#fff
|
|
814
|
+
classDef exporterStyle fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
|
|
815
|
+
classDef outputStyle fill:#22c55e,stroke:#16a34a,stroke-width:2px,color:#fff`;
|
|
816
|
+
}
|
|
817
|
+
function formatRisksSection(risksContent, lang) {
|
|
818
|
+
const criticalMatches = risksContent.match(/🔴[^\n]+/g) || [];
|
|
819
|
+
const mediumMatches = risksContent.match(/🟡[^\n]+/g) || [];
|
|
820
|
+
const lowMatches = risksContent.match(/🟢[^\n]+/g) || [];
|
|
821
|
+
if (criticalMatches.length === 0 && mediumMatches.length === 0 && lowMatches.length === 0) {
|
|
822
|
+
return '';
|
|
823
|
+
}
|
|
824
|
+
let html = `
|
|
825
|
+
<div class="risks-section">
|
|
826
|
+
<h3>⚠️ ${lang === 'fr' ? 'Risques Identifiés' : 'Identified Risks'}</h3>
|
|
827
|
+
`;
|
|
828
|
+
criticalMatches.forEach(risk => {
|
|
829
|
+
html += `<div class="risk-item critical"><span class="risk-icon">🔴</span><span>${risk.replace(/🔴\s*/, '')}</span></div>`;
|
|
830
|
+
});
|
|
831
|
+
mediumMatches.forEach(risk => {
|
|
832
|
+
html += `<div class="risk-item medium"><span class="risk-icon">🟡</span><span>${risk.replace(/🟡\s*/, '')}</span></div>`;
|
|
833
|
+
});
|
|
834
|
+
lowMatches.forEach(risk => {
|
|
835
|
+
html += `<div class="risk-item low"><span class="risk-icon">🟢</span><span>${risk.replace(/🟢\s*/, '')}</span></div>`;
|
|
836
|
+
});
|
|
837
|
+
html += `</div>`;
|
|
838
|
+
return html;
|
|
595
839
|
}
|
|
596
840
|
//# sourceMappingURL=html.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../src/exporters/html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAM7B,MAAM,UAAU,YAAY,CACxB,OAAe,EACf,eAAuB,EACvB,YAAoB,EACpB,OAAoB,IAAI,EACxB,QAAwB;IAExB,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1C,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,SAAS,GAAG,KAAK,CAAC;IAEtB,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,IAAI;SACC,OAAO,CAAC,UAAU,EAAE,iBAAiB,CAAC;SACtC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;SAC/B,OAAO,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC;IAE/D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAE9B,gDAAgD;QAChD,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;gBACX,UAAU,IAAI,sCAAsC,CAAC;gBACrD,OAAO,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,SAAS;YAExC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAA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kBAAkB;CACrE,CAAC;IAEE,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC3B,IAAI,IAAI,0EAA0E,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC;IAC/H,CAAC,CAAC,CAAC;IAEH,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI,IAAI,wEAAwE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC;IAC7H,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACtB,IAAI,IAAI,qEAAqE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC;IAC1H,CAAC,CAAC,CAAC;IAEH,IAAI,IAAI,QAAQ,CAAC;IACjB,OAAO,IAAI,CAAC;AAEhB,CAAC"}
|
package/docs/docs-to-dev.md
CHANGED
|
@@ -1,85 +1,70 @@
|
|
|
1
1
|
# Rapport Technique DocsToDev
|
|
2
2
|
|
|
3
|
-
> 📅 Généré le : vendredi 9 janvier 2026 à 09:
|
|
3
|
+
> 📅 Généré le : vendredi 9 janvier 2026 à 09:22
|
|
4
4
|
> 📊 7 fichiers analysés • 15 dépendances identifiées
|
|
5
5
|
|
|
6
6
|
## 💡 Analyse Intelligente
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## 1.
|
|
9
9
|
|
|
10
10
|
**`But` du `Projet`**
|
|
11
|
-
`Le` projet `DocsToDev`
|
|
11
|
+
`Le` projet `DocsToDev` vise à analyser des données techniques brutes et à les transformer en documentation métier claire et structurée.
|
|
12
12
|
|
|
13
|
-
`Il`
|
|
13
|
+
`Il` résout les problèmes de compréhension et d'analyse de données techniques complexes pour les développeurs et les équipes de développement.
|
|
14
14
|
|
|
15
|
-
`Le`
|
|
15
|
+
`Le` public cible de ce projet inclut les développeurs, les architectes logiciels, et les équipes de développement qui cherchent à améliorer la qualité et la compréhension de leurs projets logiciels.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 2.
|
|
18
18
|
|
|
19
19
|
**`Design` `System` Détecté**
|
|
20
|
-
`Le`
|
|
21
|
-
- **`Palette` de couleurs** : `Les` couleurs
|
|
20
|
+
`Le` design system détecté dans le projet inclut :
|
|
21
|
+
- **`Palette` de couleurs** : `Les` couleurs primaires et secondaires utilisées dans le projet ne sont pas explicitement définies dans les extraits de code fournis, mais il est mentionné que la palette de couleurs fait partie de l'analyse du design system.
|
|
22
22
|
|
|
23
|
-
- **`Typographie`** : `
|
|
23
|
+
- **`Typographie`** : `Les` polices utilisées ne sont pas spécifiquement mentionnées dans les extraits de code fournis.
|
|
24
24
|
|
|
25
|
-
- **`Patterns` de composants** : `Les` patterns de composants
|
|
25
|
+
- **`Patterns` de composants** : `Les` patterns de composants, tels que les cartes, les modales, les formulaires, etc., sont détectés et documentés dans le projet.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## 3.
|
|
28
28
|
|
|
29
29
|
**⚠️ `Risques` `Identifi`és**
|
|
30
|
-
`Les` risques potentiels
|
|
31
|
-
- 🔴 **`Critique`** :
|
|
30
|
+
`Les` risques potentiels identifiés dans le projet sont classés par niveau :
|
|
31
|
+
- 🔴 **`Critique`** :
|
|
32
|
+
- `La` sécurité du projet pourrait être compromise si les clés API comme `GROQ_API_KEY` ne sont pas sécurisées correctement.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
- L'architecture du projet pourrait être affectée par la complexité et la maintenance des fichiers et des dépendances.
|
|
34
35
|
|
|
35
|
-
- 🟡 **`Moyen`** :
|
|
36
|
+
- 🟡 **`Moyen`** :
|
|
37
|
+
- `La` dette technique et les performances du projet pourraient être impactées par la complexité croissante des analyses et des exports.
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
- 🟢 **`Faible`** :
|
|
40
|
+
- `Les` améliorations mineures pourraient inclure la optimisation des requêtes, la mise à jour des dépendances, et la réduction de la duplication de code.
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### 4.
|
|
42
|
+
## 4.
|
|
42
43
|
|
|
43
44
|
**💡 `Recommandations`**
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
**`Refactoring`** : `Simplifier` et modulariser le code complexe pour améliorer la lisibilité et la maintenabilité.
|
|
48
|
-
|
|
49
|
-
2.
|
|
50
|
-
|
|
51
|
-
**`Optimisations`** : `Utiliser` des techniques d'optimisation pour améliorer les performances, comme la mise en cache des résultats d'analyse ou l'utilisation de workers pour les tâches longues.
|
|
52
|
-
|
|
53
|
-
3.
|
|
45
|
+
`Les` actions concrètes pour améliorer le projet sont :
|
|
46
|
+
- **`Refactoring`** : Réorganiser le code pour améliorer la lisibilité et la maintainabilité.
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
- **`Optimisations`** : `Optimiser` les performances en utilisant des méthodes plus efficaces pour les analyses et les exports.
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
- **`Bonnes` pratiques** : `Adopter` des bonnes pratiques de développement telles que les tests unitaires et d'intégration, et la mise à jour régulière des dépendances.
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
5.
|
|
62
|
-
|
|
63
|
-
**`Documentation`** : `Maintenir` une documentation claire et à jour sur l'architecture, les APIs, et les bonnes pratiques de développement pour faciliter la contribution et la maintenance.
|
|
64
|
-
|
|
65
|
-
### 5.
|
|
52
|
+
## 5.
|
|
66
53
|
|
|
67
54
|
**`Analyse` Détaillée des `Fichiers`**
|
|
68
|
-
- **`src/ai/`analyzer.ts`** : `Ce` fichier
|
|
55
|
+
- **`src/ai/`analyzer.ts`** : `Ce` fichier contient les fonctions d'analyse de l'IA, notamment `askAI` et `askAIDetailed`, qui analysent les données techniques et retournent des résultats détaillés.
|
|
69
56
|
|
|
70
|
-
`
|
|
57
|
+
- **`src/analyzers/`languageAnalyzer`.ts`** : `Ce` fichier contient les classes et les fonctions d'analyse de langage, notamment `TSJSAnalyzer`, qui analyse les fichiers de code et retourne des informations sur les exports, les imports, les fonctions, les classes, etc.
|
|
71
58
|
|
|
72
|
-
- **`src/cache/`cacheManager`.ts`** :
|
|
59
|
+
- **`src/cache/`cacheManager`.ts`** : `Ce` fichier contient la classe `CacheManager`, qui gère le cache des analyses pour améliorer les performances.
|
|
73
60
|
|
|
74
|
-
- **`src/
|
|
61
|
+
- **`src/cli/`index.ts`** : `Ce` fichier contient le point d'entrée de la ligne de commande, qui utilise les commandes pour exécuter les analyses et générer les rapports.
|
|
75
62
|
|
|
76
|
-
- **`src/
|
|
63
|
+
- **`src/commands/`generateSummary`.ts`** : `Ce` fichier contient la fonction `generateSummary`, qui génère un résumé du projet en fonction des données d'analyse.
|
|
77
64
|
|
|
78
|
-
- **`src/commands/`
|
|
65
|
+
- **`src/commands/`run.ts`** : `Ce` fichier contient la fonction `runCommand`, qui exécute les analyses et génère les rapports en fonction des options de la ligne de commande.
|
|
79
66
|
|
|
80
|
-
- **`src/
|
|
81
|
-
|
|
82
|
-
- **`src/exporters/`html.ts`** : `Exporte` le rapport d'analyse au format HTML, permettant une visualisation facile des résultats dans un navigateur web.
|
|
67
|
+
- **`src/exporters/`html.ts`** : `Ce` fichier contient la fonction `exportToHTML`, qui exporte les résultats des analyses en format HTML.
|
|
83
68
|
|
|
84
69
|
## 📂 Architecture du projet
|
|
85
70
|
|
|
@@ -110,6 +95,20 @@
|
|
|
110
95
|
|
|
111
96
|
---
|
|
112
97
|
|
|
98
|
+
### 📄 [`src/analyzers/languageAnalyzer.ts`](../src/analyzers/languageAnalyzer.ts)
|
|
99
|
+
|
|
100
|
+
**Complexité et maintenance** : 580 lignes • 🟠 Élevée (270)
|
|
101
|
+
|
|
102
|
+
**Fonctions** : `getAnalyzer()`, `getSupportedExtensions()`, `isExplicitlySupported()`
|
|
103
|
+
|
|
104
|
+
**Classes** : `TSJSAnalyzer`, `PythonAnalyzer`, `JavaAnalyzer`, `CSharpAnalyzer`, `GoAnalyzer`, `RustAnalyzer`, `HTMLAnalyzer`, `CSSAnalyzer`, `PHPAnalyzer`, `RubyAnalyzer`, `SQLAnalyzer`, `DefaultAnalyzer`
|
|
105
|
+
|
|
106
|
+
**Types/Interfaces** : `LanguageAnalyzer`, `FileAnalysisResult`
|
|
107
|
+
|
|
108
|
+
**Exports publics** : `LanguageAnalyzer`, `FileAnalysisResult`, `getAnalyzer`, `getSupportedExtensions`, `isExplicitlySupported`
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
113
112
|
### 📄 [`src/cache/cacheManager.ts`](../src/cache/cacheManager.ts)
|
|
114
113
|
|
|
115
114
|
**Complexité et maintenance** : 179 lignes • 🟢 Faible (36)
|
|
@@ -128,23 +127,9 @@
|
|
|
128
127
|
|
|
129
128
|
---
|
|
130
129
|
|
|
131
|
-
### 📄 [`src/analyzers/languageAnalyzer.ts`](../src/analyzers/languageAnalyzer.ts)
|
|
132
|
-
|
|
133
|
-
**Complexité et maintenance** : 580 lignes • 🟠 Élevée (270)
|
|
134
|
-
|
|
135
|
-
**Fonctions** : `getAnalyzer()`, `getSupportedExtensions()`, `isExplicitlySupported()`
|
|
136
|
-
|
|
137
|
-
**Classes** : `TSJSAnalyzer`, `PythonAnalyzer`, `JavaAnalyzer`, `CSharpAnalyzer`, `GoAnalyzer`, `RustAnalyzer`, `HTMLAnalyzer`, `CSSAnalyzer`, `PHPAnalyzer`, `RubyAnalyzer`, `SQLAnalyzer`, `DefaultAnalyzer`
|
|
138
|
-
|
|
139
|
-
**Types/Interfaces** : `LanguageAnalyzer`, `FileAnalysisResult`
|
|
140
|
-
|
|
141
|
-
**Exports publics** : `LanguageAnalyzer`, `FileAnalysisResult`, `getAnalyzer`, `getSupportedExtensions`, `isExplicitlySupported`
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
130
|
### 📄 [`src/cli/index.ts`](../src/cli/index.ts)
|
|
146
131
|
|
|
147
|
-
**Complexité et maintenance** :
|
|
132
|
+
**Complexité et maintenance** : 355 lignes • 🟡 Modérée (77)
|
|
148
133
|
|
|
149
134
|
**Fonctions** : `typeWriter()`, `showBanner()`, `selectLanguage()`, `showTransition()`
|
|
150
135
|
|