hyperneod 0.0.0-stage → 0.44.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/bin/hyperneod.js +51 -0
- package/package.json +19 -3
- package/README.md +0 -3
package/bin/hyperneod.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HyperNeo daemon launcher.
|
|
5
|
+
* Detects the current platform and spawns the correct compiled daemon binary
|
|
6
|
+
* from the matching @hyperneo/hyperneod-{platform} optional dependency.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const { spawnSync } = require('child_process');
|
|
10
|
+
|
|
11
|
+
const PLATFORM_MAP = {
|
|
12
|
+
'darwin-arm64': '@hyperneo/hyperneod-darwin-arm64',
|
|
13
|
+
'darwin-x64': '@hyperneo/hyperneod-darwin-x64',
|
|
14
|
+
'linux-x64': '@hyperneo/hyperneod-linux-x64',
|
|
15
|
+
'linux-arm64': '@hyperneo/hyperneod-linux-arm64',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
19
|
+
const packageName = PLATFORM_MAP[platformKey];
|
|
20
|
+
|
|
21
|
+
if (!packageName) {
|
|
22
|
+
console.error(
|
|
23
|
+
`Error: hyperneod does not support ${process.platform} ${process.arch}.\n` +
|
|
24
|
+
`Supported platforms: ${Object.keys(PLATFORM_MAP).join(', ')}`
|
|
25
|
+
);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let binaryPath;
|
|
30
|
+
try {
|
|
31
|
+
binaryPath = require.resolve(`${packageName}/bin/hyperneod`);
|
|
32
|
+
} catch {
|
|
33
|
+
console.error(
|
|
34
|
+
`Error: Could not find hyperneod binary for ${platformKey}.\n` +
|
|
35
|
+
`The package ${packageName} may not be installed.\n` +
|
|
36
|
+
`Try reinstalling: npm install -g hyperneod`
|
|
37
|
+
);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
42
|
+
stdio: 'inherit',
|
|
43
|
+
env: process.env,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (result.error) {
|
|
47
|
+
console.error(`Error: Failed to execute hyperneod binary: ${result.error.message}`);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyperneod",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.44.1",
|
|
4
|
+
"description": "HyperNeo standalone daemon binary (no web UI)",
|
|
5
|
+
"bin": {
|
|
6
|
+
"hyperneod": "bin/hyperneod.js"
|
|
7
|
+
},
|
|
8
|
+
"optionalDependencies": {
|
|
9
|
+
"@hyperneo/hyperneod-darwin-arm64": "0.44.1",
|
|
10
|
+
"@hyperneo/hyperneod-darwin-x64": "0.44.1",
|
|
11
|
+
"@hyperneo/hyperneod-linux-x64": "0.44.1",
|
|
12
|
+
"@hyperneo/hyperneod-linux-arm64": "0.44.1"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin/"
|
|
16
|
+
],
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/lsm/HyperNeo"
|
|
21
|
+
}
|
|
6
22
|
}
|
package/README.md
DELETED