@fffonion/yahu 0.0.0-stage → 0.21.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
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fffonion/yahu
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install the Yahu desktop application globally:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g @fffonion/yahu
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Then start it with:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yahu --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The package includes the release binaries for Linux x64/arm64, macOS arm64, and Windows x64. The global `yahu` command selects the matching binary for the current platform.
|
package/bin/yahu.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const { spawn } = require('node:child_process');
|
|
8
|
+
|
|
9
|
+
function targetKey() {
|
|
10
|
+
if (process.platform === 'linux' && process.arch === 'x64') return 'x86_64-unknown-linux-gnu';
|
|
11
|
+
if (process.platform === 'linux' && process.arch === 'arm64') return 'aarch64-unknown-linux-gnu';
|
|
12
|
+
if (process.platform === 'darwin' && process.arch === 'arm64') return 'aarch64-apple-darwin';
|
|
13
|
+
if (process.platform === 'win32' && process.arch === 'x64') return 'x86_64-pc-windows-gnu';
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const target = targetKey();
|
|
18
|
+
if (!target) {
|
|
19
|
+
console.error(`@fffonion/yahu does not provide a binary for ${process.platform}/${process.arch}.`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const executable = process.platform === 'win32' ? 'yahu.exe' : 'yahu';
|
|
24
|
+
const binary = path.join(__dirname, '..', 'binaries', target, executable);
|
|
25
|
+
if (!fs.existsSync(binary)) {
|
|
26
|
+
console.error(`The @fffonion/yahu package is missing its ${target} binary.`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const child = spawn(binary, process.argv.slice(2), {
|
|
31
|
+
stdio: 'inherit',
|
|
32
|
+
windowsHide: false,
|
|
33
|
+
});
|
|
34
|
+
child.on('error', (error) => {
|
|
35
|
+
console.error(`Failed to start yahu: ${error.message}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
});
|
|
38
|
+
child.on('exit', (code, signal) => {
|
|
39
|
+
if (signal) {
|
|
40
|
+
process.kill(process.pid, signal);
|
|
41
|
+
} else {
|
|
42
|
+
process.exit(code === null ? 1 : code);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fffonion/yahu",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.21.2",
|
|
4
|
+
"description": "Yet Another Hermes UI desktop binary",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/fffonion/yahu.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/fffonion/yahu",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"yahu": "bin/yahu.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"bin",
|
|
19
|
+
"binaries",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
}
|
|
25
|
+
}
|