Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.validate = function validate(logger, config, cli) {
// Determine if the project is an app or a module, run appropriate build command
if (cli.argv.type === 'module') {
// make sure the module manifest is sane
ti.validateModuleManifest(logger, cli, cli.manifest);
return function (finished) {
logger.log.init(function () {
const result = ti.validatePlatformOptions(logger, config, cli, 'buildModule');
if (result && typeof result === 'function') {
result(finished);
} else {
finished(result);
}
});
};
} else {
ti.validatePlatform(logger, cli, 'platform');
exports.validate = function (logger, config, cli) {
// Determine if the project is an app or a module, run appropriate clean command
if (cli.argv.type === 'module') {
// make sure the module manifest is sane
ti.validateModuleManifest(logger, cli, cli.manifest);
return function (finished) {
logger.log.init(function () {
const result = ti.validatePlatformOptions(logger, config, cli, 'cleanModule');
if (result && typeof result === 'function') {
result(finished);
} else {
finished(result);
}
});
};
} else {
let platforms = cli.argv.platforms || cli.argv.platform;
if (platforms) {
platforms = ti.scrubPlatforms(platforms);