@vuepress/core
Advanced tools
Comparing version 2.0.0-beta.53 to 2.0.0-beta.54
@@ -21,3 +21,3 @@ import { MarkdownLink, MarkdownSfcBlocks, MarkdownOptions, Markdown, MarkdownHeader } from '@vuepress/markdown'; | ||
*/ | ||
declare type Page<ExtraPageData extends Record<any, any> = Record<never, never>, ExtraPageFrontmatter extends Record<any, any> = Record<string, unknown>, ExtraPageFields extends Record<any, any> = Record<never, never>> = PageBase<ExtraPageFrontmatter> & ExtraPageFields & { | ||
type Page<ExtraPageData extends Record<any, any> = Record<never, never>, ExtraPageFrontmatter extends Record<any, any> = Record<string, unknown>, ExtraPageFields extends Record<any, any> = Record<never, never>> = PageBase<ExtraPageFrontmatter> & ExtraPageFields & { | ||
/** | ||
@@ -162,7 +162,7 @@ * Data of the page, which will be available in client code | ||
declare type PromiseOrNot<T> = Promise<T> | T; | ||
declare type Closable = { | ||
type PromiseOrNot<T> = Promise<T> | T; | ||
type Closable = { | ||
close(): void; | ||
}; | ||
declare type Hook<Exposed, Normalized = Exposed, Result = Normalized extends (...args: any) => infer U ? U extends Promise<infer V> ? V : U : void> = { | ||
type Hook<Exposed, Normalized = Exposed, Result = Normalized extends (...args: any) => infer U ? U extends Promise<infer V> ? V : U : void> = { | ||
exposed: Exposed; | ||
@@ -172,6 +172,6 @@ normalized: Normalized; | ||
}; | ||
declare type LifeCycleHook<T extends unknown[] = []> = Hook<(app: App, ...args: T) => PromiseOrNot<void>>; | ||
declare type ExtendsHook<T> = Hook<(extendable: T, app: App) => PromiseOrNot<void>>; | ||
declare type ClientConfigFileHook = Hook<string | ((app: App) => PromiseOrNot<string>), (app: App) => Promise<string>>; | ||
declare type AliasDefineHook = Hook<Record<string, any> | ((app: App, isServer: boolean) => PromiseOrNot<Record<string, any>>), (app: App, isServer: boolean) => Promise<Record<string, any>>>; | ||
type LifeCycleHook<T extends unknown[] = []> = Hook<(app: App, ...args: T) => PromiseOrNot<void>>; | ||
type ExtendsHook<T> = Hook<(extendable: T, app: App) => PromiseOrNot<void>>; | ||
type ClientConfigFileHook = Hook<string | ((app: App) => PromiseOrNot<string>), (app: App) => Promise<string>>; | ||
type AliasDefineHook = Hook<Record<string, any> | ((app: App, isServer: boolean) => PromiseOrNot<Record<string, any>>), (app: App, isServer: boolean) => Promise<Record<string, any>>>; | ||
/** | ||
@@ -197,7 +197,7 @@ * List of hooks | ||
*/ | ||
declare type HooksName = keyof Hooks; | ||
type HooksName = keyof Hooks; | ||
/** | ||
* Exposed hooks API that can be accessed by a plugin | ||
*/ | ||
declare type HooksExposed = { | ||
type HooksExposed = { | ||
[K in HooksName]: Hooks[K]['exposed']; | ||
@@ -208,3 +208,3 @@ }; | ||
*/ | ||
declare type HooksNormalized = { | ||
type HooksNormalized = { | ||
[K in HooksName]: Hooks[K]['normalized']; | ||
@@ -215,3 +215,3 @@ }; | ||
*/ | ||
declare type HooksResult = { | ||
type HooksResult = { | ||
[K in HooksName]: Hooks[K]['result']; | ||
@@ -267,3 +267,3 @@ }; | ||
*/ | ||
declare type Plugin<T extends PluginObject = PluginObject> = T | PluginFunction<T>; | ||
type Plugin<T extends PluginObject = PluginObject> = T | PluginFunction<T>; | ||
/** | ||
@@ -274,3 +274,3 @@ * Vuepress plugin function | ||
*/ | ||
declare type PluginFunction<T extends PluginObject = PluginObject> = (app: App) => T; | ||
type PluginFunction<T extends PluginObject = PluginObject> = (app: App) => T; | ||
/** | ||
@@ -286,3 +286,3 @@ * Vuepress plugin object | ||
*/ | ||
declare type PluginConfig = (Plugin | Plugin[])[]; | ||
type PluginConfig = (Plugin | Plugin[])[]; | ||
@@ -298,7 +298,7 @@ /** | ||
*/ | ||
declare type Theme = Plugin<ThemeObject>; | ||
type Theme = Plugin<ThemeObject>; | ||
/** | ||
* Vuepress theme function | ||
*/ | ||
declare type ThemeFunction = PluginFunction<ThemeObject>; | ||
type ThemeFunction = PluginFunction<ThemeObject>; | ||
/** | ||
@@ -417,7 +417,7 @@ * Vuepress theme object | ||
*/ | ||
declare type AppConfig = AppConfigCommon & AppConfigDev & AppConfigBuild; | ||
type AppConfig = AppConfigCommon & AppConfigDev & AppConfigBuild; | ||
/** | ||
* Vuepress app options | ||
*/ | ||
declare type AppOptions = Required<AppConfig>; | ||
type AppOptions = Required<AppConfig>; | ||
@@ -427,3 +427,3 @@ /** | ||
*/ | ||
declare type AppDirFunction = (...args: string[]) => string; | ||
type AppDirFunction = (...args: string[]) => string; | ||
/** | ||
@@ -460,3 +460,3 @@ * Directory utils | ||
*/ | ||
declare type AppWriteTemp = (file: string, content: string) => Promise<string>; | ||
type AppWriteTemp = (file: string, content: string) => Promise<string>; | ||
@@ -463,0 +463,0 @@ /** |
@@ -388,3 +388,3 @@ // src/app/prepare/prepareClientConfigs.ts | ||
import { ensureEndingSlash } from "@vuepress/shared"; | ||
import { logger as logger2 } from "@vuepress/utils"; | ||
import { logger as logger2, sanitizeFileName } from "@vuepress/utils"; | ||
var resolvePagePath = ({ | ||
@@ -404,3 +404,3 @@ permalink, | ||
} | ||
return encodeURI(pagePath); | ||
return encodeURI(pagePath.split("/").map(sanitizeFileName).join("/")); | ||
}; | ||
@@ -618,3 +618,3 @@ | ||
// src/app/appUse.ts | ||
import { chalk, debug as debug5, warn } from "@vuepress/utils"; | ||
import { colors, debug as debug5, warn } from "@vuepress/utils"; | ||
@@ -633,3 +633,3 @@ // src/app/resolvePluginObject.ts | ||
} | ||
log5(`use plugin ${chalk.magenta(pluginObject.name)}`); | ||
log5(`use plugin ${colors.magenta(pluginObject.name)}`); | ||
if (pluginObject.multiple !== true) { | ||
@@ -642,3 +642,3 @@ const duplicateIndex = app.pluginApi.plugins.findIndex( | ||
warn( | ||
`plugin ${chalk.magenta( | ||
`plugin ${colors.magenta( | ||
pluginObject.name | ||
@@ -654,3 +654,3 @@ )} has been used multiple times, only the last one will take effect` | ||
// src/pluginApi/createHookQueue.ts | ||
import { chalk as chalk2, debug as debug6, logger as logger3 } from "@vuepress/utils"; | ||
import { colors as colors2, debug as debug6, logger as logger3 } from "@vuepress/utils"; | ||
var log6 = debug6("vuepress:core/plugin-api"); | ||
@@ -669,3 +669,3 @@ var createHookQueue = (name) => { | ||
log6( | ||
`process ${chalk2.magenta(name)} from ${chalk2.magenta( | ||
`process ${colors2.magenta(name)} from ${colors2.magenta( | ||
item.pluginName | ||
@@ -681,3 +681,3 @@ )}` | ||
logger3.error( | ||
`error in hook ${chalk2.magenta(name)} from ${chalk2.magenta( | ||
`error in hook ${colors2.magenta(name)} from ${colors2.magenta( | ||
item.pluginName | ||
@@ -684,0 +684,0 @@ )}` |
{ | ||
"name": "@vuepress/core", | ||
"version": "2.0.0-beta.53", | ||
"version": "2.0.0-beta.54", | ||
"description": "Core package of VuePress", | ||
@@ -30,7 +30,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@vuepress/client": "2.0.0-beta.53", | ||
"@vuepress/markdown": "2.0.0-beta.53", | ||
"@vuepress/shared": "2.0.0-beta.53", | ||
"@vuepress/utils": "2.0.0-beta.53", | ||
"vue": "^3.2.41" | ||
"vue": "^3.2.45", | ||
"@vuepress/client": "2.0.0-beta.54", | ||
"@vuepress/markdown": "2.0.0-beta.54", | ||
"@vuepress/shared": "2.0.0-beta.54", | ||
"@vuepress/utils": "2.0.0-beta.54" | ||
}, | ||
@@ -37,0 +37,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50763
+ Added@vuepress/client@2.0.0-beta.54(transitive)
+ Added@vuepress/markdown@2.0.0-beta.54(transitive)
+ Added@vuepress/shared@2.0.0-beta.54(transitive)
+ Added@vuepress/utils@2.0.0-beta.54(transitive)
+ Addedfs-extra@11.2.0(transitive)
- Removed@vuepress/client@2.0.0-beta.53(transitive)
- Removed@vuepress/markdown@2.0.0-beta.53(transitive)
- Removed@vuepress/shared@2.0.0-beta.53(transitive)
- Removed@vuepress/utils@2.0.0-beta.53(transitive)
- Removedfs-extra@10.1.0(transitive)
Updatedvue@^3.2.45