dir-analysis-tool 1.0.0 → 1.0.2

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.
Files changed (62) hide show
  1. package/README.md +39 -39
  2. package/bin/advanced-analysis.d.ts +43 -0
  3. package/bin/advanced-analysis.d.ts.map +1 -0
  4. package/bin/advanced-analysis.js +187 -0
  5. package/bin/advanced-analysis.js.map +1 -0
  6. package/bin/analyzer.d.ts +40 -0
  7. package/bin/analyzer.d.ts.map +1 -0
  8. package/bin/analyzer.js +215 -0
  9. package/bin/analyzer.js.map +1 -0
  10. package/bin/classifier.d.ts +27 -0
  11. package/bin/classifier.d.ts.map +1 -0
  12. package/{src/classifier.ts → bin/classifier.js} +63 -83
  13. package/bin/classifier.js.map +1 -0
  14. package/bin/cli.d.ts +2 -0
  15. package/bin/cli.d.ts.map +1 -0
  16. package/bin/cli.js +423 -0
  17. package/bin/cli.js.map +1 -0
  18. package/bin/config.d.ts +10 -0
  19. package/bin/config.d.ts.map +1 -0
  20. package/bin/config.js +94 -0
  21. package/bin/config.js.map +1 -0
  22. package/bin/export.d.ts +20 -0
  23. package/bin/export.d.ts.map +1 -0
  24. package/{src/export.ts → bin/export.js} +56 -80
  25. package/bin/export.js.map +1 -0
  26. package/bin/html-report.d.ts +12 -0
  27. package/bin/html-report.d.ts.map +1 -0
  28. package/{src/html-report.ts → bin/html-report.js} +83 -92
  29. package/bin/html-report.js.map +1 -0
  30. package/bin/index.d.ts +3 -0
  31. package/bin/index.d.ts.map +1 -0
  32. package/bin/index.js +1 -1
  33. package/bin/index.js.map +1 -0
  34. package/bin/interactive.d.ts +27 -0
  35. package/bin/interactive.d.ts.map +1 -0
  36. package/{src/interactive.ts → bin/interactive.js} +637 -656
  37. package/bin/interactive.js.map +1 -0
  38. package/bin/progress.d.ts +9 -0
  39. package/bin/progress.d.ts.map +1 -0
  40. package/{src/progress.ts → bin/progress.js} +42 -47
  41. package/bin/progress.js.map +1 -0
  42. package/bin/tree-view.d.ts +21 -0
  43. package/bin/tree-view.d.ts.map +1 -0
  44. package/{src/tree-view.ts → bin/tree-view.js} +140 -129
  45. package/bin/tree-view.js.map +1 -0
  46. package/{src/types.ts → bin/types.d.ts} +43 -47
  47. package/bin/types.d.ts.map +1 -0
  48. package/bin/types.js +3 -0
  49. package/bin/types.js.map +1 -0
  50. package/bin/utils.d.ts +24 -0
  51. package/bin/utils.d.ts.map +1 -0
  52. package/{src/utils.ts → bin/utils.js} +59 -54
  53. package/bin/utils.js.map +1 -0
  54. package/package.json +6 -1
  55. package/.dir-analyzer.json +0 -11
  56. package/example-config.json +0 -13
  57. package/src/advanced-analysis.ts +0 -185
  58. package/src/analyzer.ts +0 -278
  59. package/src/cli.ts +0 -431
  60. package/src/config.ts +0 -66
  61. package/src/index.ts +0 -2
  62. package/tsconfig.json +0 -31
