(async () => { const tags = argv.tags == null ? null : argv.tags.split(','); await uploadModel(argv.model_file, argv.name, tags); process.exit(); })().catch(e => { const newTags = argv.new_tags == null ? null : argv.new_tags.split(','); const removeTags = argv.remove_tags == null ? null : argv.remove_tags.split(','); await updateModel(argv.model_id.toString(), argv.model_file, argv.name, newTags, removeTags); process.exit(); })().catch(e => {
gulp.task('component', function(){ var cap = function(val){ return val.charAt(0).toUpperCase() + val.slice(1); }; var name = yargs.name; var parentPath = yargs.parent || ''; var destPath = path.join(resolveToComponents(), parentPath, name); return gulp.src(paths.blankTemplates) .pipe(tpl({ name: name, upCaseName: cap(name) })) .pipe(rename(function(path){ path.basename = path.basename.replace('component', name); })) .pipe(gulp.dest(destPath)); });
yarg.command('save [name]', 'saves previous scan permanently', (yargs) => { yargs.positional('name', { type: 'string', describe: 'name of the file in which your scan will be saved' }) }, function(argv) { if(!argv) { console.log(`${logSymbols.warning} ${chalk.yellow('Please enter the name for the file of the scan you want to save')}`); } fs.access('data/temporary.json', fs.F_OK, (err) => { if (err) throw err; fs.readFile('data/temporary.json', 'utf8', (err1, data) => { if (err1) throw err1; let realdata = JSON.parse(data); for(let i = 0; i < realdata.array.length; i++) { fs.writeFile(`data/${argv.name}.json`, realdata.array[i], (err2) => { if (err2) throw err2; console.log(`${chalk.blue('Your scan has been permanently saved in file:')} ${chalk.green(`${argv.name}.json`)}`) }); } }); }) });
argv.name, function(err, results) { if (err) return cb(err);
argv.clientCustomerId, argv.id, argv.name, function(err, results) { if (err) return cb(err);
name: argv.name || null, currencyCode: argv.currencyCode || 'USD', dateTimeZone: argv.dateTimeZone || 'America/Chicago'
name: argv.name, budget: {budgetId: argv.budgetId}, advertisingChannelType: 'SEARCH',
name: argv.name, amount: {microAmount: 10000000}, status: 'ENABLED'
(async () => { const tags = argv.tags == null ? null : argv.tags.split(','); await uploadModel(argv.model_file, argv.name, tags); process.exit(); })().catch(e => { const newTags = argv.new_tags == null ? null : argv.new_tags.split(','); const removeTags = argv.remove_tags == null ? null : argv.remove_tags.split(','); await updateModel(argv.model_id.toString(), argv.model_file, argv.name, newTags, removeTags); process.exit(); })().catch(e => {