@lucenaone/coder 1.1.1 → 1.1.5
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/package.json +1 -1
- package/src/agent.js +0 -1
- package/src/main.js +10 -10
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -124,7 +124,6 @@ export class LucenaAgent {
|
|
|
124
124
|
|
|
125
125
|
// ── Listen for browser connect events ──
|
|
126
126
|
// When the browser connects, push the pre-built index immediately
|
|
127
|
-
const connectRef = ref(this.db, `tunnels/${this.tunnelId}/meta/browserConnected`);
|
|
128
127
|
onChildAdded(ref(this.db, `tunnels/${this.tunnelId}/browserConnect`), async (snapshot) => {
|
|
129
128
|
const data = snapshot.val();
|
|
130
129
|
if (!data) return;
|
package/src/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/main.js — CLI entry point for the Lucena agent
|
|
2
2
|
import { LucenaAgent } from './agent.js';
|
|
3
3
|
import { basename } from 'path';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
|
|
6
6
|
// Standard ANSI Terminal Colors
|
|
7
7
|
const c = {
|
|
@@ -55,9 +55,7 @@ export async function main() {
|
|
|
55
55
|
process.on('SIGTERM', shutdown);
|
|
56
56
|
|
|
57
57
|
try {
|
|
58
|
-
console.log(` ${c.dim}⏳ Indexing workspace...${c.reset}`);
|
|
59
58
|
const tunnelId = await agent.start();
|
|
60
|
-
console.log(` ${c.green}✔ Indexed${c.reset}\n`);
|
|
61
59
|
console.log(` ${c.green}✔ Tunnel active!${c.reset}\n`);
|
|
62
60
|
|
|
63
61
|
const idLabel = "Tunnel ID:";
|
|
@@ -69,15 +67,17 @@ export async function main() {
|
|
|
69
67
|
console.log(` ${c.dim}└${border}┘${c.reset}`);
|
|
70
68
|
|
|
71
69
|
const webUrl = `https://lucenacoder.com/?tunnel=${tunnelId}`;
|
|
72
|
-
console.log(`\n ${c.dim}Opening browser to your workspace...${c.reset}`);
|
|
73
70
|
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
const urlLabel = "URL:";
|
|
72
|
+
const urlBoxWidth = urlLabel.length + webUrl.length + 5;
|
|
73
|
+
const urlBorder = '─'.repeat(urlBoxWidth);
|
|
74
|
+
|
|
75
|
+
console.log(`\n ${c.dim}┌${urlBorder}┐${c.reset}`);
|
|
76
|
+
console.log(` ${c.dim}│${c.reset} ${c.dim}${urlLabel}${c.reset} ${c.cyan}${webUrl}${c.reset} ${c.dim}│${c.reset}`);
|
|
77
|
+
console.log(` ${c.dim}└${urlBorder}┘${c.reset}`);
|
|
79
78
|
|
|
80
|
-
console.log(`\n ${c.dim}
|
|
79
|
+
console.log(`\n ${c.dim}Open the URL above in your browser to connect.${c.reset}`);
|
|
80
|
+
console.log(` ${c.dim}Press Ctrl+C to disconnect${c.reset}\n`);
|
|
81
81
|
} catch (err) {
|
|
82
82
|
console.error(`\n ${c.yellow}✖ Failed to start tunnel: ${err.message}${c.reset}\n`);
|
|
83
83
|
process.exit(1);
|