Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/cli

Package Overview
Dependencies
Maintainers
3
Versions
68
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.14.1 to 2.14.2

37

dist/cli-banner.js
/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,10 +10,15 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');
const chalk = _interopDefault(require('chalk'));
const env = _interopDefault(require('std-env'));
const consola = _interopDefault(require('consola'));
const prettyBytes = _interopDefault(require('pretty-bytes'));
const chalk = require('chalk');
const env = require('std-env');
const consola = require('consola');
const prettyBytes = require('pretty-bytes');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
const env__default = /*#__PURE__*/_interopDefaultLegacy(env);
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const prettyBytes__default = /*#__PURE__*/_interopDefaultLegacy(prettyBytes);
function getMemoryUsage () {

@@ -27,17 +32,17 @@ // https://nodejs.org/api/process.html#process_process_memoryusage

const { heap, rss } = getMemoryUsage();
return `Memory usage: ${chalk.bold(prettyBytes(heap))} (RSS: ${prettyBytes(rss)})`
return `Memory usage: ${chalk__default['default'].bold(prettyBytes__default['default'](heap))} (RSS: ${prettyBytes__default['default'](rss)})`
}
function showMemoryUsage () {
consola.info(getFormattedMemoryUsage());
consola__default['default'].info(getFormattedMemoryUsage());
}
function showBanner (nuxt, showMemoryUsage = true) {
if (env.test) {
if (env__default['default'].test) {
return
}
if (env.minimalCLI) {
if (env__default['default'].minimalCLI) {
for (const listener of nuxt.server.listeners) {
consola.info('Listening on: ' + listener.url);
consola__default['default'].info('Listening on: ' + listener.url);
}

@@ -52,5 +57,5 @@ return

const { bannerColor, badgeMessages } = nuxt.options.cli;
titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} @ ${nuxt.constructor.version || 'exotic'}\n`);
titleLines.push(`${chalk__default['default'][bannerColor].bold('Nuxt.js')} @ ${nuxt.constructor.version || 'exotic'}\n`);
const label = name => chalk.bold.cyan(`▸ ${name}:`);
const label = name => chalk__default['default'].bold.cyan(`▸ ${name}:`);

@@ -61,3 +66,3 @@ // Environment

if (process.env.NODE_ENV !== _env) {
_env += ` (${chalk.cyan(process.env.NODE_ENV)})`;
_env += ` (${chalk__default['default'].cyan(process.env.NODE_ENV)})`;
}

@@ -81,3 +86,3 @@ titleLines.push(`${label('Environment')} ${_env}`);

for (const listener of nuxt.server.listeners) {
messageLines.push(chalk.bold('Listening: ') + chalk.underline.blue(listener.url));
messageLines.push(chalk__default['default'].bold('Listening: ') + chalk__default['default'].underline.blue(listener.url));
}

@@ -84,0 +89,0 @@

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');

@@ -22,8 +20,12 @@ require('path');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const build = {

@@ -112,3 +114,3 @@ name: 'build',

const nextCommand = nuxt.options.target === utils.TARGETS.static ? 'nuxt generate' : 'nuxt start';
consola.info('Ready to run `' + (nextCommand) + '`');
consola__default['default'].info('Ready to run `' + (nextCommand) + '`');
}

@@ -115,0 +117,0 @@ }

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');

@@ -18,15 +16,21 @@ require('path');

require('@nuxt/utils');
const chalk = _interopDefault(require('chalk'));
const chalk = require('chalk');
require('std-env');
require('wrap-ansi');
require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
require('pretty-bytes');
const banner = require('./cli-banner.js');
const opener = _interopDefault(require('opener'));
const opener = require('opener');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const opener__default = /*#__PURE__*/_interopDefaultLegacy(opener);
const dev = {

@@ -57,3 +61,3 @@ name: 'dev',

} catch (error) {
consola.fatal(error);
consola__default['default'].fatal(error);
return

@@ -66,3 +70,3 @@ }

await nuxt.callHook('cli:buildError', error);
consola.error(error);
consola__default['default'].error(error);
}

@@ -93,3 +97,3 @@

argv.open = false;
const openerPromises = nuxt.server.listeners.map(listener => opener(listener.url));
const openerPromises = nuxt.server.listeners.map(listener => opener__default['default'](listener.url));
await Promise.all(openerPromises);

@@ -114,3 +118,3 @@ }

for (const listener of nuxt.server.listeners) {
consola.info(chalk.bold('Listening on: ') + listener.url);
consola__default['default'].info(chalk__default['default'].bold('Listening on: ') + listener.url);
}

@@ -125,6 +129,6 @@

consola.log({
consola__default['default'].log({
type: event,
icon: chalk[color].bold(icon),
message: `${action} ${chalk.cyan(index.formatPath(path))}`
icon: chalk__default['default'][color].bold(icon),
message: `${action} ${chalk__default['default'].cyan(index.formatPath(path))}`
});

@@ -131,0 +135,0 @@ },

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
require('./cli-index.js');

@@ -22,7 +20,7 @@ require('path');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
require('upath');

@@ -35,6 +33,10 @@ require('fs-extra');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const _export = {
...generate.default,
run (...args) {
consola.warn('`nuxt export` has been deprecated! Please use `nuxt generate`.');
consola__default['default'].warn('`nuxt export` has been deprecated! Please use `nuxt generate`.');
return generate.default.run.call(this, ...args)

@@ -41,0 +43,0 @@ }

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,7 +10,4 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');
const path = require('path');
const path__default = _interopDefault(path);
require('@nuxt/config');

@@ -23,13 +20,23 @@ require('exit');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
const upath = _interopDefault(require('upath'));
const fs$1 = _interopDefault(require('fs-extra'));
const buffer = _interopDefault(require('buffer'));
const globby = _interopDefault(require('globby'));
const destr = _interopDefault(require('destr'));
const upath = require('upath');
const fs = require('fs-extra');
const _buffer = require('buffer');
const globby = require('globby');
const destr = require('destr');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const path__default = /*#__PURE__*/_interopDefaultLegacy(path);
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const upath__default = /*#__PURE__*/_interopDefaultLegacy(upath);
const fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
const _buffer__default = /*#__PURE__*/_interopDefaultLegacy(_buffer);
const globby__default = /*#__PURE__*/_interopDefaultLegacy(globby);
const destr__default = /*#__PURE__*/_interopDefaultLegacy(destr);
var create_buffer = index.createCommonjsModule(function (module, exports) {

@@ -43,5 +50,5 @@

var createBuffer = buffer.Buffer.from && buffer.Buffer.alloc && buffer.Buffer.allocUnsafe && buffer.Buffer.allocUnsafeSlow ? buffer.Buffer.from : // support for Node < 5.10
var createBuffer = _buffer__default['default'].Buffer.from && _buffer__default['default'].Buffer.alloc && _buffer__default['default'].Buffer.allocUnsafe && _buffer__default['default'].Buffer.allocUnsafeSlow ? _buffer__default['default'].Buffer.from : // support for Node < 5.10
function (val) {
return new buffer.Buffer(val);
return new _buffer__default['default'].Buffer(val);
};

@@ -95,3 +102,3 @@

var crc32 = (0, _define_crc2.default)('crc-32', function (buf, previous) {
if (!buffer.Buffer.isBuffer(buf)) buf = (0, _create_buffer2.default)(buf);
if (!_buffer__default['default'].Buffer.isBuffer(buf)) buf = (0, _create_buffer2.default)(buf);

@@ -126,3 +133,3 @@ var crc = previous === 0 ? 0 : ~~previous ^ -1;

if (options.generate.cache === false || destr(process.env.NUXT_BUILD) || cmd.argv['force-build']) {
if (options.generate.cache === false || destr__default['default'](process.env.NUXT_BUILD) || cmd.argv['force-build']) {
const builder = await cmd.getBuilder(nuxt);

@@ -157,3 +164,3 @@ await builder.build();

rootDir: nuxt.options.rootDir,
ignore: nuxt.options.generate.cache.ignore.map(upath.normalize),
ignore: nuxt.options.generate.cache.ignore.map(upath__default['default'].normalize),
globbyOptions: nuxt.options.generate.cache.globbyOptions

@@ -174,8 +181,8 @@ };

// Check if build can be skipped
const nuxtBuildFile = path__default.resolve(nuxt.options.buildDir, 'build.json');
if (fs$1.existsSync(nuxtBuildFile)) {
const previousBuild = destr(fs$1.readFileSync(nuxtBuildFile, 'utf-8')) || {};
const nuxtBuildFile = path__default['default'].resolve(nuxt.options.buildDir, 'build.json');
if (fs__default['default'].existsSync(nuxtBuildFile)) {
const previousBuild = destr__default['default'](fs__default['default'].readFileSync(nuxtBuildFile, 'utf-8')) || {};
for (const field of ['nuxtVersion', 'ssr', 'target']) {
if (previousBuild[field] !== currentBuild[field]) {
consola.info(`Doing webpack rebuild because ${field} changed`);
consola__default['default'].info(`Doing webpack rebuild because ${field} changed`);
break

@@ -189,6 +196,6 @@ }

if (!changed) {
consola.success('Skipping webpack build as no changes detected');
consola__default['default'].success('Skipping webpack build as no changes detected');
return
} else {
consola.info(`Doing webpack rebuild because ${changed} modified`);
consola__default['default'].info(`Doing webpack rebuild because ${changed} modified`);
}

@@ -203,3 +210,3 @@ }

// Write build.json
fs$1.writeFileSync(nuxtBuildFile, JSON.stringify(currentBuild, null, 2), 'utf-8');
fs__default['default'].writeFileSync(nuxtBuildFile, JSON.stringify(currentBuild, null, 2), 'utf-8');

@@ -217,3 +224,3 @@ await nuxt.close();

}
config.buildDir = (config.static && config.static.cacheDir) || path__default.resolve(config.rootDir, 'node_modules/.cache/nuxt');
config.buildDir = (config.static && config.static.cacheDir) || path__default['default'].resolve(config.rootDir, 'node_modules/.cache/nuxt');
config.build = config.build || {};

@@ -248,3 +255,3 @@ config.build.transpile = config.build.transpile || [];

const files = await globby('**/*.*', {
const files = await globby__default['default']('**/*.*', {
...globbyOptions,

@@ -259,3 +266,3 @@ ignore,

try {
const fileContent = await fs$1.readFile(p);
const fileContent = await fs__default['default'].readFile(p);
snapshot[key] = {

@@ -262,0 +269,0 @@ checksum: await crc32(fileContent).toString(16)

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');

@@ -18,12 +16,17 @@ require('path');

require('@nuxt/utils');
const chalk = _interopDefault(require('chalk'));
const chalk = require('chalk');
require('std-env');
require('wrap-ansi');
require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
async function listCommands () {

@@ -48,3 +51,3 @@ const commandsOrder = ['dev', 'build', 'generate', 'start', 'help'];

return index.foldLines(
chalk.green(cmd) + i + description,
chalk__default['default'].green(cmd) + i + description,
index.startSpaces + maxLength + index.optionSpaces * 2,

@@ -77,3 +80,3 @@ index.startSpaces + index.optionSpaces

if (!command) {
consola.info(`Unknown command: ${name}`);
consola__default['default'].info(`Unknown command: ${name}`);
return

@@ -80,0 +83,0 @@ }

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
require('./cli-index.js');

@@ -22,7 +20,7 @@ require('path');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
require('pretty-bytes');

@@ -35,6 +33,10 @@ require('./cli-banner.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const serve = {
...start.default,
run (...args) {
consola.warn('`nuxt serve` has been deprecated! Please use `nuxt start`.');
consola__default['default'].warn('`nuxt serve` has been deprecated! Please use `nuxt start`.');
return start.default.run.call(this, ...args)

@@ -41,0 +43,0 @@ }

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,7 +10,4 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');
const path = require('path');
const path__default = _interopDefault(path);
const config = require('@nuxt/config');

@@ -23,14 +20,20 @@ require('exit');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
const fs = require('fs');
const fs__default = _interopDefault(fs);
require('execa');
require('pretty-bytes');
const banner = require('./cli-banner.js');
const connect = _interopDefault(require('connect'));
const serveStatic = _interopDefault(require('serve-static'));
const compression = _interopDefault(require('compression'));
const connect = require('connect');
const serveStatic = require('serve-static');
const compression = require('compression');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const connect__default = /*#__PURE__*/_interopDefaultLegacy(connect);
const serveStatic__default = /*#__PURE__*/_interopDefaultLegacy(serveStatic);
const compression__default = /*#__PURE__*/_interopDefaultLegacy(compression);
async function serve (cmd) {

@@ -53,7 +56,7 @@ const _config = await cmd.getNuxtConfig({ dev: false });

}
const app = connect();
app.use(compression({ threshold: 0 }));
const app = connect__default['default']();
app.use(compression__default['default']({ threshold: 0 }));
app.use(
options.router.base,
serveStatic(options.generate.dir, {
serveStatic__default['default'](options.generate.dir, {
extensions: ['html']

@@ -102,3 +105,3 @@ })

consola.info(`Serving static application from \`${distPath}\``);
consola__default['default'].info(`Serving static application from \`${distPath}\``);
}

@@ -105,0 +108,0 @@

/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -10,4 +10,2 @@ * - All the amazing contributors

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const index = require('./cli-index.js');

@@ -22,9 +20,14 @@ require('path');

require('boxen');
const consola = _interopDefault(require('consola'));
const consola = require('consola');
require('minimist');
require('hable');
require('execa');
require('fs');
require('execa');
const util = _interopDefault(require('util'));
const util = require('util');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const consola__default = /*#__PURE__*/_interopDefaultLegacy(consola);
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
/** `Object#toString` result references. */

@@ -434,10 +437,10 @@ var symbolTag = '[object Symbol]';

consola.log(serialized + '\n');
consola__default['default'].log(serialized + '\n');
if (serialized.includes('[Object]' )) {
consola.info('You can use `--depth` or add more queries to inspect `[Object]` and `[Array]` fields.');
consola__default['default'].info('You can use `--depth` or add more queries to inspect `[Object]` and `[Array]` fields.');
}
if (queryError) {
consola.warn(`No match in webpack config for \`${queryError}\``);
consola__default['default'].warn(`No match in webpack config for \`${queryError}\``);
}

@@ -485,8 +488,8 @@ }

