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.12.2 to 2.13.0

dist/cli-export.js

34

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

@@ -49,10 +49,26 @@ * - All the amazing contributors

// Name and version
const { bannerColor } = nuxt.options.cli;
titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} ${nuxt.constructor.version}`);
const { bannerColor, badgeMessages } = nuxt.options.cli;
titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} @ ${nuxt.constructor.version || 'exotic'}\n`);
// Running mode
titleLines.push(`Running in ${nuxt.options.dev ? chalk.bold.blue('development') : chalk.bold.green('production')} mode (${chalk.bold(nuxt.options.mode)})`);
const label = name => chalk.bold.cyan(`▸ ${name}:`);
// Environment
const isDev = nuxt.options.dev;
let _env = isDev ? 'development' : 'production';
if (process.env.NODE_ENV !== _env) {
_env += ` (${chalk.cyan(process.env.NODE_ENV)})`;
}
titleLines.push(`${label('Environment')} ${_env}`);
// Rendering
const isSSR = nuxt.options.render.ssr;
const rendering = isSSR ? 'server-side' : 'client-side';
titleLines.push(`${label('Rendering')} ${rendering}`);
// Target
const target = nuxt.options.target || 'server';
titleLines.push(`${label('Target')} ${target}`);
if (showMemoryUsage) {
titleLines.push(getFormattedMemoryUsage());
titleLines.push('\n' + getFormattedMemoryUsage());
}

@@ -62,8 +78,8 @@

for (const listener of nuxt.server.listeners) {
messageLines.push(chalk.bold('Listening on: ') + chalk.underline.blue(listener.url));
messageLines.push(chalk.bold('Listening: ') + chalk.underline.blue(listener.url));
}
// Add custom badge messages
if (nuxt.options.cli.badgeMessages.length) {
messageLines.push('', ...nuxt.options.cli.badgeMessages);
if (badgeMessages.length) {
messageLines.push('', ...badgeMessages);
}

@@ -70,0 +86,0 @@

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

@@ -10,2 +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');

@@ -15,3 +17,3 @@ require('path');

require('exit');
require('@nuxt/utils');
const utils = require('@nuxt/utils');
require('chalk');

@@ -21,3 +23,3 @@ require('std-env');

require('boxen');
require('consola');
const consola = _interopDefault(require('consola'));
require('minimist');

@@ -89,3 +91,3 @@ require('hable');

const config = await cmd.getNuxtConfig({ dev: false, server: false, _build: true });
config.server = config.mode === 'spa' && cmd.argv.generate !== false;
config.server = (config.mode === utils.MODES.spa || config.ssr === false) && cmd.argv.generate !== false;
const nuxt = await cmd.getNuxt(config);

@@ -101,3 +103,4 @@

if (nuxt.options.mode === 'spa' && cmd.argv.generate !== false) {
// TODO: remove if in Nuxt 3
if (nuxt.options.mode === utils.MODES.spa && nuxt.options.target === utils.TARGETS.server && cmd.argv.generate !== false) {
// Build + Generate for static deployment

@@ -110,2 +113,5 @@ const generator = await cmd.getGenerator(nuxt);

await builder.build();
const nextCommand = nuxt.options.target === utils.TARGETS.static ? 'nuxt export' : 'nuxt start';
consola.info('Ready to run `' + (nextCommand) + '`');
}

@@ -112,0 +118,0 @@ }

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

require('exit');
require('@nuxt/utils');
const utils = require('@nuxt/utils');
require('chalk');

@@ -36,3 +36,3 @@ require('std-env');

default: true,
description: 'Only generate pages for dynamic routes. Nuxt has to be built once before using this option'
description: 'Only generate pages for dynamic routes, used for incremental builds. Generate has to be run once without this option before using it'
},

