@slidev/cli 0.42.11 → 0.43.0-beta.0
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-ITLUPWNS.mjs → build-C2GYF6EU.mjs} +7 -7
- package/dist/{build-I34EOBVM.js → build-J2XECXHU.js} +8 -8
- package/dist/{chunk-QVVA2G2Y.mjs → chunk-E3UONPQL.mjs} +37 -45
- package/dist/chunk-HA2YGJJG.mjs +4837 -0
- package/dist/{chunk-VPD6PH2L.mjs → chunk-HO75FTDI.mjs} +7 -7
- package/dist/{chunk-RSZHGGR3.js → chunk-J7PXWEZ7.js} +7 -7
- package/dist/{chunk-6XVZLT3I.mjs → chunk-JDHANZ37.mjs} +1 -1
- package/dist/{chunk-34SGGZ4P.js → chunk-JQHGZJGJ.js} +7 -10
- package/dist/{chunk-TH7JXF42.js → chunk-O7JFTQZ2.js} +86 -94
- package/dist/{chunk-KB3DQ2OE.mjs → chunk-QHOBBTS4.mjs} +1 -31
- package/dist/chunk-ROTHRPSW.js +4837 -0
- package/dist/{chunk-QDKRARRU.js → chunk-YUG22S6W.js} +1 -31
- package/dist/{chunk-MZBIET7Y.mjs → chunk-ZEKM4EGL.mjs} +3 -6
- package/dist/cli.js +36 -35
- package/dist/cli.mjs +17 -16
- package/dist/{export-6G7WYT32.mjs → export-I7B4PU6A.mjs} +17 -22
- package/dist/{export-BGMCS4F2.js → export-MCALG7XD.js} +18 -23
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/dist/{unocss-2T2KTWQ5.js → unocss-2DU67QXG.js} +6 -7
- package/dist/{unocss-ALFHEPHE.mjs → unocss-2UOAV4VT.mjs} +9 -10
- package/dist/windicss-FNELZNWD.js +9 -0
- package/dist/windicss-UVXCUIV4.mjs +9 -0
- package/package.json +7 -6
- package/template.md +1 -1
- package/dist/chunk-4O6GOAOC.js +0 -1634
- package/dist/chunk-UAV6RPFT.mjs +0 -1634
- package/dist/windicss-3HGYWXUJ.js +0 -9
- package/dist/windicss-TWSVDM4O.mjs +0 -9
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-HA2YGJJG.mjs";
|
|
6
|
+
import "./chunk-JDHANZ37.mjs";
|
|
7
|
+
import "./chunk-ZEKM4EGL.mjs";
|
|
8
|
+
import "./chunk-QHOBBTS4.mjs";
|
|
9
9
|
|
|
10
10
|
// node/build.ts
|
|
11
|
-
import { join as join3, resolve as resolve3 } from "path";
|
|
12
|
-
import http from "http";
|
|
11
|
+
import { join as join3, resolve as resolve3 } from "node:path";
|
|
12
|
+
import http from "node:http";
|
|
13
13
|
import fs2 from "fs-extra";
|
|
14
14
|
import { resolveConfig, build as viteBuild } from "vite";
|
|
15
15
|
import connect from "connect";
|
|
@@ -722,7 +722,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
722
722
|
await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
723
723
|
`, "utf-8");
|
|
724
724
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
725
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
725
|
+
const { exportSlides, getExportOptions } = await import("./export-I7B4PU6A.mjs");
|
|
726
726
|
const port = 12445;
|
|
727
727
|
const app = connect();
|
|
728
728
|
const server = http.createServer(app);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkROTHRPSWjs = require('./chunk-ROTHRPSW.js');
|
|
6
6
|
require('./chunk-KKGXM3XL.js');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-JQHGZJGJ.js');
|
|
8
|
+
require('./chunk-YUG22S6W.js');
|
|
9
9
|
|
|
10
10
|
// node/build.ts
|
|
11
11
|
var _path = require('path');
|
|
@@ -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 _chunkROTHRPSWjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
655
655
|
let config = void 0;
|
|
656
656
|
try {
|
|
657
|
-
const inlineConfig = await
|
|
657
|
+
const inlineConfig = await _chunkROTHRPSWjs.mergeViteConfigs.call(void 0,
|
|
658
658
|
options,
|
|
659
659
|
viteConfig,
|
|
660
660
|
{
|
|
661
661
|
root: options.userRoot,
|
|
662
662
|
plugins: [
|
|
663
|
-
await
|
|
663
|
+
await _chunkROTHRPSWjs.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 _chunkROTHRPSWjs.mergeViteConfigs.call(void 0,
|
|
685
685
|
options,
|
|
686
686
|
inlineConfig,
|
|
687
687
|
{
|
|
@@ -722,7 +722,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
722
722
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
723
723
|
`, "utf-8");
|
|
724
724
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
725
|
-
const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-
|
|
725
|
+
const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-MCALG7XD.js"));
|
|
726
726
|
const port = 12445;
|
|
727
727
|
const app = _connect2.default.call(void 0, );
|
|
728
728
|
const server = _http2.default.createServer(app);
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HA2YGJJG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
packageExists,
|
|
7
7
|
resolveImportPath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZEKM4EGL.mjs";
|
|
9
9
|
import {
|
|
10
10
|
__commonJS,
|
|
11
|
-
__privateAdd,
|
|
12
|
-
__privateGet,
|
|
13
|
-
__privateSet,
|
|
14
|
-
__privateWrapper,
|
|
15
11
|
__toESM
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QHOBBTS4.mjs";
|
|
17
13
|
|
|
18
14
|
// ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
|
|
19
15
|
var require_constants = __commonJS({
|
|
@@ -2492,8 +2488,8 @@ var require_semver2 = __commonJS({
|
|
|
2492
2488
|
});
|
|
2493
2489
|
|
|
2494
2490
|
// node/server.ts
|
|
2495
|
-
import { join } from "path";
|
|
2496
|
-
import process2 from "process";
|
|
2491
|
+
import { join } from "node:path";
|
|
2492
|
+
import process2 from "node:process";
|
|
2497
2493
|
import { createServer as createViteServer, resolveConfig } from "vite";
|
|
2498
2494
|
async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
2499
2495
|
const rawConfig = await resolveConfig({}, "serve", options.entry);
|
|
@@ -2523,28 +2519,28 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2523
2519
|
import * as parser from "@slidev/parser/fs";
|
|
2524
2520
|
|
|
2525
2521
|
// package.json
|
|
2526
|
-
var version = "0.
|
|
2522
|
+
var version = "0.43.0-beta.0";
|
|
2527
2523
|
|
|
2528
2524
|
// node/themes.ts
|
|
2529
2525
|
import prompts2 from "prompts";
|
|
2530
2526
|
|
|
2531
2527
|
// ../../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";
|
|
2533
|
-
import path$3, { join as join$1, dirname, resolve } from "path";
|
|
2534
|
-
import process$2 from "process";
|
|
2535
|
-
import url, { fileURLToPath } from "url";
|
|
2536
|
-
import { Buffer as Buffer$1 } from "buffer";
|
|
2537
|
-
import childProcess, { ChildProcess } from "child_process";
|
|
2528
|
+
import fs$1, { promises, createWriteStream, createReadStream, existsSync } from "node:fs";
|
|
2529
|
+
import path$3, { join as join$1, dirname, resolve } from "node:path";
|
|
2530
|
+
import process$2 from "node:process";
|
|
2531
|
+
import url, { fileURLToPath } from "node:url";
|
|
2532
|
+
import { Buffer as Buffer$1 } from "node:buffer";
|
|
2533
|
+
import childProcess, { ChildProcess } from "node:child_process";
|
|
2538
2534
|
import require$$0$2 from "child_process";
|
|
2539
2535
|
import require$$0$1 from "path";
|
|
2540
2536
|
import require$$0 from "fs";
|
|
2541
|
-
import os$1, { constants } from "os";
|
|
2537
|
+
import os$1, { constants } from "node:os";
|
|
2542
2538
|
import require$$0$3 from "assert";
|
|
2543
2539
|
import require$$2 from "events";
|
|
2544
2540
|
import require$$0$5 from "buffer";
|
|
2545
2541
|
import require$$0$4 from "stream";
|
|
2546
2542
|
import require$$2$1 from "util";
|
|
2547
|
-
import { debuglog } from "util";
|
|
2543
|
+
import { debuglog } from "node:util";
|
|
2548
2544
|
import require$$0$6 from "os";
|
|
2549
2545
|
import require$$1 from "tty";
|
|
2550
2546
|
import require$$0$7 from "readline";
|
|
@@ -2749,7 +2745,7 @@ var decode = (str, opt = {}) => {
|
|
|
2749
2745
|
if (opt.bracketedArray) {
|
|
2750
2746
|
isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
|
|
2751
2747
|
} else {
|
|
2752
|
-
duplicates[keyRaw] = (
|
|
2748
|
+
duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1;
|
|
2753
2749
|
isArray = duplicates[keyRaw] > 1;
|
|
2754
2750
|
}
|
|
2755
2751
|
const key = isArray ? keyRaw.slice(0, -2) : keyRaw;
|
|
@@ -2862,53 +2858,49 @@ var Node = class {
|
|
|
2862
2858
|
this.value = value;
|
|
2863
2859
|
}
|
|
2864
2860
|
};
|
|
2865
|
-
var _head, _tail, _size;
|
|
2866
2861
|
var Queue = class {
|
|
2862
|
+
#head;
|
|
2863
|
+
#tail;
|
|
2864
|
+
#size;
|
|
2867
2865
|
constructor() {
|
|
2868
|
-
__privateAdd(this, _head, void 0);
|
|
2869
|
-
__privateAdd(this, _tail, void 0);
|
|
2870
|
-
__privateAdd(this, _size, void 0);
|
|
2871
2866
|
this.clear();
|
|
2872
2867
|
}
|
|
2873
2868
|
enqueue(value) {
|
|
2874
2869
|
const node = new Node(value);
|
|
2875
|
-
if (
|
|
2876
|
-
|
|
2877
|
-
|
|
2870
|
+
if (this.#head) {
|
|
2871
|
+
this.#tail.next = node;
|
|
2872
|
+
this.#tail = node;
|
|
2878
2873
|
} else {
|
|
2879
|
-
|
|
2880
|
-
|
|
2874
|
+
this.#head = node;
|
|
2875
|
+
this.#tail = node;
|
|
2881
2876
|
}
|
|
2882
|
-
|
|
2877
|
+
this.#size++;
|
|
2883
2878
|
}
|
|
2884
2879
|
dequeue() {
|
|
2885
|
-
const current =
|
|
2880
|
+
const current = this.#head;
|
|
2886
2881
|
if (!current) {
|
|
2887
2882
|
return;
|
|
2888
2883
|
}
|
|
2889
|
-
|
|
2890
|
-
|
|
2884
|
+
this.#head = this.#head.next;
|
|
2885
|
+
this.#size--;
|
|
2891
2886
|
return current.value;
|
|
2892
2887
|
}
|
|
2893
2888
|
clear() {
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2889
|
+
this.#head = void 0;
|
|
2890
|
+
this.#tail = void 0;
|
|
2891
|
+
this.#size = 0;
|
|
2897
2892
|
}
|
|
2898
2893
|
get size() {
|
|
2899
|
-
return
|
|
2894
|
+
return this.#size;
|
|
2900
2895
|
}
|
|
2901
2896
|
*[Symbol.iterator]() {
|
|
2902
|
-
let current =
|
|
2897
|
+
let current = this.#head;
|
|
2903
2898
|
while (current) {
|
|
2904
2899
|
yield current.value;
|
|
2905
2900
|
current = current.next;
|
|
2906
2901
|
}
|
|
2907
2902
|
}
|
|
2908
2903
|
};
|
|
2909
|
-
_head = new WeakMap();
|
|
2910
|
-
_tail = new WeakMap();
|
|
2911
|
-
_size = new WeakMap();
|
|
2912
2904
|
function pLimit(concurrency) {
|
|
2913
2905
|
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
|
2914
2906
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
@@ -7426,7 +7418,7 @@ var parseNi = (agent, args, ctx) => {
|
|
|
7426
7418
|
return getCommand(agent, "global", exclude(args, "-g"));
|
|
7427
7419
|
if (args.includes("--frozen-if-present")) {
|
|
7428
7420
|
args = exclude(args, "--frozen-if-present");
|
|
7429
|
-
return getCommand(agent,
|
|
7421
|
+
return getCommand(agent, ctx?.hasLock ? "frozen" : "install", args);
|
|
7430
7422
|
}
|
|
7431
7423
|
if (args.includes("--frozen"))
|
|
7432
7424
|
return getCommand(agent, "frozen", exclude(args, "--frozen"));
|
|
@@ -7601,8 +7593,8 @@ import { underline } from "kolorist";
|
|
|
7601
7593
|
import fs3 from "fs-extra";
|
|
7602
7594
|
|
|
7603
7595
|
// node/options.ts
|
|
7604
|
-
import { dirname as dirname2, join as join3, resolve as resolve2 } from "path";
|
|
7605
|
-
import process3 from "process";
|
|
7596
|
+
import { dirname as dirname2, join as join3, resolve as resolve2 } from "node:path";
|
|
7597
|
+
import process3 from "node:process";
|
|
7606
7598
|
import { uniq } from "@antfu/utils";
|
|
7607
7599
|
import _debug from "debug";
|
|
7608
7600
|
|
|
@@ -7622,14 +7614,14 @@ async function getPackageJson(root) {
|
|
|
7622
7614
|
async function getAddons(userRoot, config2) {
|
|
7623
7615
|
const { slidev = {} } = await getPackageJson(userRoot);
|
|
7624
7616
|
const configAddons = Array.isArray(config2.addons) ? config2.addons : [];
|
|
7625
|
-
const addons = configAddons.concat(Array.isArray(slidev
|
|
7617
|
+
const addons = configAddons.concat(Array.isArray(slidev?.addons) ? slidev.addons : []);
|
|
7626
7618
|
return (await getRecursivePlugins(addons.map(resolvePluginName), 3)).filter(Boolean);
|
|
7627
7619
|
}
|
|
7628
7620
|
async function getRecursivePlugins(addons, depth) {
|
|
7629
7621
|
const addonsArray = await Promise.all(addons.map(async (addon) => {
|
|
7630
7622
|
const { slidev = {}, engines = {} } = await getPackageJson(addon);
|
|
7631
7623
|
checkEngine(addon, engines);
|
|
7632
|
-
let addons2 = Array.isArray(slidev
|
|
7624
|
+
let addons2 = Array.isArray(slidev?.addons) ? slidev.addons : [];
|
|
7633
7625
|
if (addons2.length > 0 && depth)
|
|
7634
7626
|
addons2 = await getRecursivePlugins(addons2.map(resolvePluginName), depth - 1);
|
|
7635
7627
|
addons2.push(addon);
|