@factory/cli 0.57.14 → 0.60.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/package.json +9 -9
- package/platform.js +17 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factory/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Factory Droid CLI - AI-powered software engineering agent",
|
|
5
5
|
"bin": {
|
|
6
6
|
"droid": "bin/droid"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"postinstall": "node install.js"
|
|
17
17
|
},
|
|
18
18
|
"optionalDependencies": {
|
|
19
|
-
"@factory/cli-darwin-arm64": "0.
|
|
20
|
-
"@factory/cli-darwin-x64": "0.
|
|
21
|
-
"@factory/cli-darwin-x64-baseline": "0.
|
|
22
|
-
"@factory/cli-linux-arm64": "0.
|
|
23
|
-
"@factory/cli-linux-x64": "0.
|
|
24
|
-
"@factory/cli-linux-x64-baseline": "0.
|
|
25
|
-
"@factory/cli-win32-x64": "0.
|
|
26
|
-
"@factory/cli-win32-x64-baseline": "0.
|
|
19
|
+
"@factory/cli-darwin-arm64": "0.60.0",
|
|
20
|
+
"@factory/cli-darwin-x64": "0.60.0",
|
|
21
|
+
"@factory/cli-darwin-x64-baseline": "0.60.0",
|
|
22
|
+
"@factory/cli-linux-arm64": "0.60.0",
|
|
23
|
+
"@factory/cli-linux-x64": "0.60.0",
|
|
24
|
+
"@factory/cli-linux-x64-baseline": "0.60.0",
|
|
25
|
+
"@factory/cli-win32-x64": "0.60.0",
|
|
26
|
+
"@factory/cli-win32-x64-baseline": "0.60.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=20.0.0"
|
package/platform.js
CHANGED
|
@@ -64,21 +64,21 @@ function detectAVX2Support() {
|
|
|
64
64
|
// Windows: use kernel32.dll IsProcessorFeaturePresent(40) via PowerShell
|
|
65
65
|
// Feature ID 40 = PF_AVX2_INSTRUCTIONS_AVAILABLE
|
|
66
66
|
// This is the same method used by the Factory CLI installer and Bun
|
|
67
|
-
const script =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
67
|
+
const script =
|
|
68
|
+
'$ProgressPreference = "SilentlyContinue"; ' +
|
|
69
|
+
'try { ' +
|
|
70
|
+
'$hasAvx2 = (Add-Type -MemberDefinition \'[DllImport("kernel32.dll")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);\' -Name "Kernel32" -Namespace "Win32" -PassThru -ErrorAction Stop)::IsProcessorFeaturePresent(40); ' +
|
|
71
|
+
'if ($hasAvx2) { Write-Output "true" } else { Write-Output "false" } ' +
|
|
72
|
+
'} catch { ' +
|
|
73
|
+
'try { ' +
|
|
74
|
+
'$hasAvx2 = ([Win32.Kernel32]::IsProcessorFeaturePresent(40)); ' +
|
|
75
|
+
'if ($hasAvx2) { Write-Output "true" } else { Write-Output "false" } ' +
|
|
76
|
+
'} catch { ' +
|
|
77
|
+
'Write-Output "unknown" ' +
|
|
78
|
+
'} }';
|
|
79
|
+
const encodedScript = Buffer.from(script, 'utf16le').toString('base64');
|
|
80
80
|
const result = child_process.execSync(
|
|
81
|
-
`powershell -NoProfile -
|
|
81
|
+
`powershell -NoProfile -NonInteractive -EncodedCommand ${encodedScript}`,
|
|
82
82
|
{ encoding: 'utf8', timeout: 10000 }
|
|
83
83
|
);
|
|
84
84
|
const output = result.trim().toLowerCase();
|
|
@@ -96,7 +96,9 @@ function detectAVX2Support() {
|
|
|
96
96
|
function resolveBinaryPath(packageName) {
|
|
97
97
|
if (!packageName) return null;
|
|
98
98
|
try {
|
|
99
|
-
return require.resolve(`${packageName}/bin/${getBinaryName()}
|
|
99
|
+
return require.resolve(`${packageName}/bin/${getBinaryName()}`, {
|
|
100
|
+
paths: [__dirname, process.cwd()],
|
|
101
|
+
});
|
|
100
102
|
} catch (e) {
|
|
101
103
|
return null;
|
|
102
104
|
}
|