cc-connect 1.1.0-beta.2 → 1.1.0-beta.4

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/install.js +12 -2
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -133,8 +133,18 @@ async function main() {
133
133
  const binaryPath = path.join(binDir, binaryName);
134
134
 
135
135
  if (fs.existsSync(binaryPath)) {
136
- console.log(`[cc-connect] Binary already exists at ${binaryPath}`);
137
- return;
136
+ try {
137
+ const out = execSync(`"${binaryPath}" --version`, { encoding: "utf8", timeout: 5000 });
138
+ if (out.includes(VERSION.slice(1))) {
139
+ console.log(`[cc-connect] Binary ${VERSION} already installed, skipping.`);
140
+ return;
141
+ }
142
+ console.log(`[cc-connect] Existing binary is outdated, upgrading to ${VERSION}...`);
143
+ fs.unlinkSync(binaryPath);
144
+ } catch {
145
+ console.log(`[cc-connect] Replacing existing binary with ${VERSION}...`);
146
+ fs.unlinkSync(binaryPath);
147
+ }
138
148
  }
139
149
 
140
150
  const urls = getDownloadURLs(filename);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-connect",
3
- "version": "1.1.0-beta.2",
3
+ "version": "1.1.0-beta.4",
4
4
  "description": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI) to messaging platforms (Feishu, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work)",
5
5
  "keywords": [
6
6
  "claude-code",