Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// and then create all the one that don't exist on either side and the rest make sure they are the same.
// For all attributes that only exist on the sails side (e.g. email) a substitute has to be found
// Think if it makes sense to have some minimal settings (flags, or .sanerc file?) to ignore certain models/attrinutes
// .command('sync [modelName]')
// .alias('s')
// .description('Syncs the client and server models.')
// .action(function (modelName){ commands.sync(modelName); });
program.on('--help', function (){
console.log('version: ' + version);
});
program.parse(args);
if (!program.args.length || program.args[0] === 'help') {
program.help();
}
};
.reduce(
( accumulator, key ) => {
accumulator[ key ] = process.env[ key ];
return accumulator;
},
{}
),
alteredEnvPath = null;
// invalid arguments: ("in" OR "out" have to be specified, as well es "exec") OR "list" has to be requested
if (
( ( program.in && program.out ) || ( !program.in && !program.out ) || !program.exec ) &&
!program.list
) {
program.help();
return;
}
if ( program.verbose ) {
info = console.log; // eslint-disable-line no-console
}
if ( program.in && !opt.testOptIn( program.in ) ) {
info( 'Not opted-in to "' + program.in + '".' );
return;
}
if ( program.out && opt.testOptOut( program.out ) ) {
info( 'Opted-out of "' + program.out + '".' );
function getContract (path) {
if (!fs.existsSync(path)) {
path = './contracts/' + path
if (!fs.existsSync(path)) {
path = path + '.sol'
if (!fs.existsSync(path)) {
console.log(colors.red('No Contract found'));
commander.help()
process.exit(1);
}
}
}
return path
}
function getABI (path) {
function terminate(reason, help) {
console.error(colors.red(reason));
if (help) {
program.help();
}
process.exit(1);
}
.option('-w, --workspace ', 'The Power BI workspace')
.option('-k, --accessKey ', 'The Power BI workspace collection access key')
.option('-b --baseUri [baseUri]', 'The base uri to connect to');
program.on('--help', function () {
console.log(' Examples:');
console.log('');
console.log(' $ powerbi get-datasets -c -w -k ');
});
program.parse(process.argv);
let settings = config.merge(program);
if (!(settings.collection && settings.accessKey && settings.workspace)) {
program.help();
} else {
try {
let credentials = new msrest.TokenCredentials(settings.accessKey, 'AppKey');
let client = new powerbi.PowerBIClient(credentials, settings.baseUri, null);
client.datasets.getDatasets(settings.collection, settings.workspace, (err, result) => {
if (err) {
return cli.error(err);
}
let datasets = result.value;
if (datasets.length === 0) {
return cli.warn('No datasets found within workspace: %s', settings.workspace);
}
process(args) {
this.init();
this.console();
this.configure();
this.assemble();
this.compile();
this.deploy();
this.help();
this.unknown();
if (!process.argv.slice(2).length) program.help()
program.parse(args);
}
.action(function onConvert(src) {
if (src) console.log(convert(src))
else if (program.multiline) {
console.log('Input source:')
multilinePrompt((src) => {
try {
console.log(convert(src) + '\n')
} catch (err) {
console.log(err.message)
}
onConvert()
})
} else {
program.help()
}
})
function sampleMain(tjs, options) {
var subject = program.args[0];
var text = program.args[1];
var locale = program.args[1] || "en-US";
if (!subject || !text) {
console.log("\n");
program.help();
}
tjs.navigationRequest(options, subject, text, locale, function (err, result) {
if (err) {
console.error("\nnavigationRequest command: " + "Failed!".red + "\n");
} else {
if (result.result) {
console.log("\nnavigationRequest command: " + "Succeeded".green + "\n");
} else {
console.log("\nnavigationRequest command: " + "Failed!".red + "\n");
console.log("Reason: " + result.reason.red + "\n");
}
}
});
}
.action(async name => {
if (!name) {
commander.help('init');
}
await init(name);
process.exit(0);
});
function runProgramOnStdIn() {
if (isTty(process.stdin)) {
program.help();
}
captureStdIn(handleInputSuccess);
}