bini-server 1.0.7 → 1.0.9

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/cli.js CHANGED
@@ -91,14 +91,17 @@ async function findFreePort(start3) {
91
91
  throw new Error(`No free port found in range ${start3}\u2013${start3 + 99}`);
92
92
  }
93
93
  function startKeyboardLoop(port) {
94
+ if (!process.stdin.isTTY) {
95
+ return;
96
+ }
94
97
  const rl = readline.createInterface({ input: process.stdin });
95
98
  rl.on("line", (line) => {
96
99
  switch (line.trim()) {
97
100
  case "h":
98
101
  console.log("");
99
102
  console.log(" Shortcuts");
100
- console.log(` ${C.DIM}${C.GREEN}\u279C${C.RESET} ${C.DIM}press ${C.RESET}o + enter${C.DIM} to open in browser${C.RESET}`);
101
- console.log(` ${C.DIM}${C.GREEN}\u279C${C.RESET} ${C.DIM}press ${C.RESET}q + enter${C.DIM} to quit${C.RESET}`);
103
+ console.log(` ${C.DIM}press ${C.RESET}o + enter${C.DIM} to open in browser${C.RESET}`);
104
+ console.log(` ${C.DIM}press ${C.RESET}q + enter${C.DIM} to quit${C.RESET}`);
102
105
  console.log("");
103
106
  break;
104
107
  case "o": {
package/dist/index.js CHANGED
@@ -92,14 +92,17 @@ async function findFreePort(start2) {
92
92
  throw new Error(`No free port found in range ${start2}\u2013${start2 + 99}`);
93
93
  }
94
94
  function startKeyboardLoop(port) {
95
+ if (!process.stdin.isTTY) {
96
+ return;
97
+ }
95
98
  const rl = readline.createInterface({ input: process.stdin });
96
99
  rl.on("line", (line) => {
97
100
  switch (line.trim()) {
98
101
  case "h":
99
102
  console.log("");
100
103
  console.log(" Shortcuts");
101
- console.log(` ${C.DIM}${C.GREEN}\u279C${C.RESET} ${C.DIM}press ${C.RESET}o + enter${C.DIM} to open in browser${C.RESET}`);
102
- console.log(` ${C.DIM}${C.GREEN}\u279C${C.RESET} ${C.DIM}press ${C.RESET}q + enter${C.DIM} to quit${C.RESET}`);
104
+ console.log(` ${C.DIM}press ${C.RESET}o + enter${C.DIM} to open in browser${C.RESET}`);
105
+ console.log(` ${C.DIM}press ${C.RESET}q + enter${C.DIM} to quit${C.RESET}`);
103
106
  console.log("");
104
107
  break;
105
108
  case "o": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bini-server",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Production server for bini-router apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",