@factadev/cli 0.2.9 → 0.2.10
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/nest.cjs +24 -15
- package/package.json +6 -6
package/bin/nest.cjs
CHANGED
|
@@ -25,13 +25,25 @@ function isSupportedPlatform(p = platform, a = arch) {
|
|
|
25
25
|
|
|
26
26
|
function getBinaryPath(platformName = platform, archName = arch) {
|
|
27
27
|
const pkgName = `@factadev/cli-${platformName}-${archName}`;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
const binName = platformName === 'win32' ? 'nest.exe' : 'nest';
|
|
29
|
+
|
|
30
|
+
// Try multiple locations where the package might be installed
|
|
31
|
+
const possiblePaths = [
|
|
32
|
+
// 1. Top-level node_modules (if installed separately)
|
|
33
|
+
path.join(__dirname, '..', '..', pkgName, 'bin', binName),
|
|
34
|
+
// 2. Inside @factadev/cli/node_modules (if installed as optional dep)
|
|
35
|
+
path.join(__dirname, '..', 'node_modules', pkgName, 'bin', binName),
|
|
36
|
+
// 3. Global node_modules
|
|
37
|
+
path.join(process.env.PREFIX || '/usr/local', 'lib', 'node_modules', pkgName, 'bin', binName),
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
for (const binPath of possiblePaths) {
|
|
41
|
+
if (fs.existsSync(binPath)) {
|
|
42
|
+
return binPath;
|
|
43
|
+
}
|
|
34
44
|
}
|
|
45
|
+
|
|
46
|
+
return null;
|
|
35
47
|
}
|
|
36
48
|
|
|
37
49
|
function installPlatformPackage(platformName = platform, archName = arch) {
|
|
@@ -46,14 +58,11 @@ function installPlatformPackage(platformName = platform, archName = arch) {
|
|
|
46
58
|
}
|
|
47
59
|
|
|
48
60
|
function getInstalledVersion(platformName = platform, archName = arch) {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
53
|
-
return pkg.version;
|
|
54
|
-
} catch (e) {
|
|
55
|
-
return null;
|
|
61
|
+
const binPath = getBinaryPath(platformName, archName);
|
|
62
|
+
if (binPath) {
|
|
63
|
+
return 'installed';
|
|
56
64
|
}
|
|
65
|
+
return null;
|
|
57
66
|
}
|
|
58
67
|
|
|
59
68
|
function getLatestVersion(platformName = platform, archName = arch) {
|
|
@@ -95,11 +104,11 @@ function main() {
|
|
|
95
104
|
installPlatformPackage();
|
|
96
105
|
binPath = getBinaryPath();
|
|
97
106
|
} else {
|
|
98
|
-
// Check version and update if needed
|
|
107
|
+
// Check version and update if needed (optional)
|
|
99
108
|
const currentVer = getInstalledVersion();
|
|
100
109
|
const latestVer = getLatestVersion();
|
|
101
110
|
if (currentVer && latestVer && currentVer !== latestVer) {
|
|
102
|
-
console.log(`Updating
|
|
111
|
+
console.log(`Updating to v${latestVer}...`);
|
|
103
112
|
installPlatformPackage();
|
|
104
113
|
binPath = getBinaryPath();
|
|
105
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factadev/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "NEST CLI - Enterprise AI coding agent control center. Run Claude Code, Codex, Cursor, Gemini, OpenCode locally and control remotely via web.",
|
|
5
5
|
"author": "Carlos Matias Baglieri",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
},
|
|
91
91
|
"packageManager": "bun@1.3.5",
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@factadev/cli-darwin-arm64": "0.2.
|
|
94
|
-
"@factadev/cli-darwin-x64": "0.2.
|
|
95
|
-
"@factadev/cli-linux-arm64": "0.2.
|
|
96
|
-
"@factadev/cli-linux-x64": "0.2.
|
|
97
|
-
"@factadev/cli-win32-x64": "0.2.
|
|
93
|
+
"@factadev/cli-darwin-arm64": "0.2.10",
|
|
94
|
+
"@factadev/cli-darwin-x64": "0.2.10",
|
|
95
|
+
"@factadev/cli-linux-arm64": "0.2.10",
|
|
96
|
+
"@factadev/cli-linux-x64": "0.2.10",
|
|
97
|
+
"@factadev/cli-win32-x64": "0.2.10"
|
|
98
98
|
}
|
|
99
99
|
}
|