@seflless/ghosttown 1.1.0 → 1.1.2

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/bin/ghosttown.js +26 -12
  2. package/package.json +1 -1
package/bin/ghosttown.js CHANGED
@@ -643,22 +643,36 @@ function getLocalIPs() {
643
643
 
644
644
  function printBanner(url) {
645
645
  const localIPs = getLocalIPs();
646
- console.log('\n' + '═'.repeat(50));
647
- console.log(' 👻 ghosttown');
648
- console.log(''.repeat(50));
649
- console.log(`\n Open: ${url}`);
646
+ // console.log('\n' + '═'.repeat(50));
647
+ console.log('');
648
+ // console.log(' 👻 ghosttown');
649
+ // console.log('═'.repeat(50));
650
+ const labels = [
651
+ [' Open:', url],
652
+ [' Network:', ''],
653
+ [' Shell:', getShell()],
654
+ [' Home:', homedir()],
655
+ ];
656
+
657
+ console.log(labels[0].join(' '));
658
+
659
+ const network = [labels[1].join(' ')];
660
+
650
661
  if (localIPs.length > 0) {
651
- console.log(` Network:`);
662
+ let networkCount = 0;
652
663
  for (const ip of localIPs) {
653
- console.log(` http://${ip}:${HTTP_PORT}`);
664
+ networkCount++;
665
+ const spaces = networkCount !== 1 ? ' ' : '';
666
+ network.push(`${spaces}http://${ip}:${HTTP_PORT}\n`);
654
667
  }
655
668
  }
656
- console.log(`\n Shell: ${getShell()}`);
657
- console.log(` Home: ${homedir()}`);
658
- console.log('\n Warning: This server provides shell access.');
659
- console.log(' Only use for local development.\n');
660
- console.log(''.repeat(50));
661
- console.log(' Press Ctrl+C to stop.\n');
669
+ console.log(`\n${network.join('')}`);
670
+ // Shell
671
+ console.log(labels[2].join(' '));
672
+ // Home
673
+ console.log(labels[3].join(' '));
674
+ console.log('');
675
+ console.log(' Press Ctrl+C to stop.\n');
662
676
  }
663
677
 
664
678
  process.on('SIGINT', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seflless/ghosttown",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly",
5
5
  "type": "module",
6
6
  "main": "./dist/ghostty-web.umd.cjs",