Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
platforms.original.indexOf('iphone') !== -1 || platforms.original.push('iphone');
}
ti.availablePlatformsNames.forEach(function (p) {
if (p !== 'ios') {
params['deployment-targets'][p] = platforms.original.indexOf(p) !== -1;
}
});
this.cli.createHook('create.populateTiappXml', this, function (tiapp, params, done) {
// read and populate the tiapp.xml
this.logger.info(__('Writing tiapp.xml'));
projectConfig = appc.util.mix(tiapp, params);
projectConfig.save(tiappFile);
done();
}.bind(this))(fs.existsSync(tiappFile) ? new ti.tiappxml(tiappFile) : new ti.tiappxml(), params, next);
},
n,
p,
maxlen,
sdkPath = cli.sdk.path,
templateDir,
propsList = [ 'sdk-version', 'id', 'name', 'version', 'publisher', 'url', 'description', 'copyright', 'icon', 'analytics', 'guid' ],
deploymentTargets = tiapp['deployment-targets'];
args.length === 0 && output === 'report' && logger.banner();
switch (args.length) {
case 0:
if (output === 'json') {
// Store the deployment targets
result = new ti.tiappxml();
result['deployment-targets'] = {};
for (p in deploymentTargets) {
result['deployment-targets'][p] = deploymentTargets[p];
}
// Copy all of the other properties in and print the results
propsList.forEach(function (p) {
result[p] = tiapp[p];
});
logger.log(result.toString('pretty-json'));
} else {
// Print the deployment targets
logger.log(__('Deployment Targets:'));
maxlen = Object.keys(deploymentTargets).reduce(function (a, b) {
exports.run = function (logger, config, cli, finished) {
var projectDir = cli.argv['project-dir'],
tiappPath = path.join(projectDir, 'tiapp.xml'),
tiapp = new ti.tiappxml(tiappPath),
output = cli.argv.output,
key,
value,
result = {},
args = cli.argv._,
n,
p,
maxlen,
sdkPath = cli.sdk.path,
templateDir,
propsList = [ 'sdk-version', 'id', 'name', 'version', 'publisher', 'url', 'description', 'copyright', 'icon', 'analytics', 'guid' ],
deploymentTargets = tiapp['deployment-targets'];
args.length === 0 && output === 'report' && logger.banner();
switch (args.length) {