Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const configSavedMessage = await this.configFile.save(this.userConfig);
this.logger.info(`set "${profile.id}" as active profile`);
this.logger.info(configSavedMessage);
}
}
ProfilesUse.description = 'select which profile to use';
ProfilesUse.args = [
{
name: 'profile',
description: 'Shorthand identifier for your profile',
required: true
}
];
ProfilesUse.flags = BaseCommand.flags;
module.exports = ProfilesUse;
}
const activeProject = this.userConfig.getActiveProject();
this.userConfig.projects.forEach(p => {
if (p.id === activeProject.id) {
p.active = true;
}
});
this.output(this.userConfig.projects);
} else {
this.logger.warn('No projects have been configured. Run ' + chalk.whiteBright('twilio projects:add') + ' to add one!');
}
}
}
ProjectsList.description = 'show what Twilio projects you have configured';
ProjectsList.flags = BaseCommand.flags;
module.exports = ProjectsList;
}),
subject: flags.string({
description: 'The subject line for an email.'
}),
text: flags.string({
description: 'Text to send within the email body.'
}),
attachment: flags.string({
description: 'Path for the file that you want to attach.'
}),
'force-tty': flags.boolean({
default: false,
hidden: true
})
},
BaseCommand.flags
);
Send.args = [];
module.exports = Send;
class Zork extends BaseCommand {
async run() {
await super.run();
try {
const zork = await this.install('zorkjs');
zork();
} catch (error) {
this.logger.debug('Error loading zork: ' + JSON.stringify(error));
throw new TwilioCliError('I don\'t know the word "zork".');
}
}
}
Zork.description = 'what could this be?';
Zork.flags = BaseCommand.flags;
Zork.hidden = true;
module.exports = Zork;
}
const activeProfile = this.userConfig.getActiveProfile();
this.userConfig.profiles.forEach(p => {
if (p.id === activeProfile.id) {
p.active = true;
}
});
this.output(this.userConfig.profiles);
} else {
this.logger.warn('No profiles have been configured. Run ' + chalk.whiteBright('twilio profiles:create') + ' to create one!');
}
}
}
ProfilesList.description = 'show what profiles you have configured';
ProfilesList.flags = BaseCommand.flags;
module.exports = ProfilesList;