new Transfer(argv.d, { password: argv.p }) .decrypt(output) .then(function () { console.log('Successfully decrypted in', output) }) .catch(catchError)
const cannon = (title = null) => new Promise((yes, no) => { autocannon( { title, url: argv.u || 'http://localhost:5050/users/rayo', connections: argv.c || 100, pipelining: argv.p || 10, duration: argv.d || 5 }, (error, result) => (error ? no(error) : yes(result)) ); })
async function run() { let contentTypes; if (argv._.length === 1) { contentTypes = JSON.parse(fs.readFileSync(argv._[0], 'utf8')); } else if (managementToken) { contentTypes = await convertApi .getContentTypesFromManagementApi(spaceId, managementToken, environmentId); } else if (apiToken) { contentTypes = await convertApi .getContentTypesFromDistributionApi(spaceId, apiToken, environmentId); } else { console.log(usageHelp); return false; } const options = { hideEntityFields: argv.n || argv['no-fields'], dev: argv.dev || argv.d }; const modelsMap = convertApi.contentTypesToModelMap(contentTypes); const dotStr = convertApi.modelsMapToDot(modelsMap, options); console.log(dotStr); return dotStr; }
const cannon = (title = null) => new Promise((yes, no) => { autocannon( { title, url: argv.u || 'http://localhost:5050/users/rayo', connections: argv.c || 100, pipelining: argv.p || 10, duration: argv.d || 5 }, (error, result) => (error ? no(error) : yes(result)) ); })