@slidev/cli 0.48.0-beta.5 → 0.48.0-beta.7
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.
|
@@ -2496,7 +2496,7 @@ var require_semver2 = __commonJS({
|
|
|
2496
2496
|
});
|
|
2497
2497
|
|
|
2498
2498
|
// package.json
|
|
2499
|
-
var version = "0.48.0-beta.
|
|
2499
|
+
var version = "0.48.0-beta.7";
|
|
2500
2500
|
|
|
2501
2501
|
// node/common.ts
|
|
2502
2502
|
import { existsSync, promises as fs } from "node:fs";
|
|
@@ -2787,8 +2787,7 @@ function createSlidesLoader({ data, clientRoot, roots, remote, mode }, pluginOpt
|
|
|
2787
2787
|
if (type === "json" && req.method === "POST") {
|
|
2788
2788
|
const body = await getBodyJson(req);
|
|
2789
2789
|
const slide = data.slides[idx];
|
|
2790
|
-
|
|
2791
|
-
if (!onlyNoteChanged)
|
|
2790
|
+
if (body.content && body.content !== slide.source.content)
|
|
2792
2791
|
hmrPages.add(idx);
|
|
2793
2792
|
Object.assign(slide.source, body);
|
|
2794
2793
|
parser.prettifySlide(slide.source);
|
|
@@ -4244,7 +4243,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
4244
4243
|
"components",
|
|
4245
4244
|
join7(process3.cwd(), "components")
|
|
4246
4245
|
],
|
|
4247
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.md
|
|
4246
|
+
include: [/\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.md$/, /\.md\?vue/],
|
|
4248
4247
|
exclude: [],
|
|
4249
4248
|
resolvers: [
|
|
4250
4249
|
IconsResolver({
|
package/dist/cli.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
resolveAddons,
|
|
6
6
|
resolveOptions,
|
|
7
7
|
resolveTheme
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NXS3RLNR.mjs";
|
|
9
9
|
import {
|
|
10
10
|
version
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XPONWFND.mjs";
|
|
12
12
|
import {
|
|
13
13
|
loadSetups
|
|
14
14
|
} from "./chunk-O6TYYGU6.mjs";
|
|
@@ -32,7 +32,7 @@ import equal from "fast-deep-equal";
|
|
|
32
32
|
import { verifyConfig } from "@slidev/parser";
|
|
33
33
|
import { injectPreparserExtensionLoader } from "@slidev/parser/fs";
|
|
34
34
|
import { uniq } from "@antfu/utils";
|
|
35
|
-
import {
|
|
35
|
+
import { getPort } from "get-port-please";
|
|
36
36
|
var CONFIG_RESTART_FIELDS = [
|
|
37
37
|
"highlighter",
|
|
38
38
|
"monaco",
|
|
@@ -101,7 +101,13 @@ cli.command(
|
|
|
101
101
|
if (server)
|
|
102
102
|
await server.close();
|
|
103
103
|
const options = await resolveOptions({ entry, remote, theme, inspect }, "dev");
|
|
104
|
-
|
|
104
|
+
const host = remote !== void 0 ? bind : "localhost";
|
|
105
|
+
port = userPort || await getPort({
|
|
106
|
+
port: 3030,
|
|
107
|
+
random: false,
|
|
108
|
+
portRange: [3030, 4e3],
|
|
109
|
+
host
|
|
110
|
+
});
|
|
105
111
|
server = await createServer(
|
|
106
112
|
options,
|
|
107
113
|
{
|
|
@@ -109,7 +115,7 @@ cli.command(
|
|
|
109
115
|
port,
|
|
110
116
|
strictPort: true,
|
|
111
117
|
open,
|
|
112
|
-
host
|
|
118
|
+
host,
|
|
113
119
|
// @ts-expect-error Vite <= 4
|
|
114
120
|
force
|
|
115
121
|
},
|
|
@@ -271,7 +277,7 @@ cli.command(
|
|
|
271
277
|
}).strict().help(),
|
|
272
278
|
async (args) => {
|
|
273
279
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
274
|
-
const { build } = await import("./build-
|
|
280
|
+
const { build } = await import("./build-UVXNEWY7.mjs");
|
|
275
281
|
for (const entryFile of entry) {
|
|
276
282
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
277
283
|
if (download && !options.data.config.download)
|
|
@@ -347,7 +353,7 @@ cli.command(
|
|
|
347
353
|
async (args) => {
|
|
348
354
|
const { entry, theme } = args;
|
|
349
355
|
const { exportSlides, getExportOptions } = await import("./export-SM2ZATWB.mjs");
|
|
350
|
-
const port = await
|
|
356
|
+
const port = await getPort(12445);
|
|
351
357
|
for (const entryFile of entry) {
|
|
352
358
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
353
359
|
const server = await createServer(
|
|
@@ -391,7 +397,7 @@ cli.command(
|
|
|
391
397
|
timeout
|
|
392
398
|
}) => {
|
|
393
399
|
const { exportNotes } = await import("./export-SM2ZATWB.mjs");
|
|
394
|
-
const port = await
|
|
400
|
+
const port = await getPort(12445);
|
|
395
401
|
for (const entryFile of entry) {
|
|
396
402
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
|
397
403
|
const server = await createServer(
|
|
@@ -505,8 +511,3 @@ function printInfo(options, port, remote, tunnelUrl, publicIp) {
|
|
|
505
511
|
return lastRemoteUrl;
|
|
506
512
|
}
|
|
507
513
|
}
|
|
508
|
-
async function findFreePort(start) {
|
|
509
|
-
if (await checkPort(start) !== false)
|
|
510
|
-
return start;
|
|
511
|
-
return findFreePort(start + 1);
|
|
512
|
-
}
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createServer,
|
|
3
3
|
parser,
|
|
4
4
|
resolveOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NXS3RLNR.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ViteSlidevPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XPONWFND.mjs";
|
|
9
9
|
import "./chunk-O6TYYGU6.mjs";
|
|
10
10
|
import "./chunk-7HOZGSL4.mjs";
|
|
11
11
|
import "./chunk-BXO7ZPPU.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.48.0-beta.
|
|
3
|
+
"version": "0.48.0-beta.7",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@iconify-json/ph": "^1.1.11",
|
|
48
48
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
49
49
|
"@mrdrogdrog/optional": "^1.2.1",
|
|
50
|
-
"@shikijs/markdown-it": "^1.1.
|
|
51
|
-
"@shikijs/twoslash": "^1.1.
|
|
52
|
-
"@shikijs/vitepress-twoslash": "^1.1.
|
|
50
|
+
"@shikijs/markdown-it": "^1.1.7",
|
|
51
|
+
"@shikijs/twoslash": "^1.1.7",
|
|
52
|
+
"@shikijs/vitepress-twoslash": "^1.1.7",
|
|
53
53
|
"@unocss/extractor-mdc": "^0.58.5",
|
|
54
54
|
"@unocss/reset": "^0.58.5",
|
|
55
55
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"htmlparser2": "^9.1.0",
|
|
67
67
|
"is-installed-globally": "^1.0.0",
|
|
68
68
|
"jiti": "^1.21.0",
|
|
69
|
-
"js-base64": "^3.7.
|
|
69
|
+
"js-base64": "^3.7.7",
|
|
70
70
|
"katex": "^0.16.9",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
72
|
"local-pkg": "^0.5.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"markdown-it-footnote": "^4.0.0",
|
|
75
75
|
"markdown-it-link-attributes": "^4.0.1",
|
|
76
76
|
"markdown-it-mdc": "^0.2.3",
|
|
77
|
-
"mlly": "^1.
|
|
77
|
+
"mlly": "^1.6.1",
|
|
78
78
|
"monaco-editor": "^0.37.1",
|
|
79
79
|
"nanoid": "^5.0.6",
|
|
80
80
|
"open": "^10.0.3",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"resolve": "^1.22.8",
|
|
88
88
|
"resolve-from": "^5.0.0",
|
|
89
89
|
"resolve-global": "^2.0.0",
|
|
90
|
-
"shiki": "^1.1.
|
|
90
|
+
"shiki": "^1.1.7",
|
|
91
91
|
"sirv": "^2.0.4",
|
|
92
92
|
"typescript": "^5.3.3",
|
|
93
93
|
"unocss": "^0.58.5",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"unplugin-vue-markdown": "^0.26.0",
|
|
97
97
|
"untun": "^0.1.3",
|
|
98
98
|
"uqr": "^0.1.2",
|
|
99
|
-
"vite": "^5.1.
|
|
99
|
+
"vite": "^5.1.4",
|
|
100
100
|
"vite-plugin-inspect": "^0.8.3",
|
|
101
101
|
"vite-plugin-remote-assets": "^0.4.1",
|
|
102
102
|
"vite-plugin-static-copy": "^1.0.1",
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"vitefu": "^0.2.5",
|
|
105
105
|
"vue": "^3.4.19",
|
|
106
106
|
"yargs": "^17.7.2",
|
|
107
|
-
"@slidev/client": "0.48.0-beta.
|
|
108
|
-
"@slidev/parser": "0.48.0-beta.
|
|
109
|
-
"@slidev/types": "0.48.0-beta.
|
|
107
|
+
"@slidev/client": "0.48.0-beta.7",
|
|
108
|
+
"@slidev/parser": "0.48.0-beta.7",
|
|
109
|
+
"@slidev/types": "0.48.0-beta.7"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|