Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const list = () => {
const userConfig = configManager.read().scaffold;
const scaffoldList = configManager.readScaffoldListByStatOrder();
const data = scaffoldList.map((scaffold) => {
return { stat: userConfig[scaffold].stat, name: scaffold, repo: userConfig[scaffold].repo };
});
console.log(columnify(data)); // eslint-disable-line no-console
};
id: event.LogicalResourceId,
status: `- ${event.ResourceStatus}`
}
if (event.ResourceStatusReason) {
out.reason = ` (${event.ResourceStatusReason})`
}
return out
})
if (argv.limit) {
events = events.slice(events.length - argv.limit, events.length)
}
console.log(columnify(events, {
showHeaders: false
}))
}
function prettyPrintVariables(variables: VariablesContent) {
const { entries } = variables;
const updatedRows = entries.map((entry: VariableResource) => {
return {
...entry,
key: chalk`{dim │} {cyan ${entry.key}}:`,
};
});
const renderedValues = columnify(updatedRows, {
columns: ['key', 'value'],
showHeaders: false,
});
return renderedValues;
}
export function printObjectWithoutHeaders(obj: {}): string {
return columnify(obj, { showHeaders: false });
}
function plainPrintDeployedResources(
config: DeployLocalProjectConfig,
result: DeployResult
) {
const functionsOutput: string = columnify(
result.functionResources.sort(sortByAccess).map(fn => ({
...fn,
url: `https://${result.domain}${fn.path}`,
})),
{
columns: ['access', 'path', 'url'],
showHeaders: false,
}
);
const assetsOutput: string = columnify(
result.assetResources.sort(sortByAccess).map(asset => ({
...asset,
url: `https://${result.domain}${asset.path}`,
})),
{
function printRows(rows: any[], keys: string[]) {
return columnify(rows, { columns: keys, headingTransform });
}
columns: computed('content', function() {
let data = this.content;
stringifyObjectValues(data);
return columnify(data, {
preserveNewLines: true,
headingTransform: function(heading) {
return capitalize(heading);
},
});
}),
});