Comparing version 2.12.2 to 2.13.0
/*! | ||
* @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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
115805
13
3836
18
19
+ Addedcompression@^1.7.4
+ Addedconnect@^3.7.0
+ Addedserve-static@^1.14.1
+ Added@nuxt/config@2.13.0(transitive)
+ Added@nuxt/utils@2.13.0(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcompressible@2.0.18(transitive)
+ Addedcompression@1.8.0(transitive)
+ Addedconnect@3.7.0(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddefu@2.0.46.1.4(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addeddestr@1.2.2(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addeddotenv@8.6.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedfinalhandler@1.1.2(transitive)
+ Addedflat@5.0.2(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjiti@0.1.20(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.53.0(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednegotiator@0.6.4(transitive)
+ Addedon-finished@2.3.02.4.1(transitive)
+ Addedon-headers@1.0.2(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedrc9@1.2.4(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserialize-javascript@4.0.0(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedstatuses@1.5.02.0.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedvary@1.1.2(transitive)
- Removed@nuxt/config@2.12.2(transitive)
- Removed@nuxt/utils@2.12.2(transitive)
- Removedserialize-javascript@3.1.0(transitive)
Updated@nuxt/config@2.13.0
Updated@nuxt/utils@2.13.0
Updatedconsola@^2.13.0