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

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.6.0-beta.4",
3
+ "version": "1.6.0-beta.5",
4
4
  "description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -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
 
@@ -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}`);