New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/cli

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/cli - npm Package Compare versions

Comparing version 2.8.1 to 2.9.0

dist/cli-banner.js

25

dist/cli-build.js
/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -11,3 +11,3 @@ * - All the amazing contributors

require('path');
require('consola');
require('@nuxt/config');
require('exit');

@@ -19,5 +19,4 @@ require('@nuxt/utils');

require('boxen');
const __chunk_2 = require('./cli-chunk2.js');
require('@nuxt/config');
const __chunk_3 = require('./cli-chunk3.js');
const index = require('./cli-index.js');
require('consola');

@@ -29,4 +28,4 @@ const build = {

options: {
...__chunk_3.common,
...__chunk_3.locking,
...index.common,
...index.locking,
analyze: {

@@ -36,3 +35,3 @@ alias: 'a',

description: 'Launch webpack-bundle-analyzer to optimize your bundles',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
// Analyze option

@@ -49,3 +48,3 @@ options.build = options.build || {};

description: 'Enable Vue devtools',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
options.vue = options.vue || {};

@@ -67,3 +66,3 @@ options.vue.config = options.vue.config || {};

description: 'Disable output except for errors',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
// Silence output when using --quiet

@@ -80,3 +79,3 @@ options.build = options.build || {};

description: 'Bundle all server dependencies (useful for nuxt-start)',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
if (argv.standalone) {

@@ -88,3 +87,3 @@ options.build.standalone = true;

},
async run(cmd) {
async run (cmd) {
const config = await cmd.getNuxtConfig({ dev: false, _build: true });

@@ -94,3 +93,3 @@ const nuxt = await cmd.getNuxt(config);

if (cmd.argv.lock) {
await cmd.setLock(await __chunk_2.createLock({
await cmd.setLock(await index.createLock({
id: 'build',

@@ -97,0 +96,0 @@ dir: nuxt.options.buildDir,

/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -13,3 +13,3 @@ * - All the amazing contributors

require('path');
const consola = _interopDefault(require('consola'));
require('@nuxt/config');
require('exit');

@@ -21,7 +21,6 @@ require('@nuxt/utils');

require('boxen');
const __chunk_2 = require('./cli-chunk2.js');
require('@nuxt/config');
const __chunk_3 = require('./cli-chunk3.js');
const index = require('./cli-index.js');
const consola = _interopDefault(require('consola'));
require('pretty-bytes');
const __chunk_4 = require('./cli-chunk4.js');
const banner = require('./cli-banner.js');
const opener = _interopDefault(require('opener'));

@@ -34,4 +33,4 @@

options: {
...__chunk_3.common,
...__chunk_3.server,
...index.common,
...index.server,
open: {

@@ -44,3 +43,3 @@ alias: 'o',

async run(cmd) {
async run (cmd) {
const { argv } = cmd;

@@ -51,3 +50,3 @@

async startDev(cmd, argv) {
async startDev (cmd, argv) {
try {

@@ -62,3 +61,3 @@ const nuxt = await this._startDev(cmd, argv);

async _startDev(cmd, argv) {
async _startDev (cmd, argv) {
const config = await cmd.getNuxtConfig({ dev: true, _build: true });

@@ -78,3 +77,3 @@ const nuxt = await cmd.getNuxt(config);

// Show banner when listening
__chunk_4.showBanner(nuxt, false);
banner.showBanner(nuxt, false);

@@ -95,3 +94,3 @@ // Opens the server listeners url in the default browser (only once)

// Print memory usage
__chunk_4.showMemoryUsage();
banner.showMemoryUsage();

@@ -102,4 +101,4 @@ // Return instance

logChanged({ event, path }) {
const { icon, color, action } = __chunk_2.eventsMapping[event] || __chunk_2.eventsMapping.change;
logChanged ({ event, path }) {
const { icon, color, action } = index.eventsMapping[event] || index.eventsMapping.change;

@@ -109,7 +108,7 @@ consola.log({

icon: chalk[color].bold(icon),
message: `${action} ${chalk.cyan(__chunk_2.formatPath(path))}`
message: `${action} ${chalk.cyan(index.formatPath(path))}`
});
},
async onWatchRestart({ event, path }, { nuxt, cmd, argv }) {
async onWatchRestart ({ event, path }, { nuxt, cmd, argv }) {
this.logChanged({ event, path });

@@ -122,3 +121,3 @@

onBundlerChange(path) {
onBundlerChange (path) {
this.logChanged({ event: 'change', path });

@@ -125,0 +124,0 @@ }

/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -11,3 +11,3 @@ * - All the amazing contributors

require('path');
require('consola');
require('@nuxt/config');
require('exit');

@@ -19,5 +19,4 @@ require('@nuxt/utils');

require('boxen');
const __chunk_2 = require('./cli-chunk2.js');
require('@nuxt/config');
const __chunk_3 = require('./cli-chunk3.js');
const index = require('./cli-index.js');
require('consola');

@@ -29,4 +28,4 @@ const generate = {

options: {
...__chunk_3.common,
...__chunk_3.locking,
...index.common,
...index.locking,
build: {

@@ -41,3 +40,3 @@ type: 'boolean',

description: 'Enable Vue devtools',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
options.vue = options.vue || {};

@@ -54,3 +53,3 @@ options.vue.config = options.vue.config || {};

description: 'Disable output except for errors',
prepare(cmd, options, argv) {
prepare (cmd, options, argv) {
// Silence output when using --quiet

@@ -64,6 +63,6 @@ options.build = options.build || {};

modern: {
...__chunk_3.common.modern,
...index.common.modern,
description: 'Generate app in modern build (modern mode can be only client)',
prepare(cmd, options, argv) {
if (__chunk_2.normalizeArg(argv.modern)) {
prepare (cmd, options, argv) {
if (index.normalizeArg(argv.modern)) {
options.modern = 'client';

@@ -79,3 +78,3 @@ }

},
async run(cmd) {
async run (cmd) {
const config = await cmd.getNuxtConfig({ dev: false, _generate: true, _build: cmd.argv.build });

@@ -92,3 +91,3 @@

if (cmd.argv.lock) {
await cmd.setLock(await __chunk_2.createLock({
await cmd.setLock(await index.createLock({
id: 'build',

@@ -102,3 +101,3 @@ dir: nuxt.options.buildDir,

await cmd.setLock(await __chunk_2.createLock({
await cmd.setLock(await index.createLock({
id: 'generate',

@@ -105,0 +104,0 @@ dir: nuxt.options.generate.dir,

/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -12,6 +12,5 @@ * - All the amazing contributors

const __chunk_1 = require('./cli-chunk.js');
const command = require('./cli-command.js');
require('path');
const consola = _interopDefault(require('consola'));
require('minimist');
require('@nuxt/config');
require('exit');

@@ -23,9 +22,8 @@ require('@nuxt/utils');

require('boxen');
const __chunk_2 = require('./cli-chunk2.js');
require('@nuxt/config');
const index = require('./cli-index.js');
const consola = _interopDefault(require('consola'));
require('minimist');
require('esm');
require('fs-extra');
const __chunk_3 = require('./cli-chunk3.js');
async function listCommands() {
async function listCommands () {
const commandsOrder = ['dev', 'build', 'generate', 'start', 'help'];

@@ -35,3 +33,3 @@

const _commands = await Promise.all(
commandsOrder.map(cmd => __chunk_1.getCommand(cmd))
commandsOrder.map(cmd => command.getCommand(cmd))
);

@@ -48,14 +46,14 @@

const _cmds = commandsHelp.map(([cmd, description]) => {
const i = __chunk_2.indent(maxLength + __chunk_2.optionSpaces - cmd.length);
return __chunk_2.foldLines(
const i = index.indent(maxLength + index.optionSpaces - cmd.length);
return index.foldLines(
chalk.green(cmd) + i + description,
__chunk_2.startSpaces + maxLength + __chunk_2.optionSpaces * 2,
__chunk_2.startSpaces + __chunk_2.optionSpaces
index.startSpaces + maxLength + index.optionSpaces * 2,
index.startSpaces + index.optionSpaces
)
}).join('\n');
const usage = __chunk_2.foldLines(`Usage: nuxt <command> [--help|-h]`, __chunk_2.startSpaces);
const cmds = __chunk_2.foldLines(`Commands:`, __chunk_2.startSpaces) + '\n\n' + _cmds;
const usage = index.foldLines(`Usage: nuxt <command> [--help|-h]`, index.startSpaces);
const cmds = index.foldLines(`Commands:`, index.startSpaces) + '\n\n' + _cmds;
process.stderr.write(__chunk_2.colorize(`${usage}\n\n${cmds}\n\n`));
process.stderr.write(index.colorize(`${usage}\n\n${cmds}\n\n`));
}

@@ -68,6 +66,6 @@

options: {
help: __chunk_3.common.help,
version: __chunk_3.common.version
help: index.common.help,
version: index.common.version
},
async run(cmd) {
async run (cmd) {
const [name] = cmd._argv;

@@ -77,5 +75,5 @@ if (!name) {

}
const command = await __chunk_1.getCommand(name);
const command$1 = await command.getCommand(name);
if (!command) {
if (!command$1) {
consola.info(`Unknown command: ${name}`);

@@ -85,3 +83,3 @@ return

__chunk_1.NuxtCommand.from(command).showHelp();
command.NuxtCommand.from(command$1).showHelp();
}

@@ -88,0 +86,0 @@ };

/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -11,3 +11,3 @@ * - All the amazing contributors

require('path');
require('consola');
require('@nuxt/config');
require('exit');

@@ -19,7 +19,6 @@ require('@nuxt/utils');

require('boxen');
require('./cli-chunk2.js');
require('@nuxt/config');
const __chunk_3 = require('./cli-chunk3.js');
const index = require('./cli-index.js');
require('consola');
require('pretty-bytes');
const __chunk_4 = require('./cli-chunk4.js');
const banner = require('./cli-banner.js');

@@ -31,6 +30,6 @@ const start = {

options: {
...__chunk_3.common,
...__chunk_3.server
...index.common,
...index.server
},
async run(cmd) {
async run (cmd) {
const config = await cmd.getNuxtConfig({ dev: false, _start: true });

@@ -41,3 +40,3 @@ const nuxt = await cmd.getNuxt(config);

await nuxt.server.listen();
__chunk_4.showBanner(nuxt);
banner.showBanner(nuxt);
}

@@ -44,0 +43,0 @@ };

/*!
* @nuxt/cli v2.8.1 (c) 2016-2019
* @nuxt/cli v2.9.0 (c) 2016-2019

@@ -14,6 +14,5 @@ * - All the amazing contributors

const __chunk_1 = require('./cli-chunk.js');
const command = require('./cli-command.js');
require('path');
const consola = _interopDefault(require('consola'));
require('minimist');
require('@nuxt/config');
const exit = _interopDefault(require('exit'));

@@ -25,7 +24,7 @@ require('@nuxt/utils');

require('boxen');
const __chunk_2 = require('./cli-chunk2.js');
require('@nuxt/config');
const index = require('./cli-index.js');
const consola = _interopDefault(require('consola'));
require('minimist');
require('esm');
require('fs-extra');
const fs$1 = _interopDefault(require('fs'));
const fs = _interopDefault(require('fs'));
const execa = _interopDefault(require('execa'));

@@ -35,3 +34,3 @@

function setup({ dev }) {
function setup ({ dev }) {
// Apply default NODE_ENV if not provided

@@ -56,6 +55,6 @@ if (!process.env.NODE_ENV) {

consola.addReporter({
log(logObj) {
log (logObj) {
if (logObj.type === 'fatal') {
const errorMessage = String(logObj.args[0]);
process.stderr.write(__chunk_2.fatalBox(errorMessage));
process.stderr.write(index.fatalBox(errorMessage));
exit(1);

@@ -70,3 +69,18 @@ }

async function run(_argv) {
function packageExists (name) {
try {
require.resolve(name);
return true
} catch (e) {
return false
}
}
async function run (_argv) {
// Check for not installing both nuxt and nuxt-edge
const dupPkg = '@nuxt/' + ( 'cli-edge');
if (packageExists(dupPkg)) {
throw new Error('Both `nuxt` and `nuxt-edge` dependencies are installed! This is unsupported, please choose one and remove the other one from dependencies.')
}
// Read from process.argv

@@ -76,8 +90,8 @@ const argv = _argv ? Array.from(_argv) : process.argv.slice(2);

// Check for internal command
let cmd = await __chunk_1.getCommand(argv[0]);
let cmd = await command.getCommand(argv[0]);
// Matching `nuxt` or `nuxt [dir]` or `nuxt -*` for `nuxt dev` shortcut
if (!cmd && (!argv[0] || argv[0][0] === '-' || fs$1.existsSync(argv[0]))) {
if (!cmd && (!argv[0] || argv[0][0] === '-' || fs.existsSync(argv[0]))) {
argv.unshift('dev');
cmd = await __chunk_1.getCommand('dev');
cmd = await command.getCommand('dev');
}

@@ -90,3 +104,3 @@

if (cmd) {
return __chunk_1.NuxtCommand.run(cmd, argv.slice(1))
return command.NuxtCommand.run(cmd, argv.slice(1))
}

@@ -102,3 +116,3 @@

} catch (error) {
if (error.code === 'ENOENT') {
if (error.exitCode === 2) {
throw String(`Command not found: nuxt-${argv[0]}`)

@@ -110,10 +124,12 @@ }

const commands = __chunk_1._commands;
const imports = __chunk_1._imports;
const commands = command._commands;
const imports = command._imports;
const options = index._options;
exports.NuxtCommand = __chunk_1.NuxtCommand;
exports.loadNuxtConfig = __chunk_1.loadNuxtConfig;
exports.NuxtCommand = command.NuxtCommand;
exports.loadNuxtConfig = command.loadNuxtConfig;
exports.commands = commands;
exports.imports = imports;
exports.options = options;
exports.run = run;
exports.setup = setup;
{
"name": "@nuxt/cli",
"version": "2.8.1",
"version": "2.9.0",
"repository": "nuxt/nuxt.js",

@@ -15,16 +15,16 @@ "license": "MIT",

"dependencies": {
"@nuxt/config": "2.8.1",
"@nuxt/utils": "2.8.1",
"boxen": "^4.0.0",
"@nuxt/config": "2.9.0",
"@nuxt/utils": "2.9.0",
"boxen": "^4.1.0",
"chalk": "^2.4.2",
"consola": "^2.7.1",
"consola": "^2.10.1",
"esm": "^3.2.25",
"execa": "^1.0.0",
"execa": "^2.0.4",
"exit": "^0.1.2",
"fs-extra": "^8.0.1",
"fs-extra": "^8.1.0",
"minimist": "^1.2.0",
"opener": "1.5.1",
"pretty-bytes": "^5.2.0",
"pretty-bytes": "^5.3.0",
"std-env": "^2.2.1",
"wrap-ansi": "^5.1.0"
"wrap-ansi": "^6.0.0"
},

@@ -31,0 +31,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc