Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const render = (opts, content = {}) => {
const { h, renderToString } = require('ink') // eslint-disable-line
const Table = require('ink-table').default
if (opts.json) {
console.log(JSON.stringify(content, null, 2))
} else if (opts.parseable) {
console.log(['collaborator', 'access'].join('\t'))
Object.keys(content).forEach(collab => {
console.log([collab, content[collab]].join('\t'))
})
} else if (!opts.silent && opts.loglevel !== 'silent') {
const data = Object.keys(content).map(collab => {
return { collab, role: content[collab] }
})
console.log(renderToString())
}
}
<table></table>
'use strict'
const { h, renderToString } = require('ink') // eslint-disable-line
const figgyPudding = require('figgy-pudding')
const generateQRCode = require('../utils/generate-qrcode')
const libprofile = require('libnpm/profile')
const otplease = require('../utils/otplease.js')
const queryString = require('querystring')
const readOTP = require('../utils/read-otp')
const readPassword = require('../utils/read-password')
const Table = require('ink-table').default
const url = require('url')
const ProfileConfig = figgyPudding({
cidr_whitelist: {},
json: {},
parseable: {},
property: {},
silent: {},
loglevel: {},
mode: {},
token: {},
username: {},
password: {},
value: {}
})
'use strict'
const figgyPudding = require('figgy-pudding')
const { h, renderToString } = require('ink') // eslint-disable-line
const orgs = require('libnpm/org')
const Table = require('ink-table').default
const OrgConfig = figgyPudding({
json: {},
loglevel: {},
org: {},
parseable: {},
role: {},
silent: {},
user: {}
})
module.exports.add = orgAdd
async function orgAdd (argv, opts) {
opts = OrgConfig(opts)
const memDeets = await orgs.set(opts.org, opts.user, opts.role, opts)
if (opts.json) {