upfyn-code 1.0.3 → 1.0.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.
- package/bin/cli.js +1 -1
- package/package.json +2 -3
- package/src/auth.js +1 -1
- package/src/connect.js +5 -5
- package/src/launch.js +1 -1
- package/src/mcp.js +2 -4
- package/src/server.js +1 -2
package/bin/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ const program = new Command();
|
|
|
11
11
|
program
|
|
12
12
|
.name('upfyn-code')
|
|
13
13
|
.description('Launch Upfyn AI coding environment from your terminal')
|
|
14
|
-
.version('1.0.
|
|
14
|
+
.version('1.0.4')
|
|
15
15
|
.option('--local', 'Start a local server instead of opening the hosted app')
|
|
16
16
|
.action(async (options) => {
|
|
17
17
|
if (options.local) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upfyn-code",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Unified AI coding interface — access AI chat, terminal, file explorer, git, and visual canvas from any browser. Connect your local machine and code from anywhere.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
"LICENSE"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"start": "node bin/cli.js"
|
|
18
|
-
"build-frontend": "cd ../../frontend && npm run build && cp -r dist ../../packages/cli/dist"
|
|
17
|
+
"start": "node bin/cli.js"
|
|
19
18
|
},
|
|
20
19
|
"keywords": [
|
|
21
20
|
"upfyn",
|
package/src/auth.js
CHANGED
|
@@ -82,7 +82,7 @@ export async function login() {
|
|
|
82
82
|
const name = data.user.first_name || data.user.username;
|
|
83
83
|
console.log(chalk.green(`\n Logged in as ${chalk.bold(name)}!\n`));
|
|
84
84
|
} catch (err) {
|
|
85
|
-
console.log(chalk.red(
|
|
85
|
+
console.log(chalk.red('\n Connection error. Check your network and try again.\n'));
|
|
86
86
|
process.exit(1);
|
|
87
87
|
}
|
|
88
88
|
}
|
package/src/connect.js
CHANGED
|
@@ -74,7 +74,7 @@ async function handleRelayCommand(data, ws) {
|
|
|
74
74
|
switch (action) {
|
|
75
75
|
case 'claude-query': {
|
|
76
76
|
const { command, options } = data;
|
|
77
|
-
console.log(chalk.cyan(
|
|
77
|
+
console.log(chalk.cyan(' [relay] Processing Claude query...'));
|
|
78
78
|
|
|
79
79
|
const args = ['--print'];
|
|
80
80
|
if (options?.projectPath) args.push('--cwd', options.projectPath);
|
|
@@ -114,7 +114,7 @@ async function handleRelayCommand(data, ws) {
|
|
|
114
114
|
|
|
115
115
|
case 'shell-command': {
|
|
116
116
|
const { command: cmd, cwd } = data;
|
|
117
|
-
console.log(chalk.dim(
|
|
117
|
+
console.log(chalk.dim(' [relay] Executing shell command...'));
|
|
118
118
|
const result = await execCommand(cmd, [], { cwd: cwd || os.homedir(), timeout: 60000 });
|
|
119
119
|
ws.send(JSON.stringify({ type: 'relay-response', requestId, data: { stdout: result } }));
|
|
120
120
|
break;
|
|
@@ -143,7 +143,7 @@ async function handleRelayCommand(data, ws) {
|
|
|
143
143
|
|
|
144
144
|
case 'git-operation': {
|
|
145
145
|
const { gitCommand, cwd: gitCwd } = data;
|
|
146
|
-
console.log(chalk.dim(
|
|
146
|
+
console.log(chalk.dim(' [relay] Running git operation...'));
|
|
147
147
|
const result = await execCommand('git', [gitCommand], { cwd: gitCwd });
|
|
148
148
|
ws.send(JSON.stringify({ type: 'relay-response', requestId, data: { stdout: result } }));
|
|
149
149
|
break;
|
|
@@ -198,7 +198,7 @@ export async function connect(options = {}) {
|
|
|
198
198
|
const data = await res.json();
|
|
199
199
|
relayKey = data.token;
|
|
200
200
|
} catch (err) {
|
|
201
|
-
console.log(chalk.red(
|
|
201
|
+
console.log(chalk.red('\n Could not get connection token. Check your network and try again.\n'));
|
|
202
202
|
process.exit(1);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -251,7 +251,7 @@ export async function connect(options = {}) {
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
} catch (e) {
|
|
254
|
-
|
|
254
|
+
// message parse error
|
|
255
255
|
}
|
|
256
256
|
});
|
|
257
257
|
|
package/src/launch.js
CHANGED
|
@@ -25,7 +25,7 @@ export async function openHosted() {
|
|
|
25
25
|
|
|
26
26
|
const name = user.first_name || user.username;
|
|
27
27
|
console.log(chalk.green(` Welcome back, ${chalk.bold(name)}!`));
|
|
28
|
-
console.log(chalk.dim(
|
|
28
|
+
console.log(chalk.dim(' Opening Upfyn-Code in your browser...\n'));
|
|
29
29
|
|
|
30
30
|
await open(url);
|
|
31
31
|
}
|
package/src/mcp.js
CHANGED
|
@@ -33,7 +33,7 @@ export async function mcp(options = {}) {
|
|
|
33
33
|
const data = await res.json();
|
|
34
34
|
relayKey = data.token;
|
|
35
35
|
} catch (err) {
|
|
36
|
-
console.log(chalk.red(
|
|
36
|
+
console.log(chalk.red('\n Could not get connection token. Check your network and try again.\n'));
|
|
37
37
|
process.exit(1);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -53,7 +53,5 @@ export async function mcp(options = {}) {
|
|
|
53
53
|
console.log(chalk.dim(' Add this to your Claude / Cursor MCP settings:\n'));
|
|
54
54
|
console.log(chalk.white(JSON.stringify(mcpConfig, null, 2)));
|
|
55
55
|
console.log('');
|
|
56
|
-
console.log(chalk.dim('
|
|
57
|
-
console.log(chalk.cyan(` ${serverUrl}/mcp`));
|
|
58
|
-
console.log(chalk.dim(` Authorization: Bearer ${relayKey}\n`));
|
|
56
|
+
console.log(chalk.dim(' The JSON above contains your MCP URL and authorization header.\n'));
|
|
59
57
|
}
|
package/src/server.js
CHANGED
|
@@ -39,8 +39,7 @@ export async function startServer(port, serverUrl, token) {
|
|
|
39
39
|
const server = app.listen(port, async () => {
|
|
40
40
|
const url = `http://localhost:${port}?token=${encodeURIComponent(token)}`;
|
|
41
41
|
console.log(chalk.green(`\n Local server running at ${chalk.bold(`http://localhost:${port}`)}`));
|
|
42
|
-
console.log(chalk.dim(
|
|
43
|
-
console.log(chalk.dim(' Press Ctrl+C to stop.\n'));
|
|
42
|
+
console.log(chalk.dim(' API proxy active. Press Ctrl+C to stop.\n'));
|
|
44
43
|
await open(url);
|
|
45
44
|
resolve(server);
|
|
46
45
|
});
|