cicy-code 0.2.14 → 2.0.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/bin/cicy-code.js +5 -12
- package/package.json +8 -2
package/bin/cicy-code.js
CHANGED
|
@@ -7,6 +7,8 @@ const https = require('https');
|
|
|
7
7
|
const pkg = require('../package.json');
|
|
8
8
|
const binPath = path.join(__dirname, 'cicy-code');
|
|
9
9
|
const os = require('os');
|
|
10
|
+
const CICY_ROOT_DIR = path.join(os.homedir(), 'cicy-ai');
|
|
11
|
+
const CICY_GLOBAL_JSON_PATH = path.join(CICY_ROOT_DIR, 'global.json');
|
|
10
12
|
|
|
11
13
|
const cn = process.argv.includes('--cn') || process.env.CN_MIRROR === '1';
|
|
12
14
|
const desktopMode = process.argv.includes('--desktop');
|
|
@@ -102,8 +104,7 @@ async function main() {
|
|
|
102
104
|
|
|
103
105
|
function getToken() {
|
|
104
106
|
try {
|
|
105
|
-
const
|
|
106
|
-
const data = JSON.parse(fs.readFileSync(globalJson, 'utf8'));
|
|
107
|
+
const data = JSON.parse(fs.readFileSync(CICY_GLOBAL_JSON_PATH, 'utf8'));
|
|
107
108
|
return data.api_token || '';
|
|
108
109
|
} catch { return ''; }
|
|
109
110
|
}
|
|
@@ -179,7 +180,7 @@ async function launchDesktop() {
|
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
// Find cicy-desktop package
|
|
183
|
+
// Find cicy-desktop package from the global install
|
|
183
184
|
let desktopDir = null;
|
|
184
185
|
|
|
185
186
|
// Check global 'cicy-desktop' package
|
|
@@ -189,14 +190,6 @@ async function launchDesktop() {
|
|
|
189
190
|
if (!fs.existsSync(path.join(desktopDir, 'src', 'main.js'))) desktopDir = null;
|
|
190
191
|
} catch {}
|
|
191
192
|
|
|
192
|
-
// Fallback: bundled desktop/ submodule
|
|
193
|
-
if (!desktopDir) {
|
|
194
|
-
const bundled = path.join(__dirname, '..', '..', 'desktop');
|
|
195
|
-
if (fs.existsSync(path.join(bundled, 'src', 'main.js'))) {
|
|
196
|
-
desktopDir = bundled;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
193
|
if (!desktopDir) {
|
|
201
194
|
console.log(' ⚠️ cicy-desktop not found. Installing...');
|
|
202
195
|
try {
|
|
@@ -204,7 +197,7 @@ async function launchDesktop() {
|
|
|
204
197
|
const cicyBin = execSync('which cicy', { encoding: 'utf8' }).trim();
|
|
205
198
|
desktopDir = path.resolve(path.dirname(cicyBin), '..', 'lib', 'node_modules', 'cicy-desktop');
|
|
206
199
|
} catch {
|
|
207
|
-
console.error(' ❌ Failed to install cicy. Install manually: npm install -g cicy-desktop');
|
|
200
|
+
console.error(' ❌ Failed to install cicy-desktop. Install manually: npm install -g cicy-desktop');
|
|
208
201
|
console.log(` 📱 Fallback: open browser → ${url}`);
|
|
209
202
|
return;
|
|
210
203
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cicy-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "CiCy Code - AI-powered development environment",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cicy-code": "bin/cicy-code.js"
|
|
@@ -17,7 +17,13 @@
|
|
|
17
17
|
"url": "git+https://github.com/cicy-ai/cicy-code.git"
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/cicy-ai/cicy-code",
|
|
20
|
-
"keywords": [
|
|
20
|
+
"keywords": [
|
|
21
|
+
"cicy",
|
|
22
|
+
"code",
|
|
23
|
+
"ai",
|
|
24
|
+
"agent",
|
|
25
|
+
"development"
|
|
26
|
+
],
|
|
21
27
|
"license": "MIT",
|
|
22
28
|
"engines": {
|
|
23
29
|
"node": ">=14"
|