eitri-cli 1.6.0-beta.4 → 1.6.0-beta.6

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
@@ -82,8 +82,8 @@ const run = async () => {
82
82
  .option("-v, --verbose", "Exibe mais logs")
83
83
  .option("-r, --release", "Gera uma nova release baseado nos commits. Um arquivo CHANGELOG.md será gerado automaticamente.")
84
84
  .option(
85
- "-c, --components",
86
- "Publica o Eitri-App como biblioteca de components"
85
+ "-s, --shared",
86
+ "Publica o Eitri-App compartilhado"
87
87
  )
88
88
  .option(
89
89
  "-m, --message <revision-message>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.6.0-beta.4",
3
+ "version": "1.6.0-beta.6",
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,4 @@
1
+ module.exports = {
2
+ 'SHARED' : 'SHARED',
3
+ 'APPLICATION': 'APPLICATION'
4
+ }
@@ -17,13 +17,19 @@ class QRCodeFactory {
17
17
  qrcodeTerminal.generate(args?.fullUrl ?? "", {small: true})
18
18
  }
19
19
 
20
- async create(data, eitriAppSlug = "") {
20
+ async create(data, eitriAppSlug = "", displayOutsideTerminal = false) {
21
21
  console.log('==================================================')
22
22
  console.log('Utilize o QR-Code para iniciar o seu Eitri-App')
23
23
  console.log('É importante utilizar o leitor de QR-Code do')
24
24
  console.log('aplicativo à qual destina-se o seu Eitri-App')
25
25
  console.log('==================================================')
26
- const qrCodeTempPath = await this.tempFile(eitriAppSlug)
26
+
27
+ let qrCodeTempPath = `${eitriAppSlug}::${new Date().getTime()}`
28
+
29
+ if(displayOutsideTerminal){
30
+ qrCodeTempPath = await this.tempFile(eitriAppSlug)
31
+ }
32
+
27
33
  await this.createQRCodeImage(qrCodeTempPath, data)
28
34
  return qrCodeTempPath
29
35
  }
@@ -52,7 +52,7 @@ class TrackingService {
52
52
  }
53
53
  await axios.get(GA_URL, config)
54
54
  } catch (e) {
55
- debug('Erro ao enviar tracking de pageview', e.message)
55
+ debug('Erro ao enviar tracking de pageview', e?.message || "")
56
56
  }
57
57
  }
58
58
 
@@ -86,7 +86,7 @@ class TrackingService {
86
86
 
87
87
  await axios.get(GA_URL, config)
88
88
  } catch (e) {
89
- debug('Erro ao enviar tracking de erro', e.message)
89
+ debug('Erro ao enviar tracking de erro', e?.message || "")
90
90
  }
91
91
  }
92
92
 
@@ -109,7 +109,7 @@ class TrackingService {
109
109
 
110
110
  await axios.get(GA_URL, config)
111
111
  } catch (e) {
112
- debug('Erro ao enviar tracking de evento', e.message)
112
+ debug('Erro ao enviar tracking de evento', e?.message || "")
113
113
  }
114
114
  }
115
115
 
@@ -27,6 +27,7 @@ const EitriAppManager = require("./EitriAppManager");
27
27
  const EitriAppService = require("./EitriAppService");
28
28
  const VegvisirService = require("../modules/vegvisir/VegvisirService");
29
29
  const HuginService = require("./HuginService");
30
+ const EitriAppType = require("../model/EitriAppType");
30
31
  const vegvisirService = new VegvisirService()
31
32
  const huginService = new HuginService()
32
33
 
@@ -823,7 +824,7 @@ class Workspace {
823
824
  miniConf,
824
825
  buildMessage: args.message,
825
826
  cliVersion: packageJson.version,
826
- eitriAppType: args.components ? 'COMPONENTS' : 'APPLICATION'
827
+ eitriAppType: args.shared ? EitriAppType.SHARED : EitriAppType.APPLICATION
827
828
  };
828
829
  const url = `${this.serverUrl}/${this.basePath}/publish?async=true`;
829
830
  await this.http.post(url, body, headers);
@@ -49,7 +49,7 @@ function QRCodeStarter(
49
49
  const _QRCodeFactory = new QRCodeFactory();
50
50
 
51
51
  const eitriAppSlug = this.workspace?._miniConf?.slug ?? "";
52
- const qrCodePath = await _QRCodeFactory.create(fullUrl, eitriAppSlug);
52
+ const qrCodePath = await _QRCodeFactory.create(fullUrl, eitriAppSlug, this.args.qrPrinter);
53
53
 
54
54
  if (this.args.verbose) {
55
55
  console.log(`QrCode Path: ${qrCodePath}`);