depfixer 1.0.0
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 +128 -0
- package/dist/commands/analyze.d.ts +18 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +404 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/fix.d.ts +14 -0
- package/dist/commands/fix.d.ts.map +1 -0
- package/dist/commands/fix.js +82 -0
- package/dist/commands/fix.js.map +1 -0
- package/dist/commands/graph.d.ts +12 -0
- package/dist/commands/graph.d.ts.map +1 -0
- package/dist/commands/graph.js +58 -0
- package/dist/commands/graph.js.map +1 -0
- package/dist/commands/login.d.ts +11 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +109 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +7 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +22 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +108 -0
- package/dist/index.js.map +1 -0
- package/dist/services/api-client.d.ts +89 -0
- package/dist/services/api-client.d.ts.map +1 -0
- package/dist/services/api-client.js +162 -0
- package/dist/services/api-client.js.map +1 -0
- package/dist/services/auth-manager.d.ts +30 -0
- package/dist/services/auth-manager.d.ts.map +1 -0
- package/dist/services/auth-manager.js +82 -0
- package/dist/services/auth-manager.js.map +1 -0
- package/dist/services/cache-manager.d.ts +52 -0
- package/dist/services/cache-manager.d.ts.map +1 -0
- package/dist/services/cache-manager.js +87 -0
- package/dist/services/cache-manager.js.map +1 -0
- package/dist/services/gitignore.d.ts +19 -0
- package/dist/services/gitignore.d.ts.map +1 -0
- package/dist/services/gitignore.js +64 -0
- package/dist/services/gitignore.js.map +1 -0
- package/dist/services/package-json.d.ts +39 -0
- package/dist/services/package-json.d.ts.map +1 -0
- package/dist/services/package-json.js +106 -0
- package/dist/services/package-json.js.map +1 -0
- package/dist/utils/hash.d.ts +6 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +9 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/output.d.ts +91 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +222 -0
- package/dist/utils/output.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as fs from 'fs/promises';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Package.json Service
|
|
5
|
+
* Handles reading, sanitizing, and writing package.json files
|
|
6
|
+
*/
|
|
7
|
+
export class PackageJsonService {
|
|
8
|
+
/**
|
|
9
|
+
* Read package.json from directory
|
|
10
|
+
*/
|
|
11
|
+
async read(dir = process.cwd()) {
|
|
12
|
+
const filePath = path.join(dir, 'package.json');
|
|
13
|
+
try {
|
|
14
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
15
|
+
const parsed = JSON.parse(content);
|
|
16
|
+
return { content, parsed, path: filePath };
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (error.code === 'ENOENT') {
|
|
20
|
+
throw new Error(`No package.json found in ${dir}`);
|
|
21
|
+
}
|
|
22
|
+
if (error instanceof SyntaxError) {
|
|
23
|
+
throw new Error(`Invalid JSON in package.json: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sanitize package.json for sending to server
|
|
30
|
+
* Removes sensitive/irrelevant fields, keeps only dependency-related data
|
|
31
|
+
*/
|
|
32
|
+
sanitize(pkg) {
|
|
33
|
+
return {
|
|
34
|
+
name: pkg.name || 'unnamed',
|
|
35
|
+
version: pkg.version,
|
|
36
|
+
private: pkg.private || false, // Keep - affects peer dep strictness
|
|
37
|
+
dependencies: pkg.dependencies || {},
|
|
38
|
+
devDependencies: pkg.devDependencies || {},
|
|
39
|
+
peerDependencies: pkg.peerDependencies || {},
|
|
40
|
+
resolutions: pkg.resolutions || {},
|
|
41
|
+
overrides: pkg.overrides || {},
|
|
42
|
+
engines: pkg.engines || {},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Apply solution to package.json (creates package.json.fixed)
|
|
47
|
+
*/
|
|
48
|
+
async applyFixes(dir, solution) {
|
|
49
|
+
const { content, parsed } = await this.read(dir);
|
|
50
|
+
const fixed = { ...parsed };
|
|
51
|
+
// Apply dependency fixes
|
|
52
|
+
if (fixed.dependencies) {
|
|
53
|
+
for (const [pkg, version] of Object.entries(solution.dependencies)) {
|
|
54
|
+
if (fixed.dependencies[pkg]) {
|
|
55
|
+
fixed.dependencies[pkg] = version;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Apply devDependency fixes
|
|
60
|
+
if (fixed.devDependencies) {
|
|
61
|
+
for (const [pkg, version] of Object.entries(solution.devDependencies)) {
|
|
62
|
+
if (fixed.devDependencies[pkg]) {
|
|
63
|
+
fixed.devDependencies[pkg] = version;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Write to package.json.fixed
|
|
68
|
+
const fixedPath = path.join(dir, 'package.json.fixed');
|
|
69
|
+
await fs.writeFile(fixedPath, JSON.stringify(fixed, null, 2) + '\n', 'utf-8');
|
|
70
|
+
return fixedPath;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get list of changes that would be applied
|
|
74
|
+
*/
|
|
75
|
+
getChanges(original, solution) {
|
|
76
|
+
const changes = [];
|
|
77
|
+
// Check dependencies
|
|
78
|
+
if (original.dependencies) {
|
|
79
|
+
for (const [pkg, version] of Object.entries(solution.dependencies)) {
|
|
80
|
+
if (original.dependencies[pkg] && original.dependencies[pkg] !== version) {
|
|
81
|
+
changes.push({
|
|
82
|
+
package: pkg,
|
|
83
|
+
from: original.dependencies[pkg],
|
|
84
|
+
to: version,
|
|
85
|
+
type: 'dependency',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Check devDependencies
|
|
91
|
+
if (original.devDependencies) {
|
|
92
|
+
for (const [pkg, version] of Object.entries(solution.devDependencies)) {
|
|
93
|
+
if (original.devDependencies[pkg] && original.devDependencies[pkg] !== version) {
|
|
94
|
+
changes.push({
|
|
95
|
+
package: pkg,
|
|
96
|
+
from: original.devDependencies[pkg],
|
|
97
|
+
to: version,
|
|
98
|
+
type: 'devDependency',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return changes;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../src/services/package-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;QAKpC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAEhD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACrD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC5B,MAA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C;YACH,CAAC;QACH,CAAC;QAED,wBAAwB;QACxB,IAAI,QAAQ,CAAC,eAAe,EAAE,CAAC;YAC7B,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;gBACtE,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,OAAO,EAAE,CAAC;oBAC/E,OAAO,CAAC,IAAI,CAAC;wBACX,OAAO,EAAE,GAAG;wBACZ,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC;wBACnC,EAAE,EAAE,OAAO;wBACX,IAAI,EAAE,eAAe;qBACtB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as crypto from 'crypto';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate SHA256 hash of content
|
|
4
|
+
* Used for verifying package.json hasn't changed since last analysis
|
|
5
|
+
*/
|
|
6
|
+
export function calculateHash(content) {
|
|
7
|
+
return crypto.createHash('sha256').update(content).digest('hex');
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Ora } from 'ora';
|
|
2
|
+
/**
|
|
3
|
+
* Get colored severity text
|
|
4
|
+
*/
|
|
5
|
+
export declare function colorSeverity(severity: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Print a styled header
|
|
8
|
+
*/
|
|
9
|
+
export declare function printHeader(text: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Print success message
|
|
12
|
+
*/
|
|
13
|
+
export declare function printSuccess(message: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Print error message
|
|
16
|
+
*/
|
|
17
|
+
export declare function printError(message: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Print warning message
|
|
20
|
+
*/
|
|
21
|
+
export declare function printWarning(message: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Print info message
|
|
24
|
+
*/
|
|
25
|
+
export declare function printInfo(message: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Create a spinner
|
|
28
|
+
*/
|
|
29
|
+
export declare function createSpinner(text: string): Ora;
|
|
30
|
+
/**
|
|
31
|
+
* Print health score with color coding
|
|
32
|
+
*/
|
|
33
|
+
export declare function printHealthScore(score: number): void;
|
|
34
|
+
/**
|
|
35
|
+
* Print severity summary
|
|
36
|
+
*/
|
|
37
|
+
export declare function printSeveritySummary(summary: {
|
|
38
|
+
critical: number;
|
|
39
|
+
high: number;
|
|
40
|
+
medium: number;
|
|
41
|
+
low: number;
|
|
42
|
+
}): void;
|
|
43
|
+
/**
|
|
44
|
+
* Create audit mode conflicts table (no recommendedVersion)
|
|
45
|
+
*/
|
|
46
|
+
export declare function createAuditTable(conflicts: Array<{
|
|
47
|
+
package: string;
|
|
48
|
+
currentVersion: string;
|
|
49
|
+
severity: string;
|
|
50
|
+
description: string;
|
|
51
|
+
}>): string;
|
|
52
|
+
/**
|
|
53
|
+
* Create full mode conflicts table (with recommendedVersion)
|
|
54
|
+
*/
|
|
55
|
+
export declare function createFullTable(conflicts: Array<{
|
|
56
|
+
package: string;
|
|
57
|
+
currentVersion: string;
|
|
58
|
+
recommendedVersion: string;
|
|
59
|
+
severity: string;
|
|
60
|
+
description: string;
|
|
61
|
+
}>): string;
|
|
62
|
+
/**
|
|
63
|
+
* Create migration table
|
|
64
|
+
*/
|
|
65
|
+
export declare function createMigrationTable(corePackages: Array<{
|
|
66
|
+
package: string;
|
|
67
|
+
currentVersion: string;
|
|
68
|
+
targetVersion: string;
|
|
69
|
+
changeType: string;
|
|
70
|
+
}>): string;
|
|
71
|
+
/**
|
|
72
|
+
* Print upgrade call-to-action box
|
|
73
|
+
*/
|
|
74
|
+
export declare function printUpgradeBox(issueCount: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* Print cached solution info
|
|
77
|
+
*/
|
|
78
|
+
export declare function printCacheInfo(cacheFile: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Create a text-based progress bar
|
|
81
|
+
*/
|
|
82
|
+
export declare function createProgressBar(percentage: number, width?: number): string;
|
|
83
|
+
/**
|
|
84
|
+
* Print prefetch progress status
|
|
85
|
+
*/
|
|
86
|
+
export declare function printPrefetchProgress(fetchedCount: number, totalPackages: number, percentage: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* Clear the current line (for progress updates)
|
|
89
|
+
*/
|
|
90
|
+
export declare function clearLine(): void;
|
|
91
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAEA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAe/B;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,E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IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,GAAG,MAAM,CA2BV;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAUxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAItD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,MAAM,CAKhF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAG3G;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import Table from 'cli-table3';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
/**
|
|
5
|
+
* CLI Output Utilities
|
|
6
|
+
* Provides consistent styling and formatting for CLI output
|
|
7
|
+
*/
|
|
8
|
+
// Severity colors
|
|
9
|
+
const severityColors = {
|
|
10
|
+
critical: chalk.red.bold,
|
|
11
|
+
high: chalk.red,
|
|
12
|
+
medium: chalk.yellow,
|
|
13
|
+
low: chalk.blue,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Get colored severity text
|
|
17
|
+
*/
|
|
18
|
+
export function colorSeverity(severity) {
|
|
19
|
+
const colorFn = severityColors[severity] || chalk.white;
|
|
20
|
+
return colorFn(severity.toUpperCase());
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Print a styled header
|
|
24
|
+
*/
|
|
25
|
+
export function printHeader(text) {
|
|
26
|
+
console.log();
|
|
27
|
+
console.log(chalk.bold.cyan(text));
|
|
28
|
+
console.log(chalk.dim('-'.repeat(text.length)));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Print success message
|
|
32
|
+
*/
|
|
33
|
+
export function printSuccess(message) {
|
|
34
|
+
console.log(chalk.green('✓ ') + message);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Print error message
|
|
38
|
+
*/
|
|
39
|
+
export function printError(message) {
|
|
40
|
+
console.log(chalk.red('✗ ') + message);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Print warning message
|
|
44
|
+
*/
|
|
45
|
+
export function printWarning(message) {
|
|
46
|
+
console.log(chalk.yellow('⚠ ') + message);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Print info message
|
|
50
|
+
*/
|
|
51
|
+
export function printInfo(message) {
|
|
52
|
+
console.log(chalk.blue('ℹ ') + message);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a spinner
|
|
56
|
+
*/
|
|
57
|
+
export function createSpinner(text) {
|
|
58
|
+
return ora({
|
|
59
|
+
text,
|
|
60
|
+
spinner: 'dots',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Print health score with color coding
|
|
65
|
+
*/
|
|
66
|
+
export function printHealthScore(score) {
|
|
67
|
+
let color = chalk.green;
|
|
68
|
+
if (score < 50)
|
|
69
|
+
color = chalk.red;
|
|
70
|
+
else if (score < 70)
|
|
71
|
+
color = chalk.yellow;
|
|
72
|
+
else if (score < 85)
|
|
73
|
+
color = chalk.blue;
|
|
74
|
+
console.log();
|
|
75
|
+
console.log(chalk.bold('Health Score: ') + color.bold(`${score}/100`));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Print severity summary
|
|
79
|
+
*/
|
|
80
|
+
export function printSeveritySummary(summary) {
|
|
81
|
+
const parts = [];
|
|
82
|
+
if (summary.critical > 0)
|
|
83
|
+
parts.push(chalk.red.bold(`${summary.critical} critical`));
|
|
84
|
+
if (summary.high > 0)
|
|
85
|
+
parts.push(chalk.red(`${summary.high} high`));
|
|
86
|
+
if (summary.medium > 0)
|
|
87
|
+
parts.push(chalk.yellow(`${summary.medium} medium`));
|
|
88
|
+
if (summary.low > 0)
|
|
89
|
+
parts.push(chalk.blue(`${summary.low} low`));
|
|
90
|
+
if (parts.length === 0) {
|
|
91
|
+
console.log(chalk.green('No issues found!'));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
console.log(`Issues: ${parts.join(', ')}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Create audit mode conflicts table (no recommendedVersion)
|
|
99
|
+
*/
|
|
100
|
+
export function createAuditTable(conflicts) {
|
|
101
|
+
const table = new Table({
|
|
102
|
+
head: [
|
|
103
|
+
chalk.bold('Severity'),
|
|
104
|
+
chalk.bold('Package'),
|
|
105
|
+
chalk.bold('Current'),
|
|
106
|
+
chalk.bold('Issue'),
|
|
107
|
+
],
|
|
108
|
+
colWidths: [12, 25, 15, 50],
|
|
109
|
+
wordWrap: true,
|
|
110
|
+
});
|
|
111
|
+
for (const conflict of conflicts) {
|
|
112
|
+
table.push([
|
|
113
|
+
colorSeverity(conflict.severity),
|
|
114
|
+
conflict.package,
|
|
115
|
+
conflict.currentVersion,
|
|
116
|
+
conflict.description,
|
|
117
|
+
]);
|
|
118
|
+
}
|
|
119
|
+
return table.toString();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create full mode conflicts table (with recommendedVersion)
|
|
123
|
+
*/
|
|
124
|
+
export function createFullTable(conflicts) {
|
|
125
|
+
const table = new Table({
|
|
126
|
+
head: [
|
|
127
|
+
chalk.bold('Severity'),
|
|
128
|
+
chalk.bold('Package'),
|
|
129
|
+
chalk.bold('Current'),
|
|
130
|
+
chalk.bold('Recommended'),
|
|
131
|
+
chalk.bold('Issue'),
|
|
132
|
+
],
|
|
133
|
+
colWidths: [12, 22, 13, 13, 40],
|
|
134
|
+
wordWrap: true,
|
|
135
|
+
});
|
|
136
|
+
for (const conflict of conflicts) {
|
|
137
|
+
table.push([
|
|
138
|
+
colorSeverity(conflict.severity),
|
|
139
|
+
conflict.package,
|
|
140
|
+
conflict.currentVersion,
|
|
141
|
+
chalk.green(conflict.recommendedVersion),
|
|
142
|
+
conflict.description,
|
|
143
|
+
]);
|
|
144
|
+
}
|
|
145
|
+
return table.toString();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create migration table
|
|
149
|
+
*/
|
|
150
|
+
export function createMigrationTable(corePackages) {
|
|
151
|
+
const table = new Table({
|
|
152
|
+
head: [
|
|
153
|
+
chalk.bold('Package'),
|
|
154
|
+
chalk.bold('Current'),
|
|
155
|
+
chalk.bold('Target'),
|
|
156
|
+
chalk.bold('Change'),
|
|
157
|
+
],
|
|
158
|
+
colWidths: [30, 15, 15, 15],
|
|
159
|
+
wordWrap: true,
|
|
160
|
+
});
|
|
161
|
+
for (const pkg of corePackages) {
|
|
162
|
+
let changeColor = chalk.white;
|
|
163
|
+
if (pkg.changeType === 'major')
|
|
164
|
+
changeColor = chalk.red;
|
|
165
|
+
else if (pkg.changeType === 'minor')
|
|
166
|
+
changeColor = chalk.yellow;
|
|
167
|
+
else if (pkg.changeType === 'patch')
|
|
168
|
+
changeColor = chalk.blue;
|
|
169
|
+
table.push([
|
|
170
|
+
pkg.package,
|
|
171
|
+
pkg.currentVersion,
|
|
172
|
+
chalk.green(pkg.targetVersion),
|
|
173
|
+
changeColor(pkg.changeType),
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
return table.toString();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Print upgrade call-to-action box
|
|
180
|
+
*/
|
|
181
|
+
export function printUpgradeBox(issueCount) {
|
|
182
|
+
const box = `
|
|
183
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
184
|
+
│ ${chalk.bold.cyan('UPGRADE TO FULL MODE')} │
|
|
185
|
+
│ Found ${chalk.bold(issueCount)} issue${issueCount !== 1 ? 's' : ''}. Get specific version recommendations: │
|
|
186
|
+
│ │
|
|
187
|
+
│ ${chalk.cyan('npx depfixer login')} │
|
|
188
|
+
│ ${chalk.cyan('npx depfixer analyze --full')} │
|
|
189
|
+
└──────────────────────────────────────────────────────────────┘`;
|
|
190
|
+
console.log(box);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Print cached solution info
|
|
194
|
+
*/
|
|
195
|
+
export function printCacheInfo(cacheFile) {
|
|
196
|
+
console.log();
|
|
197
|
+
console.log(chalk.green('✨ Solution cached to ') + chalk.cyan(cacheFile));
|
|
198
|
+
console.log(chalk.dim(' Run `npx depfixer fix` anytime to apply (FREE, uses cached solution).'));
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a text-based progress bar
|
|
202
|
+
*/
|
|
203
|
+
export function createProgressBar(percentage, width = 30) {
|
|
204
|
+
const filled = Math.round((percentage / 100) * width);
|
|
205
|
+
const empty = width - filled;
|
|
206
|
+
const bar = chalk.green('█'.repeat(filled)) + chalk.gray('░'.repeat(empty));
|
|
207
|
+
return `[${bar}] ${percentage}%`;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Print prefetch progress status
|
|
211
|
+
*/
|
|
212
|
+
export function printPrefetchProgress(fetchedCount, totalPackages, percentage) {
|
|
213
|
+
const bar = createProgressBar(percentage);
|
|
214
|
+
process.stdout.write(`\r Fetching package data: ${bar} (${fetchedCount}/${totalPackages})`);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Clear the current line (for progress updates)
|
|
218
|
+
*/
|
|
219
|
+
export function clearLine() {
|
|
220
|
+
process.stdout.write('\r\x1b[K');
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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AAC;AACrG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB,EAAE,QAAgB,EAAE;IACtE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7B,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5E,OAAO,IAAI,GAAG,KAAK,UAAU,GAAG,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAoB,EAAE,aAAqB,EAAE,UAAkB;IACnG,MAAM,GAAG,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,GAAG,KAAK,YAAY,IAAI,aAAa,GAAG,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "depfixer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool for analyzing and fixing JavaScript/TypeScript dependency conflicts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"depfixer": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsx src/index.ts",
|
|
13
|
+
"start": "node dist/index.js",
|
|
14
|
+
"clean": "rimraf dist",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"dependencies",
|
|
19
|
+
"dependency-management",
|
|
20
|
+
"package-json",
|
|
21
|
+
"version-conflicts",
|
|
22
|
+
"angular",
|
|
23
|
+
"react",
|
|
24
|
+
"vue",
|
|
25
|
+
"npm"
|
|
26
|
+
],
|
|
27
|
+
"author": "DepFixer Team",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"homepage": "https://depfixer.com",
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"axios": "^1.7.4",
|
|
35
|
+
"chalk": "^5.3.0",
|
|
36
|
+
"cli-table3": "^0.6.5",
|
|
37
|
+
"commander": "^12.1.0",
|
|
38
|
+
"open": "^10.1.0",
|
|
39
|
+
"ora": "^8.1.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.10.0",
|
|
43
|
+
"rimraf": "^5.0.5",
|
|
44
|
+
"tsx": "^4.7.0",
|
|
45
|
+
"typescript": "^5.3.3"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"README.md"
|
|
50
|
+
]
|
|
51
|
+
}
|