From 458023d254e025fbaa398d581669ca4bfdd29031 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 16 Apr 2024 11:35:48 +0200 Subject: [PATCH] feat: setting up hookable --- packages/slidev/node/slidev.ts | 43 ++++++++++++ packages/slidev/node/vite/extendConfig.ts | 9 ++- packages/slidev/node/vite/index.ts | 20 +++--- packages/slidev/node/vite/loaders.ts | 13 ++-- packages/slidev/node/vite/markdown.ts | 18 +++-- packages/slidev/node/vite/vue.ts | 9 +-- packages/slidev/package.json | 1 + pnpm-lock.yaml | 81 ++++++++++++----------- 8 files changed, 123 insertions(+), 71 deletions(-) create mode 100644 packages/slidev/node/slidev.ts diff --git a/packages/slidev/node/slidev.ts b/packages/slidev/node/slidev.ts new file mode 100644 index 0000000000..ee2f55ef88 --- /dev/null +++ b/packages/slidev/node/slidev.ts @@ -0,0 +1,43 @@ +import type { MarkdownTransformContext, ResolvedSlidevOptions, SlidevPluginOptions, SlidevServerOptions } from '@slidev/types' +import { createHooks } from 'hookable' +import type MarkdownIt from 'markdown-it' +import type { ViteDevServer } from 'vite' + +export interface SlidevServerHooks { + /** + * Hook for the Vite server created + */ + 'server:created': (server: ViteDevServer) => void + /** + * Hook for the Vite config resolved + */ + 'vite:configResolved': (config: any) => void + /** + * Setting up the markdown-it instance + */ + 'markdown:setup': (md: MarkdownIt) => Promise | void + /** + * Transforming markdown content before any Slidev transformations + * You may manipulate MagicString instance + * The hook has to be sync + */ + 'markdown:transform:pre': (context: MarkdownTransformContext, id: string) => void + /** + * Transforming markdown content after Slidev transformations + * You may manipulate MagicString instance + * The hook has to be sync + */ + 'markdown:transform:post': (context: MarkdownTransformContext, id: string) => void +} + +export class SlidevServerApp { + public readonly hooks = createHooks() + public viteServer?: ViteDevServer + + constructor( + public options: ResolvedSlidevOptions, + public pluginOptions: SlidevPluginOptions, + public serverOptions?: SlidevServerOptions, + ) { + } +} diff --git a/packages/slidev/node/vite/extendConfig.ts b/packages/slidev/node/vite/extendConfig.ts index b92ceacef8..b973f3e39a 100644 --- a/packages/slidev/node/vite/extendConfig.ts +++ b/packages/slidev/node/vite/extendConfig.ts @@ -7,6 +7,7 @@ import type { ResolvedSlidevOptions } from '@slidev/types' import { getIndexHtml } from '../commands/shared' import { resolveImportPath, toAtFS } from '../resolver' import { dependencies } from '../../../client/package.json' +import type { SlidevServerApp } from '../slidev' const INCLUDE = [ ...Object.keys(dependencies), @@ -51,7 +52,8 @@ const ASYNC_MODULES = [ '@vue', ] -export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin { +export function createConfigPlugin(app: SlidevServerApp): Plugin { + const { options } = app return { name: 'slidev:config', async config(config) { @@ -165,7 +167,12 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin { return mergeConfig(injection, config) }, + configResolved(resolved) { + app.hooks.callHook('vite:configResolved', resolved) + }, configureServer(server) { + app.viteServer = server + app.hooks.callHook('server:created', server) // serve our index.html after vite history fallback return () => { server.middlewares.use(async (req, res, next) => { diff --git a/packages/slidev/node/vite/index.ts b/packages/slidev/node/vite/index.ts index be08284b05..17ed91c464 100644 --- a/packages/slidev/node/vite/index.ts +++ b/packages/slidev/node/vite/index.ts @@ -8,8 +8,8 @@ import IconsResolver from 'unplugin-icons/resolver' import Components from 'unplugin-vue-components/vite' import ServerRef from 'vite-plugin-vue-server-ref' import { notNullish } from '@antfu/utils' -import type { ResolvedSlidevOptions, SlidevPluginOptions, SlidevServerOptions } from '@slidev/types' import { loadDrawings, writeDrawings } from '../integrations/drawings' +import type { SlidevServerApp } from '../slidev' import { createConfigPlugin } from './extendConfig' import { createSlidesLoader } from './loaders' @@ -18,11 +18,9 @@ import { createVueCompilerFlagsPlugin } from './compilerFlagsVue' import { createMonacoTypesLoader } from './monacoTypes' import { createVuePlugin } from './vue' -export async function ViteSlidevPlugin( - options: ResolvedSlidevOptions, - pluginOptions: SlidevPluginOptions, - serverOptions: SlidevServerOptions = {}, -): Promise { +export async function ViteSlidevPlugin(app: SlidevServerApp): Promise { + const { options, pluginOptions } = app + const { components: componentsOptions = {}, icons: iconsOptions = {}, @@ -43,10 +41,9 @@ export async function ViteSlidevPlugin( const publicRoots = [...themeRoots, ...addonRoots].map(i => join(i, 'public')).filter(existsSync) const plugins = [ - createMarkdownPlugin(options, pluginOptions), - - createVuePlugin(options, pluginOptions), - createSlidesLoader(options, pluginOptions, serverOptions), + createMarkdownPlugin(app), + createVuePlugin(app), + createSlidesLoader(app), Components({ extensions: ['vue', 'md', 'js', 'ts', 'jsx', 'tsx'], @@ -115,7 +112,7 @@ export async function ViteSlidevPlugin( }, }), - createConfigPlugin(options), + createConfigPlugin(app), createMonacoTypesLoader(options), createVueCompilerFlagsPlugin(options), @@ -128,6 +125,7 @@ export async function ViteSlidevPlugin( })), })) : null, + options.inspect ? import('vite-plugin-inspect').then(r => (r.default || r)({ dev: true, diff --git a/packages/slidev/node/vite/loaders.ts b/packages/slidev/node/vite/loaders.ts index 9ced0e0053..2199adb6e4 100644 --- a/packages/slidev/node/vite/loaders.ts +++ b/packages/slidev/node/vite/loaders.ts @@ -21,6 +21,7 @@ import { VIRTUAL_SLIDE_PREFIX, templateSlides } from '../virtual/slides' import { templateConfigs } from '../virtual/configs' import { templateMonacoRunDeps } from '../virtual/monaco-deps' import { templateMonacoTypes } from '../virtual/monaco-types' +import type { SlidevServerApp } from '../slidev' const regexId = /^\/\@slidev\/slide\/(\d+)\.(md|json)(?:\?import)?$/ const regexIdQuery = /(\d+?)\.(md|json|frontmatter)$/ @@ -93,11 +94,7 @@ function withRenderedNote(data: SlideInfo): SlideInfo { } } -export function createSlidesLoader( - options: ResolvedSlidevOptions, - pluginOptions: SlidevPluginOptions, - serverOptions: SlidevServerOptions, -): Plugin[] { +export function createSlidesLoader(app: SlidevServerApp): Plugin[] { const hmrPages = new Set() let server: ViteDevServer | undefined @@ -106,7 +103,7 @@ export function createSlidesLoader( let skipHmr: { filePath: string, fileContent: string } | null = null - const { data, clientRoot, roots, mode } = options + const { data, clientRoot, roots, mode } = app.options const templateCtx: VirtualModuleTempalteContext = { md, @@ -203,7 +200,7 @@ export function createSlidesLoader( await ctx.read() - const newData = await serverOptions.loadData?.() + const newData = await app.serverOptions?.loadData?.() if (!newData) return [] @@ -311,7 +308,7 @@ export function createSlidesLoader( const template = templates.find(i => i.id === id) if (template) { return { - code: await template.getContent(options, templateCtx, this), + code: await template.getContent(app.options, templateCtx, this), map: { mappings: '' }, } } diff --git a/packages/slidev/node/vite/markdown.ts b/packages/slidev/node/vite/markdown.ts index b56064bd14..be6af5ed70 100644 --- a/packages/slidev/node/vite/markdown.ts +++ b/packages/slidev/node/vite/markdown.ts @@ -25,14 +25,13 @@ import { loadShikiSetups } from '../setups/shiki' import { loadSetups } from '../setups/load' import { transformCodeWrapper, transformKaTexWrapper, transformMagicMove, transformMermaid, transformMonaco, transformPageCSS, transformPlantUml, transformSlotSugar, transformSnippet } from '../syntax/transform' import { escapeVueInCode } from '../syntax/transform/utils' +import type { SlidevServerApp } from '../slidev' let shiki: Highlighter | undefined let shikiOptions: MarkdownItShikiOptions | undefined -export async function createMarkdownPlugin( - options: ResolvedSlidevOptions, - { markdown: mdOptions }: SlidevPluginOptions, -): Promise { +export async function createMarkdownPlugin(app: SlidevServerApp): Promise { + const { options, pluginOptions: { markdown: mdOptions } } = app const { data: { config }, roots, mode, entry, clientRoot } = options const setups: ((md: MarkdownIt) => void)[] = [] @@ -95,7 +94,6 @@ export async function createMarkdownPlugin( setups.push(md => md.use(MarkdownItMdc)) const KatexOptions: KatexOptions = await loadSetups(options.clientRoot, roots, 'katex.ts', {}, { strict: false }, false) - const sourceMapConsumers: Record = {} return Markdown({ @@ -112,7 +110,7 @@ export async function createMarkdownPlugin( ...mdOptions?.markdownItOptions, }, ...mdOptions, - markdownItSetup(md) { + async markdownItSetup(md) { md.use(MarkdownItAttrs, { attrs: { target: '_blank', @@ -126,7 +124,9 @@ export async function createMarkdownPlugin( md.use(MarkdownItVDrag, sourceMapConsumers) setups.forEach(i => i(md)) - mdOptions?.markdownItSetup?.(md) + + await mdOptions?.markdownItSetup?.(md) + await app.hooks.callHook('markdown:setup', md) }, transforms: { before(code, id) { @@ -143,6 +143,8 @@ export async function createMarkdownPlugin( }, } + app.hooks.callHook('markdown:transform:pre', ctx, id) + transformSnippet(ctx, options, id) if (config.highlighter === 'shiki') @@ -157,6 +159,8 @@ export async function createMarkdownPlugin( transformPageCSS(ctx, id) transformSlotSugar(ctx) + app.hooks.callHook('markdown:transform:post', ctx, id) + const sourceMap = ctx.s.generateMap() sourceMapConsumers[id] = new SourceMapConsumer({ ...sourceMap, diff --git a/packages/slidev/node/vite/vue.ts b/packages/slidev/node/vite/vue.ts index ebd625a940..a6db086d0e 100644 --- a/packages/slidev/node/vite/vue.ts +++ b/packages/slidev/node/vite/vue.ts @@ -1,7 +1,7 @@ import type { Plugin } from 'vite' import Vue from '@vitejs/plugin-vue' import VueJsx from '@vitejs/plugin-vue-jsx' -import type { ResolvedSlidevOptions, SlidevPluginOptions } from '@slidev/types' +import type { SlidevServerApp } from '../slidev' const customElements = new Set([ // katex @@ -34,14 +34,11 @@ const customElements = new Set([ 'semantics', ]) -export async function createVuePlugin( - options: ResolvedSlidevOptions, - pluginOptions: SlidevPluginOptions, -): Promise { +export async function createVuePlugin(app: SlidevServerApp): Promise { const { vue: vueOptions = {}, vuejsx: vuejsxOptions = {}, - } = pluginOptions + } = app.pluginOptions const VuePlugin = Vue({ include: [/\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.md$/, /\.md\?vue/], diff --git a/packages/slidev/package.json b/packages/slidev/package.json index 72a593eb05..661dcad2fd 100644 --- a/packages/slidev/package.json +++ b/packages/slidev/package.json @@ -74,6 +74,7 @@ "fs-extra": "^11.2.0", "get-port-please": "^3.1.2", "global-directory": "^4.0.1", + "hookable": "^5.5.3", "htmlparser2": "^9.1.0", "is-installed-globally": "^1.0.0", "jiti": "^1.21.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e9661a18c..32dbaae33e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -509,7 +509,7 @@ importers: version: 3.7.0 debug: specifier: ^4.3.4 - version: 4.3.4(supports-color@8.1.1) + version: 4.3.4(supports-color@5.5.0) fast-deep-equal: specifier: ^3.1.3 version: 3.1.3 @@ -525,6 +525,9 @@ importers: global-directory: specifier: ^4.0.1 version: 4.0.1 + hookable: + specifier: ^5.5.3 + version: 5.5.3 htmlparser2: specifier: ^9.1.0 version: 9.1.0 @@ -993,7 +996,7 @@ packages: '@babel/traverse': 7.24.1 '@babel/types': 7.24.0 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -1241,7 +1244,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.24.4 '@babel/types': 7.24.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1815,7 +1818,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -1832,7 +1835,7 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) espree: 10.0.1 globals: 14.0.0 ignore: 5.3.1 @@ -1883,7 +1886,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1948,7 +1951,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.5.2 '@iconify/types': 1.1.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.4.3 transitivePeerDependencies: @@ -1961,7 +1964,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.7 '@iconify/types': 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.6.1 @@ -2749,7 +2752,7 @@ packages: '@typescript-eslint/type-utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.6.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -2775,7 +2778,7 @@ packages: '@typescript-eslint/types': 7.6.0 '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.6.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 typescript: 5.4.5 transitivePeerDependencies: @@ -2810,7 +2813,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5) '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 ts-api-utils: 1.3.0(typescript@5.4.5) typescript: 5.4.5 @@ -2839,7 +2842,7 @@ packages: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -2861,7 +2864,7 @@ packages: dependencies: '@typescript-eslint/types': 7.6.0 '@typescript-eslint/visitor-keys': 7.6.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 @@ -2937,7 +2940,7 @@ packages: /@typescript/vfs@1.5.0: resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -3751,7 +3754,7 @@ packages: /@windicss/config@1.9.3: resolution: {integrity: sha512-u8GUjsfC9r5X1AGYhzb1lX3zZj8wqk6SH1DYex8XUGmZ1M2UpvnUPOFi63XFViduspQ6l2xTX84QtG+lUzhEoQ==} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) jiti: 1.21.0 windicss: 3.5.6 transitivePeerDependencies: @@ -3763,7 +3766,7 @@ packages: dependencies: '@antfu/utils': 0.7.7 '@windicss/config': 1.9.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) fast-glob: 3.3.2 magic-string: 0.30.9 micromatch: 4.0.5 @@ -4857,7 +4860,6 @@ packages: dependencies: ms: 2.1.2 supports-color: 5.5.0 - dev: true /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -4870,6 +4872,7 @@ packages: dependencies: ms: 2.1.2 supports-color: 8.1.1 + dev: true /decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -5540,7 +5543,7 @@ packages: eslint: ^8.56.0 || ^9.0.0-0 dependencies: '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) doctrine: 3.0.0 eslint: 9.0.0 eslint-import-resolver-node: 0.3.9 @@ -5562,7 +5565,7 @@ packages: '@es-joy/jsdoccomment': 0.42.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint: 9.0.0 esquery: 1.5.0 @@ -5657,7 +5660,7 @@ packages: peerDependencies: eslint: '>=6.0.0' dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 eslint-compat-utils: 0.5.0(eslint@9.0.0) lodash: 4.17.21 @@ -5755,7 +5758,7 @@ packages: peerDependencies: eslint: '>=6.0.0' dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 eslint-compat-utils: 0.5.0(eslint@9.0.0) lodash: 4.17.21 @@ -5821,7 +5824,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.0.1 eslint-visitor-keys: 4.0.0 @@ -6144,7 +6147,7 @@ packages: debug: optional: true dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) dev: false /foreground-child@3.1.1: @@ -6459,6 +6462,7 @@ packages: /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + dev: true /has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} @@ -6995,7 +6999,7 @@ packages: dependencies: chalk: 5.3.0 commander: 11.1.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) execa: 8.0.1 lilconfig: 3.0.0 listr2: 8.0.1 @@ -7696,7 +7700,7 @@ packages: /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -7706,7 +7710,7 @@ packages: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} dependencies: '@types/debug': 4.1.12 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -7729,7 +7733,7 @@ packages: resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} dependencies: '@types/debug': 4.1.12 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -9115,6 +9119,7 @@ packages: engines: {node: '>=10'} dependencies: has-flag: 4.0.0 + dev: true /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -9329,7 +9334,7 @@ packages: bundle-require: 4.0.2(esbuild@0.19.12) cac: 6.7.14 chokidar: 3.6.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) esbuild: 0.19.12 execa: 5.1.1 globby: 11.1.0 @@ -9702,7 +9707,7 @@ packages: '@antfu/utils': 0.7.7 '@iconify/utils': 2.1.22 '@vue/compiler-sfc': 3.4.22 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.5.0 unplugin: 1.10.1 @@ -9725,7 +9730,7 @@ packages: '@antfu/utils': 0.7.7 '@rollup/pluginutils': 5.1.0 chokidar: 3.6.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) fast-glob: 3.3.2 local-pkg: 0.4.3 magic-string: 0.30.9 @@ -9882,7 +9887,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) pathe: 1.1.2 picocolors: 1.0.0 vite: 5.2.9(@types/node@20.12.7) @@ -9909,7 +9914,7 @@ packages: dependencies: '@antfu/utils': 0.7.7 '@rollup/pluginutils': 5.1.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) error-stack-parser-es: 0.1.1 fs-extra: 11.2.0 open: 10.1.0 @@ -9934,7 +9939,7 @@ packages: dependencies: '@antfu/utils': 0.7.7 '@rollup/pluginutils': 5.1.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) error-stack-parser-es: 0.1.1 fs-extra: 11.2.0 open: 10.1.0 @@ -9955,7 +9960,7 @@ packages: '@antfu/utils': 0.7.7 axios: 1.6.5(debug@4.3.4) blueimp-md5: 2.19.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) fs-extra: 11.2.0 magic-string: 0.30.9 vite: 5.2.9(@types/node@20.12.7) @@ -9983,7 +9988,7 @@ packages: vue: ^3.0.0 dependencies: '@antfu/utils': 0.7.7 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) klona: 2.0.6 mlly: 1.6.1 ufo: 1.5.3 @@ -9999,7 +10004,7 @@ packages: vite: ^2.0.1 || ^3.0.0 || ^4.0.0 || ^5.0.0 dependencies: '@windicss/plugin-utils': 1.9.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) kolorist: 1.8.0 vite: 3.2.8(@types/node@20.12.7) windicss: 3.5.6 @@ -10176,7 +10181,7 @@ packages: '@vitest/utils': 1.5.0 acorn-walk: 8.3.2 chai: 4.4.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) execa: 8.0.1 local-pkg: 0.5.0 magic-string: 0.30.9 @@ -10219,7 +10224,7 @@ packages: peerDependencies: eslint: '>=6.0.0' dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4(supports-color@5.5.0) eslint: 9.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3