eitri-cli 1.1.2 → 1.1.3
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 +23 -85
- package/package.json +1 -1
- package/src/cmd/clean.js +0 -40
- package/src/cmd/push-version.js +5 -1
- package/src/cmd/validate.js +0 -6
- package/src/modules/vegvisir/VegvisirCommand.js +3 -1
- package/src/service/EitriAppService.js +49 -0
- package/src/service/MiniLog.js +18 -1
- package/src/service/Workspace.js +13 -73
package/index.js
CHANGED
|
@@ -20,12 +20,10 @@ const run = async () => {
|
|
|
20
20
|
// Continuando como antes...
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
program
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
version()
|
|
28
|
-
})
|
|
23
|
+
program.option("-v, --version", "Mostra a versao da CLI").action(() => {
|
|
24
|
+
const { version } = require("./src/cmd/version");
|
|
25
|
+
version();
|
|
26
|
+
});
|
|
29
27
|
|
|
30
28
|
program
|
|
31
29
|
.command("login")
|
|
@@ -38,9 +36,7 @@ const run = async () => {
|
|
|
38
36
|
|
|
39
37
|
program
|
|
40
38
|
.command("create <project-name>")
|
|
41
|
-
.description(
|
|
42
|
-
`Cria um projeto com um mini app totalmente funcional. Mais detalhes em ${config?.doc?.createUrl}`
|
|
43
|
-
)
|
|
39
|
+
.description(`Cria um projeto com um eitri app totalmente funcional.`)
|
|
44
40
|
.option(
|
|
45
41
|
"--yes",
|
|
46
42
|
"Aceita os valores default para nome titulo e organizacao"
|
|
@@ -49,7 +45,7 @@ const run = async () => {
|
|
|
49
45
|
"--template <template-name>",
|
|
50
46
|
"Define um boilerplate para a criação do projeto"
|
|
51
47
|
)
|
|
52
|
-
.option("--target", "Define
|
|
48
|
+
.option("--target", "Define o application de execução do eitri app")
|
|
53
49
|
.option("-v, --verbose", "Exibe mais logs")
|
|
54
50
|
.action((projectName, cmdObj) => {
|
|
55
51
|
require("./src/cmd/create")(projectName, cmdObj);
|
|
@@ -115,40 +111,16 @@ const run = async () => {
|
|
|
115
111
|
require("./src/cmd/start")(cmdObj);
|
|
116
112
|
});
|
|
117
113
|
|
|
118
|
-
// program
|
|
119
|
-
// .command('test-initialization-params <initializationParams>')
|
|
120
|
-
// .description('Passa parâmetros em querystring para a inicialização do mini app. ex: "stringChave1=stringValor1&stringChave2=stringValor2..."')
|
|
121
|
-
// .option('-Q, --old-qrcode', 'QR Code legado')
|
|
122
|
-
// .option('-N, --new-qrcode', '(Obsoleto) Novo qrcode')
|
|
123
|
-
// .option('-S, --show-deeplink', 'Exibe o deep link do workspace')
|
|
124
|
-
// .option('-V, --verbose', 'Exibe mais logs')
|
|
125
|
-
// .action((initializationParams, cmdObj) => {
|
|
126
|
-
// if (cmdObj.newQrcode) {
|
|
127
|
-
// console.log('Uso de -N ou --new-qrcode é redundante. O "eitri" já otimiza o Qr Code.')
|
|
128
|
-
// }
|
|
129
|
-
|
|
130
|
-
// require('./src/cmd/test-initialization-params')(initializationParams, cmdObj)
|
|
131
|
-
// })
|
|
132
|
-
|
|
133
|
-
// program
|
|
134
|
-
// .command('order-details <orderId>')
|
|
135
|
-
// .description('Abre o mini app na tela de detalhes da ordem')
|
|
136
|
-
// .option('-l, --local', 'Aponta para o servidor local')
|
|
137
|
-
// .option('-A, --upload-all', 'Sobe todos os arquivos')
|
|
138
|
-
// .action((orderId, cmdObj) => {
|
|
139
|
-
// require('./src/cmd/order-details')(orderId, cmdObj)
|
|
140
|
-
// })
|
|
141
|
-
|
|
142
114
|
program
|
|
143
115
|
.command("push-version")
|
|
144
116
|
.description(
|
|
145
|
-
"Cria e envia um build do
|
|
117
|
+
"Cria e envia um build do eitri app para ser avaliado por um revisor antes de ser publicado"
|
|
146
118
|
)
|
|
147
119
|
.option("-l, --local", "Aponta para o servidor local")
|
|
148
120
|
.option("-v, --verbose", "Exibe mais logs")
|
|
149
121
|
.option(
|
|
150
122
|
"-c, --components",
|
|
151
|
-
"Publica o
|
|
123
|
+
"Publica o eitri app como biblioteca de components"
|
|
152
124
|
)
|
|
153
125
|
.option(
|
|
154
126
|
"-m, --message <revision-message>",
|
|
@@ -159,61 +131,27 @@ const run = async () => {
|
|
|
159
131
|
require("./src/cmd/push-version")(cmdObj);
|
|
160
132
|
});
|
|
161
133
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
134
|
+
program
|
|
135
|
+
.command('clean')
|
|
136
|
+
.description(
|
|
137
|
+
'Realiza a limpeza do workspace remoto do desenvolvedor. Útil quando há mal fucionamento na compilação em nuvem do eitri app.'
|
|
138
|
+
)
|
|
139
|
+
.option('-v, --verbose', 'Exibe mais logs')
|
|
140
|
+
.action(cmdObj => {
|
|
141
|
+
require('./src/cmd/clean')(cmdObj)
|
|
142
|
+
})
|
|
171
143
|
|
|
172
144
|
program
|
|
173
145
|
.command("self-update")
|
|
174
146
|
.description("Desinstala a versao antiga e instala a mais nova")
|
|
175
147
|
.action(() => {
|
|
176
|
-
require(
|
|
177
|
-
|
|
178
|
-
{stdio:
|
|
179
|
-
)
|
|
180
|
-
})
|
|
148
|
+
require("child_process").execSync(
|
|
149
|
+
"npm uninstall -g eitri-cli && npm i eitri-cli -g",
|
|
150
|
+
{ stdio: "inherit" }
|
|
151
|
+
);
|
|
152
|
+
});
|
|
181
153
|
|
|
182
|
-
|
|
183
|
-
// .command('open-share <share-id>')
|
|
184
|
-
// .description('Abre um compartilhamento do share-api')
|
|
185
|
-
// .action((shareId, cmdObj) =>
|
|
186
|
-
// require('./src/cmd/open-share')(shareId, cmdObj)
|
|
187
|
-
// )
|
|
188
|
-
|
|
189
|
-
// program
|
|
190
|
-
// .command('tail-logs <email>')
|
|
191
|
-
// .description('Para ler logs de prod do email')
|
|
192
|
-
// .action((email, cmdObj) => {
|
|
193
|
-
// require('./src/cmd/tail-logs')(email, cmdObj)
|
|
194
|
-
// })
|
|
195
|
-
|
|
196
|
-
// program
|
|
197
|
-
// .command('invite [email]')
|
|
198
|
-
// .option('--remove', 'Remove o desenvolvedor')
|
|
199
|
-
// .option('--list', 'Lista todos os desenvolvedores')
|
|
200
|
-
// .option('--accept', 'Aceita um convite')
|
|
201
|
-
// .option('-v, --verbose', 'Exibe mais logs')
|
|
202
|
-
// .description('Convida um desenvolvedor para contribuir com o seu miniapp')
|
|
203
|
-
// .action((email, cmdObj) => require('./src/cmd/invite')(email, cmdObj))
|
|
204
|
-
|
|
205
|
-
// program
|
|
206
|
-
// .command('list')
|
|
207
|
-
// .description('Lista as opções de um determinado comando')
|
|
208
|
-
// .option('--template', 'exibe os tipos de templates disponíveis, para gerar um exemplo de projeto.')
|
|
209
|
-
// .action((cmdObj) =>
|
|
210
|
-
// require('./src/cmd/list')(cmdObj))
|
|
211
|
-
|
|
212
|
-
// if (!process.argv.slice(2).length) {
|
|
213
|
-
// program.outputHelp()
|
|
214
|
-
// }
|
|
215
|
-
|
|
216
|
-
program.addCommand(VegvisirCommand());
|
|
154
|
+
program.addCommand(VegvisirCommand())
|
|
217
155
|
|
|
218
156
|
if (
|
|
219
157
|
process.argv.length > 2 &&
|
package/package.json
CHANGED
package/src/cmd/clean.js
CHANGED
|
@@ -12,46 +12,7 @@ const targetService = new TargetService(workspace)
|
|
|
12
12
|
|
|
13
13
|
module.exports = async function clean(cmdObj) {
|
|
14
14
|
try {
|
|
15
|
-
const start = Date.now()
|
|
16
15
|
await validator.assertCommandNotRunning('clean')
|
|
17
|
-
let miniConf = workspace.getMiniConf()
|
|
18
|
-
let validateResult = checkErros(miniConf)
|
|
19
|
-
|
|
20
|
-
if (!validateResult.isSuccess()) {
|
|
21
|
-
console.log(
|
|
22
|
-
'Por favor, verifique atentamente os erros exibidos acima. Siga o exemplo abaixo: ' +
|
|
23
|
-
`
|
|
24
|
-
module.exports = {
|
|
25
|
-
|
|
26
|
-
// Dados da sua empresa
|
|
27
|
-
organization: {
|
|
28
|
-
"name": "Minha Empresa"
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
// Nome do seu mini app
|
|
32
|
-
"name": "Meu Mini App",
|
|
33
|
-
|
|
34
|
-
// Titulo do mini app, que vai em baixo do botao na pagina de transacoes
|
|
35
|
-
"title": "Meu super mini app",
|
|
36
|
-
|
|
37
|
-
// Chave para gerar a ordem/qrcode de pagamento (opcional)
|
|
38
|
-
"public-key": "",
|
|
39
|
-
|
|
40
|
-
// Identificador amigavel para colocar em uma url
|
|
41
|
-
"slug": "com.eitri.loja",
|
|
42
|
-
|
|
43
|
-
// Versao do mini app
|
|
44
|
-
"version": "1.0.0",
|
|
45
|
-
|
|
46
|
-
${await targetService.getAppConfExampleSnippet()}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
16
|
|
|
56
17
|
blindGuardian.readConf()
|
|
57
18
|
workspace.setServerUrl(config.get('workspace').url)
|
|
@@ -63,7 +24,6 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
63
24
|
|
|
64
25
|
console.log('[1] Limpo.')
|
|
65
26
|
|
|
66
|
-
await track(miniConf, start)
|
|
67
27
|
TrackingEitriAnalytics.sendEvent({
|
|
68
28
|
command: "clean",
|
|
69
29
|
success: true,
|
package/src/cmd/push-version.js
CHANGED
|
@@ -104,13 +104,17 @@ ${await targetService.getAppConfExampleSnippet()}
|
|
|
104
104
|
console.log('\x1b[1mdisponível no Eitri Console para aprovação\x1b[0m');
|
|
105
105
|
console.log(separator)
|
|
106
106
|
|
|
107
|
+
const organization = miniConf?.organization ? Object.keys(miniConf?.organization).length !== 0 ? miniConf?.organization : "-" : {
|
|
108
|
+
id: miniConf?.organizationId
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
await TrackingEitriAnalytics.sendEvent({
|
|
108
112
|
command: "push-version",
|
|
109
113
|
success: true,
|
|
110
114
|
data: {
|
|
111
115
|
eitriApp: {
|
|
112
116
|
...miniConf,
|
|
113
|
-
organization
|
|
117
|
+
organization
|
|
114
118
|
},
|
|
115
119
|
target,
|
|
116
120
|
startDate: `${start}`,
|
package/src/cmd/validate.js
CHANGED
|
@@ -73,12 +73,6 @@ module.exports.validate = function (miniConf) {
|
|
|
73
73
|
let isversionvalid = checkAmeVersion(miniConf)
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
if (!miniConf.organization) {
|
|
77
|
-
validateResult.addError(
|
|
78
|
-
'Por Favor, preencha o campo \'organization\' (Utilize apenas caracteres maiusculo, minusculo e espaco. Ex: \'Minha Empresa\').'
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
76
|
if (!miniConf.name) {
|
|
83
77
|
validateResult.addError(
|
|
84
78
|
'Por Favor, preencha o campo \'name\' (Utilize apenas caracteres maiusculo, minusculo e espaco. Ex: \'Meu Mini App\').'
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const commander = require("commander");
|
|
2
2
|
|
|
3
3
|
module.exports = function VegvisirCommand() {
|
|
4
|
-
const workspaceCommand = commander.command("workspace")
|
|
4
|
+
const workspaceCommand = commander.command("workspace")
|
|
5
|
+
.description("Gerencia os workspaces do desenvolvedor, para mais informações execute 'eitri workspace --help'")
|
|
6
|
+
|
|
5
7
|
workspaceCommand
|
|
6
8
|
.command("list")
|
|
7
9
|
.description("Lista os workspaces do usuário")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const { writeFile, rename } = require("fs/promises");
|
|
2
|
+
const chalk = require("chalk");
|
|
3
|
+
const path = require('path')
|
|
4
|
+
const {existsSync} = require('fs')
|
|
5
|
+
module.exports = class EitriAppService {
|
|
6
|
+
validEitriConf(eitriConf) {
|
|
7
|
+
const requiredFields = ["id", "applicationId", "organizationId"];
|
|
8
|
+
let isValid = true;
|
|
9
|
+
for (const field of requiredFields) {
|
|
10
|
+
if (!eitriConf[field]) isValid = false;
|
|
11
|
+
}
|
|
12
|
+
return isValid;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async writeEitriConf(remoteEitriConf, localEitriConf, folder2WatchPath) {
|
|
16
|
+
if (!remoteEitriConf) return;
|
|
17
|
+
|
|
18
|
+
const eitriAppConfPath = path.resolve(
|
|
19
|
+
folder2WatchPath,
|
|
20
|
+
"../eitri-app.conf.js"
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
if (!existsSync(eitriAppConfPath)) {
|
|
24
|
+
console.warn(
|
|
25
|
+
chalk.yellow.underline.bold(
|
|
26
|
+
"Renomeando arquivo de configuração de miniapp.conf.js -> eitri-app.conf.js",
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
const miniAppConfPath = path.resolve(
|
|
30
|
+
folder2WatchPath,
|
|
31
|
+
"../miniapp.conf.js"
|
|
32
|
+
);
|
|
33
|
+
await rename(miniAppConfPath, eitriAppConfPath);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let updatedEitriConf = {
|
|
37
|
+
...localEitriConf,
|
|
38
|
+
...remoteEitriConf,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const eitriConf = `module.exports = ${JSON.stringify(
|
|
42
|
+
updatedEitriConf,
|
|
43
|
+
null,
|
|
44
|
+
'\t'
|
|
45
|
+
)}`;
|
|
46
|
+
|
|
47
|
+
await writeFile(eitriAppConfPath, eitriConf, "utf8");
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/service/MiniLog.js
CHANGED
|
@@ -121,12 +121,29 @@ class MiniLog {
|
|
|
121
121
|
console.log(chalk.cyan(msg))
|
|
122
122
|
} else {
|
|
123
123
|
// A propriedade userFriendlyMessage deve ser tratada pelo miniapp. Logaremos da forma como o miniapp nos fornecer o objeto.
|
|
124
|
-
|
|
124
|
+
if(!data.method) {
|
|
125
|
+
console.log(`\x1b[34meitri:\x1b[0m\x1b[97m${data.msg}\x1b[0m`);
|
|
126
|
+
} else {
|
|
127
|
+
const message = this._colorizeMessage(data.msg, data.method)
|
|
128
|
+
console[data.method](`\x1b[34meitri:\x1b[0m${message}`);
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
131
|
if (data.stopCLI) {
|
|
127
132
|
process.exit(1)
|
|
128
133
|
}
|
|
129
134
|
}
|
|
135
|
+
|
|
136
|
+
_colorizeMessage(message, method) {
|
|
137
|
+
const colorizedMessage = {
|
|
138
|
+
log: chalk.hex("#95DB00")(message),
|
|
139
|
+
warn: chalk.yellow(message),
|
|
140
|
+
error: chalk.red(message),
|
|
141
|
+
info: chalk.green(message),
|
|
142
|
+
debug: chalk.blue(message),
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
return colorizedMessage[method] || colorizedMessage.log
|
|
146
|
+
}
|
|
130
147
|
}
|
|
131
148
|
|
|
132
149
|
module.exports = MiniLog
|
package/src/service/Workspace.js
CHANGED
|
@@ -18,7 +18,6 @@ const packageJson = require(path.resolve(
|
|
|
18
18
|
const tempFolderPath = require("../util/os").OS_MAPPER;
|
|
19
19
|
const TargetService = require("../service/TargetService");
|
|
20
20
|
const WatcherOpts = require("../enum/WatcherOpts");
|
|
21
|
-
const { default: axios } = require("../../node_modules/axios/index");
|
|
22
21
|
const ipv4 = require("../util/ipv4");
|
|
23
22
|
const { compressToBase64 } = require("lz-string");
|
|
24
23
|
const Buffer = require("buffer");
|
|
@@ -26,7 +25,10 @@ const DEFAULT_ENV = "dev";
|
|
|
26
25
|
const cliProgress = require("cli-progress");
|
|
27
26
|
const EitriAppManager = require("./EitriAppManager");
|
|
28
27
|
const getWorkspace = require("../util/getWorkspace");
|
|
28
|
+
const EitriAppService = require("./EitriAppService");
|
|
29
|
+
|
|
29
30
|
class Workspace {
|
|
31
|
+
|
|
30
32
|
constructor(blindGuardian, hashFolder) {
|
|
31
33
|
this.config = config.get("workspace");
|
|
32
34
|
this.basePath = this.config.basePath;
|
|
@@ -51,6 +53,11 @@ class Workspace {
|
|
|
51
53
|
*/
|
|
52
54
|
this.progressBar;
|
|
53
55
|
this.progressBarCounter = 0;
|
|
56
|
+
/**
|
|
57
|
+
* @type {EitriAppService}
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
this.eitriAppService = new EitriAppService();
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
getTargets() {
|
|
@@ -211,7 +218,11 @@ class Workspace {
|
|
|
211
218
|
|
|
212
219
|
const setupData = setupResponse.data;
|
|
213
220
|
|
|
214
|
-
const { state, target: remoteTarget } = setupData;
|
|
221
|
+
const { state, target: remoteTarget, eitriConf: remoteEitriConf } = setupData;
|
|
222
|
+
|
|
223
|
+
if(!this.eitriAppService.validEitriConf(miniConf)) {
|
|
224
|
+
await this.eitriAppService.writeEitriConf(remoteEitriConf, miniConf, this.folder2watch);
|
|
225
|
+
}
|
|
215
226
|
|
|
216
227
|
this.printLibsVersion(state);
|
|
217
228
|
|
|
@@ -952,77 +963,6 @@ class Workspace {
|
|
|
952
963
|
return results;
|
|
953
964
|
}
|
|
954
965
|
|
|
955
|
-
//TODO: ESSE MÉTODO DEVE SER APAGADO, QUANDO NÃO EXISTIR MAIS O COMANDO PUBLISH
|
|
956
|
-
async publish(publishMessage) {
|
|
957
|
-
const miniConf = this.getMiniConf();
|
|
958
|
-
const formData = new FormData();
|
|
959
|
-
|
|
960
|
-
formData.append("miniAppName", miniConf.name || "sem nome");
|
|
961
|
-
formData.append("miniAppSlug", miniConf.slug || "sem-slug");
|
|
962
|
-
formData.append("miniAppTitle", miniConf.title || "Sem Titulo");
|
|
963
|
-
formData.append(
|
|
964
|
-
"miniAppVersion",
|
|
965
|
-
miniConf.miniAppVersion || miniConf.version || "0.1.0"
|
|
966
|
-
);
|
|
967
|
-
formData.append("organizationName", miniConf.organization.name);
|
|
968
|
-
formData.append("publishMessage", publishMessage || "");
|
|
969
|
-
|
|
970
|
-
const url = `${this.serverUrl}/${this.basePath}/publish?async=true`;
|
|
971
|
-
await this.http.postForm(url, formData);
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
async build(buildMessage) {
|
|
975
|
-
const miniConf = this.getMiniConf();
|
|
976
|
-
const formData = new FormData();
|
|
977
|
-
|
|
978
|
-
formData.append("miniAppName", miniConf.name || "sem nome");
|
|
979
|
-
formData.append("miniAppSlug", miniConf.slug || "sem-slug");
|
|
980
|
-
formData.append("miniAppTitle", miniConf.title || "Sem Titulo");
|
|
981
|
-
formData.append(
|
|
982
|
-
"miniAppVersion",
|
|
983
|
-
miniConf.miniAppVersion || miniConf.version || "v1"
|
|
984
|
-
);
|
|
985
|
-
formData.append("organizationName", miniConf.organization.name);
|
|
986
|
-
formData.append("publishMessage", buildMessage || "");
|
|
987
|
-
|
|
988
|
-
const url = `${this.serverUrl}/${this.basePath}/publish?async=true`;
|
|
989
|
-
await this.http.postForm(url, formData);
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* @deprecated Prefira {@link Workspace#pushVersionAsJson}
|
|
994
|
-
*/
|
|
995
|
-
async pushVersionAsForm(buildMessage) {
|
|
996
|
-
const miniConf = this.getMiniConf();
|
|
997
|
-
const formData = new FormData();
|
|
998
|
-
|
|
999
|
-
let attrValue;
|
|
1000
|
-
|
|
1001
|
-
formData.append("miniAppName", miniConf.name || "sem nome");
|
|
1002
|
-
formData.append("miniAppSlug", miniConf.slug || "sem-slug");
|
|
1003
|
-
formData.append("miniAppTitle", miniConf.title || "Sem Titulo");
|
|
1004
|
-
formData.append(
|
|
1005
|
-
"miniAppVersion",
|
|
1006
|
-
miniConf.miniAppVersion || miniConf.version || "v1"
|
|
1007
|
-
);
|
|
1008
|
-
formData.append("organizationName", miniConf.organization.name);
|
|
1009
|
-
formData.append("miniAppSubSetName", miniConf.name);
|
|
1010
|
-
formData.append("miniAppSubSetTitle", miniConf.title);
|
|
1011
|
-
if ((attrValue = miniConf["eitri-app-components"]))
|
|
1012
|
-
formData.append("cliComponentsVersion", attrValue);
|
|
1013
|
-
if ((attrValue = miniConf["eitri-app-client"]))
|
|
1014
|
-
formData.append("cliSuperAppClientVersion", attrValue);
|
|
1015
|
-
if ((attrValue = packageJson.version))
|
|
1016
|
-
formData.append("cliVersion", attrValue);
|
|
1017
|
-
if ((attrValue = buildMessage))
|
|
1018
|
-
formData.append("publishMessage", attrValue);
|
|
1019
|
-
if ((attrValue = miniConf.privacy))
|
|
1020
|
-
formData.append("privacy", JSON.stringify(attrValue));
|
|
1021
|
-
|
|
1022
|
-
const url = `${this.serverUrl}/${this.basePath}/publish?async=true`;
|
|
1023
|
-
await this.http.postForm(url, formData);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
966
|
async pushVersionAsJson(args) {
|
|
1027
967
|
let headers = {};
|
|
1028
968
|
if (this.config.apiVersion && this.config.apiVersion.v2Header) {
|