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

@vuepress/cli

Package Overview
Dependencies
Maintainers
6
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/cli - npm Package Compare versions

Comparing version 2.0.0-beta.43 to 2.0.0-beta.44

lib/config/loadUserConfigCjs.d.ts

2

lib/commands/build/createBuild.js

@@ -34,3 +34,3 @@ "use strict";

// use user-config plugin
app.use((0, config_1.transformUserConfigToPlugin)(app, userConfig));
app.use((0, config_1.transformUserConfigToPlugin)(userConfig, cliAppConfig.source));
// clean temp and cache

@@ -37,0 +37,0 @@ if (commandOptions.cleanTemp === true) {

@@ -38,3 +38,3 @@ "use strict";

// use user-config plugin
app.use((0, config_1.transformUserConfigToPlugin)(app, userConfig));
app.use((0, config_1.transformUserConfigToPlugin)(userConfig, cliAppConfig.source));
// clean temp and cache

@@ -41,0 +41,0 @@ if (commandOptions.cleanTemp === true) {

export * from './defineUserConfig';
export * from './loadUserConfig';
export * from './loadUserConfigEs';
export * from './loadUserConfigCjs';
export * from './resolveUserConfigConventionalPath';

@@ -5,0 +5,0 @@ export * from './resolveUserConfigPath';

@@ -19,3 +19,3 @@ "use strict";

__exportStar(require("./loadUserConfig"), exports);
__exportStar(require("./loadUserConfigEs"), exports);
__exportStar(require("./loadUserConfigCjs"), exports);
__exportStar(require("./resolveUserConfigConventionalPath"), exports);

@@ -22,0 +22,0 @@ __exportStar(require("./resolveUserConfigPath"), exports);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadUserConfig = void 0;
const loadUserConfigEs_1 = require("./loadUserConfigEs");
const loadUserConfigCjs_1 = require("./loadUserConfigCjs");
const loaderMap = [
[/\.(j|t)s$/, loadUserConfigEs_1.loadUserConfigEs],
[/\.(js|cjs|ts)$/, loadUserConfigCjs_1.loadUserConfigCjs],
];

@@ -8,0 +8,0 @@ /**

@@ -11,5 +11,7 @@ "use strict";

utils_1.path.resolve(cwd, 'vuepress.config.js'),
utils_1.path.resolve(cwd, 'vuepress.config.cjs'),
utils_1.path.resolve(source, '.vuepress/config.ts'),
utils_1.path.resolve(source, '.vuepress/config.js'),
utils_1.path.resolve(source, '.vuepress/config.cjs'),
].find((item) => utils_1.fs.pathExistsSync(item));
exports.resolveUserConfigConventionalPath = resolveUserConfigConventionalPath;

@@ -1,2 +0,2 @@

import type { App, PluginObject } from '@vuepress/core';
import type { PluginObject } from '@vuepress/core';
import type { UserConfig } from './types';

@@ -6,2 +6,2 @@ /**

*/
export declare const transformUserConfigToPlugin: (app: App, userConfig: UserConfig) => PluginObject;
export declare const transformUserConfigToPlugin: (userConfig: UserConfig, source: string, cwd?: string) => PluginObject;

@@ -8,3 +8,3 @@ "use strict";

*/
const transformUserConfigToPlugin = (app, userConfig) => {
const transformUserConfigToPlugin = (userConfig, source, cwd = process.cwd()) => {
const userConfigPlugin = {

@@ -14,8 +14,12 @@ name: 'user-config',

};
// if `clientAppEnhanceFiles` is not set explicitly,
// if `clientConfigFile` is not set explicitly,
// try to load conventional files
if (userConfigPlugin.clientAppEnhanceFiles === undefined) {
userConfigPlugin.clientAppEnhanceFiles = [
app.dir.source('.vuepress/clientAppEnhance.ts'),
app.dir.source('.vuepress/clientAppEnhance.js'),
if (userConfigPlugin.clientConfigFile === undefined) {
userConfigPlugin.clientConfigFile = [
utils_1.path.resolve(cwd, 'vuepress.client.ts'),
utils_1.path.resolve(cwd, 'vuepress.client.js'),
utils_1.path.resolve(cwd, 'vuepress.client.mjs'),
utils_1.path.resolve(source, '.vuepress/client.ts'),
utils_1.path.resolve(source, '.vuepress/client.js'),
utils_1.path.resolve(source, '.vuepress/client.mjs'),
].find((item) => utils_1.fs.pathExistsSync(item));

@@ -22,0 +26,0 @@ }

@@ -14,4 +14,4 @@ "use strict";

sourcemap: 'inline',
target: 'node12',
target: 'node14',
}).code;
exports.transformTsFileToCodeSync = transformTsFileToCodeSync;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveAppConfig = void 0;
const shared_1 = require("@vuepress/shared");
const utils_1 = require("@vuepress/utils");

@@ -25,4 +26,18 @@ /**

}
if (appConfig.base &&
!(appConfig.base.startsWith('/') && appConfig.base.endsWith('/'))) {
const rawBase = appConfig.base;
appConfig.base = (0, shared_1.ensureLeadingSlash)((0, shared_1.ensureEndingSlash)(rawBase));
utils_1.logger.warn(`${utils_1.chalk.magenta('base')} should start and end with a slash (/),` +
` so it has been normalized from ${utils_1.chalk.magenta(rawBase)}` +
` to ${utils_1.chalk.magenta(appConfig.base)}`);
}
if (appConfig.dest &&
utils_1.path.normalize(appConfig.source).includes(utils_1.path.normalize(appConfig.dest))) {
utils_1.logger.warn(`${utils_1.chalk.magenta('dest')} directory would be emptied during build,` +
` so we fallback it to the default directory for the safety of your source files`);
delete appConfig.dest;
}
return appConfig;
};
exports.resolveAppConfig = resolveAppConfig;
{
"name": "@vuepress/cli",
"version": "2.0.0-beta.43",
"version": "2.0.0-beta.44",
"description": "CLI package of VuePress",

@@ -29,8 +29,9 @@ "keywords": [

"dependencies": {
"@vuepress/core": "2.0.0-beta.43",
"@vuepress/utils": "2.0.0-beta.43",
"@vuepress/core": "2.0.0-beta.44",
"@vuepress/shared": "2.0.0-beta.44",
"@vuepress/utils": "2.0.0-beta.44",
"cac": "^6.7.12",
"chokidar": "^3.5.3",
"envinfo": "^7.8.1",
"esbuild": "^0.14.36"
"esbuild": "^0.14.39"
},

@@ -37,0 +38,0 @@ "devDependencies": {

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