@seflless/ghosttown 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/bin/ghosttown.js +28 -12
  2. package/package.json +2 -1
package/bin/ghosttown.js CHANGED
@@ -643,22 +643,38 @@ 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
+ // console.log(``);
663
+ let networkCount = 0;
664
+ localIPs.push(localIPs[0]);
652
665
  for (const ip of localIPs) {
653
- console.log(` http://${ip}:${HTTP_PORT}`);
666
+ networkCount++;
667
+ const spaces = networkCount !== 1 ? ' ' : '';
668
+ network.push(`${spaces}http://${ip}:${HTTP_PORT}\n`);
654
669
  }
655
670
  }
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');
671
+ console.log(`\n${network.join('')}`);
672
+ // Shell
673
+ console.log(labels[2].join(' '));
674
+ // Home
675
+ console.log(labels[3].join(' '));
676
+ console.log('');
677
+ console.log(' Press Ctrl+C to stop.\n');
662
678
  }
663
679
 
664
680
  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.1",
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",
@@ -68,6 +68,7 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@lydell/node-pty": "^1.0.1",
71
+ "image-to-ascii": "^3.3.0",
71
72
  "ws": "^8.18.0"
72
73
  },
73
74
  "devDependencies": {