@slidev/cli 0.42.8 → 0.42.10
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-6GVZNR3H.mjs → build-4XPJ27UV.mjs} +1 -1
- package/dist/{build-5C3436OE.js → build-E5AQPKXP.js} +5 -5
- package/dist/{chunk-REQPWSOF.mjs → chunk-B54ZYWFO.mjs} +10 -10
- package/dist/{chunk-3YS3H6FW.js → chunk-BFOSXE34.js} +14 -14
- package/dist/{chunk-3UUV7IFA.js → chunk-C6JRFTBY.js} +10 -8
- package/dist/{chunk-GZGDDQJD.mjs → chunk-XNFJHVPK.mjs} +10 -8
- package/dist/cli.js +27 -27
- package/dist/cli.mjs +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +12 -12
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkC6JRFTBYjs = require('./chunk-C6JRFTBY.js');
|
|
6
6
|
require('./chunk-KKGXM3XL.js');
|
|
7
7
|
require('./chunk-34SGGZ4P.js');
|
|
8
8
|
require('./chunk-QDKRARRU.js');
|
|
@@ -651,16 +651,16 @@ async function build(options, viteConfig = {}, args) {
|
|
|
651
651
|
let originalIndexHTML;
|
|
652
652
|
if (_fsextra2.default.existsSync(indexPath))
|
|
653
653
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
654
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
654
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkC6JRFTBYjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
655
655
|
let config = void 0;
|
|
656
656
|
try {
|
|
657
|
-
const inlineConfig = await
|
|
657
|
+
const inlineConfig = await _chunkC6JRFTBYjs.mergeViteConfigs.call(void 0,
|
|
658
658
|
options,
|
|
659
659
|
viteConfig,
|
|
660
660
|
{
|
|
661
661
|
root: options.userRoot,
|
|
662
662
|
plugins: [
|
|
663
|
-
await
|
|
663
|
+
await _chunkC6JRFTBYjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
664
664
|
{
|
|
665
665
|
name: "resolve-config",
|
|
666
666
|
configResolved(_config) {
|
|
@@ -681,7 +681,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
681
681
|
} else {
|
|
682
682
|
console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
|
|
683
683
|
await _vite.build.call(void 0,
|
|
684
|
-
await
|
|
684
|
+
await _chunkC6JRFTBYjs.mergeViteConfigs.call(void 0,
|
|
685
685
|
options,
|
|
686
686
|
inlineConfig,
|
|
687
687
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XNFJHVPK.mjs";
|
|
5
5
|
import {
|
|
6
6
|
packageExists,
|
|
7
7
|
resolveImportPath
|
|
@@ -2523,31 +2523,31 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2523
2523
|
import * as parser from "@slidev/parser/fs";
|
|
2524
2524
|
|
|
2525
2525
|
// package.json
|
|
2526
|
-
var version = "0.42.
|
|
2526
|
+
var version = "0.42.10";
|
|
2527
2527
|
|
|
2528
2528
|
// node/themes.ts
|
|
2529
2529
|
import prompts2 from "prompts";
|
|
2530
2530
|
|
|
2531
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.21.
|
|
2531
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.21.6/node_modules/@antfu/ni/dist/shared/ni.add7487c.mjs
|
|
2532
|
+
import fs$1, { promises, createWriteStream, createReadStream, existsSync } from "fs";
|
|
2532
2533
|
import path$3, { join as join$1, dirname, resolve } from "path";
|
|
2533
2534
|
import process$2 from "process";
|
|
2534
|
-
import
|
|
2535
|
-
import require$$2 from "events";
|
|
2535
|
+
import url, { fileURLToPath } from "url";
|
|
2536
2536
|
import { Buffer as Buffer$1 } from "buffer";
|
|
2537
2537
|
import childProcess, { ChildProcess } from "child_process";
|
|
2538
2538
|
import require$$0$2 from "child_process";
|
|
2539
2539
|
import require$$0$1 from "path";
|
|
2540
2540
|
import require$$0 from "fs";
|
|
2541
|
-
import url, { fileURLToPath } from "url";
|
|
2542
2541
|
import os$1, { constants } from "os";
|
|
2543
2542
|
import require$$0$3 from "assert";
|
|
2544
|
-
import
|
|
2543
|
+
import require$$2 from "events";
|
|
2545
2544
|
import require$$0$5 from "buffer";
|
|
2546
2545
|
import require$$0$4 from "stream";
|
|
2547
2546
|
import require$$2$1 from "util";
|
|
2548
2547
|
import { debuglog } from "util";
|
|
2549
2548
|
import require$$0$6 from "os";
|
|
2550
2549
|
import require$$1 from "tty";
|
|
2550
|
+
import require$$0$7 from "readline";
|
|
2551
2551
|
function npmRun(agent) {
|
|
2552
2552
|
return (args) => {
|
|
2553
2553
|
if (args.length > 1)
|
|
@@ -2589,8 +2589,8 @@ var bun = {
|
|
|
2589
2589
|
"frozen": "bun install --no-save",
|
|
2590
2590
|
"global": "bun add -g {0}",
|
|
2591
2591
|
"add": "bun add {0}",
|
|
2592
|
-
"upgrade":
|
|
2593
|
-
"upgrade-interactive":
|
|
2592
|
+
"upgrade": "bun update {0}",
|
|
2593
|
+
"upgrade-interactive": "bun update {0}",
|
|
2594
2594
|
"execute": "bunx {0}",
|
|
2595
2595
|
"uninstall": "bun remove {0}",
|
|
2596
2596
|
"global_uninstall": "bun remove -g {0}"
|
|
@@ -7531,7 +7531,7 @@ function init(open, close) {
|
|
|
7531
7531
|
return txt === void 0 ? chain([open], [blk]) : $.enabled ? run$1([blk], txt + "") : txt + "";
|
|
7532
7532
|
};
|
|
7533
7533
|
}
|
|
7534
|
-
var version2 = "0.21.
|
|
7534
|
+
var version2 = "0.21.6";
|
|
7535
7535
|
var DEBUG_SIGN = "?";
|
|
7536
7536
|
async function getCliCommand(fn, args, options = {}, cwd = options.cwd ?? process$2.cwd()) {
|
|
7537
7537
|
const isGlobal = args.includes("-g");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkC6JRFTBYjs = require('./chunk-C6JRFTBY.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -2500,7 +2500,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2500
2500
|
const pluginOptions = rawConfig.slidev || {};
|
|
2501
2501
|
_process2.default.env.EDITOR = _process2.default.env.EDITOR || "code";
|
|
2502
2502
|
const server = await _vite.createServer.call(void 0,
|
|
2503
|
-
await
|
|
2503
|
+
await _chunkC6JRFTBYjs.mergeViteConfigs.call(void 0,
|
|
2504
2504
|
options,
|
|
2505
2505
|
viteConfig,
|
|
2506
2506
|
{
|
|
@@ -2510,7 +2510,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2510
2510
|
]
|
|
2511
2511
|
},
|
|
2512
2512
|
plugins: [
|
|
2513
|
-
await
|
|
2513
|
+
await _chunkC6JRFTBYjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
2514
2514
|
]
|
|
2515
2515
|
},
|
|
2516
2516
|
"serve"
|
|
@@ -2523,31 +2523,31 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2523
2523
|
var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
|
|
2524
2524
|
|
|
2525
2525
|
// package.json
|
|
2526
|
-
var version = "0.42.
|
|
2526
|
+
var version = "0.42.10";
|
|
2527
2527
|
|
|
2528
2528
|
// node/themes.ts
|
|
2529
2529
|
var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
|
|
2530
2530
|
|
|
2531
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.21.
|
|
2531
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.21.6/node_modules/@antfu/ni/dist/shared/ni.add7487c.mjs
|
|
2532
|
+
var _fs2 = require('fs'); var _fs3 = _interopRequireDefault(_fs2);
|
|
2532
2533
|
|
|
2533
2534
|
|
|
2534
|
-
var
|
|
2535
|
-
var _events = require('events'); var _events2 = _interopRequireDefault(_events);
|
|
2535
|
+
var _url = require('url'); var _url2 = _interopRequireDefault(_url);
|
|
2536
2536
|
var _buffer = require('buffer'); var _buffer2 = _interopRequireDefault(_buffer);
|
|
2537
2537
|
var _child_process = require('child_process'); var _child_process2 = _interopRequireDefault(_child_process);
|
|
2538
2538
|
|
|
2539
2539
|
|
|
2540
|
-
|
|
2541
|
-
var _url = require('url'); var _url2 = _interopRequireDefault(_url);
|
|
2540
|
+
|
|
2542
2541
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
2543
2542
|
var _assert = require('assert'); var _assert2 = _interopRequireDefault(_assert);
|
|
2544
|
-
|
|
2543
|
+
var _events = require('events'); var _events2 = _interopRequireDefault(_events);
|
|
2545
2544
|
|
|
2546
2545
|
var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
|
|
2547
2546
|
var _util = require('util'); var _util2 = _interopRequireDefault(_util);
|
|
2548
2547
|
|
|
2549
2548
|
|
|
2550
2549
|
var _tty = require('tty'); var _tty2 = _interopRequireDefault(_tty);
|
|
2550
|
+
var _readline = require('readline'); var _readline2 = _interopRequireDefault(_readline);
|
|
2551
2551
|
function npmRun(agent) {
|
|
2552
2552
|
return (args) => {
|
|
2553
2553
|
if (args.length > 1)
|
|
@@ -2589,8 +2589,8 @@ var bun = {
|
|
|
2589
2589
|
"frozen": "bun install --no-save",
|
|
2590
2590
|
"global": "bun add -g {0}",
|
|
2591
2591
|
"add": "bun add {0}",
|
|
2592
|
-
"upgrade":
|
|
2593
|
-
"upgrade-interactive":
|
|
2592
|
+
"upgrade": "bun update {0}",
|
|
2593
|
+
"upgrade-interactive": "bun update {0}",
|
|
2594
2594
|
"execute": "bunx {0}",
|
|
2595
2595
|
"uninstall": "bun remove {0}",
|
|
2596
2596
|
"global_uninstall": "bun remove -g {0}"
|
|
@@ -7531,7 +7531,7 @@ function init(open, close) {
|
|
|
7531
7531
|
return txt === void 0 ? chain([open], [blk]) : $.enabled ? run$1([blk], txt + "") : txt + "";
|
|
7532
7532
|
};
|
|
7533
7533
|
}
|
|
7534
|
-
var version2 = "0.21.
|
|
7534
|
+
var version2 = "0.21.6";
|
|
7535
7535
|
var DEBUG_SIGN = "?";
|
|
7536
7536
|
async function getCliCommand(fn, args, options = {}, cwd = _nullishCoalesce(options.cwd, () => ( _process2.default.cwd()))) {
|
|
7537
7537
|
const isGlobal = args.includes("-g");
|
|
@@ -7594,7 +7594,7 @@ async function run(fn, args, options = {}) {
|
|
|
7594
7594
|
await execaCommand(command, { stdio: "inherit", encoding: "utf-8", cwd });
|
|
7595
7595
|
}
|
|
7596
7596
|
|
|
7597
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.21.
|
|
7597
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.21.6/node_modules/@antfu/ni/dist/index.mjs
|
|
7598
7598
|
|
|
7599
7599
|
|
|
7600
7600
|
|
|
@@ -187,26 +187,26 @@ var dependencies = {
|
|
|
187
187
|
"@antfu/utils": "^0.7.6",
|
|
188
188
|
"@slidev/parser": "workspace:*",
|
|
189
189
|
"@slidev/types": "workspace:*",
|
|
190
|
-
"@unocss/reset": "^0.55.
|
|
191
|
-
"@vueuse/core": "^10.
|
|
190
|
+
"@unocss/reset": "^0.55.3",
|
|
191
|
+
"@vueuse/core": "^10.4.0",
|
|
192
192
|
"@vueuse/head": "^1.3.1",
|
|
193
|
-
"@vueuse/math": "^10.
|
|
193
|
+
"@vueuse/math": "^10.4.0",
|
|
194
194
|
"@vueuse/motion": "^2.0.0",
|
|
195
195
|
codemirror: "^5.65.5",
|
|
196
196
|
defu: "^6.1.2",
|
|
197
|
-
drauu: "^0.3.
|
|
197
|
+
drauu: "^0.3.4",
|
|
198
198
|
"file-saver": "^2.0.5",
|
|
199
199
|
"fuse.js": "^6.6.2",
|
|
200
200
|
"js-base64": "^3.7.5",
|
|
201
201
|
"js-yaml": "^4.1.0",
|
|
202
202
|
katex: "^0.16.8",
|
|
203
|
-
mermaid: "^10.
|
|
203
|
+
mermaid: "^10.4.0",
|
|
204
204
|
"monaco-editor": "^0.37.1",
|
|
205
205
|
nanoid: "^4.0.2",
|
|
206
206
|
prettier: "^3.0.2",
|
|
207
207
|
recordrtc: "^5.6.2",
|
|
208
208
|
resolve: "^1.22.4",
|
|
209
|
-
unocss: "^0.55.
|
|
209
|
+
unocss: "^0.55.3",
|
|
210
210
|
"vite-plugin-windicss": "^1.9.1",
|
|
211
211
|
vue: "^3.3.4",
|
|
212
212
|
"vue-router": "^4.2.4",
|
|
@@ -500,7 +500,8 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
500
500
|
return md2;
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
|
-
} catch (
|
|
503
|
+
} catch (e) {
|
|
504
|
+
console.error("[Slidev] failed to send HMR", e);
|
|
504
505
|
}
|
|
505
506
|
})
|
|
506
507
|
)).flatMap((i) => i || []);
|
|
@@ -1323,6 +1324,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1323
1324
|
}
|
|
1324
1325
|
const KatexOptions = await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "katex.ts", {}, { strict: false }, false);
|
|
1325
1326
|
return _vite8.default.call(void 0, {
|
|
1327
|
+
include: [/\.md$/],
|
|
1326
1328
|
wrapperClasses: "",
|
|
1327
1329
|
headEnabled: false,
|
|
1328
1330
|
frontmatter: false,
|
|
@@ -1632,7 +1634,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1632
1634
|
dest: "theme"
|
|
1633
1635
|
}))
|
|
1634
1636
|
})) : null,
|
|
1635
|
-
options.inspect ? Promise.resolve().then(() => require("vite-plugin-inspect")).then((r) => r.default({
|
|
1637
|
+
options.inspect ? Promise.resolve().then(() => require("vite-plugin-inspect")).then((r) => (r.default || r)({
|
|
1636
1638
|
dev: true,
|
|
1637
1639
|
build: true
|
|
1638
1640
|
})) : null,
|
|
@@ -187,26 +187,26 @@ var dependencies = {
|
|
|
187
187
|
"@antfu/utils": "^0.7.6",
|
|
188
188
|
"@slidev/parser": "workspace:*",
|
|
189
189
|
"@slidev/types": "workspace:*",
|
|
190
|
-
"@unocss/reset": "^0.55.
|
|
191
|
-
"@vueuse/core": "^10.
|
|
190
|
+
"@unocss/reset": "^0.55.3",
|
|
191
|
+
"@vueuse/core": "^10.4.0",
|
|
192
192
|
"@vueuse/head": "^1.3.1",
|
|
193
|
-
"@vueuse/math": "^10.
|
|
193
|
+
"@vueuse/math": "^10.4.0",
|
|
194
194
|
"@vueuse/motion": "^2.0.0",
|
|
195
195
|
codemirror: "^5.65.5",
|
|
196
196
|
defu: "^6.1.2",
|
|
197
|
-
drauu: "^0.3.
|
|
197
|
+
drauu: "^0.3.4",
|
|
198
198
|
"file-saver": "^2.0.5",
|
|
199
199
|
"fuse.js": "^6.6.2",
|
|
200
200
|
"js-base64": "^3.7.5",
|
|
201
201
|
"js-yaml": "^4.1.0",
|
|
202
202
|
katex: "^0.16.8",
|
|
203
|
-
mermaid: "^10.
|
|
203
|
+
mermaid: "^10.4.0",
|
|
204
204
|
"monaco-editor": "^0.37.1",
|
|
205
205
|
nanoid: "^4.0.2",
|
|
206
206
|
prettier: "^3.0.2",
|
|
207
207
|
recordrtc: "^5.6.2",
|
|
208
208
|
resolve: "^1.22.4",
|
|
209
|
-
unocss: "^0.55.
|
|
209
|
+
unocss: "^0.55.3",
|
|
210
210
|
"vite-plugin-windicss": "^1.9.1",
|
|
211
211
|
vue: "^3.3.4",
|
|
212
212
|
"vue-router": "^4.2.4",
|
|
@@ -500,7 +500,8 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
500
500
|
return md2;
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
|
-
} catch {
|
|
503
|
+
} catch (e) {
|
|
504
|
+
console.error("[Slidev] failed to send HMR", e);
|
|
504
505
|
}
|
|
505
506
|
})
|
|
506
507
|
)).flatMap((i) => i || []);
|
|
@@ -1323,6 +1324,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1323
1324
|
}
|
|
1324
1325
|
const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1325
1326
|
return Markdown2({
|
|
1327
|
+
include: [/\.md$/],
|
|
1326
1328
|
wrapperClasses: "",
|
|
1327
1329
|
headEnabled: false,
|
|
1328
1330
|
frontmatter: false,
|
|
@@ -1632,7 +1634,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1632
1634
|
dest: "theme"
|
|
1633
1635
|
}))
|
|
1634
1636
|
})) : null,
|
|
1635
|
-
options.inspect ? import("vite-plugin-inspect").then((r) => r.default({
|
|
1637
|
+
options.inspect ? import("vite-plugin-inspect").then((r) => (r.default || r)({
|
|
1636
1638
|
dev: true,
|
|
1637
1639
|
build: true
|
|
1638
1640
|
})) : null,
|
package/dist/cli.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkBFOSXE34js = require('./chunk-BFOSXE34.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkC6JRFTBYjs = require('./chunk-C6JRFTBY.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
|
|
@@ -22,7 +22,7 @@ require('./chunk-34SGGZ4P.js');
|
|
|
22
22
|
var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
|
|
23
23
|
|
|
24
24
|
// node/cli.ts
|
|
25
|
-
var import_fast_deep_equal = _chunkQDKRARRUjs.__toESM.call(void 0,
|
|
25
|
+
var import_fast_deep_equal = _chunkQDKRARRUjs.__toESM.call(void 0, _chunkC6JRFTBYjs.require_fast_deep_equal.call(void 0, ));
|
|
26
26
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
27
27
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
28
28
|
var _child_process = require('child_process');
|
|
@@ -49,15 +49,15 @@ _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) =>
|
|
|
49
49
|
const roots = (
|
|
50
50
|
/* uniq */
|
|
51
51
|
[
|
|
52
|
-
|
|
53
|
-
...
|
|
54
|
-
|
|
52
|
+
_chunkBFOSXE34js.getUserRoot.call(void 0, {}).userRoot,
|
|
53
|
+
..._chunkBFOSXE34js.getAddonRoots.call(void 0, addons, ""),
|
|
54
|
+
_chunkBFOSXE34js.getClientRoot.call(void 0, )
|
|
55
55
|
]
|
|
56
56
|
);
|
|
57
57
|
const mergeArrays = (a, b) => a.concat(b);
|
|
58
58
|
return await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], false, mergeArrays);
|
|
59
59
|
});
|
|
60
|
-
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(
|
|
60
|
+
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkBFOSXE34js.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
|
|
61
61
|
cli.command(
|
|
62
62
|
"* [entry]",
|
|
63
63
|
"Start a local server for Slidev",
|
|
@@ -113,9 +113,9 @@ cli.command(
|
|
|
113
113
|
async function initServer() {
|
|
114
114
|
if (server)
|
|
115
115
|
await server.close();
|
|
116
|
-
const options = await
|
|
116
|
+
const options = await _chunkBFOSXE34js.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
|
|
117
117
|
port = userPort || await findFreePort(3030);
|
|
118
|
-
server = await
|
|
118
|
+
server = await _chunkBFOSXE34js.createServer.call(void 0,
|
|
119
119
|
options,
|
|
120
120
|
{
|
|
121
121
|
server: {
|
|
@@ -129,7 +129,7 @@ cli.command(
|
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
onDataReload(newData, data) {
|
|
132
|
-
if (!theme &&
|
|
132
|
+
if (!theme && _chunkBFOSXE34js.resolveThemeName.call(void 0, newData.config.theme) !== _chunkBFOSXE34js.resolveThemeName.call(void 0, data.config.theme)) {
|
|
133
133
|
console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
|
|
134
134
|
initServer();
|
|
135
135
|
} else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
|
|
@@ -258,9 +258,9 @@ cli.command(
|
|
|
258
258
|
}).strict().help(),
|
|
259
259
|
async (args) => {
|
|
260
260
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
261
|
-
const { build } = await Promise.resolve().then(() => require("./build-
|
|
261
|
+
const { build } = await Promise.resolve().then(() => require("./build-E5AQPKXP.js"));
|
|
262
262
|
for (const entryFile of entry) {
|
|
263
|
-
const options = await
|
|
263
|
+
const options = await _chunkBFOSXE34js.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
|
|
264
264
|
if (download && !options.data.config.download)
|
|
265
265
|
options.data.config.download = download;
|
|
266
266
|
printInfo(options);
|
|
@@ -280,9 +280,9 @@ cli.command(
|
|
|
280
280
|
(args) => commonOptions(args).strict().help(),
|
|
281
281
|
async ({ entry }) => {
|
|
282
282
|
for (const entryFile of entry) {
|
|
283
|
-
const data = await
|
|
284
|
-
|
|
285
|
-
await
|
|
283
|
+
const data = await _chunkBFOSXE34js.parser.load(entryFile);
|
|
284
|
+
_chunkBFOSXE34js.parser.prettify(data);
|
|
285
|
+
await _chunkBFOSXE34js.parser.save(data);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
);
|
|
@@ -298,17 +298,17 @@ cli.command(
|
|
|
298
298
|
default: "theme"
|
|
299
299
|
}),
|
|
300
300
|
async ({ entry, dir, theme: themeInput }) => {
|
|
301
|
-
const data = await
|
|
302
|
-
const theme =
|
|
301
|
+
const data = await _chunkBFOSXE34js.parser.load(entry);
|
|
302
|
+
const theme = _chunkBFOSXE34js.resolveThemeName.call(void 0, themeInput || data.config.theme);
|
|
303
303
|
if (theme === "none") {
|
|
304
304
|
console.error('Cannot eject theme "none"');
|
|
305
305
|
_process2.default.exit(1);
|
|
306
306
|
}
|
|
307
|
-
if (
|
|
307
|
+
if (_chunkBFOSXE34js.isPath.call(void 0, theme)) {
|
|
308
308
|
console.error("Theme is already ejected");
|
|
309
309
|
_process2.default.exit(1);
|
|
310
310
|
}
|
|
311
|
-
const roots =
|
|
311
|
+
const roots = _chunkBFOSXE34js.getThemeRoots.call(void 0, theme, entry);
|
|
312
312
|
if (!roots.length) {
|
|
313
313
|
console.error(`Could not find theme "${theme}"`);
|
|
314
314
|
_process2.default.exit(1);
|
|
@@ -320,7 +320,7 @@ cli.command(
|
|
|
320
320
|
const dirPath = `./${dir}`;
|
|
321
321
|
data.slides[0].frontmatter.theme = dirPath;
|
|
322
322
|
data.slides[0].raw = null;
|
|
323
|
-
await
|
|
323
|
+
await _chunkBFOSXE34js.parser.save(data);
|
|
324
324
|
console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
|
|
325
325
|
}
|
|
326
326
|
);
|
|
@@ -340,8 +340,8 @@ cli.command(
|
|
|
340
340
|
const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-BGMCS4F2.js"));
|
|
341
341
|
const port = await findFreePort(12445);
|
|
342
342
|
for (const entryFile of entry) {
|
|
343
|
-
const options = await
|
|
344
|
-
const server = await
|
|
343
|
+
const options = await _chunkBFOSXE34js.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
|
|
344
|
+
const server = await _chunkBFOSXE34js.createServer.call(void 0,
|
|
345
345
|
options,
|
|
346
346
|
{
|
|
347
347
|
server: { port },
|
|
@@ -350,7 +350,7 @@ cli.command(
|
|
|
350
350
|
);
|
|
351
351
|
await server.listen(port);
|
|
352
352
|
printInfo(options);
|
|
353
|
-
|
|
353
|
+
_chunkBFOSXE34js.parser.filterDisabled(options.data);
|
|
354
354
|
const result = await exportSlides({
|
|
355
355
|
port,
|
|
356
356
|
...getExportOptions({ ...args, entry: entryFile }, options)
|
|
@@ -386,8 +386,8 @@ cli.command(
|
|
|
386
386
|
const { exportNotes } = await Promise.resolve().then(() => require("./export-BGMCS4F2.js"));
|
|
387
387
|
const port = await findFreePort(12445);
|
|
388
388
|
for (const entryFile of entry) {
|
|
389
|
-
const options = await
|
|
390
|
-
const server = await
|
|
389
|
+
const options = await _chunkBFOSXE34js.resolveOptions.call(void 0, { entry: entryFile }, "export");
|
|
390
|
+
const server = await _chunkBFOSXE34js.createServer.call(void 0,
|
|
391
391
|
options,
|
|
392
392
|
{
|
|
393
393
|
server: { port },
|
|
@@ -396,7 +396,7 @@ cli.command(
|
|
|
396
396
|
);
|
|
397
397
|
await server.listen(port);
|
|
398
398
|
printInfo(options);
|
|
399
|
-
|
|
399
|
+
_chunkBFOSXE34js.parser.filterDisabled(options.data);
|
|
400
400
|
const result = await exportNotes({
|
|
401
401
|
port,
|
|
402
402
|
output: output || (options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entryFile, ".md")}-export-notes`),
|
|
@@ -457,7 +457,7 @@ function printInfo(options, port, remote, tunnelUrl) {
|
|
|
457
457
|
console.log();
|
|
458
458
|
console.log();
|
|
459
459
|
console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
|
|
460
|
-
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${
|
|
460
|
+
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkBFOSXE34js.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
|
|
461
461
|
console.log();
|
|
462
462
|
_parser.verifyConfig.call(void 0, options.data.config, options.data.themeMeta, (v) => console.warn(_kolorist.yellow.call(void 0, ` ! ${v}`)));
|
|
463
463
|
console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
|
package/dist/cli.mjs
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveThemeName,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B54ZYWFO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
require_fast_deep_equal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XNFJHVPK.mjs";
|
|
16
16
|
import {
|
|
17
17
|
loadSetups
|
|
18
18
|
} from "./chunk-6XVZLT3I.mjs";
|
|
@@ -258,7 +258,7 @@ cli.command(
|
|
|
258
258
|
}).strict().help(),
|
|
259
259
|
async (args) => {
|
|
260
260
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
261
|
-
const { build } = await import("./build-
|
|
261
|
+
const { build } = await import("./build-4XPJ27UV.mjs");
|
|
262
262
|
for (const entryFile of entry) {
|
|
263
263
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
264
264
|
if (download && !options.data.config.download)
|
package/dist/index.js
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkBFOSXE34js = require('./chunk-BFOSXE34.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkRSZHGGR3js = require('./chunk-RSZHGGR3.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkC6JRFTBYjs = require('./chunk-C6JRFTBY.js');
|
|
19
19
|
require('./chunk-KKGXM3XL.js');
|
|
20
20
|
require('./chunk-34SGGZ4P.js');
|
|
21
21
|
require('./chunk-QDKRARRU.js');
|
|
@@ -32,4 +32,4 @@ require('./chunk-QDKRARRU.js');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
exports.ViteSlidevPlugin =
|
|
35
|
+
exports.ViteSlidevPlugin = _chunkC6JRFTBYjs.ViteSlidevPlugin; exports.createServer = _chunkBFOSXE34js.createServer; exports.createWindiCSSPlugin = _chunkRSZHGGR3js.createWindiCSSPlugin; exports.getAddonRoots = _chunkBFOSXE34js.getAddonRoots; exports.getCLIRoot = _chunkBFOSXE34js.getCLIRoot; exports.getClientRoot = _chunkBFOSXE34js.getClientRoot; exports.getRoot = _chunkBFOSXE34js.getRoot; exports.getThemeRoots = _chunkBFOSXE34js.getThemeRoots; exports.getUserRoot = _chunkBFOSXE34js.getUserRoot; exports.isPath = _chunkBFOSXE34js.isPath; exports.parser = _chunkBFOSXE34js.parser; exports.resolveOptions = _chunkBFOSXE34js.resolveOptions;
|
package/dist/index.mjs
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
isPath,
|
|
10
10
|
parser,
|
|
11
11
|
resolveOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B54ZYWFO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
createWindiCSSPlugin
|
|
15
15
|
} from "./chunk-VPD6PH2L.mjs";
|
|
16
16
|
import {
|
|
17
17
|
ViteSlidevPlugin
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XNFJHVPK.mjs";
|
|
19
19
|
import "./chunk-6XVZLT3I.mjs";
|
|
20
20
|
import "./chunk-MZBIET7Y.mjs";
|
|
21
21
|
import "./chunk-KB3DQ2OE.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.10",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@antfu/utils": "^0.7.6",
|
|
46
|
-
"@hedgedoc/markdown-it-plugins": "^2.1.
|
|
47
|
-
"@iconify-json/carbon": "^1.1.
|
|
46
|
+
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|
|
47
|
+
"@iconify-json/carbon": "^1.1.20",
|
|
48
48
|
"@iconify-json/ph": "^1.1.6",
|
|
49
49
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
50
50
|
"@mrdrogdrog/optional": "^1.2.1",
|
|
51
|
-
"@vitejs/plugin-vue": "
|
|
52
|
-
"@vitejs/plugin-vue-jsx": "^3.0.
|
|
51
|
+
"@vitejs/plugin-vue": "4.3.1",
|
|
52
|
+
"@vitejs/plugin-vue-jsx": "^3.0.2",
|
|
53
53
|
"@windicss/config": "^1.9.1",
|
|
54
54
|
"cli-progress": "^3.12.0",
|
|
55
55
|
"codemirror": "^5.65.5",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"htmlparser2": "^9.0.0",
|
|
63
63
|
"import-from": "^4.0.0",
|
|
64
64
|
"is-installed-globally": "^0.4.0",
|
|
65
|
-
"jiti": "^1.19.
|
|
65
|
+
"jiti": "^1.19.3",
|
|
66
66
|
"js-base64": "^3.7.5",
|
|
67
67
|
"katex": "^0.16.8",
|
|
68
68
|
"kolorist": "^1.8.0",
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"resolve-from": "^5.0.0",
|
|
83
83
|
"resolve-global": "^1.0.0",
|
|
84
84
|
"shiki": "^0.14.3",
|
|
85
|
-
"unocss": "^0.55.
|
|
85
|
+
"unocss": "^0.55.3",
|
|
86
86
|
"unplugin-icons": "^0.16.5",
|
|
87
87
|
"unplugin-vue-components": "^0.25.1",
|
|
88
|
-
"unplugin-vue-markdown": "^0.24.
|
|
89
|
-
"uqr": "^0.1.
|
|
88
|
+
"unplugin-vue-markdown": "^0.24.2",
|
|
89
|
+
"uqr": "^0.1.2",
|
|
90
90
|
"vite": "^4.4.9",
|
|
91
91
|
"vite-plugin-inspect": "^0.7.38",
|
|
92
92
|
"vite-plugin-remote-assets": "^0.3.2",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"vue": "^3.3.4",
|
|
97
97
|
"windicss": "^3.5.6",
|
|
98
98
|
"yargs": "^17.7.2",
|
|
99
|
-
"@slidev/client": "0.42.
|
|
100
|
-
"@slidev/parser": "0.42.
|
|
101
|
-
"@slidev/types": "0.42.
|
|
99
|
+
"@slidev/client": "0.42.10",
|
|
100
|
+
"@slidev/parser": "0.42.10",
|
|
101
|
+
"@slidev/types": "0.42.10"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@types/plantuml-encoder": "^1.4.0",
|