Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
' If you perform this command you will have your local sui-mono linked to your local sui-studio'
)
console.log('')
console.log(' Examples:')
console.log('')
console.log(' $ sui-mono link')
console.log(' $ sui-mono --help')
console.log(' $ sui-mono -h')
console.log('')
})
.parse(process.argv)
const packages = config.getScopes()
const cwd = path.join(process.cwd(), config.getPackagesFolder())
const packagesPaths = [...getPackagesPaths(cwd)(packages), process.cwd()]
const packagesNames = [...getPackagesNames(cwd)(packages), null]
const dependenciesMap = getInternalDependencyMap(packagesPaths)(packagesNames)
const usedDependenciesPaths = getUsedInternalDependencies(packagesPaths)(
packagesNames
)
const createCommands = linkingMap => {
const linkedPackages = []
const createCommandsForMap = pkg => {
const {name, path, deps} = pkg
const commands = []
if (deps.length) {
deps.forEach(dep =>
commands.push(...createCommandsForMap(linkingMap[dep]))
)
commands.push(['npm', ['link', ...deps], {cwd: path}])
}