fallow 2.12.1 → 2.13.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/bin/fallow-mcp +60 -0
- package/package.json +10 -9
package/bin/fallow-mcp
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require('child_process');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
const { existsSync } = require('fs');
|
|
6
|
+
|
|
7
|
+
function getPlatformPackage() {
|
|
8
|
+
const platform = process.platform;
|
|
9
|
+
const arch = process.arch;
|
|
10
|
+
|
|
11
|
+
if (platform === 'win32' && arch === 'x64') {
|
|
12
|
+
return '@fallow-cli/win32-x64-msvc';
|
|
13
|
+
}
|
|
14
|
+
if (platform === 'darwin') {
|
|
15
|
+
return `@fallow-cli/darwin-${arch}`;
|
|
16
|
+
}
|
|
17
|
+
if (platform === 'linux') {
|
|
18
|
+
try {
|
|
19
|
+
const { familySync } = require('detect-libc');
|
|
20
|
+
const libc = familySync() === 'musl' ? 'musl' : 'gnu';
|
|
21
|
+
return `@fallow-cli/linux-${arch}-${libc}`;
|
|
22
|
+
} catch {
|
|
23
|
+
// musl binaries are statically linked and work on both glibc and musl systems
|
|
24
|
+
return `@fallow-cli/linux-${arch}-musl`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const pkg = getPlatformPackage();
|
|
32
|
+
|
|
33
|
+
if (!pkg) {
|
|
34
|
+
console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let binaryPath;
|
|
39
|
+
try {
|
|
40
|
+
const pkgDir = require.resolve(`${pkg}/package.json`);
|
|
41
|
+
const binaryName = process.platform === 'win32' ? 'fallow-mcp.exe' : 'fallow-mcp';
|
|
42
|
+
binaryPath = join(pkgDir, '..', binaryName);
|
|
43
|
+
} catch {
|
|
44
|
+
console.error(`Could not find ${pkg}. Run 'npm install' to install platform-specific binary.`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!existsSync(binaryPath)) {
|
|
49
|
+
console.error(`Binary not found at ${binaryPath}`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
execFileSync(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
55
|
+
} catch (e) {
|
|
56
|
+
if (e.status !== undefined) {
|
|
57
|
+
process.exit(e.status);
|
|
58
|
+
}
|
|
59
|
+
throw e;
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Codebase analyzer for TypeScript/JavaScript — unused code, circular dependencies, code duplication, complexity hotspots, and architecture boundary violations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"node": ">=16"
|
|
26
26
|
},
|
|
27
27
|
"bin": {
|
|
28
|
-
"fallow": "bin/fallow"
|
|
28
|
+
"fallow": "bin/fallow",
|
|
29
|
+
"fallow-mcp": "bin/fallow-mcp"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
32
|
"bin",
|
|
@@ -39,12 +40,12 @@
|
|
|
39
40
|
"detect-libc": "^2.0.0"
|
|
40
41
|
},
|
|
41
42
|
"optionalDependencies": {
|
|
42
|
-
"@fallow-cli/darwin-arm64": "2.
|
|
43
|
-
"@fallow-cli/darwin-x64": "2.
|
|
44
|
-
"@fallow-cli/linux-x64-gnu": "2.
|
|
45
|
-
"@fallow-cli/linux-arm64-gnu": "2.
|
|
46
|
-
"@fallow-cli/linux-x64-musl": "2.
|
|
47
|
-
"@fallow-cli/linux-arm64-musl": "2.
|
|
48
|
-
"@fallow-cli/win32-x64-msvc": "2.
|
|
43
|
+
"@fallow-cli/darwin-arm64": "2.13.0",
|
|
44
|
+
"@fallow-cli/darwin-x64": "2.13.0",
|
|
45
|
+
"@fallow-cli/linux-x64-gnu": "2.13.0",
|
|
46
|
+
"@fallow-cli/linux-arm64-gnu": "2.13.0",
|
|
47
|
+
"@fallow-cli/linux-x64-musl": "2.13.0",
|
|
48
|
+
"@fallow-cli/linux-arm64-musl": "2.13.0",
|
|
49
|
+
"@fallow-cli/win32-x64-msvc": "2.13.0"
|
|
49
50
|
}
|
|
50
51
|
}
|