Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resolveDependencies(filteredRepos, [], function (err, repoList) {
var runList = _.chain(repoList)
.filter(boscoOptionFilter('deps-only', notCurrentService))
.filter(boscoOptionFilter('docker-only', isType('remote')))
.map(getConfig)
.filter(isInfraOnly)
.filter(exclude)
.sortBy(getOrder)
.value();
if (displayOnly) {
_.chain(repos)
.map(_.curry(createTree)(tree, []))
.value();
/* eslint-disable no-console */
console.log(treeify.asTree(tree));
/* eslint-enable no-console */
next();
} else {
next(null, runList);
}
});
}
const dataValue = await the_session.readVariableValue(server_NamespaceArray_Id);
console.log(" --- NAMESPACE ARRAY ---");
const namespaceArray = dataValue.value.value;
for (const namespace of namespaceArray) {
console.log(" Namespace ", namespace.index, " : ", namespace);
}
console.log(" -----------------------");
// -----------------------------------------------------------------------------------------------------------
// enumerate all EVENT TYPES
// -----------------------------------------------------------------------------------------------------------
const result = getAllEventTypes(the_session);
console.log(chalk.cyan("---------------------------------------------------- All Event Types "));
console.log(treeify.asTree(result, true));
console.log(" -----------------------");
// -----------------------------------------------------------------------------------------------------------
// Node Crawling
// -----------------------------------------------------------------------------------------------------------
let t1: number;
let t2: number;
function print_stat() {
t2 = Date.now();
const str = util.format("R= %d W= %d T=%d t= %d",
client.bytesRead, client.bytesWritten, client.transactionsPerformed, (t2 - t1));
console.log(chalk.yellow.bold(str));
}
if (doCrawling) {
if(functionCallObject.contract.substring(0,8) !== '#address') {
constructCallTree(functionCallObject.contract, functionCallName, parentObject[keyString])
}
} else {
parentObject[keyString] = Object.keys(functionCallsTree[functionCallObject.contract][functionCallName]).length === 0 ?
{} :
'..[Repeated Ref]..'.red
}
}
})
}
// Call with seed
constructCallTree(contractToTraverse, functionToTraverse, callTree[seedKeyString])
return treeify.asTree(callTree, true)
}
searchDir(searchRoot, treeObj[key], err => {
if (err) {
throw err;
}
cleanTree(treeObj);
const treeString = treeify.asTree(treeObj, true);
const formattedStr = String(treeString).split('\n').map(function (line) {
return '\t' + line;
});
console.log(chalk.white(formattedStr.join('\n')));
process.exit(0);
});
console.log(" connecting to ", chalk.cyan.bold(endpointUrl));
console.log(" strategy", client.connectionStrategy);
try {
await client.connect(endpointUrl);
} catch (err) {
console.log(chalk.red(" Cannot connect to ") + endpointUrl);
console.log(" Error = ", err.message);
return;
}
const endpoints = await client.getEndpoints();
if (argv.debug) {
fs.writeFileSync("tmp/endpoints.log", JSON.stringify(endpoints, null, " "));
console.log(treeify.asTree(endpoints, true));
}
const table = new Table();
let serverCertificate: Certificate | undefined;
let i = 0;
for (const endpoint of endpoints) {
table.cell("endpoint", endpoint.endpointUrl + "");
table.cell("Application URI", endpoint.server.applicationUri);
table.cell("Product URI", endpoint.server.productUri);
table.cell("Application Name", endpoint.server.applicationName.text);
table.cell("Security Mode", MessageSecurityMode[endpoint.securityMode].toString());
table.cell("securityPolicyUri", endpoint.securityPolicyUri);
table.cell("Type", ApplicationType[endpoint.server.applicationType]);
table.cell("certificate", "..." /*endpoint.serverCertificate*/);
stats.assets.forEach(asset => {
const entries = getEntries(stats.modules, asset.chunks);
const tree = buildDependencyTree(
stats.modules,
entries,
module,
);
if (Object.keys(tree[module.name]).length > 0) {
console.log(chalk.bold(`Hash: ${stats.hash}`));
console.log(chalk.bold.green(asset.name));
console.log(treeify.asTree(tree, true));
}
});
}
async function cmdShowTrees(appKey: string): Promise {
const outcomes = await getOutcomesForAppKeyOrFilename(appKey);
for (const experimentKey of Object.getOwnPropertyNames(outcomes)) {
console.log(bold(magenta(experimentKey)));
console.log(treeify.asTree(makePrintTree(outcomes[experimentKey]), true));
}
}
export function logDependenciesTree(
parser: YarnLockParser,
deps: PackagePath[],
logLevel: 'debug' | 'error'
) {
for (const dep of deps) {
const depTree = parser.buildDependencyTree(dep)
logLevel === 'debug'
? log.debug(treeify.asTree(depTree, true, true))
: log.error(treeify.asTree(depTree, true, true))
}
}
exports.asTree = function(sorted) {
return treeify.asTree(sorted, true);
};
.then(function (files) {
return treeify.asTree(obj(files))
})
}