@42ailab/42cc 0.3.20 → 0.4.0

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/42cc.js +5 -8
  2. package/package.json +3 -3
package/bin/42cc.js CHANGED
@@ -58,13 +58,12 @@ function getPlatformKey() {
58
58
  }
59
59
 
60
60
  function getPackageDir(pkgName) {
61
- // 方法 1: 尝试 require.resolve (适用于嵌套安装)
61
+ // Method 1: Try require.resolve (for nested installation)
62
62
  try {
63
63
  const pkgPath = require.resolve(`${pkgName}/package.json`);
64
64
  return path.dirname(pkgPath);
65
65
  } catch {
66
- // 方法 2: 查找 sibling 目录 (适用于 npm flat 安装)
67
- // 从当前包目录向上查找 @42ailab 目录
66
+ // Method 2: Find sibling directory (for npm flat installation)
68
67
  const currentPkgDir = path.dirname(__dirname); // @42ailab/42cc
69
68
  const scopeDir = path.dirname(currentPkgDir); // @42ailab
70
69
  const pkgShortName = pkgName.replace("@42ailab/", "");
@@ -109,7 +108,6 @@ function launchApp() {
109
108
 
110
109
  if (process.platform === "darwin") {
111
110
  // macOS: Use 'open' to launch .app bundle
112
- // This ensures Info.plist settings (LSUIElement, etc.) are respected
113
111
  const appPath = path.join(pkgDir, "42cc.app");
114
112
 
115
113
  if (!fs.existsSync(appPath)) {
@@ -117,13 +115,12 @@ function launchApp() {
117
115
  process.exit(1);
118
116
  }
119
117
 
120
- // 移除 quarantine 属性,避免 "已损坏" 弹窗
121
- // npm/bun 安装时 .app 的签名属性可能丢失,需要清除 quarantine
118
+ // Remove quarantine attribute to avoid "damaged app" warning
122
119
  const { execSync } = require("child_process");
123
120
  try {
124
121
  execSync(`xattr -cr "${appPath}"`, { stdio: "ignore" });
125
122
  } catch {
126
- // 忽略错误,可能没有 quarantine 属性
123
+ // Ignore error, may not have quarantine attribute
127
124
  }
128
125
 
129
126
  const child = spawn("open", ["-a", appPath], {
@@ -145,7 +142,7 @@ function launchApp() {
145
142
  const child = spawn(exePath, [], {
146
143
  detached: true,
147
144
  stdio: "ignore",
148
- windowsHide: true, // Hide console window flash
145
+ windowsHide: true,
149
146
  });
150
147
  child.unref();
151
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@42ailab/42cc",
3
- "version": "0.3.20",
3
+ "version": "0.4.0",
4
4
  "description": "Claude Code model configuration tool - CLI launcher for the 42cc tray application",
5
5
  "bin": {
6
6
  "42cc": "./bin/42cc.js"
@@ -10,8 +10,8 @@
10
10
  "README.md"
11
11
  ],
12
12
  "optionalDependencies": {
13
- "@42ailab/42cc-darwin-universal": "0.3.20",
14
- "@42ailab/42cc-win32-x64": "0.3.20"
13
+ "@42ailab/42cc-darwin-universal": "0.4.0",
14
+ "@42ailab/42cc-win32-x64": "0.4.0"
15
15
  },
16
16
  "os": [
17
17
  "darwin",