Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'));
// if they didn't explicitly set --platform and we have a platform in the manifest,
// then just use that and skip the platform prompting
if (!cli.argv.platform && manifest.platform) {
cli.argv.platform = ti.resolvePlatform(manifest.platform);
conf.options.platform.required = false;
}
timodule.properties || (timodule.properties = {});
cli.argv.type = 'module';
} else {
// neither app nor module
return;
}
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'));
// if they didn't explicitly set --platform and we have a platform in the manifest,
// then just use that and skip the platform prompting
if (!cli.argv.platform && manifest.platform) {
cli.argv.platform = ti.resolvePlatform(manifest.platform);
conf.options.platform.required = false;
}
timodule.properties || (timodule.properties = {});
cli.argv.type = 'module';
} else {
// neither app nor module
return;
}