@vmz/plugin-shiki 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/runtime.d.ts +25 -0
- package/dist/runtime.js +147 -0
- package/dist/vmz.plugin.d.ts +23 -0
- package/dist/vmz.plugin.js +82 -0
- package/package.json +17 -9
- package/runtime.ts +0 -62
- package/vmz.plugin.ts +0 -50
package/README.md
CHANGED
|
@@ -22,6 +22,21 @@ It is especially useful for:
|
|
|
22
22
|
- tutorials that move between prose and real VMZ components;
|
|
23
23
|
- source browsers that need trustworthy language presentation.
|
|
24
24
|
|
|
25
|
+
## Third-party TextMate grammar (VMZ-2)
|
|
26
|
+
|
|
27
|
+
By default the runtime loads `vmz-textmate/shiki`. For other languages (e.g. VOS), pass a peer adapter:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import shiki from '@vmz/plugin-shiki';
|
|
31
|
+
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
plugins: [shiki({ textmate: '@game-gpt/vos-textmate/shiki' })],
|
|
34
|
+
engines: { code: 'shiki' },
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The plugin writes `dist/_vmz/plugin-shiki.config.json`; the runtime reads it in SSR (`VMZ_DIST`) and in the browser (`fetch`).
|
|
39
|
+
|
|
25
40
|
## VMZ boundary
|
|
26
41
|
|
|
27
42
|
Shiki owns source presentation. VMZ owns document structure, SSR, optional interaction, testing, and delivery. The
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shiki highlight helper — async with optional sync cache after prewarm.
|
|
3
|
+
* TextMate grammar via configurable peer (default `vmz-textmate/shiki`).
|
|
4
|
+
*/
|
|
5
|
+
import type { Highlighter } from 'shiki';
|
|
6
|
+
export type ShikiRuntimeConfig = {
|
|
7
|
+
/** Shiki + TextMate adapter module (default `vmz-textmate/shiki`). */
|
|
8
|
+
textmate?: string;
|
|
9
|
+
/** Default themes passed to the textmate highlighter factory. */
|
|
10
|
+
themes?: string[];
|
|
11
|
+
};
|
|
12
|
+
/** @internal test hook */
|
|
13
|
+
export declare function getShikiRuntimeConfig(): Readonly<ShikiRuntimeConfig>;
|
|
14
|
+
/** Reset module state (tests). */
|
|
15
|
+
export declare function resetShikiRuntimeForTests(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Configure runtime before highlight (also called by `shiki()` plugin factory).
|
|
18
|
+
*/
|
|
19
|
+
export declare function configureShiki(opts: ShikiRuntimeConfig): void;
|
|
20
|
+
export declare function prewarmShiki(opts?: {
|
|
21
|
+
themes?: string[];
|
|
22
|
+
}): Promise<Highlighter>;
|
|
23
|
+
export declare function highlight(code: string, lang?: string, theme?: string): Promise<string>;
|
|
24
|
+
/** Sync highlight when prewarmed; otherwise escaped `<pre><code>`. */
|
|
25
|
+
export declare function highlightSync(code: string, lang?: string, theme?: string): string;
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shiki highlight helper — async with optional sync cache after prewarm.
|
|
3
|
+
* TextMate grammar via configurable peer (default `vmz-textmate/shiki`).
|
|
4
|
+
*/
|
|
5
|
+
const DEFAULT_TEXTMATE = 'vmz-textmate/shiki';
|
|
6
|
+
let config = {};
|
|
7
|
+
let configResolved = false;
|
|
8
|
+
let cached = null;
|
|
9
|
+
let pending = null;
|
|
10
|
+
/** @internal test hook */
|
|
11
|
+
export function getShikiRuntimeConfig() {
|
|
12
|
+
return config;
|
|
13
|
+
}
|
|
14
|
+
/** Reset module state (tests). */
|
|
15
|
+
export function resetShikiRuntimeForTests() {
|
|
16
|
+
config = {};
|
|
17
|
+
configResolved = false;
|
|
18
|
+
cached = null;
|
|
19
|
+
pending = null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Configure runtime before highlight (also called by `shiki()` plugin factory).
|
|
23
|
+
*/
|
|
24
|
+
export function configureShiki(opts) {
|
|
25
|
+
if (opts.textmate)
|
|
26
|
+
config.textmate = opts.textmate;
|
|
27
|
+
if (opts.themes?.length)
|
|
28
|
+
config.themes = [...opts.themes];
|
|
29
|
+
configResolved = Boolean(opts.textmate);
|
|
30
|
+
cached = null;
|
|
31
|
+
pending = null;
|
|
32
|
+
}
|
|
33
|
+
async function resolveRuntimeConfig() {
|
|
34
|
+
if (configResolved)
|
|
35
|
+
return;
|
|
36
|
+
const globalCfg = globalThis.__vmzPluginShiki;
|
|
37
|
+
if (globalCfg?.textmate) {
|
|
38
|
+
config.textmate = globalCfg.textmate;
|
|
39
|
+
if (globalCfg.themes?.length)
|
|
40
|
+
config.themes = [...globalCfg.themes];
|
|
41
|
+
configResolved = true;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
if (typeof fetch === 'function') {
|
|
46
|
+
const res = await fetch('/_vmz/plugin-shiki.config.json', { cache: 'no-store' });
|
|
47
|
+
if (res.ok) {
|
|
48
|
+
const parsed = (await res.json());
|
|
49
|
+
if (parsed.textmate)
|
|
50
|
+
config.textmate = parsed.textmate;
|
|
51
|
+
if (parsed.themes?.length)
|
|
52
|
+
config.themes = [...parsed.themes];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
/* optional sidecar */
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const dist = typeof process !== 'undefined' ? process.env.VMZ_DIST : undefined;
|
|
61
|
+
if (dist) {
|
|
62
|
+
const { readFile } = await import('node:fs/promises');
|
|
63
|
+
const { join } = await import('node:path');
|
|
64
|
+
const raw = await readFile(join(dist, '_vmz', 'plugin-shiki.config.json'), 'utf8');
|
|
65
|
+
const parsed = JSON.parse(raw);
|
|
66
|
+
if (parsed.textmate)
|
|
67
|
+
config.textmate = parsed.textmate;
|
|
68
|
+
if (parsed.themes?.length)
|
|
69
|
+
config.themes = [...parsed.themes];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
/* optional sidecar */
|
|
74
|
+
}
|
|
75
|
+
configResolved = true;
|
|
76
|
+
}
|
|
77
|
+
function textmateSpec() {
|
|
78
|
+
return config.textmate || DEFAULT_TEXTMATE;
|
|
79
|
+
}
|
|
80
|
+
async function loadTextmateHighlighter(themes) {
|
|
81
|
+
const spec = textmateSpec();
|
|
82
|
+
try {
|
|
83
|
+
const mod = (await import(/* webpackIgnore: true */ spec));
|
|
84
|
+
const factory = mod.createVmzHighlighter ?? mod.createHighlighter ?? mod.default?.createVmzHighlighter;
|
|
85
|
+
if (typeof factory === 'function') {
|
|
86
|
+
return factory({ themes, langs: [] });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
/* try generic shiki below */
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
async function loadGenericHighlighter(themes) {
|
|
95
|
+
const { createHighlighter } = await import('shiki');
|
|
96
|
+
return createHighlighter({
|
|
97
|
+
themes,
|
|
98
|
+
langs: ['javascript', 'typescript', 'tsx', 'jsx', 'json', 'html', 'css', 'markdown', 'bash', 'text'],
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export async function prewarmShiki(opts = {}) {
|
|
102
|
+
if (cached)
|
|
103
|
+
return cached;
|
|
104
|
+
if (pending)
|
|
105
|
+
return pending;
|
|
106
|
+
pending = (async () => {
|
|
107
|
+
await resolveRuntimeConfig();
|
|
108
|
+
const themes = opts.themes?.length ? opts.themes : config.themes?.length ? config.themes : ['vitesse-dark'];
|
|
109
|
+
const fromTextmate = await loadTextmateHighlighter(themes);
|
|
110
|
+
cached = fromTextmate ?? (await loadGenericHighlighter(themes));
|
|
111
|
+
return cached;
|
|
112
|
+
})();
|
|
113
|
+
return pending;
|
|
114
|
+
}
|
|
115
|
+
export async function highlight(code, lang = 'text', theme = 'vitesse-dark') {
|
|
116
|
+
const highlighter = await prewarmShiki({ themes: [theme] });
|
|
117
|
+
try {
|
|
118
|
+
return highlighter.codeToHtml(code ?? '', {
|
|
119
|
+
lang: lang || 'text',
|
|
120
|
+
theme,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return fallbackPre(code);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Sync highlight when prewarmed; otherwise escaped `<pre><code>`. */
|
|
128
|
+
export function highlightSync(code, lang = 'text', theme = 'vitesse-dark') {
|
|
129
|
+
if (!cached)
|
|
130
|
+
return fallbackPre(code);
|
|
131
|
+
try {
|
|
132
|
+
return cached.codeToHtml(code ?? '', {
|
|
133
|
+
lang: lang || 'text',
|
|
134
|
+
theme,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
return fallbackPre(code);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function fallbackPre(code) {
|
|
142
|
+
const escaped = String(code ?? '')
|
|
143
|
+
.replace(/&/g, '&')
|
|
144
|
+
.replace(/</g, '<')
|
|
145
|
+
.replace(/>/g, '>');
|
|
146
|
+
return `<pre class="shiki shiki-fallback"><code>${escaped}</code></pre>`;
|
|
147
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ShikiPluginOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* TextMate Shiki adapter module id.
|
|
4
|
+
* Default `vmz-textmate/shiki`; VOS uses `@game-gpt/vos-textmate/shiki`.
|
|
5
|
+
*/
|
|
6
|
+
textmate?: string;
|
|
7
|
+
/** Default Shiki themes for prewarm. */
|
|
8
|
+
themes?: string[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* VMZ Shiki plugin factory — register `<Shiki>` + `engines.code`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import shiki from '@vmz/plugin-shiki';
|
|
16
|
+
* export default defineConfig({
|
|
17
|
+
* plugins: [shiki({ textmate: '@game-gpt/vos-textmate/shiki' })],
|
|
18
|
+
* engines: { code: 'shiki' },
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function shiki(options?: ShikiPluginOptions): import("@vmz/plugin").VmzPlugin;
|
|
23
|
+
export default shiki;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { definePlugin, loadPluginSource } from '@vmz/plugin';
|
|
4
|
+
import { configureShiki } from './runtime.js';
|
|
5
|
+
const source = loadPluginSource(import.meta.url, '../components/Shiki.vmz');
|
|
6
|
+
const DEFAULT_TEXTMATE = 'vmz-textmate/shiki';
|
|
7
|
+
function writeRuntimeSidecar(outDir, opts) {
|
|
8
|
+
const textmate = opts.textmate ?? DEFAULT_TEXTMATE;
|
|
9
|
+
const payload = {
|
|
10
|
+
textmate,
|
|
11
|
+
...(opts.themes?.length ? { themes: opts.themes } : {}),
|
|
12
|
+
};
|
|
13
|
+
const dir = path.join(outDir, '_vmz');
|
|
14
|
+
mkdirSync(dir, { recursive: true });
|
|
15
|
+
writeFileSync(path.join(dir, 'plugin-shiki.config.json'), `${JSON.stringify(payload, null, 2)}\n`, 'utf8');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* VMZ Shiki plugin factory — register `<Shiki>` + `engines.code`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import shiki from '@vmz/plugin-shiki';
|
|
23
|
+
* export default defineConfig({
|
|
24
|
+
* plugins: [shiki({ textmate: '@game-gpt/vos-textmate/shiki' })],
|
|
25
|
+
* engines: { code: 'shiki' },
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export function shiki(options = {}) {
|
|
30
|
+
configureShiki({
|
|
31
|
+
textmate: options.textmate ?? DEFAULT_TEXTMATE,
|
|
32
|
+
themes: options.themes,
|
|
33
|
+
});
|
|
34
|
+
return definePlugin({
|
|
35
|
+
name: '@vmz/plugin-shiki',
|
|
36
|
+
version: '0.1.0',
|
|
37
|
+
protocol: '0.1.0',
|
|
38
|
+
stages: ['workspace_resolve', 'analyzer'],
|
|
39
|
+
deterministic: true,
|
|
40
|
+
async contribute(ctx) {
|
|
41
|
+
if (ctx.stage === 'workspace_resolve') {
|
|
42
|
+
writeRuntimeSidecar(ctx.outDir, options);
|
|
43
|
+
return {
|
|
44
|
+
stage: 'workspace_resolve',
|
|
45
|
+
cacheKey: `@vmz/plugin-shiki:Shiki.vmz:${source.contentHash.slice(0, 12)}:${options.textmate ?? DEFAULT_TEXTMATE}`,
|
|
46
|
+
items: [
|
|
47
|
+
{
|
|
48
|
+
id: 'component-shiki',
|
|
49
|
+
kind: 'source',
|
|
50
|
+
path: 'src/components/Shiki.vmz',
|
|
51
|
+
content: source.content,
|
|
52
|
+
contentHash: source.contentHash,
|
|
53
|
+
materialize: true,
|
|
54
|
+
engine: 'shiki',
|
|
55
|
+
engineKind: 'code',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (ctx.stage === 'analyzer') {
|
|
61
|
+
return {
|
|
62
|
+
stage: 'analyzer',
|
|
63
|
+
cacheKey: '@vmz/plugin-shiki:analyzer',
|
|
64
|
+
items: [
|
|
65
|
+
{
|
|
66
|
+
id: 'engine-shiki',
|
|
67
|
+
kind: 'analyzer',
|
|
68
|
+
path: 'src/components/Shiki.vmz',
|
|
69
|
+
severity: 'advice',
|
|
70
|
+
message: 'code engine shiki online',
|
|
71
|
+
code: 'vmz.engine.shiki',
|
|
72
|
+
engine: 'shiki',
|
|
73
|
+
engineKind: 'code',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return { stage: ctx.stage, items: [] };
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export default shiki;
|
package/package.json
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/plugin-shiki",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VMZ Shiki adapter - <Shiki> + code engine registration",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "./vmz.plugin.
|
|
8
|
-
"types": "./vmz.plugin.ts",
|
|
7
|
+
"main": "./dist/vmz.plugin.js",
|
|
8
|
+
"types": "./dist/vmz.plugin.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"types": "./vmz.plugin.ts",
|
|
12
|
-
"default": "./vmz.plugin.
|
|
11
|
+
"types": "./dist/vmz.plugin.d.ts",
|
|
12
|
+
"default": "./dist/vmz.plugin.js"
|
|
13
13
|
},
|
|
14
14
|
"./runtime": {
|
|
15
|
-
"types": "./runtime.ts",
|
|
16
|
-
"default": "./runtime.
|
|
15
|
+
"types": "./dist/runtime.d.ts",
|
|
16
|
+
"default": "./dist/runtime.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"components",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc -p tsconfig.json"
|
|
26
|
+
},
|
|
19
27
|
"dependencies": {
|
|
20
|
-
"@vmz/plugin": "0.1.
|
|
28
|
+
"@vmz/plugin": "0.1.12"
|
|
21
29
|
},
|
|
22
30
|
"peerDependencies": {
|
|
23
31
|
"shiki": ">=3",
|
|
24
|
-
"vmz-textmate": "0.1.
|
|
32
|
+
"vmz-textmate": "0.1.12"
|
|
25
33
|
},
|
|
26
34
|
"peerDependenciesMeta": {
|
|
27
35
|
"shiki": {
|
package/runtime.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shiki highlight helper — async with optional sync cache after prewarm.
|
|
3
|
-
* For `lang === 'vmz'`, prefers `vmz-textmate/shiki` when available.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { Highlighter } from 'shiki';
|
|
7
|
-
|
|
8
|
-
let cached: Highlighter | null = null;
|
|
9
|
-
let pending: Promise<Highlighter> | null = null;
|
|
10
|
-
|
|
11
|
-
export async function prewarmShiki(opts: { themes?: string[] } = {}): Promise<Highlighter> {
|
|
12
|
-
if (cached) return cached;
|
|
13
|
-
if (pending) return pending;
|
|
14
|
-
pending = (async () => {
|
|
15
|
-
const themes = opts.themes?.length ? opts.themes : ['vitesse-dark'];
|
|
16
|
-
try {
|
|
17
|
-
const { createVmzHighlighter } = await import('vmz-textmate/shiki');
|
|
18
|
-
cached = await createVmzHighlighter({ themes });
|
|
19
|
-
} catch {
|
|
20
|
-
const { createHighlighter } = await import('shiki');
|
|
21
|
-
cached = await createHighlighter({
|
|
22
|
-
themes,
|
|
23
|
-
langs: ['javascript', 'typescript', 'tsx', 'jsx', 'json', 'html', 'css', 'markdown', 'bash'],
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return cached!;
|
|
27
|
-
})();
|
|
28
|
-
return pending;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export async function highlight(code: string, lang = 'text', theme = 'vitesse-dark'): Promise<string> {
|
|
32
|
-
const highlighter = await prewarmShiki({ themes: [theme] });
|
|
33
|
-
try {
|
|
34
|
-
return highlighter.codeToHtml(code ?? '', {
|
|
35
|
-
lang: lang || 'text',
|
|
36
|
-
theme,
|
|
37
|
-
});
|
|
38
|
-
} catch {
|
|
39
|
-
return fallbackPre(code);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** Sync highlight when prewarmed; otherwise escaped `<pre><code>`. */
|
|
44
|
-
export function highlightSync(code: string, lang = 'text', theme = 'vitesse-dark'): string {
|
|
45
|
-
if (!cached) return fallbackPre(code);
|
|
46
|
-
try {
|
|
47
|
-
return cached.codeToHtml(code ?? '', {
|
|
48
|
-
lang: lang || 'text',
|
|
49
|
-
theme,
|
|
50
|
-
});
|
|
51
|
-
} catch {
|
|
52
|
-
return fallbackPre(code);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function fallbackPre(code: string): string {
|
|
57
|
-
const escaped = String(code ?? '')
|
|
58
|
-
.replace(/&/g, '&')
|
|
59
|
-
.replace(/</g, '<')
|
|
60
|
-
.replace(/>/g, '>');
|
|
61
|
-
return `<pre class="shiki shiki-fallback"><code>${escaped}</code></pre>`;
|
|
62
|
-
}
|
package/vmz.plugin.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { definePlugin, loadPluginSource } from '@vmz/plugin';
|
|
2
|
-
|
|
3
|
-
const source = loadPluginSource(import.meta.url, 'components/Shiki.vmz');
|
|
4
|
-
|
|
5
|
-
export default definePlugin({
|
|
6
|
-
name: '@vmz/plugin-shiki',
|
|
7
|
-
version: '0.1.0',
|
|
8
|
-
protocol: '0.1.0',
|
|
9
|
-
stages: ['workspace_resolve', 'analyzer'],
|
|
10
|
-
deterministic: true,
|
|
11
|
-
async contribute(ctx) {
|
|
12
|
-
if (ctx.stage === 'workspace_resolve') {
|
|
13
|
-
return {
|
|
14
|
-
stage: 'workspace_resolve',
|
|
15
|
-
cacheKey: `@vmz/plugin-shiki:Shiki.vmz:${source.contentHash.slice(0, 12)}`,
|
|
16
|
-
items: [
|
|
17
|
-
{
|
|
18
|
-
id: 'component-shiki',
|
|
19
|
-
kind: 'source',
|
|
20
|
-
path: 'src/components/Shiki.vmz',
|
|
21
|
-
content: source.content,
|
|
22
|
-
contentHash: source.contentHash,
|
|
23
|
-
materialize: true,
|
|
24
|
-
engine: 'shiki',
|
|
25
|
-
engineKind: 'code',
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
if (ctx.stage === 'analyzer') {
|
|
31
|
-
return {
|
|
32
|
-
stage: 'analyzer',
|
|
33
|
-
cacheKey: '@vmz/plugin-shiki:analyzer',
|
|
34
|
-
items: [
|
|
35
|
-
{
|
|
36
|
-
id: 'engine-shiki',
|
|
37
|
-
kind: 'analyzer',
|
|
38
|
-
path: 'src/components/Shiki.vmz',
|
|
39
|
-
severity: 'advice',
|
|
40
|
-
message: 'code engine shiki online',
|
|
41
|
-
code: 'vmz.engine.shiki',
|
|
42
|
-
engine: 'shiki',
|
|
43
|
-
engineKind: 'code',
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return { stage: ctx.stage, items: [] };
|
|
49
|
-
},
|
|
50
|
-
});
|