@slidev/cli 0.42.4 → 0.42.5

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/cli.js CHANGED
@@ -9,10 +9,10 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkLNT2WGURjs = require('./chunk-LNT2WGUR.js');
12
+ var _chunk35XQHQN5js = require('./chunk-35XQHQN5.js');
13
13
 
14
14
 
15
- var _chunkX2K32WHHjs = require('./chunk-X2K32WHH.js');
15
+ var _chunkGPOP6RE3js = require('./chunk-GPOP6RE3.js');
16
16
 
17
17
 
18
18
  var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
@@ -22,7 +22,7 @@ require('./chunk-6ZL4B4HQ.js');
22
22
  var _chunkMJQETB73js = require('./chunk-MJQETB73.js');
23
23
 
24
24
  // node/cli.ts
25
- var import_fast_deep_equal = _chunkMJQETB73js.__toESM.call(void 0, _chunkX2K32WHHjs.require_fast_deep_equal.call(void 0, ));
25
+ var import_fast_deep_equal = _chunkMJQETB73js.__toESM.call(void 0, _chunkGPOP6RE3js.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');
@@ -48,15 +48,15 @@ _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) =>
48
48
  const roots = (
49
49
  /* uniq */
50
50
  [
51
- _chunkLNT2WGURjs.getUserRoot.call(void 0, {}).userRoot,
52
- ..._chunkLNT2WGURjs.getAddonRoots.call(void 0, addons, ""),
53
- _chunkLNT2WGURjs.getClientRoot.call(void 0, )
51
+ _chunk35XQHQN5js.getUserRoot.call(void 0, {}).userRoot,
52
+ ..._chunk35XQHQN5js.getAddonRoots.call(void 0, addons, ""),
53
+ _chunk35XQHQN5js.getClientRoot.call(void 0, )
54
54
  ]
55
55
  );
56
56
  const mergeArrays = (a, b) => a.concat(b);
57
57
  return await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], false, mergeArrays);
58
58
  });