@@ -79,10 +79,22 @@ devtools: {

async run (cmd) {
const config = await cmd.getNuxtConfig({ dev: false, _generate: true, _build: cmd.argv.build });
const config = await cmd.getNuxtConfig({
dev: false,
_build: cmd.argv.build,
_generate: true
});
if (config.target === utils.TARGETS.static) {
throw new Error("Please use `nuxt export` when using `target: 'static'`")
}
// Forcing static target anyway
config.target = utils.TARGETS.static;
// Disable analyze if set by the nuxt config
if (!config.build) {
config.build = {};
}
config.build = config.build || {};
config.build.analyze = false;
// Set flag to keep the prerendering behaviour
config._legacyGenerate = true;
const nuxt = await cmd.getNuxt(config);

@@ -109,2 +121,3 @@

const generator = await cmd.getGenerator(nuxt);
await nuxt.server.listen();

@@ -116,2 +129,3 @@ const { errors } = await generator.generate({

await nuxt.close();
if (cmd.argv['fail-on-error'] && errors.length > 0) {

@@ -118,0 +132,0 @@ throw new Error('Error generating pages, exiting with non-zero code')

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

require('exit');
require('@nuxt/utils');
const utils = require('@nuxt/utils');
require('chalk');

@@ -38,2 +38,5 @@ require('std-env');

const config = await cmd.getNuxtConfig({ dev: false, _start: true });
if (config.target === utils.TARGETS.static) {
throw new Error('You cannot use `nuxt start` with ' + utils.TARGETS.static + ' target, please use `nuxt export` and `nuxt serve`')
}
const nuxt = await cmd.getNuxt(config);

@@ -40,0 +43,0 @@

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

return typeof value == 'symbol' ||
(index.isObjectLike(value) && index.baseGetTag(value) == symbolTag);
(index.isObjectLike_1(value) && index._baseGetTag(value) == symbolTag);
}

@@ -69,3 +69,3 @@

function isKey(value, object) {
if (index.isArray(value)) {
if (index.isArray_1(value)) {
return false;

@@ -147,3 +147,3 @@ }

};
memoized.cache = new (memoize.Cache || index.MapCache);
memoized.cache = new (memoize.Cache || index._MapCache);
return memoized;

@@ -153,3 +153,3 @@ }

// Expose `MapCache`.
memoize.Cache = index.MapCache;
memoize.Cache = index._MapCache;

@@ -235,3 +235,3 @@ var memoize_1 = memoize;

/** Used to convert symbols to primitives and strings. */
var symbolProto = index.Symbol ? index.Symbol.prototype : undefined,
var symbolProto = index._Symbol ? index._Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;

@@ -252,3 +252,3 @@

}
if (index.isArray(value)) {
if (index.isArray_1(value)) {
// Recursively convert values (susceptible to call stack limits).

@@ -302,3 +302,3 @@ return _arrayMap(value, baseToString) + '';

function castPath(value, object) {
if (index.isArray(value)) {
if (index.isArray_1(value)) {
return value;

@@ -305,0 +305,0 @@ }

/*!
* @nuxt/cli v2.12.2 (c) 2016-2020
* @nuxt/cli v2.13.0 (c) 2016-2020

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

{
"name": "@nuxt/cli",
"version": "2.12.2",
"version": "2.13.0",
"repository": "nuxt/nuxt.js",

@@ -15,7 +15,9 @@ "license": "MIT",

"dependencies": {
"@nuxt/config": "2.12.2",
"@nuxt/utils": "2.12.2",
"@nuxt/config": "2.13.0",
"@nuxt/utils": "2.13.0",
"boxen": "^4.2.0",
"chalk": "^3.0.0",
"consola": "^2.11.3",
"compression": "^1.7.4",
"connect": "^3.7.0",
"consola": "^2.13.0",
"esm": "^3.2.25",

@@ -29,2 +31,3 @@ "execa": "^3.4.0",

"pretty-bytes": "^5.3.0",
"serve-static": "^1.14.1",
"std-env": "^2.2.1",

@@ -31,0 +34,0 @@ "wrap-ansi": "^6.2.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