airloom 0.1.31 → 0.1.32
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/dist/index.js +12 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2519,13 +2519,18 @@ async function main() {
|
|
|
2519
2519
|
if (!useAbly) console.log(`Relay: ${RELAY_URL}`);
|
|
2520
2520
|
const localUrl = `http://localhost:${port}`;
|
|
2521
2521
|
const controlUrl = encodeControlUrl(localUrl, controlToken);
|
|
2522
|
-
log(`
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2522
|
+
console.log(`Host UI: ${controlUrl}`);
|
|
2523
|
+
const isSSH = !!(process.env.SSH_CONNECTION || process.env.SSH_TTY || process.env.SSH_CLIENT);
|
|
2524
|
+
if (isSSH) {
|
|
2525
|
+
console.log("\n (SSH session detected \u2014 open the Host UI URL above in a local browser)");
|
|
2526
|
+
} else {
|
|
2527
|
+
import("node:child_process").then(({ exec }) => {
|
|
2528
|
+
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2529
|
+
exec(`${cmd} ${controlUrl}`);
|
|
2530
|
+
}).catch(() => {
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
console.log();
|
|
2529
2534
|
const terminal = new TerminalSession(channel, () => state.terminalLaunchCommand, broadcast);
|
|
2530
2535
|
state.terminal = terminal;
|
|
2531
2536
|
const pushViewerSession = () => {
|