@@ -1,80 +1,56 @@
1
- import { AnalysisResult } from './analyzer';
2
- import { DuplicateFileGroup, LargeFile, EmptyFile } from './types';
3
-
4
- export interface ExtendedAnalysisResult extends AnalysisResult {
5
- largeFiles?: LargeFile[];
6
- duplicateGroups?: DuplicateFileGroup[];
7
- duplicateStats?: {
8
- totalGroups: number;
9
- totalWastedSpace: number;
10
- totalWastedSpaceFormatted: string;
11
- };
12
- // Phase 1 new properties
13
- emptyFiles?: EmptyFile[];
14
- topLargestFiles?: LargeFile[];
15
- treeView?: string;
16
- }
17
-
18
- export class CSVExporter {
19
- static exportAnalysis(result: ExtendedAnalysisResult): string {
20
- const lines: string[] = [];
21
-
22
- // Header
23
- lines.push('Type,Path,Size (Bytes),Size (Formatted),Count,Details');
24
-
25
- // Summary
26
- lines.push(`Summary,${result.path},${result.totalSizeBytes},${result.totalSizeMB}MB,${result.files},Folders: ${result.folders}`);
27
-
28
- // File types
29
- Object.entries(result.types).forEach(([type, count]) => {
30
- if (count > 0) {
31
- lines.push(`FileType,${type},-,-,${count},-`);
32
- }
33
- });
34
-
35
- // Large files
36
- if (result.largeFiles && result.largeFiles.length > 0) {
37
- result.largeFiles.forEach(file => {
38
- lines.push(`LargeFile,"${file.path}",${file.size},"${file.sizeFormatted}",1,-`);
39
- });
40
- }
41
-
42
- // Duplicate groups
43
- if (result.duplicateGroups && result.duplicateGroups.length > 0) {
44
- result.duplicateGroups.forEach((group, index) => {
45
- group.files.forEach((file, fileIndex) => {
46
- const details = fileIndex === 0
47
- ? `Group ${index + 1}, Total files: ${group.files.length}, Wasted space: ${group.totalWastedSpaceFormatted}`
48
- : `Group ${index + 1} (duplicate)`;
49
- lines.push(`Duplicate,"${file}",${group.size},"${group.sizeFormatted}",1,"${details}"`);
50
- });
51
- });
52
- }
53
-
54
- return lines.join('\n');
55
- }
56
-
57
- static exportLargeFiles(largeFiles: LargeFile[]): string {
58
- const lines: string[] = [];
59
- lines.push('Path,Size (Bytes),Size (Formatted)');
60
-
61
- largeFiles.forEach(file => {
62
- lines.push(`"${file.path}",${file.size},"${file.sizeFormatted}"`);
63
- });
64
-
65
- return lines.join('\n');
66
- }
67
-
68
- static exportDuplicates(duplicateGroups: DuplicateFileGroup[]): string {
69
- const lines: string[] = [];
70
- lines.push('Group,Path,Size (Bytes),Size (Formatted),Files in Group,Wasted Space');
71
-
72
- duplicateGroups.forEach((group, index) => {
73
- group.files.forEach(file => {
74
- lines.push(`${index + 1},"${file}",${group.size},"${group.sizeFormatted}",${group.files.length},"${group.totalWastedSpaceFormatted}"`);
75
- });
76
- });
77
-
78
- return lines.join('\n');
79
- }
80
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CSVExporter = void 0;
4
+ class CSVExporter {
5
+ static exportAnalysis(result) {
6
+ const lines = [];
7
+ // Header
8
+ lines.push('Type,Path,Size (Bytes),Size (Formatted),Count,Details');
9
+ // Summary
10
+ lines.push(`Summary,${result.path},${result.totalSizeBytes},${result.totalSizeMB}MB,${result.files},Folders: ${result.folders}`);
11
+ // File types
12
+ Object.entries(result.types).forEach(([type, count]) => {
13
+ if (count > 0) {
14
+ lines.push(`FileType,${type},-,-,${count},-`);
15
+ }
16
+ });
17
+ // Large files
18
+ if (result.largeFiles && result.largeFiles.length > 0) {
19
+ result.largeFiles.forEach(file => {
20
+ lines.push(`LargeFile,"${file.path}",${file.size},"${file.sizeFormatted}",1,-`);
21
+ });
22
+ }
23
+ // Duplicate groups
24
+ if (result.duplicateGroups && result.duplicateGroups.length > 0) {
25
+ result.duplicateGroups.forEach((group, index) => {
26
+ group.files.forEach((file, fileIndex) => {
27
+ const details = fileIndex === 0
28
+ ? `Group ${index + 1}, Total files: ${group.files.length}, Wasted space: ${group.totalWastedSpaceFormatted}`
29
+ : `Group ${index + 1} (duplicate)`;
30
+ lines.push(`Duplicate,"${file}",${group.size},"${group.sizeFormatted}",1,"${details}"`);
31
+ });
32
+ });
33
+ }
34
+ return lines.join('\n');
35
+ }
36
+ static exportLargeFiles(largeFiles) {
37
+ const lines = [];
38
+ lines.push('Path,Size (Bytes),Size (Formatted)');
39
+ largeFiles.forEach(file => {
40
+ lines.push(`"${file.path}",${file.size},"${file.sizeFormatted}"`);
41
+ });
42
+ return lines.join('\n');
43
+ }
44
+ static exportDuplicates(duplicateGroups) {
45
+ const lines = [];
46
+ lines.push('Group,Path,Size (Bytes),Size (Formatted),Files in Group,Wasted Space');
47
+ duplicateGroups.forEach((group, index) => {
48
+ group.files.forEach(file => {
49
+ lines.push(`${index + 1},"${file}",${group.size},"${group.sizeFormatted}",${group.files.length},"${group.totalWastedSpaceFormatted}"`);
50
+ });
51
+ });
52
+ return lines.join('\n');
53
+ }
54
+ }
55
+ exports.CSVExporter = CSVExporter;
56
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../src/export.ts"],"names":[],"mappings":";;;AAiBA,MAAa,WAAW;IACpB,MAAM,CAAC,cAAc,CAAC,MAA8B;QAChD,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,SAAS;QACT,KAAK,CAAC,IAAI,CAAC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CAAC,CAAC;IAC5B,CAAC;CACJ;AA9DD,kCA8DC"}
@@ -0,0 +1,12 @@
1
+ import { ExtendedAnalysisResult } from './export';
2
+ export declare class HTMLReportGenerator {
3
+ static generateReport(result: ExtendedAnalysisResult, filename?: string): Promise<string>;
4
+ private static generateHTML;
5
+ private static getCSS;
6
+ private static getJavaScript;
7
+ private static getFileTypeChartData;
8
+ private static getLargestFilesChartData;
9
+ private static countNonZeroTypes;
10
+ private static escapeHtml;
11
+ }
12
+ //# sourceMappingURL=html-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-report.d.ts","sourceRoot":"","sources":["../src/html-report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIlD,qBAAa,mBAAmB;WACf,cAAc,CAAC,MAAM,EAAE,sBAAsB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAwB/F,OAAO,CAAC,MAAM,CAAC,YAAY;IA0JzB,OAAO,CAAC,MAAM,CAAC,MAAM;IAqUvB,OAAO,CAAC,MAAM,CAAC,aAAa;IAmJ5B,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAwBnC,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAevC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAE9B,OAAO,CAAC,MAAM,CAAC,UAAU;CAO9B"}
@@ -1,33 +1,31 @@
1
- import { ExtendedAnalysisResult } from './export';
2
- import { formatSize } from './utils';
3
- import { promises as fs } from 'fs';
4
-
5
- export class HTMLReportGenerator {
6
- static async generateReport(result: ExtendedAnalysisResult, filename?: string): Promise<string> {
7
- let outputFile = filename || `directory-analysis-${new Date().toISOString().slice(0, 10)}.html`;
8
-
9
- // Check if the provided filename is actually a directory
10
- if (filename) {
11
- try {
12
- const stats = await fs.stat(filename);
13
- if (stats.isDirectory()) {
14
- // If it's a directory, generate a filename inside that directory
15
- const path = require('path');
16
- outputFile = path.join(filename, `directory-analysis-${new Date().toISOString().slice(0, 10)}.html`);
17
- }
18
- } catch (error) {
19
- // If stat fails, assume it's a valid filename (file doesn't exist yet)
20
- outputFile = filename;
21
- }
22
- }
23
-
24
- const html = this.generateHTML(result);
25
- await fs.writeFile(outputFile, html);
26
-
27
- return outputFile;
28
- }
29
-
30
- private static generateHTML(result: ExtendedAnalysisResult): string {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTMLReportGenerator = void 0;
4
+ const utils_1 = require("./utils");
5
+ const fs_1 = require("fs");
6
+ class HTMLReportGenerator {
7
+ static async generateReport(result, filename) {
8
+ let outputFile = filename || `directory-analysis-${new Date().toISOString().slice(0, 10)}.html`;
9
+ // Check if the provided filename is actually a directory
10
+ if (filename) {
11
+ try {
12
+ const stats = await fs_1.promises.stat(filename);
13
+ if (stats.isDirectory()) {
14
+ // If it's a directory, generate a filename inside that directory
15
+ const path = require('path');
16
+ outputFile = path.join(filename, `directory-analysis-${new Date().toISOString().slice(0, 10)}.html`);
17
+ }
18
+ }
19
+ catch (error) {
20
+ // If stat fails, assume it's a valid filename (file doesn't exist yet)
21
+ outputFile = filename;
22
+ }
23
+ }
24
+ const html = this.generateHTML(result);
25
+ await fs_1.promises.writeFile(outputFile, html);
26
+ return outputFile;
27
+ }
28
+ static generateHTML(result) {
31
29
  return `<!DOCTYPE html>
32
30
  <html lang="en">
33
31
  <head>
@@ -52,7 +50,7 @@ export class HTMLReportGenerator {
52
50
  <div class="summary-icon">📦</div>
53
51
  <div class="summary-content">
54
52
  <h3>Total Size</h3>
55
- <p class="summary-value">${formatSize(result.totalSizeBytes)}</p>
53
+ <p class="summary-value">${(0, utils_1.formatSize)(result.totalSizeBytes)}</p>
56
54
  </div>
57
55
  </div>
58
56
  <div class="summary-card">
@@ -180,8 +178,9 @@ export class HTMLReportGenerator {
180
178
  ${this.getJavaScript(result)}
181
179
  </script>
182
180
  </body>
183
- </html>`;
184
- } private static getCSS(): string {
181
+ </html>`;
182
+ }
183
+ static getCSS() {
185
184
  return `
186
185
  * {
187
186
  margin: 0;
@@ -503,13 +502,11 @@ export class HTMLReportGenerator {
503
502
  margin-bottom: 10px;
504
503
  }
505
504
  }
506
- `;
507
- }
508
-
509
- private static getJavaScript(result: ExtendedAnalysisResult): string {
510
- const fileTypeData = this.getFileTypeChartData(result.types);
511
- const largestFilesData = this.getLargestFilesChartData(result.topLargestFiles);
512
-
505
+ `;
506
+ }
507
+ static getJavaScript(result) {
508
+ const fileTypeData = this.getFileTypeChartData(result.types);
509
+ const largestFilesData = this.getLargestFilesChartData(result.topLargestFiles);
513
510
  return ` // File Type Chart
514
511
  const fileTypeCtx = document.getElementById('fileTypeChart').getContext('2d');
515
512
  new Chart(fileTypeCtx, {
@@ -650,55 +647,49 @@ export class HTMLReportGenerator {
650
647
  const i = Math.floor(Math.log(bytes) / Math.log(k));
651
648
  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
652
649
  }
653
- `;
654
- }
655
-
656
- private static getFileTypeChartData(types: any): { labels: string[], data: number[] } {
657
- const typeMapping = {
658
- code: '🧑‍💻 Code',
659
- images: '📷 Images',
660
- documents: '📄 Documents',
661
- videos: '🎬 Videos',
662
- audio: '🎵 Audio',
663
- archives: '🗃️ Archives',
664
- other: '❓ Other'
665
- };
666
-
667
- const labels: string[] = [];
668
- const data: number[] = [];
669
-
670
- Object.entries(types).forEach(([key, value]) => {
671
- if ((value as number) > 0) {
672
- labels.push(typeMapping[key as keyof typeof typeMapping] || key);
673
- data.push(value as number);
674
- }
675
- });
676
-
677
- return { labels, data };
678
- }
679
-
680
- private static getLargestFilesChartData(topFiles?: any[]): { labels: string[], data: number[] } {
681
- if (!topFiles || topFiles.length === 0) {
682
- return { labels: [], data: [] };
683
- }
684
-
685
- const labels = topFiles.map(file => {
686
- const fileName = file.path.split(/[/\\]/).pop() || file.path;
687
- return fileName.length > 20 ? fileName.substring(0, 17) + '...' : fileName;
688
- });
689
-
690
- const data = topFiles.map(file => file.size);
691
-
692
- return { labels, data };
693
- }
694
-
695
- private static countNonZeroTypes(types: any): number {
696
- return Object.values(types).filter(count => (count as number) > 0).length;
697
- } private static escapeHtml(text: string): string {
698
- return text
699
- .replace(/&/g, '&amp;')
700
- .replace(/</g, '&lt;').replace(/>/g, '&gt;')
701
- .replace(/"/g, '&quot;')
702
- .replace(/'/g, '&#39;');
703
- }
704
- }
650
+ `;
651
+ }
652
+ static getFileTypeChartData(types) {
653
+ const typeMapping = {
654
+ code: '🧑‍💻 Code',
655
+ images: '📷 Images',
656
+ documents: '📄 Documents',
657
+ videos: '🎬 Videos',
658
+ audio: '🎵 Audio',
659
+ archives: '🗃️ Archives',
660
+ other: '❓ Other'
661
+ };
662
+ const labels = [];
663
+ const data = [];
664
+ Object.entries(types).forEach(([key, value]) => {
665
+ if (value > 0) {
666
+ labels.push(typeMapping[key] || key);
667
+ data.push(value);
668
+ }
669
+ });
670
+ return { labels, data };
671
+ }
672
+ static getLargestFilesChartData(topFiles) {
673
+ if (!topFiles || topFiles.length === 0) {
674
+ return { labels: [], data: [] };
675
+ }
676
+ const labels = topFiles.map(file => {
677
+ const fileName = file.path.split(/[/\\]/).pop() || file.path;
678
+ return fileName.length > 20 ? fileName.substring(0, 17) + '...' : fileName;
679
+ });
680
+ const data = topFiles.map(file => file.size);
681
+ return { labels, data };
682
+ }
683
+ static countNonZeroTypes(types) {
684
+ return Object.values(types).filter(count => count > 0).length;
685
+ }
686
+ static escapeHtml(text) {
687
+ return text
688
+ .replace(/&/g, '&amp;')
689
+ .replace(/</g, '&lt;').replace(/>/g, '&gt;')
690
+ .replace(/"/g, '&quot;')
691
+ .replace(/'/g, '&#39;');
692
+ }
693
+ }
694
+ exports.HTMLReportGenerator = HTMLReportGenerator;
695
+ //# sourceMappingURL=html-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-report.js","sourceRoot":"","sources":["../src/html-report.ts"],"names":[],"mappings":";;;AACA,mCAAqC;AACr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O,CAAC;aACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;aAC3C,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;aACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;CACJ;AA3rBD,kDA2rBC"}
package/bin/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import './cli.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,UAAU,CAAC"}
package/bin/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- require("./cli");
4
+ require("./cli.js");
5
5
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,oBAAkB"}
@@ -0,0 +1,27 @@
1
+ export declare class InteractiveMode {
2
+ private analyzer;
3
+ private currentResult;
4
+ private currentPath;
5
+ constructor();
6
+ start(): Promise<void>;
7
+ private showMainMenu;
8
+ private analyzeDirectory;
9
+ private getAnalysisOptions;
10
+ private getFileFilters;
11
+ private changePath;
12
+ private displayBasicResults;
13
+ private viewResults;
14
+ private displayTreeView;
15
+ private displayLargeFiles;
16
+ private displayDuplicates;
17
+ private displayEmptyFiles;
18
+ private displayTopFiles;
19
+ private exportResults;
20
+ private getDefaultFilename;
21
+ private advancedOptions;
22
+ private comparDirectories;
23
+ private displayComparison;
24
+ private showSettings;
25
+ private showHelp;
26
+ }
27
+ //# sourceMappingURL=interactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAUA,qBAAa,eAAe;IACxB,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,aAAa,CAAuC;IAC5D,OAAO,CAAC,WAAW,CAAyB;;IAMtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAoCd,YAAY;YAyBZ,gBAAgB;YAwBhB,kBAAkB;YAiFlB,cAAc;YA0Ed,UAAU;YAuBV,mBAAmB;YA6BnB,WAAW;IAmDzB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,eAAe;YAaT,aAAa;IAgE3B,OAAO,CAAC,kBAAkB;YAkBZ,eAAe;YA8Bf,iBAAiB;IA6C/B,OAAO,CAAC,iBAAiB;YAsBX,YAAY;IAO1B,OAAO,CAAC,QAAQ;CA6BnB"}