eitri-cli 1.17.0 → 1.18.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.
@@ -7,6 +7,7 @@ export interface StartArguments {
7
7
  shared?: boolean
8
8
  verbose?: boolean
9
9
  playground?: boolean
10
+ initializationParams?: string
10
11
  }
11
12
  export interface EitriLibsArguments {
12
13
  bifrost?: boolean
package/index.js CHANGED
@@ -42,14 +42,15 @@ const run = async () => {
42
42
  .option("--yes", "Aceita o redirecionamento para o console")
43
43
  .option("-v, --verbose", "Exibe mais logs")
44
44
  .action(async (cmdObj) => {
45
- const isLoginV2 = process.env.FT_LOGIN_V2
46
- if (isLoginV2) {
47
- console.log("\n\n Iniciando login (v2) \n");
48
- require("./src/cmd/loginV2")(cmdObj);
45
+ const isLoginV1 = process.env.FT_LOGIN_V1
46
+ if (isLoginV1) {
47
+ console.log("\n\n Iniciando login (@deprecated) \n");
48
+ require("./src/cmd/login")(cmdObj);
49
49
  return
50
50
  }
51
51
 
52
- require("./src/cmd/login")(cmdObj);
52
+ console.log("\n\n Iniciando login \n");
53
+ require("./src/cmd/loginV2")(cmdObj);
53
54
  });
54
55
 
55
56
  program
@@ -77,8 +78,8 @@ const run = async () => {
77
78
  "Gera um QR code com a URL de abertura do Eitri Playground"
78
79
  )
79
80
  .option(
80
- "-P, --qr-printer <qrPrinter>",
81
- "Indica qual programa imprimirá o QR Code. Se omitido, exibe o QrCode no terminal. Valores válidos: terminal|chrome|msedge|firefox"
81
+ "-i, --initializationParams <initializationParams>",
82
+ "Define os parâmetros de inicialização do Eitri-App"
82
83
  )
83
84
  .option(
84
85
  "-e, --emulator <platform>",
@@ -94,14 +95,6 @@ const run = async () => {
94
95
  require("./src/cmd/start")(cmdObj);
95
96
  });
96
97
 
97
- program
98
- .command('test-initialization-params <initializationParams>')
99
- .option("-v, --verbose", "Exibe mais logs")
100
- .description('Define parâmetros na query string para inicializar o Eitri-App. Exemplo: stringChave1=stringValor1&stringChave2=stringValor2...')
101
- .action((initializationParams, cmdObj) => {
102
- require('./src/cmd/test-initialization-params')(initializationParams, cmdObj)
103
- })
104
-
105
98
  program
106
99
  .command("push-version")
107
100
  .description(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.17.0",
3
+ "version": "1.18.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": {
@@ -180,7 +180,7 @@ ${await targetService.getAppConfExampleSnippet()}
180
180
  id: miniConf?.organizationId
181
181
  }
182
182
 
183
- TrackingEitriAnalytics.sendEvent({
183
+ await TrackingEitriAnalytics.sendEvent({
184
184
  eventName: "push-version",
185
185
  userId: workspace?.userEmail,
186
186
  data: {
@@ -190,7 +190,7 @@ ${await targetService.getAppConfExampleSnippet()}
190
190
  },
191
191
  application: target,
192
192
  startDate: `${start}`,
193
- tempWorkspaceId
193
+ workspaceId: tempWorkspaceId
194
194
  }
195
195
  })
196
196
  process.exit(0)
@@ -205,7 +205,7 @@ ${await targetService.getAppConfExampleSnippet()}
205
205
  console.log(`\x1b[1m\x1b[31mNão será possível continuar por enquanto. Ocorreu um erro.\x1b[0m`);
206
206
  }
207
207
 
208
- TrackingEitriAnalytics.sendEvent({
208
+ await TrackingEitriAnalytics.sendEvent({
209
209
  eventName: "push-version.error",
210
210
  userId: workspace?.userEmail,
211
211
  data: {
package/src/cmd/start.js CHANGED
@@ -22,7 +22,17 @@ const debug = require('debug')('eitri:start')
22
22
 
23
23
  module.exports = async function start(args) {
24
24
  debug("Iniciando start()")
25
- const miniConf = workspace.getMiniConf()
25
+
26
+ let miniConf
27
+ try {
28
+ miniConf = workspace.getMiniConf()
29
+ if(!miniConf || !miniConf.slug){
30
+ throw new Error('Não foi possível encontrar o arquivo eitri-app.conf')
31
+ }
32
+ } catch (error) {
33
+ console.log(`\n\x1b[1m\x1b[31m${error.message}\x1b[0m\n`);
34
+ process.exit(1);
35
+ }
26
36
 
27
37
  await vegvisirService.isCurrentWorkspaceOwnedByUser(miniConf.slug)
28
38