create-aiproj 1.7.13 → 1.7.14
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 +1 -1
- package/scripts/install.js +12 -4
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -6,7 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const { execSync } = require('child_process');
|
|
7
7
|
const zlib = require('zlib');
|
|
8
8
|
|
|
9
|
-
const VERSION = '1.7.
|
|
9
|
+
const VERSION = '1.7.14';
|
|
10
10
|
const REPO = 'victorysightsound/aiproject';
|
|
11
11
|
|
|
12
12
|
function getPlatformTarget() {
|
|
@@ -72,9 +72,17 @@ async function install() {
|
|
|
72
72
|
const data = await download(url);
|
|
73
73
|
|
|
74
74
|
if (isWindows) {
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
// Extract zip on Windows using PowerShell
|
|
76
|
+
const tempZip = path.join(binDir, 'temp.zip');
|
|
77
|
+
fs.writeFileSync(tempZip, data);
|
|
78
|
+
try {
|
|
79
|
+
execSync(`powershell -Command "Expand-Archive -Path '${tempZip}' -DestinationPath '${binDir}' -Force"`, { stdio: 'inherit' });
|
|
80
|
+
fs.unlinkSync(tempZip);
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error('Failed to extract zip. Please extract manually from:', url);
|
|
83
|
+
fs.unlinkSync(tempZip);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
78
86
|
} else {
|
|
79
87
|
// Extract tar.gz
|
|
80
88
|
const tempTar = path.join(binDir, 'temp.tar');
|