@slidev/cli 0.49.29 → 0.50.0-beta.1
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/dist/{build-2WDSCT4J.js → build-FMVKC2PV.js} +6 -6
- package/dist/{chunk-IVWMFGB5.js → chunk-6GC5ATZB.js} +1 -1
- package/dist/{chunk-YP37OZJY.js → chunk-6O4GDZ4B.js} +1101 -1082
- package/dist/cli.js +18 -18
- package/dist/{export-FTRUCBWA.js → export-WMRLKOJP.js} +7 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/package.json +27 -27
- package/dist/{chunk-HOVIRHCR.js → chunk-UNQ5DBLZ.js} +6 -6
- package/dist/{markdown-it-prism-P475G4NP.js → markdown-it-prism-44L27JJK.js} +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6GC5ATZB.js";
|
|
4
4
|
import {
|
|
5
5
|
getThemeMeta,
|
|
6
6
|
loadSetups,
|
|
@@ -9,27 +9,27 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveTheme,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6O4GDZ4B.js";
|
|
13
13
|
import "./chunk-6DS3IPOB.js";
|
|
14
14
|
import {
|
|
15
15
|
getRoots,
|
|
16
16
|
isInstalledGlobally,
|
|
17
17
|
resolveEntry
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UNQ5DBLZ.js";
|
|
19
19
|
|
|
20
20
|
// node/cli.ts
|
|
21
|
-
import path from "node:path";
|
|
22
|
-
import os from "node:os";
|
|
23
21
|
import { exec } from "node:child_process";
|
|
24
|
-
import
|
|
22
|
+
import os from "node:os";
|
|
23
|
+
import path from "node:path";
|
|
25
24
|
import process from "node:process";
|
|
25
|
+
import * as readline from "node:readline";
|
|
26
|
+
import { verifyConfig } from "@slidev/parser";
|
|
27
|
+
import equal from "fast-deep-equal";
|
|
26
28
|
import fs from "fs-extra";
|
|
29
|
+
import { getPort } from "get-port-please";
|
|
30
|
+
import { blue, bold, cyan, dim, gray, green, underline, yellow } from "kolorist";
|
|
27
31
|
import openBrowser from "open";
|
|
28
32
|
import yargs from "yargs";
|
|
29
|
-
import { blue, bold, cyan, dim, gray, green, underline, yellow } from "kolorist";
|
|
30
|
-
import equal from "fast-deep-equal";
|
|
31
|
-
import { verifyConfig } from "@slidev/parser";
|
|
32
|
-
import { getPort } from "get-port-please";
|
|
33
33
|
|
|
34
34
|
// node/setups/preparser.ts
|
|
35
35
|
import { uniq } from "@antfu/utils";
|
|
@@ -60,7 +60,7 @@ var CONFIG_RESTART_FIELDS = [
|
|
|
60
60
|
"editor",
|
|
61
61
|
"theme"
|
|
62
62
|
];
|
|
63
|
-
var
|
|
63
|
+
var FILES_CREATE_RESTART = [
|
|
64
64
|
"global-bottom.vue",
|
|
65
65
|
"global-top.vue",
|
|
66
66
|
"uno.config.js",
|
|
@@ -68,7 +68,7 @@ var FILES_CREATE_RESTART_GLOBS = [
|
|
|
68
68
|
"unocss.config.js",
|
|
69
69
|
"unocss.config.ts"
|
|
70
70
|
];
|
|
71
|
-
var
|
|
71
|
+
var FILES_CHANGE_RESTART = [
|
|
72
72
|
"setup/shiki.ts",
|
|
73
73
|
"setup/katex.ts",
|
|
74
74
|
"setup/preparser.ts"
|
|
@@ -284,8 +284,8 @@ ${dim(" Public IP: ")} ${blue(publicIp)}
|
|
|
284
284
|
bindShortcut();
|
|
285
285
|
const { watch } = await import("chokidar");
|
|
286
286
|
const watcher = watch([
|
|
287
|
-
...
|
|
288
|
-
...
|
|
287
|
+
...FILES_CREATE_RESTART,
|
|
288
|
+
...FILES_CHANGE_RESTART
|
|
289
289
|
], {
|
|
290
290
|
ignored: ["node_modules", ".git"],
|
|
291
291
|
ignoreInitial: true
|
|
@@ -303,7 +303,7 @@ ${dim(" Public IP: ")} ${blue(publicIp)}
|
|
|
303
303
|
restartServer();
|
|
304
304
|
});
|
|
305
305
|
watcher.on("change", (file) => {
|
|
306
|
-
if (
|
|
306
|
+
if (FILES_CREATE_RESTART.includes(file))
|
|
307
307
|
return;
|
|
308
308
|
console.log(yellow(`
|
|
309
309
|
file ${file} changed, restarting...
|
|
@@ -334,7 +334,7 @@ cli.command(
|
|
|
334
334
|
}).strict().help(),
|
|
335
335
|
async (args) => {
|
|
336
336
|
const { entry, theme, base, download, out, inspect } = args;
|
|
337
|
-
const { build } = await import("./build-
|
|
337
|
+
const { build } = await import("./build-FMVKC2PV.js");
|
|
338
338
|
for (const entryFile of entry) {
|
|
339
339
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
340
340
|
if (download && !options.data.config.download)
|
|
@@ -414,7 +414,7 @@ cli.command(
|
|
|
414
414
|
(args) => exportOptions(commonOptions(args)).strict().help(),
|
|
415
415
|
async (args) => {
|
|
416
416
|
const { entry, theme } = args;
|
|
417
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
417
|
+
const { exportSlides, getExportOptions } = await import("./export-WMRLKOJP.js");
|
|
418
418
|
const port = await getPort(12445);
|
|
419
419
|
for (const entryFile of entry) {
|
|
420
420
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
@@ -463,7 +463,7 @@ cli.command(
|
|
|
463
463
|
timeout,
|
|
464
464
|
wait
|
|
465
465
|
}) => {
|
|
466
|
-
const { exportNotes } = await import("./export-
|
|
466
|
+
const { exportNotes } = await import("./export-WMRLKOJP.js");
|
|
467
467
|
const port = await getPort(12445);
|
|
468
468
|
for (const entryFile of entry) {
|
|
469
469
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRoots
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UNQ5DBLZ.js";
|
|
4
4
|
|
|
5
5
|
// node/commands/export.ts
|
|
6
|
-
import path from "node:path";
|
|
7
6
|
import { Buffer } from "node:buffer";
|
|
7
|
+
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
9
|
-
import fs from "fs-extra";
|
|
10
|
-
import { blue, cyan, dim, green, yellow } from "kolorist";
|
|
11
|
-
import { Presets, SingleBar } from "cli-progress";
|
|
12
9
|
import { clearUndefined, slash } from "@antfu/utils";
|
|
13
|
-
import { parseRangeString } from "@slidev/parser/core";
|
|
14
10
|
import { outlinePdfFactory } from "@lillallol/outline-pdf";
|
|
11
|
+
import { parseRangeString } from "@slidev/parser/core";
|
|
12
|
+
import { Presets, SingleBar } from "cli-progress";
|
|
13
|
+
import fs from "fs-extra";
|
|
14
|
+
import { blue, cyan, dim, green, yellow } from "kolorist";
|
|
15
|
+
import { resolve } from "mlly";
|
|
15
16
|
import * as pdfLib from "pdf-lib";
|
|
16
17
|
import { PDFDocument } from "pdf-lib";
|
|
17
|
-
import { resolve } from "mlly";
|
|
18
18
|
function addToTree(tree, info, slideIndexes, level = 1) {
|
|
19
19
|
const titleLevel = info.level;
|
|
20
20
|
if (titleLevel && titleLevel > level && tree.length > 0 && tree[tree.length - 1].titleLevel < titleLevel) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ResolvedSlidevOptions, SlidevPluginOptions, SlidevServerOptions, SlidevEntryOptions, ResolvedSlidevUtils } from '@slidev/types';
|
|
2
1
|
import * as vite from 'vite';
|
|
3
|
-
import {
|
|
2
|
+
import { InlineConfig, PluginOption } from 'vite';
|
|
3
|
+
import { ResolvedSlidevOptions, SlidevServerOptions, SlidevEntryOptions, ResolvedSlidevUtils, SlidevPluginOptions } from '@slidev/types';
|
|
4
4
|
import * as fs from '@slidev/parser/fs';
|
|
5
5
|
export { fs as parser };
|
|
6
6
|
|
|
7
|
-
declare function ViteSlidevPlugin(options: ResolvedSlidevOptions, pluginOptions?: SlidevPluginOptions, serverOptions?: SlidevServerOptions): Promise<PluginOption[]>;
|
|
8
|
-
|
|
9
7
|
declare function createServer(options: ResolvedSlidevOptions, viteConfig?: InlineConfig, serverOptions?: SlidevServerOptions): Promise<vite.ViteDevServer>;
|
|
10
8
|
|
|
11
9
|
declare function resolveOptions(entryOptions: SlidevEntryOptions, mode: ResolvedSlidevOptions['mode']): Promise<ResolvedSlidevOptions>;
|
|
12
10
|
declare function createDataUtils(resolved: Omit<ResolvedSlidevOptions, 'utils'>): Promise<ResolvedSlidevUtils>;
|
|
13
11
|
|
|
12
|
+
declare function ViteSlidevPlugin(options: ResolvedSlidevOptions, pluginOptions?: SlidevPluginOptions, serverOptions?: SlidevServerOptions): Promise<PluginOption[]>;
|
|
13
|
+
|
|
14
14
|
export { ViteSlidevPlugin, createDataUtils, createServer, resolveOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6GC5ATZB.js";
|
|
4
4
|
import {
|
|
5
5
|
ViteSlidevPlugin,
|
|
6
6
|
createDataUtils,
|
|
7
7
|
parser,
|
|
8
8
|
resolveOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6O4GDZ4B.js";
|
|
10
10
|
import "./chunk-6DS3IPOB.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-UNQ5DBLZ.js";
|
|
12
12
|
export {
|
|
13
13
|
ViteSlidevPlugin,
|
|
14
14
|
createDataUtils,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.50.0-beta.1",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@antfu/ni": "^0.
|
|
45
|
+
"@antfu/ni": "^0.23.0",
|
|
46
46
|
"@antfu/utils": "^0.7.10",
|
|
47
|
-
"@iconify-json/carbon": "^1.1
|
|
48
|
-
"@iconify-json/ph": "^1.
|
|
49
|
-
"@iconify-json/svg-spinners": "^1.
|
|
47
|
+
"@iconify-json/carbon": "^1.2.1",
|
|
48
|
+
"@iconify-json/ph": "^1.2.0",
|
|
49
|
+
"@iconify-json/svg-spinners": "^1.2.0",
|
|
50
50
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
51
|
-
"@shikijs/markdown-it": "^1.
|
|
52
|
-
"@shikijs/twoslash": "^1.
|
|
53
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
54
|
-
"@unocss/extractor-mdc": "^0.62.
|
|
55
|
-
"@unocss/reset": "^0.62.
|
|
56
|
-
"@vitejs/plugin-vue": "^5.1.
|
|
51
|
+
"@shikijs/markdown-it": "^1.20.0",
|
|
52
|
+
"@shikijs/twoslash": "^1.20.0",
|
|
53
|
+
"@shikijs/vitepress-twoslash": "^1.20.0",
|
|
54
|
+
"@unocss/extractor-mdc": "^0.62.4",
|
|
55
|
+
"@unocss/reset": "^0.62.4",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
57
57
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
58
|
-
"chokidar": "^
|
|
58
|
+
"chokidar": "^4.0.1",
|
|
59
59
|
"cli-progress": "^3.12.0",
|
|
60
60
|
"connect": "^3.7.0",
|
|
61
|
-
"debug": "^4.3.
|
|
61
|
+
"debug": "^4.3.7",
|
|
62
62
|
"fast-deep-equal": "^3.1.3",
|
|
63
63
|
"fast-glob": "^3.3.2",
|
|
64
64
|
"fs-extra": "^11.2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"global-directory": "^4.0.1",
|
|
67
67
|
"htmlparser2": "^9.1.0",
|
|
68
68
|
"is-installed-globally": "^1.0.0",
|
|
69
|
-
"jiti": "^
|
|
69
|
+
"jiti": "^2.0.0",
|
|
70
70
|
"katex": "^0.16.11",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
72
|
"local-pkg": "^0.5.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"markdown-it-mdc": "^0.2.5",
|
|
79
79
|
"micromatch": "^4.0.8",
|
|
80
80
|
"mlly": "^1.7.1",
|
|
81
|
-
"monaco-editor": "^0.
|
|
81
|
+
"monaco-editor": "^0.52.0",
|
|
82
82
|
"open": "^10.1.0",
|
|
83
83
|
"pdf-lib": "^1.17.1",
|
|
84
84
|
"plantuml-encoder": "^1.4.0",
|
|
@@ -90,29 +90,29 @@
|
|
|
90
90
|
"resolve-from": "^5.0.0",
|
|
91
91
|
"resolve-global": "^2.0.0",
|
|
92
92
|
"semver": "^7.6.3",
|
|
93
|
-
"shiki": "^1.
|
|
93
|
+
"shiki": "^1.20.0",
|
|
94
94
|
"shiki-magic-move": "^0.4.4",
|
|
95
95
|
"sirv": "^2.0.4",
|
|
96
|
-
"source-map-js": "^1.2.
|
|
97
|
-
"typescript": "^5.
|
|
98
|
-
"unocss": "^0.62.
|
|
99
|
-
"unplugin-icons": "^0.19.
|
|
96
|
+
"source-map-js": "^1.2.1",
|
|
97
|
+
"typescript": "^5.6.2",
|
|
98
|
+
"unocss": "^0.62.4",
|
|
99
|
+
"unplugin-icons": "^0.19.3",
|
|
100
100
|
"unplugin-vue-components": "^0.27.4",
|
|
101
101
|
"unplugin-vue-markdown": "^0.26.2",
|
|
102
102
|
"untun": "^0.1.3",
|
|
103
103
|
"uqr": "^0.1.2",
|
|
104
|
-
"vite": "^5.4.
|
|
104
|
+
"vite": "^5.4.8",
|
|
105
105
|
"vite-plugin-inspect": "^0.8.7",
|
|
106
106
|
"vite-plugin-remote-assets": "^0.5.0",
|
|
107
107
|
"vite-plugin-static-copy": "^1.0.6",
|
|
108
108
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
109
|
-
"vitefu": "^1.0.
|
|
110
|
-
"vue": "^3.
|
|
111
|
-
"yaml": "^2.5.
|
|
109
|
+
"vitefu": "^1.0.2",
|
|
110
|
+
"vue": "^3.5.9",
|
|
111
|
+
"yaml": "^2.5.1",
|
|
112
112
|
"yargs": "^17.7.2",
|
|
113
|
-
"@slidev/client": "0.
|
|
114
|
-
"@slidev/parser": "0.
|
|
115
|
-
"@slidev/types": "0.
|
|
113
|
+
"@slidev/client": "0.50.0-beta.1",
|
|
114
|
+
"@slidev/parser": "0.50.0-beta.1",
|
|
115
|
+
"@slidev/types": "0.50.0-beta.1"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
118
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// node/resolver.ts
|
|
2
|
-
import { dirname, join, relative, resolve } from "node:path";
|
|
3
2
|
import * as fs from "node:fs";
|
|
3
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { parseNi, run } from "@antfu/ni";
|
|
6
7
|
import { ensurePrefix, slash } from "@antfu/utils";
|
|
7
|
-
import { resolveGlobal } from "resolve-global";
|
|
8
|
-
import { findClosestPkgJsonPath, findDepPkgJsonPath } from "vitefu";
|
|
9
|
-
import { resolvePath } from "mlly";
|
|
10
8
|
import globalDirs from "global-directory";
|
|
11
|
-
import prompts from "prompts";
|
|
12
|
-
import { parseNi, run } from "@antfu/ni";
|
|
13
9
|
import { underline, yellow } from "kolorist";
|
|
10
|
+
import { resolvePath } from "mlly";
|
|
11
|
+
import prompts from "prompts";
|
|
12
|
+
import { resolveGlobal } from "resolve-global";
|
|
13
|
+
import { findClosestPkgJsonPath, findDepPkgJsonPath } from "vitefu";
|
|
14
14
|
var cliRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
15
15
|
var isInstalledGlobally = {};
|
|
16
16
|
async function resolveImportUrl(id) {
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// node/syntax/markdown-it/markdown-it-prism.ts
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
|
+
import * as htmlparser2 from "htmlparser2";
|
|
7
8
|
import Prism from "prismjs";
|
|
8
9
|
import loadLanguages from "prismjs/components/index.js";
|
|
9
|
-
import * as htmlparser2 from "htmlparser2";
|
|
10
10
|
var require2 = createRequire(import.meta.url);
|
|
11
11
|
var Tag = class {
|
|
12
12
|
tagname;
|