@zjarlin/aio 2026.9.18 → 2026.10.7
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 +11 -1
- package/bin/aio.cjs +14 -4
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AIO CLI
|
|
2
2
|
|
|
3
|
-
AIO
|
|
3
|
+
AIO 的统一命令行入口。应用和社区插件命令由 Rust `az-aio-cli` 执行;`aio device` 从随包的 `@zjarlin/aio-device` 启动设备组件,不需要第二个全局 CLI。运行需要 Node.js 22.14 或更新版本。
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install --global @zjarlin/aio
|
|
@@ -13,6 +13,16 @@ aio --help
|
|
|
13
13
|
npx @zjarlin/aio --help
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
设备连接、后台 worker、终端、桌面、文件和技能同步统一使用:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
aio device --help
|
|
20
|
+
aio device connect
|
|
21
|
+
aio device worker --background
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
临时运行使用 `npx -y @zjarlin/aio device --help`;长期 worker 建议全局安装,以保留组件及原生依赖的固定位置。
|
|
25
|
+
|
|
16
26
|
支持 macOS arm64/x64、Linux arm64/x64 和 Windows x64。Linux 包使用静态 musl 二进制。
|
|
17
27
|
|
|
18
28
|
本项目以 MIT 或 Apache-2.0 双重许可发布,完整文本见 `LICENSE-MIT` 和 `LICENSE-APACHE`。
|
package/bin/aio.cjs
CHANGED
|
@@ -5,17 +5,27 @@ const { spawn } = require("node:child_process");
|
|
|
5
5
|
const { executableName, platformPackage } = require("../lib/platform.cjs");
|
|
6
6
|
|
|
7
7
|
let binary;
|
|
8
|
+
let arguments_;
|
|
8
9
|
try {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
if (process.argv[2] === "device") {
|
|
11
|
+
// 从随包依赖启动设备组件,不依赖另一个全局 CLI 或 PATH 配置。
|
|
12
|
+
binary = process.execPath;
|
|
13
|
+
arguments_ = [require.resolve("@zjarlin/aio-device/dist/cli.mjs"), ...process.argv.slice(3)];
|
|
14
|
+
} else {
|
|
15
|
+
const packageName = platformPackage();
|
|
16
|
+
binary = require.resolve(`${packageName}/bin/${executableName()}`);
|
|
17
|
+
arguments_ = process.argv.slice(2);
|
|
18
|
+
}
|
|
11
19
|
} catch (error) {
|
|
12
20
|
console.error(`无法启动 AIO CLI: ${error.message}`);
|
|
13
|
-
console.error(
|
|
21
|
+
console.error(process.argv[2] === "device"
|
|
22
|
+
? "请重新安装 @zjarlin/aio,以恢复随包设备组件。"
|
|
23
|
+
: "请重新安装 @zjarlin/aio,并确认 npm 未禁用 optionalDependencies。");
|
|
14
24
|
process.exitCode = 1;
|
|
15
25
|
return;
|
|
16
26
|
}
|
|
17
27
|
|
|
18
|
-
const child = spawn(binary,
|
|
28
|
+
const child = spawn(binary, arguments_, { stdio: "inherit" });
|
|
19
29
|
const signals = ["SIGINT", "SIGTERM"];
|
|
20
30
|
for (const signal of signals) process.on(signal, () => child.kill(signal));
|
|
21
31
|
child.once("error", (error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zjarlin/aio",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.7",
|
|
4
4
|
"description": "AIO application and plugin CLI",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/org-aio/aio-platform",
|
|
@@ -21,17 +21,20 @@
|
|
|
21
21
|
"LICENSE-MIT"
|
|
22
22
|
],
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
24
|
+
"node": ">=22.14.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"test": "node scripts/check-release.cjs && node --test test/*.test.cjs"
|
|
28
28
|
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@zjarlin/aio-device": "0.11.0"
|
|
31
|
+
},
|
|
29
32
|
"optionalDependencies": {
|
|
30
|
-
"@zjarlin/aio-darwin-arm64": "2026.
|
|
31
|
-
"@zjarlin/aio-darwin-x64": "2026.
|
|
32
|
-
"@zjarlin/aio-linux-arm64": "2026.
|
|
33
|
-
"@zjarlin/aio-linux-x64": "2026.
|
|
34
|
-
"@zjarlin/aio-win32-x64": "2026.
|
|
33
|
+
"@zjarlin/aio-darwin-arm64": "2026.10.7",
|
|
34
|
+
"@zjarlin/aio-darwin-x64": "2026.10.7",
|
|
35
|
+
"@zjarlin/aio-linux-arm64": "2026.10.7",
|
|
36
|
+
"@zjarlin/aio-linux-x64": "2026.10.7",
|
|
37
|
+
"@zjarlin/aio-win32-x64": "2026.10.7"
|
|
35
38
|
},
|
|
36
39
|
"publishConfig": {
|
|
37
40
|
"access": "public",
|