@yoooclaw/cli 0.2.0-beta.0 → 0.2.0-beta.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.
Files changed (2) hide show
  1. package/bin/yc.js +9 -0
  2. package/package.json +7 -7
package/bin/yc.js CHANGED
@@ -8,6 +8,7 @@
8
8
  // 设计与 esbuild / turbo 一致:主包不含二进制,只含这个极薄 launcher。
9
9
 
10
10
  const { spawnSync } = require("node:child_process");
11
+ const fs = require("node:fs");
11
12
 
12
13
  function resolveBinary() {
13
14
  const platform = process.platform; // darwin | linux | win32
@@ -34,6 +35,14 @@ if (!bin) {
34
35
  process.exit(1);
35
36
  }
36
37
 
38
+ if (process.platform !== "win32") {
39
+ try {
40
+ fs.chmodSync(bin, 0o755);
41
+ } catch {
42
+ // Best effort only: spawnSync will surface the real error if execution still fails.
43
+ }
44
+ }
45
+
37
46
  const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
38
47
  if (result.error) {
39
48
  process.stderr.write(`@yoooclaw/cli: 启动二进制失败:${result.error.message}\n`);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@yoooclaw/cli",
3
3
  "description": "yoooclaw 独立 CLI(Go 实现,按平台分发原生二进制)",
4
- "version": "0.2.0-beta.0",
4
+ "version": "0.2.0-beta.1",
5
5
  "license": "MIT",
6
6
  "author": "developer@yoooclaw.com",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/YoooClaw/cli.git"
9
+ "url": "git+https://github.com/YoooClaw/cli.git"
10
10
  },
11
11
  "publishConfig": {
12
12
  "access": "public"
@@ -20,11 +20,11 @@
20
20
  "README.md"
21
21
  ],
22
22
  "optionalDependencies": {
23
- "@yoooclaw/cli-darwin-arm64": "0.2.0-beta.0",
24
- "@yoooclaw/cli-darwin-x64": "0.2.0-beta.0",
25
- "@yoooclaw/cli-linux-arm64": "0.2.0-beta.0",
26
- "@yoooclaw/cli-linux-x64": "0.2.0-beta.0",
27
- "@yoooclaw/cli-win32-x64": "0.2.0-beta.0"
23
+ "@yoooclaw/cli-darwin-arm64": "0.2.0-beta.1",
24
+ "@yoooclaw/cli-darwin-x64": "0.2.0-beta.1",
25
+ "@yoooclaw/cli-linux-arm64": "0.2.0-beta.1",
26
+ "@yoooclaw/cli-linux-x64": "0.2.0-beta.1",
27
+ "@yoooclaw/cli-win32-x64": "0.2.0-beta.1"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=18"