@yoooclaw/cli 0.1.0 → 0.1.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/README.md +5 -3
- package/dist/bin.cjs +13 -6
- package/dist/bin.cjs.map +3 -3
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,9 +9,11 @@ yoooclaw 独立 CLI 工具 —— 自带后台守护进程(daemon),不依
|
|
|
9
9
|
|
|
10
10
|
## 安装与命令
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
两种分发渠道,二者**功能一致**,按需选择。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**平台支持**:macOS / Linux 两种渠道都支持;**Windows 走 npm 渠道**(需 Node ≥ 22.12.0),原生二进制暂未提供 Windows 目标。Windows 上凭据以明文落 `~/.yoooclaw/credentials.json`(无系统 keychain 加固,`yoooclaw doctor` 会提示),daemon 停止经 HTTP 优雅退出。
|
|
15
|
+
|
|
16
|
+
### A. npm(需要 Node ≥ 22.12.0,Windows 用此渠道)
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
19
|
# 免安装(每次拉最新版)
|
|
@@ -37,7 +39,7 @@ curl -fsSL https://raw.githubusercontent.com/Yoooclaw/openclaw-plugin/master/pac
|
|
|
37
39
|
| sh -s -- --version 0.0.5 --dir ~/bin --force
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
支持平台:`darwin-arm64` / `darwin-x64` / `linux-x64` / `linux-arm64
|
|
42
|
+
支持平台:`darwin-arm64` / `darwin-x64` / `linux-x64` / `linux-arm64`。**Windows 暂无原生二进制,请用上面的 npm 渠道。**
|
|
41
43
|
|
|
42
44
|
二进制也可以从 [GitHub Releases](https://github.com/Yoooclaw/openclaw-plugin/releases?q=cli-v) 手动下载(同 release 内 `checksums.txt` 校验)。
|
|
43
45
|
|
package/dist/bin.cjs
CHANGED
|
@@ -4271,7 +4271,7 @@ function buildContext(flags) {
|
|
|
4271
4271
|
var import_node_fs3 = require("node:fs");
|
|
4272
4272
|
function readBuildInjectedVersion() {
|
|
4273
4273
|
if (false) {}
|
|
4274
|
-
const version = "0.1.
|
|
4274
|
+
const version = "0.1.1".trim();
|
|
4275
4275
|
return version || undefined;
|
|
4276
4276
|
}
|
|
4277
4277
|
function readVersionFromPackageJson() {
|
|
@@ -14224,14 +14224,21 @@ async function daemonStop(ctx) {
|
|
|
14224
14224
|
removeLock(ctx.paths);
|
|
14225
14225
|
throw new YoooclawError("YOOOCLAW_DAEMON_NOT_RUNNING", "daemon 未运行");
|
|
14226
14226
|
}
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14227
|
+
const graceful = process.platform === "win32" ? "stop-endpoint" : "SIGTERM";
|
|
14228
|
+
if (graceful === "stop-endpoint") {
|
|
14229
|
+
try {
|
|
14230
|
+
await new DaemonClient(ctx.paths).post("/daemon/stop");
|
|
14231
|
+
} catch {}
|
|
14232
|
+
} else {
|
|
14233
|
+
try {
|
|
14234
|
+
process.kill(lock.pid, "SIGTERM");
|
|
14235
|
+
} catch {}
|
|
14236
|
+
}
|
|
14230
14237
|
for (let i = 0;i < 100; i += 1) {
|
|
14231
14238
|
await import_promises5.setTimeout(100);
|
|
14232
14239
|
if (!isProcessAlive(lock.pid)) {
|
|
14233
14240
|
removeLock(ctx.paths);
|
|
14234
|
-
return { ok: true, stopped: lock.pid, signal:
|
|
14241
|
+
return { ok: true, stopped: lock.pid, signal: graceful };
|
|
14235
14242
|
}
|
|
14236
14243
|
}
|
|
14237
14244
|
try {
|
|
@@ -14681,5 +14688,5 @@ async function run(argv = process.argv) {
|
|
|
14681
14688
|
// src/bin.ts
|
|
14682
14689
|
run(process.argv);
|
|
14683
14690
|
|
|
14684
|
-
//# debugId=
|
|
14691
|
+
//# debugId=1D045A0DEF78275F64756E2164756E21
|
|
14685
14692
|
//# sourceMappingURL=bin.cjs.map
|