Require a cloud account to submit an App

parent 8f79ffee
......@@ -37,7 +37,6 @@ export default class Submit extends Command {
await fd.readInfoFile();
} catch (e) {
this.error(e && e.message ? e.message : e);
return;
}
const compiler = new AppCompiler(this, fd);
......@@ -45,8 +44,6 @@ export default class Submit extends Command {
if (!report.isValid) {
this.error('TypeScript compiler error(s) occurred');
this.exit(1);
return;
}
const packager = new AppPackager(this, fd);
......@@ -66,7 +63,6 @@ export default class Submit extends Command {
//#region asking for information
const cloudAuth = new CloudAuth();
const hasToken = await cloudAuth.hasToken();
let email = '';
if (!hasToken) {
const cloudAccount: any = await inquirer.prompt([{
type: 'confirm',
......@@ -85,18 +81,8 @@ export default class Submit extends Command {
return;
}
} else {
const result: any = await inquirer.prompt([{
type: 'input',
name: 'email',
message: 'What is the publisher\'s email address?',
validate: (answer: string) => {
const regex = /^[^@\s]+@[^@\s]+\.[^@\s]+$/g;
return regex.test(answer);
},
}]);
email = result.email;
this.error('A Rocket.Chat Cloud account and a Marketplace Publisher account '
+ 'is required to submit an App to the Marketplace. (rc-apps login)');
}
}
......@@ -167,10 +153,6 @@ export default class Submit extends Command {
data.append('app', fs.createReadStream(fd.mergeWithFolder(zipName)));
data.append('categories', JSON.stringify(selectedCategories));
if (email) {
data.append('email', email);
}
const token = await cloudAuth.getToken();
await this.asyncSubmitData(data, flags, fd, token);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment