Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let tiapp;
try {
tiapp = cli.tiapp = new tiappxml(path.join(projectDir, 'tiapp.xml'));
} catch (ex) {
logger.error(ex);
logger.log();
process.exit(1);
}
tiapp.properties || (tiapp.properties = {});
// make sure the tiapp.xml is sane
ti.validateTiappXml(logger, config, tiapp);
// check that the Titanium SDK version is correct
if (!ti.validateCorrectSDK(logger, config, cli, 'build')) {
throw new cli.GracefulShutdown();
}
cli.argv.type = 'app';
} else if (fs.existsSync(path.join(projectDir, 'timodule.xml'))) {
let timodule;
try {
timodule = cli.tiapp = cli.timodule = new tiappxml(path.join(projectDir, 'timodule.xml'));
} catch (ex) {
logger.error(ex);
logger.log();
process.exit(1);
}
const manifest = cli.manifest = ti.loadModuleManifest(logger, path.join(projectDir, 'manifest'));
let tiapp;
try {
tiapp = cli.tiapp = new tiappxml(path.join(projectDir, 'tiapp.xml'));
} catch (ex) {
logger.error(ex);
logger.log();
process.exit(1);
}
tiapp.properties || (tiapp.properties = {});
// make sure the tiapp.xml is sane
ti.validateTiappXml(logger, config, tiapp);
// check that the Titanium SDK version is correct
if (!ti.validateCorrectSDK(logger, config, cli, 'clean')) {
throw new cli.GracefulShutdown();
}
cli.argv.type = 'app';
} else if (fs.existsSync(path.join(projectDir, 'timodule.xml'))) {
let timodule;
try {
timodule = cli.tiapp = cli.timodule = new tiappxml(path.join(projectDir, 'timodule.xml'));
} catch (ex) {
logger.error(ex);
logger.log();
process.exit(1);
}
const manifest = cli.manifest = ti.loadModuleManifest(logger, path.join(projectDir, 'manifest'));