eitri-cli 1.1.5-beta.1 → 1.1.5-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/.husky/commit-msg +4 -0
- package/README.md +5 -5
- package/commitlint.config.js +6 -0
- package/config/dev.js +1 -1
- package/index.js +6 -6
- package/package.json +8 -6
- package/src/cmd/clean.js +11 -2
- package/src/cmd/create.js +17 -7
- package/src/cmd/invite.js +4 -4
- package/src/cmd/login.js +2 -2
- package/src/cmd/push-version.js +20 -11
- package/src/cmd/start.js +10 -1
- package/src/model/Payload.js +1 -1
- package/src/modules/vegvisir/VegvisirService.js +2 -2
- package/src/modules/vegvisir/cmd/use.js +1 -1
- package/src/service/MiniLog.js +1 -1
- package/src/service/QRCodeFactory.js +2 -2
- package/src/service/Server.js +2 -2
- package/src/service/Workspace.js +1 -1
- package/src/util/AboutTemplate.jsx +1 -1
- package/src/util/UserLocalCredential.js +4 -0
- package/src/util/error-messages/invite/invite-error-messages.js +1 -1
- package/src/util/template-utils.js +2 -2
- package/test/_fixtures/factory.js +1 -1
- package/test/_fixtures/src/views/AboutTemplate.jsx +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Eitri
|
|
2
2
|
|
|
3
|
-
CLI for developing apps. Eitri-
|
|
3
|
+
CLI for developing apps. Eitri-Apps are integral parts of the Eitri mobile development platform.
|
|
4
4
|
|
|
5
5
|
## Available commands.
|
|
6
6
|
|
|
@@ -21,28 +21,28 @@ Requests your credentials for authentication in the CLI.
|
|
|
21
21
|
eitri create my-eitri-app
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Create an Eitri project with a name.
|
|
24
|
+
Create an Eitri-App project with a name.
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
```bash
|
|
28
28
|
eitri start
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Start your
|
|
31
|
+
Start your Eitri-App in a development workspace.
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
```bash
|
|
35
35
|
eitri push-version
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Submit a version of the
|
|
38
|
+
Submit a version of the Eitri-App for review by a reviewer in the console before it is published to an environment.
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
```bash
|
|
42
42
|
eitri self-update
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Update the
|
|
45
|
+
Update the Eitri-CLI itself to the latest version.
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
package/config/dev.js
CHANGED
package/index.js
CHANGED
|
@@ -36,12 +36,12 @@ const run = async () => {
|
|
|
36
36
|
|
|
37
37
|
program
|
|
38
38
|
.command("create <project-name>")
|
|
39
|
-
.description(`Cria um projeto com um
|
|
39
|
+
.description(`Cria um projeto com um Eitri-App totalmente funcional.`)
|
|
40
40
|
.option(
|
|
41
41
|
"--yes",
|
|
42
42
|
"Aceita os valores default para nome titulo e organização"
|
|
43
43
|
)
|
|
44
|
-
.option("--application", "Define o application de execução do
|
|
44
|
+
.option("--application", "Define o application de execução do Eitri-App")
|
|
45
45
|
.option("-v, --verbose", "Exibe mais logs")
|
|
46
46
|
.action((projectName, cmdObj) => {
|
|
47
47
|
require("./src/cmd/create")(projectName, cmdObj);
|
|
@@ -49,7 +49,7 @@ const run = async () => {
|
|
|
49
49
|
|
|
50
50
|
let startProgram = program
|
|
51
51
|
.command("start")
|
|
52
|
-
.description("Inicia o seu
|
|
52
|
+
.description("Inicia o seu Eitri-App em um workspace online")
|
|
53
53
|
.option("-v, --verbose", "Exibe mais logs")
|
|
54
54
|
.option("-f, --force", "Força o start")
|
|
55
55
|
.option("-S, --show-deeplink", "Exibe o deep link do workspace")
|
|
@@ -65,13 +65,13 @@ const run = async () => {
|
|
|
65
65
|
program
|
|
66
66
|
.command("push-version")
|
|
67
67
|
.description(
|
|
68
|
-
"Cria e envia uma versão do
|
|
68
|
+
"Cria e envia uma versão do Eitri-App para o Console, possibilitando também publicar em um ambiente."
|
|
69
69
|
)
|
|
70
70
|
.option("-l, --local", "Aponta para o servidor local")
|
|
71
71
|
.option("-v, --verbose", "Exibe mais logs")
|
|
72
72
|
.option(
|
|
73
73
|
"-c, --components",
|
|
74
|
-
"Publica o
|
|
74
|
+
"Publica o Eitri-App como biblioteca de components"
|
|
75
75
|
)
|
|
76
76
|
.option(
|
|
77
77
|
"-m, --message <revision-message>",
|
|
@@ -85,7 +85,7 @@ const run = async () => {
|
|
|
85
85
|
program
|
|
86
86
|
.command('clean')
|
|
87
87
|
.description(
|
|
88
|
-
'Realiza a limpeza do workspace remoto do desenvolvedor. Útil quando há mal fucionamento na compilação em nuvem do
|
|
88
|
+
'Realiza a limpeza do workspace remoto do desenvolvedor. Útil quando há mal fucionamento na compilação em nuvem do Eitri-App.'
|
|
89
89
|
)
|
|
90
90
|
.option('-v, --verbose', 'Exibe mais logs')
|
|
91
91
|
.action(cmdObj => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eitri-cli",
|
|
3
|
-
"version": "1.1.5-beta.
|
|
4
|
-
"description": "Command Line Interface to make \"
|
|
3
|
+
"version": "1.1.5-beta.2",
|
|
4
|
+
"description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eitri": "index-eitri.js"
|
|
@@ -63,17 +63,19 @@
|
|
|
63
63
|
"uuid": "^7.0.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
+
"@commitlint/cli": "^17.7.2",
|
|
67
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
66
68
|
"@faker-js/faker": "^7.6.0",
|
|
69
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
70
|
+
"@semantic-release/git": "^10.0.1",
|
|
67
71
|
"docsify-cli": "^4.4.4",
|
|
68
72
|
"eslint": "^6.7.2",
|
|
69
73
|
"eslint-config-google": "^0.14.0",
|
|
70
|
-
"husky": "^
|
|
74
|
+
"husky": "^8.0.3",
|
|
71
75
|
"jest": "^24.9.0",
|
|
72
76
|
"lint-staged": "^9.5.0",
|
|
73
77
|
"nock": "^13.3.0",
|
|
74
|
-
"semantic-release": "^22.0.5"
|
|
75
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
76
|
-
"@semantic-release/git": "^10.0.1"
|
|
78
|
+
"semantic-release": "^22.0.5"
|
|
77
79
|
},
|
|
78
80
|
"resolutions": {
|
|
79
81
|
"lodash": "4.17.21",
|
package/src/cmd/clean.js
CHANGED
|
@@ -5,12 +5,21 @@ const config = require('../service/ConfigService')
|
|
|
5
5
|
const TargetService = require('../service/TargetService')
|
|
6
6
|
const inquirer = require('inquirer')
|
|
7
7
|
const TrackingEitriAnalytics = require('../service/TrackingEitriAnalytics')
|
|
8
|
+
const UserLocalCredential = require('../util/UserLocalCredential')
|
|
8
9
|
|
|
9
10
|
const blindGuardian = workspace.blindGuardian
|
|
10
11
|
const trackingService = new TrackingService(blindGuardian)
|
|
11
12
|
const targetService = new TargetService(workspace)
|
|
12
13
|
|
|
13
14
|
module.exports = async function clean(cmdObj) {
|
|
15
|
+
try {
|
|
16
|
+
UserLocalCredential.checkForCredentials()
|
|
17
|
+
} catch (error) {
|
|
18
|
+
const errorMessage = cmdObj?.verbose ? error : error?.message
|
|
19
|
+
console.error("\n", errorMessage, "\n")
|
|
20
|
+
return
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
try {
|
|
15
24
|
await validator.assertCommandNotRunning('clean')
|
|
16
25
|
|
|
@@ -69,7 +78,7 @@ module.exports = async function clean(cmdObj) {
|
|
|
69
78
|
|
|
70
79
|
if(httpStatus === 403) {
|
|
71
80
|
await tryExitWithFriendlyMessage()
|
|
72
|
-
printError('Acesso negado! Confira se
|
|
81
|
+
printError('Acesso negado! Confira se você está registrado como desenvolvedor deste Eitri-App.')
|
|
73
82
|
await exit()
|
|
74
83
|
}
|
|
75
84
|
if(httpStatus === 500) {
|
|
@@ -91,7 +100,7 @@ module.exports = async function clean(cmdObj) {
|
|
|
91
100
|
|
|
92
101
|
function printAvailableWebhooks(webhooks) {
|
|
93
102
|
if(!webhooks || webhooks.length === 0) return
|
|
94
|
-
console.log('\nWebhooks do
|
|
103
|
+
console.log('\nWebhooks do Eitri-App.')
|
|
95
104
|
console.table(webhooks)
|
|
96
105
|
}
|
|
97
106
|
|
package/src/cmd/create.js
CHANGED
|
@@ -16,6 +16,7 @@ const Target = require("../model/Target");
|
|
|
16
16
|
const EitriAppManager = require("../service/EitriAppManager");
|
|
17
17
|
const WoodCoffee = require("../service/factories/WoodCoffeeFactory");
|
|
18
18
|
const TrackingEitriAnalytics = require("../service/TrackingEitriAnalytics");
|
|
19
|
+
const UserLocalCredential = require("../util/UserLocalCredential");
|
|
19
20
|
|
|
20
21
|
const blindGuardian = new BlindGuardian();
|
|
21
22
|
const hashFolder = new HashFolder();
|
|
@@ -51,8 +52,17 @@ const slug = (inpt) => {
|
|
|
51
52
|
|
|
52
53
|
// eslint-disable-next-line no-unused-vars
|
|
53
54
|
module.exports = async function create(projectName, cmdObj) {
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
UserLocalCredential.checkForCredentials()
|
|
58
|
+
} catch (error) {
|
|
59
|
+
const errorMessage = cmdObj?.verbose ? error : error?.message
|
|
60
|
+
console.error("\n", errorMessage, "\n")
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
console.log(
|
|
55
|
-
"\x1b[34mVamos criar o seu
|
|
65
|
+
"\x1b[34mVamos criar o seu Eitri-App. Para isso basta responder algumas perguntas:\x1b[0m"
|
|
56
66
|
);
|
|
57
67
|
|
|
58
68
|
try {
|
|
@@ -102,7 +112,7 @@ async function askClientApplication() {
|
|
|
102
112
|
name: "accepted",
|
|
103
113
|
type: "rawlist",
|
|
104
114
|
message:
|
|
105
|
-
"Selecione a aplicação para qual destina-se seu
|
|
115
|
+
"Selecione a aplicação para qual destina-se seu Eitri-App:",
|
|
106
116
|
choices: cliOptions.map(createLabel),
|
|
107
117
|
},
|
|
108
118
|
]);
|
|
@@ -186,7 +196,7 @@ async function askProjMetadata(clientApplication, cmdObj, projectName) {
|
|
|
186
196
|
} catch (err) {
|
|
187
197
|
if (cmdObj.verbose) {
|
|
188
198
|
console.error(
|
|
189
|
-
"Houve uma falha durante a criação do
|
|
199
|
+
"Houve uma falha durante a criação do Eitri-App",
|
|
190
200
|
err
|
|
191
201
|
);
|
|
192
202
|
}
|
|
@@ -220,7 +230,7 @@ function createQuestions(projectName) {
|
|
|
220
230
|
{
|
|
221
231
|
type: "input",
|
|
222
232
|
name: "name",
|
|
223
|
-
message: "Digite um nome legível para seu
|
|
233
|
+
message: "Digite um nome legível para seu Eitri-App",
|
|
224
234
|
validate: nameOrTitle,
|
|
225
235
|
default: () => {
|
|
226
236
|
return projectName;
|
|
@@ -239,7 +249,7 @@ function createQuestions(projectName) {
|
|
|
239
249
|
type: "input",
|
|
240
250
|
name: "slug",
|
|
241
251
|
message:
|
|
242
|
-
"Digite um nome único para seu
|
|
252
|
+
"Digite um nome único para seu Eitri-App. Não pode conter espaços",
|
|
243
253
|
default: (currentAnswers) => {
|
|
244
254
|
return slugify(currentAnswers.name).toLowerCase();
|
|
245
255
|
},
|
|
@@ -253,7 +263,7 @@ async function askSlug(projectName) {
|
|
|
253
263
|
{
|
|
254
264
|
type: "input",
|
|
255
265
|
name: "slug",
|
|
256
|
-
message: "Outro nome único para o
|
|
266
|
+
message: "Outro nome único para o Eitri-App:",
|
|
257
267
|
validate: slug,
|
|
258
268
|
default: () => {
|
|
259
269
|
return slugify(projectName).toLowerCase();
|
|
@@ -268,7 +278,7 @@ async function askName(projectName) {
|
|
|
268
278
|
{
|
|
269
279
|
type: "input",
|
|
270
280
|
name: "name",
|
|
271
|
-
message: "Outro nome para o
|
|
281
|
+
message: "Outro nome para o Eitri-App:",
|
|
272
282
|
validate: nameOrTitle,
|
|
273
283
|
default: () => {
|
|
274
284
|
return projectName;
|
package/src/cmd/invite.js
CHANGED
|
@@ -18,11 +18,11 @@ module.exports = async function invite(email, cmdObj) {
|
|
|
18
18
|
let invites = await inviteService.findAllBySlug(slug)
|
|
19
19
|
let invite = invites.find(i => i.email === email)
|
|
20
20
|
if (!invite) {
|
|
21
|
-
console.log(`Convite inexistente para ${email} do
|
|
21
|
+
console.log(`Convite inexistente para ${email} do Eitri-App ${slug}.`)
|
|
22
22
|
process.exit(1)
|
|
23
23
|
}
|
|
24
24
|
await inviteService.remove(invite)
|
|
25
|
-
console.log(`${email} removido com sucesso do
|
|
25
|
+
console.log(`${email} removido com sucesso do Eitri-App ${slug}.`)
|
|
26
26
|
} else if (cmdObj.list) {
|
|
27
27
|
let slug = workspace.getMiniConf().slug
|
|
28
28
|
let invites = await inviteService.findAllBySlug(slug)
|
|
@@ -37,7 +37,7 @@ module.exports = async function invite(email, cmdObj) {
|
|
|
37
37
|
}
|
|
38
38
|
console.log(`${invites.length} convites`)
|
|
39
39
|
const createLabel = (inv) => {
|
|
40
|
-
return `aceitar convite do
|
|
40
|
+
return `aceitar convite do Eitri-App "${inv.slug}" enviado por ${inv.inviterEmail || 'desconhecido'}`
|
|
41
41
|
}
|
|
42
42
|
let res = await inquirer.prompt([
|
|
43
43
|
{
|
|
@@ -49,7 +49,7 @@ module.exports = async function invite(email, cmdObj) {
|
|
|
49
49
|
])
|
|
50
50
|
let inviteToAccept = invites.find(inv => createLabel(inv) === res.accepted)
|
|
51
51
|
if (inviteToAccept) {
|
|
52
|
-
console.log(`Aceitando participar do
|
|
52
|
+
console.log(`Aceitando participar do Eitri-App ${inviteToAccept.slug}...`)
|
|
53
53
|
await inviteService.accept(inviteToAccept)
|
|
54
54
|
console.log(`Convite aceito! ${emoji.lib.clinking_glasses.char}`)
|
|
55
55
|
}
|
package/src/cmd/login.js
CHANGED
|
@@ -29,10 +29,10 @@ module.exports = async function login(args) {
|
|
|
29
29
|
open(urlAdminManagerCredentialWithParams)
|
|
30
30
|
portalOpenMessage = "Aberto em seu navegador padrão"
|
|
31
31
|
} catch (error) {
|
|
32
|
-
portalOpenMessage = "Não foi possível abrir automaticamente. Copie o link e cole em seu navegador para fazer o login na Eitri
|
|
32
|
+
portalOpenMessage = "Não foi possível abrir automaticamente. Copie o link e cole em seu navegador para fazer o login na Eitri-CLI. " + urlAdminManagerCredentialWithParams
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
|
-
portalOpenMessage = "Copie o link e cole em seu navegador para fazer o login na Eitri
|
|
35
|
+
portalOpenMessage = "Copie o link e cole em seu navegador para fazer o login na Eitri-CLI. " + urlAdminManagerCredentialWithParams
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
console.log("\n", portalOpenMessage)
|
package/src/cmd/push-version.js
CHANGED
|
@@ -10,6 +10,7 @@ const inquirer = require('inquirer')
|
|
|
10
10
|
const TrackingEitriAnalytics = require('../service/TrackingEitriAnalytics')
|
|
11
11
|
const VegvisirService = require('../modules/vegvisir/VegvisirService')
|
|
12
12
|
const getWorkspace = require('../util/getWorkspace')
|
|
13
|
+
const UserLocalCredential = require('../util/UserLocalCredential')
|
|
13
14
|
|
|
14
15
|
const blindGuardian = workspace.blindGuardian
|
|
15
16
|
const trackingService = new TrackingService(blindGuardian)
|
|
@@ -17,6 +18,14 @@ const targetService = new TargetService(workspace)
|
|
|
17
18
|
const vegvisirService = new VegvisirService()
|
|
18
19
|
|
|
19
20
|
module.exports = async function pushVersion(cmdObj) {
|
|
21
|
+
try {
|
|
22
|
+
UserLocalCredential.checkForCredentials()
|
|
23
|
+
} catch (error) {
|
|
24
|
+
const errorMessage = cmdObj?.verbose ? error : error?.message
|
|
25
|
+
console.error("\n", errorMessage, "\n")
|
|
26
|
+
return
|
|
27
|
+
}
|
|
28
|
+
|
|
20
29
|
try {
|
|
21
30
|
await validator.assertPushVersionMessage(cmdObj.message)
|
|
22
31
|
await validator.assertCommandNotRunning('push-version')
|
|
@@ -45,19 +54,19 @@ module.exports = {
|
|
|
45
54
|
"name": "Minha Empresa"
|
|
46
55
|
},
|
|
47
56
|
|
|
48
|
-
// Nome do seu
|
|
49
|
-
"name": "Meu
|
|
57
|
+
// Nome do seu Eitri-App
|
|
58
|
+
"name": "Meu Eitri-App",
|
|
50
59
|
|
|
51
|
-
// Titulo do
|
|
52
|
-
"title": "Meu super
|
|
60
|
+
// Titulo do Eitri-App
|
|
61
|
+
"title": "Meu super Eitri-App",
|
|
53
62
|
|
|
54
63
|
// Chave para gerar a ordem/qrcode de pagamento (opcional)
|
|
55
64
|
"public-key": "",
|
|
56
65
|
|
|
57
|
-
// Identificador
|
|
66
|
+
// Identificador amigável para colocar em uma url
|
|
58
67
|
"slug": "com.eitri.loja",
|
|
59
68
|
|
|
60
|
-
//
|
|
69
|
+
// Versão do Eitri-App
|
|
61
70
|
"version": "1.0.0",
|
|
62
71
|
|
|
63
72
|
${await targetService.getAppConfExampleSnippet()}
|
|
@@ -85,14 +94,14 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
85
94
|
// await logPermissionsAndOpenPrompt(addedPermissions, removedPermissions, cmdObj)
|
|
86
95
|
// console.log(separator)
|
|
87
96
|
|
|
88
|
-
console.log('Preparando os arquivos do seu
|
|
97
|
+
console.log('Preparando os arquivos do seu Eitri-App')
|
|
89
98
|
|
|
90
99
|
await workspace.uploadAll()
|
|
91
100
|
const webhooks = workspace.getWebhooks()
|
|
92
101
|
printAvailableWebhooks(webhooks)
|
|
93
102
|
console.log('')
|
|
94
103
|
console.log(separator)
|
|
95
|
-
console.log('Gerando
|
|
104
|
+
console.log('Gerando Eitri-App')
|
|
96
105
|
|
|
97
106
|
const start = Date.now()
|
|
98
107
|
let pushVersionPromise = miniLog.awaitForPushVersion()
|
|
@@ -100,8 +109,8 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
100
109
|
await pushVersionPromise
|
|
101
110
|
console.log(separator)
|
|
102
111
|
console.log('\x1b[1m\x1b[32mSucesso!!\x1b[0m');
|
|
103
|
-
console.log(`\x1b[1mA versão [${miniConf.version}] do seu
|
|
104
|
-
console.log('\x1b[1mdisponível no Eitri Console
|
|
112
|
+
console.log(`\x1b[1mA versão [${miniConf.version}] do seu Eitri-App foi enviada e está\x1b[0m`);
|
|
113
|
+
console.log('\x1b[1mdisponível no Eitri Console\x1b[0m');
|
|
105
114
|
console.log(separator)
|
|
106
115
|
|
|
107
116
|
const organization = miniConf?.organization ? Object.keys(miniConf?.organization).length !== 0 ? miniConf?.organization : "-" : {
|
|
@@ -143,7 +152,7 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
143
152
|
|
|
144
153
|
function printAvailableWebhooks(webhooks) {
|
|
145
154
|
if(!webhooks || webhooks.length === 0) return
|
|
146
|
-
console.log('\nWebhooks do
|
|
155
|
+
console.log('\nWebhooks do Eitri-App.')
|
|
147
156
|
console.table(webhooks)
|
|
148
157
|
}
|
|
149
158
|
|
package/src/cmd/start.js
CHANGED
|
@@ -13,6 +13,7 @@ const inquirer = require('inquirer')
|
|
|
13
13
|
const TrackingEitriAnalytics = require('../service/TrackingEitriAnalytics')
|
|
14
14
|
const VegvisirService = require('../modules/vegvisir/VegvisirService')
|
|
15
15
|
const getWorkspace = require('../util/getWorkspace')
|
|
16
|
+
const UserLocalCredential = require('../util/UserLocalCredential')
|
|
16
17
|
|
|
17
18
|
const blindGuardian = workspace.blindGuardian
|
|
18
19
|
const hashFolder = workspace.hashFolder
|
|
@@ -21,6 +22,14 @@ const watcher = new Watcher(workspace, hashFolder, trackingService)
|
|
|
21
22
|
const vegvisirService = new VegvisirService()
|
|
22
23
|
|
|
23
24
|
module.exports = async function start(args) {
|
|
25
|
+
try {
|
|
26
|
+
UserLocalCredential.checkForCredentials()
|
|
27
|
+
} catch (error) {
|
|
28
|
+
const errorMessage = args?.verbose ? error : error?.message
|
|
29
|
+
console.error("\n", errorMessage, "\n")
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
|
|
24
33
|
try {
|
|
25
34
|
if (!args.force) {
|
|
26
35
|
await validator.assertCommandNotRunning('start')
|
|
@@ -174,5 +183,5 @@ async function listTargetConfigs(target) {
|
|
|
174
183
|
]).then(input => input)
|
|
175
184
|
|
|
176
185
|
const config = availableConfigs.find(cfg => cfg.id === res.accepted)
|
|
177
|
-
console.log(`Utilize o comando --target-config ${config.id} para iniciar o
|
|
186
|
+
console.log(`Utilize o comando --target-config ${config.id} para iniciar o Eitri-App com a configuração desejada`)
|
|
178
187
|
}
|
package/src/model/Payload.js
CHANGED
|
@@ -31,7 +31,7 @@ module.exports = class VegvisirService {
|
|
|
31
31
|
|
|
32
32
|
}
|
|
33
33
|
} else {
|
|
34
|
-
console.error("Houve um erro inesperado ao listar workspaces");
|
|
34
|
+
console.error("Houve um erro inesperado ao listar workspaces: \n", error?.message);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -70,7 +70,7 @@ module.exports = class VegvisirService {
|
|
|
70
70
|
);
|
|
71
71
|
return process.exit(0)
|
|
72
72
|
}
|
|
73
|
-
console.error("
|
|
73
|
+
console.error("Ocorreu um erro inesperado ao listar workspaces", error?.message);
|
|
74
74
|
return process.exit(0)
|
|
75
75
|
}
|
|
76
76
|
console.error(error.message)
|
|
@@ -37,7 +37,7 @@ async function writeLocalWorkspaceConfig(selectedWorkspace) {
|
|
|
37
37
|
|
|
38
38
|
if (!existsSync(oldConfPath) && !existsSync(eitriAppConfPath)) {
|
|
39
39
|
console.error(
|
|
40
|
-
"Você só pode selecionar um workspace como local dentro de um projeto de
|
|
40
|
+
"Você só pode selecionar um workspace como local dentro de um projeto de Eitri-App"
|
|
41
41
|
);
|
|
42
42
|
return;
|
|
43
43
|
}
|
package/src/service/MiniLog.js
CHANGED
|
@@ -120,7 +120,7 @@ class MiniLog {
|
|
|
120
120
|
.join('\n')
|
|
121
121
|
console.log(chalk.cyan(msg))
|
|
122
122
|
} else {
|
|
123
|
-
// A propriedade userFriendlyMessage deve ser tratada pelo
|
|
123
|
+
// A propriedade userFriendlyMessage deve ser tratada pelo Eitri-App. Logaremos da forma como o Eitri-App nos fornecer o objeto.
|
|
124
124
|
if(!data.method) {
|
|
125
125
|
console.log(`\x1b[34meitri:\x1b[0m\x1b[97m${data.msg}\x1b[0m`);
|
|
126
126
|
} else {
|
|
@@ -19,9 +19,9 @@ class QRCodeFactory {
|
|
|
19
19
|
|
|
20
20
|
async create(data, eitriAppSlug = "") {
|
|
21
21
|
console.log('==================================================')
|
|
22
|
-
console.log('Utilize o QR-Code para iniciar o seu
|
|
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
|
-
console.log('aplicativo à qual destina-se o seu
|
|
24
|
+
console.log('aplicativo à qual destina-se o seu Eitri-App')
|
|
25
25
|
console.log('==================================================')
|
|
26
26
|
const qrCodeTempPath = await this.tempFile(eitriAppSlug)
|
|
27
27
|
await this.createQRCodeImage(qrCodeTempPath, data)
|
package/src/service/Server.js
CHANGED
|
@@ -98,7 +98,7 @@ class Server {
|
|
|
98
98
|
ameSuperAppWebConfig.url
|
|
99
99
|
)
|
|
100
100
|
data = data.replace('##IFRAME_SRC##', finalUrl)
|
|
101
|
-
//TODO configurar o slug do
|
|
101
|
+
//TODO configurar o slug do Eitri-App corrente
|
|
102
102
|
data = data.replace('##SLUG##', slug)
|
|
103
103
|
return res.send(data)
|
|
104
104
|
}
|
|
@@ -145,7 +145,7 @@ class Server {
|
|
|
145
145
|
'##AME_SUPER_APP_SRC##',
|
|
146
146
|
ameSuperAppWebConfig.url
|
|
147
147
|
)
|
|
148
|
-
//TODO configurar o slug do
|
|
148
|
+
//TODO configurar o slug do Eitri-App corrente
|
|
149
149
|
data = data.replace('##SLUG##', slug)
|
|
150
150
|
|
|
151
151
|
res.send(data)
|
package/src/service/Workspace.js
CHANGED
|
@@ -163,7 +163,7 @@ class Workspace {
|
|
|
163
163
|
);
|
|
164
164
|
if (!fs.existsSync(miniAppConfPath)) {
|
|
165
165
|
throw new Error(
|
|
166
|
-
"Por favor, verifique se você está dentro da pasta de um projeto
|
|
166
|
+
"Por favor, verifique se você está dentro da pasta de um projeto Eitri-App."
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
this._miniConf = require(miniAppConfPath);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<Spacing size="sm" />
|
|
5
5
|
<Subtitle fontSize="xs" textAlign="center" color="neutralcolor-darkest">Detalhes desta versão</Subtitle>
|
|
6
6
|
<View>
|
|
7
|
-
<Subtitle textAlign="center" fontSize="xxxs" color="neutralcolor-darkest">Este
|
|
7
|
+
<Subtitle textAlign="center" fontSize="xxxs" color="neutralcolor-darkest">Este Eitri-App foi desenvolvido utilizando as seguintes versões:</Subtitle>
|
|
8
8
|
<Spacing size="sm" />
|
|
9
9
|
<Paragraph textAlign="center">Versão da biblioteca de componentes: ###COMPONENTS_LIBRARY_VERSION_HIGHLIGHTER###</Paragraph>
|
|
10
10
|
<Spacing size="sm" />
|
|
@@ -4,7 +4,7 @@ module.exports = function inviteErrorMessages(status) {
|
|
|
4
4
|
switch (status) {
|
|
5
5
|
case 403:
|
|
6
6
|
message =
|
|
7
|
-
'Você precisa de permissão para enviar convites nesse
|
|
7
|
+
'Você precisa de permissão para enviar convites nesse Eitri-App'
|
|
8
8
|
break
|
|
9
9
|
default:
|
|
10
10
|
message = 'Ocorreu um erro'
|
|
@@ -10,8 +10,8 @@ module.exports = {
|
|
|
10
10
|
|
|
11
11
|
getTemplateDescription: function(){
|
|
12
12
|
return [
|
|
13
|
-
{name: 'serverless', description:'Gera um exemplo de um projeto
|
|
14
|
-
{name: 'persistere', description:'Gera um exemplo de um projeto
|
|
13
|
+
{name: 'serverless', description:'Gera um exemplo de um projeto Eitri-App, integrado com serverless backend'},
|
|
14
|
+
{name: 'persistere', description:'Gera um exemplo de um projeto Eitri-App, integrado com o persistere'}
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<Spacing size="sm" />
|
|
5
5
|
<Subtitle fontSize="xs" textAlign="center" color="neutralcolor-darkest">Detalhes desta versão</Subtitle>
|
|
6
6
|
<View>
|
|
7
|
-
<Subtitle textAlign="center" fontSize="xxxs" color="neutralcolor-darkest">Este
|
|
7
|
+
<Subtitle textAlign="center" fontSize="xxxs" color="neutralcolor-darkest">Este Eitri-App foi desenvolvido utilizando as seguintes versões:</Subtitle>
|
|
8
8
|
<Spacing size="sm" />
|
|
9
9
|
<Paragraph textAlign="center">Versão da biblioteca de componentes: ###COMPONENTS_LIBRARY_VERSION_HIGHLIGHTER###</Paragraph>
|
|
10
10
|
<Spacing size="sm" />
|