Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dir = projDir;
});
if (!isFound && dir == root && isDefault) { // eslint-disable-line eqeqeq
callback(true);
return;
}
if (!isFound) {
callback(new Error(__('Invalid project directory "%s" because tiapp.xml or timodule.xml not found', projectDir)));
return;
}
callback(null, dir);
}
}
}, ti.commonOptions(logger, config))
};
callback(null, conf);
})(function (err, result) {
finished(result);
dir = projDir;
});
if (!isFound && dir == root && isDefault) { // eslint-disable-line eqeqeq
callback(true);
return;
}
if (!isFound) {
callback(new Error(__('Invalid project directory "%s" because tiapp.xml or timodule.xml not found', projectDir)));
return;
}
callback(null, dir);
}
}
}, ti.commonOptions(logger, config)),
platforms: platformConf
};
callback(null, conf);
});
})(function (err, result) {
.map(function (type) {
return {
label: this.creators[type].title || type,
value: type,
order: this.creators[type].titleOrder
};
}, this)
.sort(function (a, b) {
return a.order < b.order ? -1 : a.order > b.order ? 1 : 0;
})
}));
}.bind(this),
required: true,
values: Object.keys(this.creators)
}
}, ti.commonOptions(logger, config)),
type: typeConf
};
callback(null, conf);
})(function (err, result) {
finished(result);
options: mix({
output: {
abbr: 'o',
default: 'report',
desc: __('output format'),
values: [ 'report', 'json', 'text' ]
},
'project-dir': {
desc: __('the directory of the project to analyze'),
default: '.'
},
template: {
desc: __('the name of the project template to use'),
default: 'default'
}
}, ti.commonOptions(logger, config)),
args: [
{
name: 'key',
desc: __('the key to get or set')
},
{
name: 'value',
desc: __('the value to set the specified key')
}
]
};
};