Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Config = require("@truffle/config");
const Box = require("@truffle/box");
const OS = require("os");
const config = Config.default().with({
logger: console
});
let [url, destination] = normalizeInput(options._[0]);
url = normalizeURL(url);
destination = normalizeDestination(destination, config.working_directory);
const unboxOptions = Object.assign({}, options, { logger: config.logger });
Box.unbox(url, destination, unboxOptions)
.then(({ commands }) => {
config.logger.log(`\nUnbox successful. Sweet!${OS.EOL}`);
const commandMessages = formatCommands(commands);
if (commandMessages.length > 0) config.logger.log(`Commands:${OS.EOL}`);
commandMessages.forEach(message => config.logger.log(message));
config.logger.log("");
done();
})
.catch(done);
}
};