eitri-cli 1.28.0-beta.4 → 1.28.0
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/eitri-cli-v2/eitri-cli-v2.darwin-arm64.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.darwin-x64.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.linux-x64-gnu.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
- package/src/cmd/push-version.js +3 -3
- package/src/service/Workspace.js +16 -5
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/cmd/push-version.js
CHANGED
|
@@ -149,7 +149,7 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
149
149
|
LogVerbose(cmdObj.verbose, "\n Analisando versões...")
|
|
150
150
|
|
|
151
151
|
const { target } = await workspace.checkVersions();
|
|
152
|
-
LogSuccess("
|
|
152
|
+
LogSuccess("6/8 ✓ Versões das bibliotecas analisadas.");
|
|
153
153
|
|
|
154
154
|
LogVerbose(cmdObj.verbose, " ✓ Preparando os arquivos do seu Eitri-App...")
|
|
155
155
|
|
|
@@ -157,13 +157,13 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
157
157
|
await workspace.uploadCleanZip(isDevMode);
|
|
158
158
|
LogVerbose(cmdObj.verbose, " ✓ Arquivos preparados")
|
|
159
159
|
|
|
160
|
-
LogSuccess("
|
|
160
|
+
LogSuccess("7/8 ✓ Gerando versão do Eitri-App");
|
|
161
161
|
|
|
162
162
|
const start = Date.now()
|
|
163
163
|
let pushVersionPromise = miniLog.awaitForPushVersion()
|
|
164
164
|
await workspace.pushVersionAsJson(cmdObj)
|
|
165
165
|
await pushVersionPromise
|
|
166
|
-
LogSuccess("
|
|
166
|
+
LogSuccess("8/8 ✓ Concluído");
|
|
167
167
|
|
|
168
168
|
console.log(separator)
|
|
169
169
|
console.log(`\x1b[1m A versão [${miniConf.version}] do seu Eitri-App foi enviada e está\x1b[0m`);
|
package/src/service/Workspace.js
CHANGED
|
@@ -272,20 +272,22 @@ class Workspace {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
// somente para garantir que a pasta do usuario existe
|
|
275
|
+
LogSuccess("1/8 ✓ Preparando ambiente de desenvolvimento")
|
|
275
276
|
await this.http.post(`${this.serverUrl}/${this.basePath}/v2/workspace/setup`, { eitriConf }, headers)
|
|
276
|
-
|
|
277
|
+
|
|
278
|
+
LogSuccess("2/8 ✓ Verificando permissões de publicação")
|
|
277
279
|
const response = await this.http.put(
|
|
278
280
|
`${this.serverUrl}/${this.basePath}/version?command=push-version`,
|
|
279
281
|
eitriConf,
|
|
280
282
|
headers,
|
|
281
283
|
)
|
|
282
284
|
|
|
283
|
-
LogSuccess("
|
|
285
|
+
LogSuccess("3/8 ✓ Ambiente de desenvolvimento preparado")
|
|
284
286
|
|
|
285
287
|
eitriConf.target = response.application
|
|
286
288
|
const availableTargets = await this.availableTargets()
|
|
287
289
|
let libs = TargetService.getLibsFromMiniConf(eitriConf, availableTargets)
|
|
288
|
-
LogSuccess("
|
|
290
|
+
LogSuccess("4/8 ✓ Ambiente pronto para compilação.")
|
|
289
291
|
|
|
290
292
|
const eitriConfProperties = Object.getOwnPropertyNames(eitriConf)
|
|
291
293
|
const clientName =
|
|
@@ -297,15 +299,24 @@ class Workspace {
|
|
|
297
299
|
const luminusVersion = eitriConf[componentsName]
|
|
298
300
|
|
|
299
301
|
LogSuccess(
|
|
300
|
-
`
|
|
302
|
+
`5/8 ✓ Criando versão com as bibliotecas: ${clientName} [${bifrostVersion}] | ${componentsName} [${luminusVersion}]`,
|
|
301
303
|
)
|
|
302
304
|
return { target: response.target }
|
|
303
305
|
} catch (error) {
|
|
304
|
-
|
|
306
|
+
const errorMessage = this.handleErrorMessage(error)
|
|
307
|
+
console.log(`\n\x1b[1m\x1b[31m${errorMessage}\x1b[0m`)
|
|
305
308
|
process.exit(1)
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
311
|
|
|
312
|
+
handleErrorMessage(error) {
|
|
313
|
+
let errorMessage = error.message
|
|
314
|
+
if (error.response && error.response.data && error.response.data.message) {
|
|
315
|
+
errorMessage = error.response.data.message
|
|
316
|
+
}
|
|
317
|
+
return errorMessage
|
|
318
|
+
}
|
|
319
|
+
|
|
309
320
|
isDiff(miniConf, onlineVersion, packageName) {
|
|
310
321
|
return miniConf[packageName] && onlineVersion[packageName] !== miniConf[packageName]
|
|
311
322
|
}
|