eitri-cli 1.7.0-beta.6 → 1.7.0-beta.7

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/index.js CHANGED
@@ -125,6 +125,13 @@ const run = async () => {
125
125
  require("./src/cmd/eitriLibs")(cmdObj);
126
126
  });
127
127
 
128
+ program
129
+ .command("doctor")
130
+ .description("Valida as dependências externas para execução da CLI do Eitri")
131
+ .action((cmdObj) => {
132
+ require("./src/cmd/doctor")(cmdObj);
133
+ });
134
+
128
135
  program.addCommand(VegvisirCommand());
129
136
 
130
137
  if (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.7.0-beta.6",
3
+ "version": "1.7.0-beta.7",
4
4
  "description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -0,0 +1,70 @@
1
+ const child_process = require("child_process");
2
+ const chalk = require("chalk");
3
+ const exec = child_process.exec;
4
+ const os = require("os");
5
+ module.exports = function () {
6
+ console.log("Checando dependências externas do Eitri CLI.\n");
7
+ checkGitDependency();
8
+ adbDependency();
9
+ xcodeCLIDependency();
10
+ };
11
+
12
+ const checkGitDependency = () => {
13
+ exec("git -v", (error, _, stderr) => {
14
+ if (error) {
15
+ console.log(
16
+ `[${chalk.red(
17
+ "✘"
18
+ )}] GIT. Para instalar basta acessar o link e seguir a documentação: https://git-scm.com/`
19
+ );
20
+ return;
21
+ }
22
+ if (stderr) {
23
+ console.log(
24
+ `[✘] GIT. Para instalar basta acessar o link e seguir a documentação: https://git-scm.com/`
25
+ );
26
+ return;
27
+ }
28
+ console.log(`[${chalk.green("✔")}] GIT`);
29
+ });
30
+ };
31
+
32
+ const adbDependency = () => {
33
+ exec("adb version", (error, _, stderr) => {
34
+ if (error) {
35
+ console.log(
36
+ `[${chalk.red(
37
+ "✘"
38
+ )}] ADB. Para instalar basta acessar o link e seguir a documentação: https://developer.android.com/tools/releases/platform-tools?hl=pt-br`
39
+ );
40
+ return;
41
+ }
42
+ if (stderr) {
43
+ console.log(
44
+ `[✘] ADB. Para instalar basta acessar o link e seguir a documentação: https://developer.android.com/tools/releases/platform-tools?hl=pt-br`
45
+ );
46
+ return;
47
+ }
48
+ console.log(`[${chalk.green("✔")}] ADB`);
49
+ });
50
+ };
51
+ const xcodeCLIDependency = () => {
52
+ if (os.platform() !== "darwin") return;
53
+ exec("xcrun version", (error, _, stderr) => {
54
+ if (error) {
55
+ console.log(
56
+ `[${chalk.red(
57
+ "✘"
58
+ )}] XCode. Para instalar basta acessar o link e seguir a documentação: https://developer.apple.com/documentation/Xcode`
59
+ );
60
+ return;
61
+ }
62
+ if (stderr) {
63
+ console.log(
64
+ `[✘] XCode. Para instalar basta acessar o link e seguir a documentação: https://developer.apple.com/documentation/Xcode`
65
+ );
66
+ return;
67
+ }
68
+ console.log(`[${chalk.green("✔")}] XCode`);
69
+ });
70
+ };
@@ -176,8 +176,9 @@ ${await targetService.getAppConfExampleSnippet()}
176
176
  ...miniConf,
177
177
  organization
178
178
  },
179
- target,
179
+ application: target,
180
180
  startDate: `${start}`,
181
+ tempWorkspaceId
181
182
  }
182
183
  })
183
184
  process.exit(0)
package/src/cmd/start.js CHANGED
@@ -112,8 +112,7 @@ module.exports = async function start(args) {
112
112
  eventName:"start",
113
113
  userId: workspace?.userEmail,
114
114
  data: {
115
- workspace,
116
- userWorkspace,
115
+ workspaceId: userWorkspace.id,
117
116
  miniConf,
118
117
  args
119
118
  }
@@ -17,6 +17,11 @@ class CliLogin {
17
17
 
18
18
  devUser = developerKeyParsed?.clientId
19
19
  devKey = developerKeyParsed?.clientSecret
20
+ TrackingEitriAnalytics.sendEvent({
21
+ eventName: 'login',
22
+ userId: email,
23
+ data: {}
24
+ })
20
25
  } catch (error) {
21
26
  console.error("\n", "Não foi possível realizar o seu login. Por favor, verique as credenciais.")
22
27
  TrackingEitriAnalytics.sendEvent({