59
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkLNT2WGURjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
59
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk35XQHQN5js.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
60
60
  cli.command(
61
61
  "* [entry]",
62
62
  "Start a local server for Slidev",
@@ -112,9 +112,9 @@ cli.command(
112
112
  async function initServer() {
113
113
  if (server)
114
114
  await server.close();
115
- const options = await _chunkLNT2WGURjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
115
+ const options = await _chunk35XQHQN5js.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
116
116
  port = userPort || await findFreePort(3030);
117
- server = await _chunkLNT2WGURjs.createServer.call(void 0,
117
+ server = await _chunk35XQHQN5js.createServer.call(void 0,
118
118
  options,
119
119
  {
120
120
  server: {
@@ -128,7 +128,7 @@ cli.command(
128
128
  },
129
129
  {
130
130
  onDataReload(newData, data) {
131
- if (!theme && _chunkLNT2WGURjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkLNT2WGURjs.resolveThemeName.call(void 0, data.config.theme)) {
131
+ if (!theme && _chunk35XQHQN5js.resolveThemeName.call(void 0, newData.config.theme) !== _chunk35XQHQN5js.resolveThemeName.call(void 0, data.config.theme)) {
132
132
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
133
133
  initServer();
134
134
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -246,9 +246,9 @@ cli.command(
246
246
  }).strict().help(),
247
247
  async (args) => {
248
248
  const { entry, theme, watch, base, download, out, inspect } = args;
249
- const { build } = await Promise.resolve().then(() => require("./build-3TQML4LL.js"));
249
+ const { build } = await Promise.resolve().then(() => require("./build-D4QSB7HD.js"));
250
250
  for (const entryFile of entry) {
251
- const options = await _chunkLNT2WGURjs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
251
+ const options = await _chunk35XQHQN5js.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
252
252
  if (download && !options.data.config.download)
253
253
  options.data.config.download = download;
254
254
  printInfo(options);
@@ -268,9 +268,9 @@ cli.command(
268
268
  (args) => commonOptions(args).strict().help(),
269
269
  async ({ entry }) => {
270
270
  for (const entryFile of entry) {
271
- const data = await _chunkLNT2WGURjs.parser.load(entryFile);
272
- _chunkLNT2WGURjs.parser.prettify(data);
273
- await _chunkLNT2WGURjs.parser.save(data);
271
+ const data = await _chunk35XQHQN5js.parser.load(entryFile);
272
+ _chunk35XQHQN5js.parser.prettify(data);
273
+ await _chunk35XQHQN5js.parser.save(data);
274
274
  }
275
275
  }
276
276
  );
@@ -286,17 +286,17 @@ cli.command(
286
286
  default: "theme"
287
287
  }),
288
288
  async ({ entry, dir, theme: themeInput }) => {
289
- const data = await _chunkLNT2WGURjs.parser.load(entry);
290
- const theme = _chunkLNT2WGURjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
289
+ const data = await _chunk35XQHQN5js.parser.load(entry);
290
+ const theme = _chunk35XQHQN5js.resolveThemeName.call(void 0, themeInput || data.config.theme);
291
291
  if (theme === "none") {
292
292
  console.error('Cannot eject theme "none"');
293
293
  process.exit(1);
294
294
  }
295
- if (_chunkLNT2WGURjs.isPath.call(void 0, theme)) {
295
+ if (_chunk35XQHQN5js.isPath.call(void 0, theme)) {
296
296
  console.error("Theme is already ejected");
297
297
  process.exit(1);
298
298
  }
299
- const roots = _chunkLNT2WGURjs.getThemeRoots.call(void 0, theme, entry);
299
+ const roots = _chunk35XQHQN5js.getThemeRoots.call(void 0, theme, entry);
300
300
  if (!roots.length) {
301
301
  console.error(`Could not find theme "${theme}"`);
302
302
  process.exit(1);
@@ -308,7 +308,7 @@ cli.command(
308
308
  const dirPath = `./${dir}`;
309
309
  data.slides[0].frontmatter.theme = dirPath;
310
310
  data.slides[0].raw = null;
311
- await _chunkLNT2WGURjs.parser.save(data);
311
+ await _chunk35XQHQN5js.parser.save(data);
312
312
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
313
313
  }
314
314
  );
@@ -328,8 +328,8 @@ cli.command(
328
328
  const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-PN4EOI4Z.js"));
329
329
  const port = await findFreePort(12445);
330
330
  for (const entryFile of entry) {
331
- const options = await _chunkLNT2WGURjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
332
- const server = await _chunkLNT2WGURjs.createServer.call(void 0,
331
+ const options = await _chunk35XQHQN5js.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
332
+ const server = await _chunk35XQHQN5js.createServer.call(void 0,
333
333
  options,
334
334
  {
335
335
  server: { port },
@@ -338,7 +338,7 @@ cli.command(
338
338
  );
339
339
  await server.listen(port);
340
340
  printInfo(options);
341
- _chunkLNT2WGURjs.parser.filterDisabled(options.data);
341
+ _chunk35XQHQN5js.parser.filterDisabled(options.data);
342
342
  const result = await exportSlides({
343
343
  port,
344
344
  ...getExportOptions({ ...args, entry: entryFile }, options)
@@ -374,8 +374,8 @@ cli.command(
374
374
  const { exportNotes } = await Promise.resolve().then(() => require("./export-PN4EOI4Z.js"));
375
375
  const port = await findFreePort(12445);
376
376
  for (const entryFile of entry) {
377
- const options = await _chunkLNT2WGURjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
378
- const server = await _chunkLNT2WGURjs.createServer.call(void 0,
377
+ const options = await _chunk35XQHQN5js.resolveOptions.call(void 0, { entry: entryFile }, "export");
378
+ const server = await _chunk35XQHQN5js.createServer.call(void 0,
379
379
  options,
380
380
  {
381
381
  server: { port },
@@ -384,7 +384,7 @@ cli.command(
384
384
  );
385
385
  await server.listen(port);
386
386
  printInfo(options);
387
- _chunkLNT2WGURjs.parser.filterDisabled(options.data);
387
+ _chunk35XQHQN5js.parser.filterDisabled(options.data);
388
388
  const result = await exportNotes({
389
389
  port,
390
390
  output: output || (options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entryFile, ".md")}-export-notes`),
@@ -445,7 +445,7 @@ function printInfo(options, port, remote, tunnelUrl) {
445
445
  console.log();
446
446
  console.log();
447
447
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
448
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkLNT2WGURjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
448
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk35XQHQN5js.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
449
449
  console.log();
450
450
  _parser.verifyConfig.call(void 0, options.data.config, options.data.themeMeta, (v) => console.warn(_kolorist.yellow.call(void 0, ` ! ${v}`)));
451
451
  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-HO4HKNKG.mjs";
12
+ } from "./chunk-YZMOU6XV.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
- } from "./chunk-3JYF6GOD.mjs";
15
+ } from "./chunk-Q3TKTGHS.mjs";
16
16
  import {
17
17
  loadSetups
18
18
  } from "./chunk-6XVZLT3I.mjs";
@@ -246,7 +246,7 @@ cli.command(
246
246
  }).strict().help(),
247
247
  async (args) => {
248
248
  const { entry, theme, watch, base, download, out, inspect } = args;
249
- const { build } = await import("./build-KVCLJMZB.mjs");
249
+ const { build } = await import("./build-7A4AKFCP.mjs");
250
250
  for (const entryFile of entry) {
251
251
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
252
252
  if (download && !options.data.config.download)
package/dist/index.js CHANGED
@@ -9,13 +9,13 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkLNT2WGURjs = require('./chunk-LNT2WGUR.js');
12
+ var _chunk35XQHQN5js = require('./chunk-35XQHQN5.js');
13
13
 
14
14
 
15
15
  var _chunkYI4ZV27Kjs = require('./chunk-YI4ZV27K.js');
16
16
 
17
17
 
18
- var _chunkX2K32WHHjs = require('./chunk-X2K32WHH.js');
18
+ var _chunkGPOP6RE3js = require('./chunk-GPOP6RE3.js');
19
19
  require('./chunk-KKGXM3XL.js');
20
20
  require('./chunk-6ZL4B4HQ.js');
21
21
  require('./chunk-MJQETB73.js');
@@ -32,4 +32,4 @@ require('./chunk-MJQETB73.js');
32
32
 
33
33
 
34
34
 
35
- exports.ViteSlidevPlugin = _chunkX2K32WHHjs.ViteSlidevPlugin; exports.createServer = _chunkLNT2WGURjs.createServer; exports.createWindiCSSPlugin = _chunkYI4ZV27Kjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkLNT2WGURjs.getAddonRoots; exports.getCLIRoot = _chunkLNT2WGURjs.getCLIRoot; exports.getClientRoot = _chunkLNT2WGURjs.getClientRoot; exports.getRoot = _chunkLNT2WGURjs.getRoot; exports.getThemeRoots = _chunkLNT2WGURjs.getThemeRoots; exports.getUserRoot = _chunkLNT2WGURjs.getUserRoot; exports.isPath = _chunkLNT2WGURjs.isPath; exports.parser = _chunkLNT2WGURjs.parser; exports.resolveOptions = _chunkLNT2WGURjs.resolveOptions;
35
+ exports.ViteSlidevPlugin = _chunkGPOP6RE3js.ViteSlidevPlugin; exports.createServer = _chunk35XQHQN5js.createServer; exports.createWindiCSSPlugin = _chunkYI4ZV27Kjs.createWindiCSSPlugin; exports.getAddonRoots = _chunk35XQHQN5js.getAddonRoots; exports.getCLIRoot = _chunk35XQHQN5js.getCLIRoot; exports.getClientRoot = _chunk35XQHQN5js.getClientRoot; exports.getRoot = _chunk35XQHQN5js.getRoot; exports.getThemeRoots = _chunk35XQHQN5js.getThemeRoots; exports.getUserRoot = _chunk35XQHQN5js.getUserRoot; exports.isPath = _chunk35XQHQN5js.isPath; exports.parser = _chunk35XQHQN5js.parser; exports.resolveOptions = _chunk35XQHQN5js.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,13 +9,13 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-HO4HKNKG.mjs";
12
+ } from "./chunk-YZMOU6XV.mjs";
13
13
  import {
14
14
  createWindiCSSPlugin
15
15
  } from "./chunk-X7P5WRYP.mjs";
16
16
  import {
17
17
  ViteSlidevPlugin
18
- } from "./chunk-3JYF6GOD.mjs";
18
+ } from "./chunk-Q3TKTGHS.mjs";
19
19
  import "./chunk-6XVZLT3I.mjs";
20
20
  import "./chunk-CIUEQ4TI.mjs";
21
21
  import "./chunk-L5QH2WZE.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.42.4",
3
+ "version": "0.42.5",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@antfu/utils": "^0.7.4",
46
46
  "@hedgedoc/markdown-it-plugins": "^2.0.0",
47
- "@iconify-json/carbon": "^1.1.17",
47
+ "@iconify-json/carbon": "^1.1.18",
48
48
  "@iconify-json/ph": "^1.1.5",
49
49
  "@lillallol/outline-pdf": "^4.0.0",
50
50
  "@vitejs/plugin-vue": "^4.2.3",
@@ -58,6 +58,7 @@
58
58
  "fs-extra": "^11.1.1",
59
59
  "get-port-please": "^3.0.1",
60
60
  "global-dirs": "^3.0.1",
61
+ "htmlparser2": "^9.0.0",
61
62
  "import-from": "^4.0.0",
62
63
  "is-installed-globally": "^0.4.0",
63
64
  "jiti": "^1.18.2",
@@ -81,9 +82,9 @@
81
82
  "resolve-from": "^5.0.0",
82
83
  "resolve-global": "^1.0.0",
83
84
  "shiki": "^0.14.2",
84
- "unocss": "^0.53.0",
85
- "unplugin-icons": "^0.16.2",
86
- "unplugin-vue-components": "^0.25.0",
85
+ "unocss": "^0.53.1",
86
+ "unplugin-icons": "^0.16.3",
87
+ "unplugin-vue-components": "^0.25.1",
87
88
  "vite": "^4.3.9",
88
89
  "vite-plugin-inspect": "^0.7.28",
89
90
  "vite-plugin-remote-assets": "^0.3.2",
@@ -94,15 +95,15 @@
94
95
  "vue": "^3.3.4",
95
96
  "windicss": "^3.5.6",
96
97
  "yargs": "^17.7.2",
97
- "@slidev/client": "0.42.4",
98
- "@slidev/parser": "0.42.4",
99
- "@slidev/types": "0.42.4"
98
+ "@slidev/client": "0.42.5",
99
+ "@slidev/parser": "0.42.5",
100
+ "@slidev/types": "0.42.5"
100
101
  },
101
102
  "devDependencies": {
102
103
  "@types/plantuml-encoder": "^1.4.0",
103
104
  "fast-deep-equal": "^3.1.3",
104
105
  "local-pkg": "^0.4.3",
105
- "semver": "^7.5.1",
106
+ "semver": "^7.5.2",
106
107
  "sirv": "^2.0.3"
107
108
  },
108
109
  "scripts": {