docstodev 2.0.1 → 3.0.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/README.md +60 -0
- 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 +69 -49
- package/docs/report.html +8 -3
- package/docs/summary.md +1 -1
- package/package.json +1 -1
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,CAAC,CAAC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;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,70 +1,90 @@
|
|
|
1
1
|
# Rapport Technique DocsToDev
|
|
2
2
|
|
|
3
|
-
> 📅 Généré le : vendredi 9 janvier 2026 à
|
|
3
|
+
> 📅 Généré le : vendredi 9 janvier 2026 à 10:01
|
|
4
4
|
> 📊 7 fichiers analysés • 15 dépendances identifiées
|
|
5
5
|
|
|
6
|
+
## 🎯 But du Projet
|
|
7
|
+
|
|
8
|
+
Le projet DocsToDev est conçu pour analyser et générer des documents techniques à partir de données brutes de projets logiciels. Il vise à résoudre les problèmes liés à la documentation et à la compréhension des structures de projets complexes. Le public cible est constitué de développeurs, d'architectes logiciels et de membres d'équipes de développement qui ont besoin d'une vision claire et d'une compréhension approfondie de leurs projets.
|
|
9
|
+
|
|
10
|
+
## 💡 Recommandations
|
|
11
|
+
|
|
12
|
+
- 1. **Refactorisation et Modularisation** : Organiser le code en modules plus petits et plus spécialisés pour améliorer la lisibilité et la maintenabilité.
|
|
13
|
+
2. **Gestion des Secrets** : Utiliser des méthodes sécurisées pour stocker et récupérer les clés API et autres secrets, comme les variables d'environnement ou des services de gestion de secrets.
|
|
14
|
+
3. **Optimisation des Performances** : Analyser les performances de l'application, notamment lors de l'analyse de projets de grande taille, et optimiser les algorithmes et les requêtes pour améliorer les temps de réponse.
|
|
15
|
+
4. **Tests Automatisés** : Développer une suite de tests automatisés pour vérifier la fonctionnalité, la performance et la sécurité de l'application.
|
|
16
|
+
5. **Documentation et Commentaires** : Améliorer la documentation et les commentaires dans le code pour faciliter la compréhension et la maintenance par d'autres développeurs.
|
|
17
|
+
|
|
6
18
|
## 💡 Analyse Intelligente
|
|
7
19
|
|
|
8
|
-
##
|
|
20
|
+
## `But` du `Projet`
|
|
21
|
+
`Le` projet `DocsToDev` est conçu pour analyser et générer des documents techniques à partir de données brutes de projets logiciels.
|
|
22
|
+
|
|
23
|
+
`Il` vise à résoudre les problèmes liés à la documentation et à la compréhension des structures de projets complexes.
|
|
24
|
+
|
|
25
|
+
`Le` public cible est constitué de développeurs, d'architectes logiciels et de membres d'équipes de développement qui ont besoin d'une vision claire et d'une compréhension approfondie de leurs projets.
|
|
26
|
+
|
|
27
|
+
## `Design` `System` Détecté
|
|
28
|
+
`Le` projet utilise une palette de couleurs qui n'est pas explicitement définie dans les extraits de code fournis, mais il semblerait qu'il s'appuie sur des standards web modernes.
|
|
29
|
+
|
|
30
|
+
`La` typographie est également standard, sans spécifications particulières.
|
|
31
|
+
|
|
32
|
+
`Les` patterns de composants incluent des éléments tels que des tables, des liens, des codes, et potentiellement des graphiques générés par `Mermaid` pour représenter des structures de données ou des flux de travail.
|
|
9
33
|
|
|
10
|
-
|
|
11
|
-
|
|
34
|
+
## `Risques` `Identifi`és
|
|
35
|
+
- 🔴 **`Critique`** : `La` sécurité des données et la gestion des clés API (comme la clé GROQ_API_KEY) sont cruciales.
|
|
12
36
|
|
|
13
|
-
|
|
37
|
+
L'exposition de ces clés dans le code pose un risque élevé.
|
|
14
38
|
|
|
15
|
-
|
|
39
|
+
- 🟡 **`Moyen`** : `La` complexité du code et la gestion des dépendances pourraient nécessiter une attention particulière pour éviter les problèmes de maintenance et de performance.
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
- 🟢 **`Faible`** : L'amélioration de l'expérience utilisateur et la personnalisation de la génération de rapports pourraient être des points d'amélioration mineurs mais importants pour l'adoption et la satisfaction des utilisateurs.
|
|
18
42
|
|
|
19
|
-
|
|
20
|
-
|
|
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.
|
|
43
|
+
## `Recommandations`
|
|
44
|
+
1.
|
|
22
45
|
|
|
23
|
-
|
|
46
|
+
**`Refactorisation` et `Modularisation`** : `Organiser` le code en modules plus petits et plus spécialisés pour améliorer la lisibilité et la maintenabilité.
|
|
24
47
|
|
|
25
|
-
|
|
48
|
+
2.
|
|
26
49
|
|
|
27
|
-
|
|
50
|
+
**`Gestion` des `Secrets`** : `Utiliser` des méthodes sécurisées pour stocker et récupérer les clés API et autres secrets, comme les variables d'environnement ou des services de gestion de secrets.
|
|
28
51
|
|
|
29
|
-
|
|
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.
|
|
52
|
+
3.
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
**`Optimisation` des `Performances`** : `Analyser` les performances de l'application, notamment lors de l'analyse de projets de grande taille, et optimiser les algorithmes et les requêtes pour améliorer les temps de réponse.
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
- `La` dette technique et les performances du projet pourraient être impactées par la complexité croissante des analyses et des exports.
|
|
56
|
+
4.
|
|
38
57
|
|
|
39
|
-
|
|
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.
|
|
58
|
+
**`Tests` `Automatis`és** : Développer une suite de tests automatisés pour vérifier la fonctionnalité, la performance et la sécurité de l'application.
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
5.
|
|
43
61
|
|
|
44
|
-
|
|
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é.
|
|
62
|
+
**`Documentation` et `Commentaires`** : `Am`éliorer la documentation et les commentaires dans le code pour faciliter la compréhension et la maintenance par d'autres développeurs.
|
|
47
63
|
|
|
48
|
-
|
|
64
|
+
## `Analyse` Détaillée des `Fichiers`
|
|
65
|
+
- **`src/analyzers/`languageAnalyzer`.ts`** : `Ce` fichier définit les analyseurs de langages de programmation.
|
|
49
66
|
|
|
50
|
-
|
|
67
|
+
`Il` joue un rôle crucial dans l'analyse du code source et la génération de rapports.
|
|
51
68
|
|
|
52
|
-
|
|
69
|
+
`Ses` dépendances incluent les régular expressions pour l'analyse syntaxique.
|
|
53
70
|
|
|
54
|
-
**`
|
|
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.
|
|
71
|
+
- **`src/ai/`analyzer.ts`** : `Ce` fichier est responsable de l'interaction avec l'IA pour l'analyse des données techniques.
|
|
56
72
|
|
|
57
|
-
|
|
73
|
+
`Il` utilise des options de configuration pour personnaliser l'analyse et les résultats.
|
|
58
74
|
|
|
59
|
-
- **`src/cache/`cacheManager`.ts`** : `
|
|
75
|
+
- **`src/cache/`cacheManager`.ts`** : `Il` gère le cache des analyses pour améliorer les performances en réutilisant les résultats d'analyses précédentes.
|
|
60
76
|
|
|
61
|
-
|
|
77
|
+
`Ses` dépendances incluent les modules de fichier et de cryptographie pour la gestion sécurisée du cache.
|
|
62
78
|
|
|
63
|
-
- **`src/
|
|
79
|
+
- **`src/cli/`index.ts`** : `Ce` fichier définit l'interface de ligne de commande de l'application.
|
|
64
80
|
|
|
65
|
-
|
|
81
|
+
`Il` utilise des commandes pour exécuter des tâches spécifiques, comme générer des résumés ou exécuter l'analyse.
|
|
66
82
|
|
|
67
|
-
- **`src/
|
|
83
|
+
- **`src/commands/`generateSummary`.ts`** : `Il` est utilisé pour générer un résumé du projet analysé, en incluant des métadonnées et des statistiques sur le code.
|
|
84
|
+
|
|
85
|
+
- **`src/commands/`run.ts`** : `Ce` fichier contient la logique pour exécuter l'analyse complète d'un projet, en utilisant les analyseurs de langage et les capacités d'analyse IA.
|
|
86
|
+
|
|
87
|
+
- **`src/exporters/`html.ts`** : `Il` est responsable de la conversion des résultats d'analyse en documents HTML, facilitant ainsi la visualisation et la partage des résultats.
|
|
68
88
|
|
|
69
89
|
## 📂 Architecture du projet
|
|
70
90
|
|
|
@@ -83,18 +103,6 @@
|
|
|
83
103
|
|
|
84
104
|
## 🔬 Analyse détaillée des composants
|
|
85
105
|
|
|
86
|
-
### 📄 [`src/ai/analyzer.ts`](../src/ai/analyzer.ts)
|
|
87
|
-
|
|
88
|
-
**Complexité et maintenance** : 289 lignes • 🟢 Faible (46)
|
|
89
|
-
|
|
90
|
-
**Fonctions** : `askAI()`, `askAIDetailed()`, `buildSystemPrompt()`, `parseAIResponse()`
|
|
91
|
-
|
|
92
|
-
**Types/Interfaces** : `AIAnalysisOptions`, `AIAnalysisResult`
|
|
93
|
-
|
|
94
|
-
**Exports publics** : `AIAnalysisOptions`, `AIAnalysisResult`, `askAI`, `askAIDetailed`
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
106
|
### 📄 [`src/analyzers/languageAnalyzer.ts`](../src/analyzers/languageAnalyzer.ts)
|
|
99
107
|
|
|
100
108
|
**Complexité et maintenance** : 580 lignes • 🟠 Élevée (270)
|
|
@@ -109,6 +117,18 @@
|
|
|
109
117
|
|
|
110
118
|
---
|
|
111
119
|
|
|
120
|
+
### 📄 [`src/ai/analyzer.ts`](../src/ai/analyzer.ts)
|
|
121
|
+
|
|
122
|
+
**Complexité et maintenance** : 289 lignes • 🟢 Faible (46)
|
|
123
|
+
|
|
124
|
+
**Fonctions** : `askAI()`, `askAIDetailed()`, `buildSystemPrompt()`, `parseAIResponse()`
|
|
125
|
+
|
|
126
|
+
**Types/Interfaces** : `AIAnalysisOptions`, `AIAnalysisResult`
|
|
127
|
+
|
|
128
|
+
**Exports publics** : `AIAnalysisOptions`, `AIAnalysisResult`, `askAI`, `askAIDetailed`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
112
132
|
### 📄 [`src/cache/cacheManager.ts`](../src/cache/cacheManager.ts)
|
|
113
133
|
|
|
114
134
|
**Complexité et maintenance** : 179 lignes • 🟢 Faible (36)
|