@chahuadev/framework 5.0.0 → 5.0.1
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/index.js +13 -32
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -37,43 +37,24 @@ try {
|
|
|
37
37
|
let exePath;
|
|
38
38
|
|
|
39
39
|
if (platform === 'win32') {
|
|
40
|
-
// For Windows,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (!exeFile) {
|
|
48
|
-
const exeFiles = files.filter(f => f.endsWith('.exe') && !f.includes('.msi'));
|
|
49
|
-
exeFile = arch === 'ia32'
|
|
50
|
-
? exeFiles.find(f => f.includes('ia32')) || exeFiles.find(f => !f.includes('x64'))
|
|
51
|
-
: exeFiles.find(f => !f.includes('ia32')) || exeFiles[0];
|
|
40
|
+
// For Windows, select EXE based on architecture
|
|
41
|
+
if (arch === 'ia32') {
|
|
42
|
+
exePath = path.join(binDir, 'Chahuadev Framework-win-ia32.exe');
|
|
43
|
+
} else if (arch === 'x64') {
|
|
44
|
+
exePath = path.join(binDir, 'Chahuadev Framework-win-x64.exe');
|
|
45
|
+
} else {
|
|
46
|
+
throw new Error(`Unsupported Windows architecture: ${arch}`);
|
|
52
47
|
}
|
|
53
48
|
|
|
54
|
-
if (!
|
|
55
|
-
throw new Error(`
|
|
49
|
+
if (!fs.existsSync(exePath)) {
|
|
50
|
+
throw new Error(`Executable not found: ${exePath}`);
|
|
56
51
|
}
|
|
57
|
-
exePath = path.join(binDir, exeFile);
|
|
58
52
|
} else if (platform === 'linux') {
|
|
59
|
-
// For Linux,
|
|
60
|
-
|
|
53
|
+
// For Linux, use AppImage
|
|
54
|
+
exePath = path.join(binDir, 'Chahuadev Framework.AppImage');
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (appImageFile) {
|
|
66
|
-
exePath = path.join(binDir, appImageFile);
|
|
67
|
-
} else {
|
|
68
|
-
// Step 2: Fall back to linux-unpacked directory
|
|
69
|
-
const unpackedDir = path.join(binDir, 'linux-unpacked');
|
|
70
|
-
if (fs.existsSync(unpackedDir)) {
|
|
71
|
-
const exeFiles = fs.readdirSync(unpackedDir);
|
|
72
|
-
const exe = exeFiles.find(f => f.toLowerCase().includes('chahuadev') || f.toLowerCase().includes('framework'));
|
|
73
|
-
exePath = path.join(unpackedDir, exe || exeFiles[0]);
|
|
74
|
-
} else {
|
|
75
|
-
throw new Error(`No executable found in ${binDir}`);
|
|
76
|
-
}
|
|
56
|
+
if (!fs.existsSync(exePath)) {
|
|
57
|
+
throw new Error(`AppImage not found: ${exePath}`);
|
|
77
58
|
}
|
|
78
59
|
} else if (platform === 'darwin') {
|
|
79
60
|
// For macOS, look for .app or executable
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chahuadev/framework",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Chahuadev Framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"chahuadev-framework": "index.js"
|
|
8
8
|
},
|
|
9
9
|
"optionalDependencies": {
|
|
10
|
-
"@chahuadev/framework-win32-x64": "^5.0.
|
|
11
|
-
"@chahuadev/framework-win32-ia32": "^5.0.
|
|
12
|
-
"@chahuadev/framework-linux-x64": "^5.0.
|
|
13
|
-
"@chahuadev/framework-darwin-x64": "^5.0.
|
|
14
|
-
"@chahuadev/framework-darwin-arm64": "^5.0.
|
|
10
|
+
"@chahuadev/framework-win32-x64": "^5.0.1",
|
|
11
|
+
"@chahuadev/framework-win32-ia32": "^5.0.1",
|
|
12
|
+
"@chahuadev/framework-linux-x64": "^5.0.1",
|
|
13
|
+
"@chahuadev/framework-darwin-x64": "^5.0.1",
|
|
14
|
+
"@chahuadev/framework-darwin-arm64": "^5.0.1"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|