function formatObj (obj, formatOptions) {
if (!util.formatWithOptions) {
return util.format(obj)
if (!util__default['default'].formatWithOptions) {
return util__default['default'].format(obj)
}
return util.formatWithOptions(formatOptions, obj)
return util__default['default'].formatWithOptions(formatOptions, obj)
}
exports.default = webpack;
/*!
* @nuxt/cli v2.14.1 (c) 2016-2020
* @nuxt/cli v2.14.2 (c) 2016-2020

@@ -24,4 +24,4 @@ * - All the amazing contributors

require('hable');
require('execa');
require('fs');
require('execa');

@@ -34,2 +34,3 @@

exports.imports = index.imports;
exports.isNuxtDir = index.isNuxtDir;
exports.loadNuxtConfig = index.loadNuxtConfig;

@@ -36,0 +37,0 @@ exports.options = index.index$1;

{
"name": "@nuxt/cli",
"version": "2.14.1",
"version": "2.14.2",
"repository": "nuxt/nuxt.js",

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

"dependencies": {
"@nuxt/config": "2.14.1",
"@nuxt/config": "2.14.2",
"@nuxt/static": "^1.0.0",
"@nuxt/utils": "2.14.1",
"@nuxt/utils": "2.14.2",
"boxen": "^4.2.0",

@@ -23,3 +23,3 @@ "chalk": "^3.0.0",

"connect": "^3.7.0",
"consola": "^2.14.0",
"consola": "^2.15.0",
"crc": "^3.8.0",

@@ -26,0 +26,0 @@ "destr": "^1.0.0",

Sorry, the diff of this file is too big to display

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