@chahuadev/chahuadev-hub-app 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/v/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=blue" alt="NPM Version"></a>
13
13
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/dt/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=success" alt="NPM Downloads"></a>
14
- <img src="https://img.shields.io/badge/Platform-Windows-0078D4?style=for-the-badge&logo=windows&logoColor=white" alt="Windows">
14
+ <img src="https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-0078D4?style=for-the-badge" alt="Windows | Linux">
15
15
  <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" alt="MIT">
16
16
  </p>
17
17
 
@@ -23,13 +23,33 @@
23
23
 
24
24
  > **Auto-download:** On install, the binary for your platform is downloaded automatically. Use `--foreground-scripts` to see the progress bar.
25
25
 
26
- ### Global Install (Recommended)
26
+ ### 🪟 Windows — Global Install
27
27
 
28
28
  ```bash
29
29
  npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
30
30
  ```
31
31
 
32
- ### Launch
32
+ ### 🐧 Linux — Global Install
33
+
34
+ Linux requires `sudo` for global npm packages:
35
+
36
+ ```bash
37
+ sudo npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
38
+ ```
39
+
40
+ > **Alternative (no sudo required):** Set npm prefix to your home folder first:
41
+ > ```bash
42
+ > mkdir -p ~/.npm-global
43
+ > npm config set prefix '~/.npm-global'
44
+ > echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
45
+ > source ~/.bashrc
46
+ > ```
47
+ > Then install without sudo:
48
+ > ```bash
49
+ > npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
50
+ > ```
51
+
52
+ ### 🚀 Launch
33
53
 
34
54
  ```bash
35
55
  chahuadev-hub
package/index.js CHANGED
@@ -11,9 +11,9 @@ const arch = os.arch();
11
11
  let exeName = '';
12
12
 
13
13
  if (platform === 'win32') {
14
- exeName = arch === 'ia32' ? 'chahuadev-hub-win-ia32.exe' : 'chahuadev-hub-win-x64.exe';
14
+ exeName = 'chahuadev_hub.exe';
15
15
  } else if (platform === 'linux') {
16
- exeName = 'chahuadev-hub-linux';
16
+ exeName = 'chahuadev_hub';
17
17
  } else {
18
18
  console.error(`❌ Chahuadev Hub does not support ${platform} ${arch} yet.`);
19
19
  process.exit(1);
package/install.js CHANGED
@@ -11,16 +11,12 @@ let downloadUrl = '';
11
11
  let fileName = '';
12
12
 
13
13
  if (platform === 'win32') {
14
- if (arch === 'ia32') {
15
- downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub-win-ia32.exe?download=true';
16
- fileName = 'chahuadev-hub-win-ia32.exe';
17
- } else {
18
- downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub-win-x64.exe?download=true';
19
- fileName = 'chahuadev-hub-win-x64.exe';
20
- }
14
+ // ชื่อไฟล์ตรงกับที่ PyInstaller build ออกมา
15
+ downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub.exe?download=true';
16
+ fileName = 'chahuadev_hub.exe';
21
17
  } else if (platform === 'linux') {
22
18
  downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub?download=true';
23
- fileName = 'chahuadev-hub-linux';
19
+ fileName = 'chahuadev_hub';
24
20
  }
25
21
 
26
22
  if (!downloadUrl) {
@@ -85,7 +81,11 @@ function downloadFile(url, dest) {
85
81
  console.log(' chahuadev-hub');
86
82
  console.log(' npx @chahuadev/chahuadev-hub-app\n');
87
83
 
88
- if (platform !== 'win32') fs.chmodSync(dest, 0o755);
84
+ // Make executable on Linux/macOS
85
+ if (platform !== 'win32') {
86
+ fs.chmodSync(dest, 0o755);
87
+ console.log(' chmod +x applied');
88
+ }
89
89
  });
90
90
 
91
91
  }).on('error', (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chahuadev/chahuadev-hub-app",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Chahuadev Hub — Official app launcher and distribution hub by Chahuadev",
5
5
  "main": "index.js",
6
6
  "bin": {