eitri-cli 1.3.0-beta.1 → 1.3.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0-beta.2",
4
4
  "description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -85,32 +85,34 @@ function tryOpenEmulator(fullUrl, args) {
85
85
  }
86
86
 
87
87
  function listenerKeyPressToOpenEmulator(url) {
88
+ const enterText = chalk.blue.bold("Enter");
88
89
  console.log("================================================");
89
90
  console.log(`\t${chalk.green.bold("Abertura de Eitri-App automática")}`);
90
91
  console.log("================================================");
91
- console.log(`Pressione ${chalk.blue.bold("a")} para abrir no Android`);
92
- if (os.platform() === "darwin") {
93
- console.log(`Pressione ${chalk.blue.bold("i")} para abrir no iOS`);
94
- }
95
92
  console.log(
96
- `Pressione ${chalk.blue.bold(
97
- "q"
98
- )} para finalizar a execução do Eitri-App`
93
+ `Digite ${chalk.blue.bold(
94
+ "a"
95
+ )} e pressione ${enterText} no terminal para abrir no Android`
99
96
  );
97
+ if (os.platform() === "darwin") {
98
+ console.log(
99
+ `Digite ${chalk.blue.bold(
100
+ "i"
101
+ )} e pressione ${enterText} no terminal para abrir no iOS`
102
+ );
103
+ }
100
104
  console.log("================================================");
101
105
  readline.emitKeypressEvents(process.stdin);
102
106
 
103
- if (process.stdin.isTTY) process.stdin.setRawMode(true);
104
-
105
107
  process.stdin.on("keypress", (chunk, key) => {
106
108
  if (key && key.name == "a") {
107
109
  const emulator = "android";
108
- console.log("Abrindo Eitri-App no Android");
110
+ console.log(`Abrindo Eitri-App no ${chalk.blue.bold("Android")}`);
109
111
  tryOpenEmulator(url, { emulator });
110
112
  }
111
113
  if (os.platform() === "darwin" && key && key.name == "i") {
112
114
  const emulator = "ios";
113
- console.log("Abrindo Eitri-App no iOS");
115
+ console.log(`Abrindo Eitri-App no ${chalk.blue.bold("iOS")}`);
114
116
  tryOpenEmulator(url, { emulator });
115
117
  }
116
118
  if (key && key.name == "q") {