@slidev/cli 0.42.1 → 0.42.3

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.
@@ -2454,7 +2454,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2454
2454
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2455
2455
 
2456
2456
  // package.json
2457
- var version = "0.42.1";
2457
+ var version = "0.42.3";
2458
2458
 
2459
2459
  // node/themes.ts
2460
2460
  var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
@@ -2454,7 +2454,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2454
2454
  import * as parser from "@slidev/parser/fs";
2455
2455
 
2456
2456
  // package.json
2457
- var version = "0.42.1";
2457
+ var version = "0.42.3";
2458
2458
 
2459
2459
  // node/themes.ts
2460
2460
  import prompts2 from "prompts";
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkTRSAM62Kjs = require('./chunk-TRSAM62K.js');
12
+ var _chunk6OBJFY72js = require('./chunk-6OBJFY72.js');
13
13
 
14
14
 
15
15
  var _chunkQL6EDWJQjs = require('./chunk-QL6EDWJQ.js');
@@ -48,15 +48,15 @@ _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) =>
48
48
  const roots = (
49
49
  /* uniq */
50
50
  [
51
- _chunkTRSAM62Kjs.getUserRoot.call(void 0, {}).userRoot,
52
- ..._chunkTRSAM62Kjs.getAddonRoots.call(void 0, addons, ""),
53
- _chunkTRSAM62Kjs.getClientRoot.call(void 0, )
51
+ _chunk6OBJFY72js.getUserRoot.call(void 0, {}).userRoot,
52
+ ..._chunk6OBJFY72js.getAddonRoots.call(void 0, addons, ""),
53
+ _chunk6OBJFY72js.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(_chunkTRSAM62Kjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
59
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk6OBJFY72js.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 _chunkTRSAM62Kjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
115
+ const options = await _chunk6OBJFY72js.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
116
116
  port = userPort || await findFreePort(3030);
117
- server = await _chunkTRSAM62Kjs.createServer.call(void 0,
117
+ server = await _chunk6OBJFY72js.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 && _chunkTRSAM62Kjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkTRSAM62Kjs.resolveThemeName.call(void 0, data.config.theme)) {
131
+ if (!theme && _chunk6OBJFY72js.resolveThemeName.call(void 0, newData.config.theme) !== _chunk6OBJFY72js.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]))) {
@@ -248,7 +248,7 @@ cli.command(
248
248
  const { entry, theme, watch, base, download, out, inspect } = args;
249
249
  const { build } = await Promise.resolve().then(() => require("./build-FNP2QTPG.js"));
250
250
  for (const entryFile of entry) {
251
- const options = await _chunkTRSAM62Kjs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
251
+ const options = await _chunk6OBJFY72js.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 _chunkTRSAM62Kjs.parser.load(entryFile);
272
- _chunkTRSAM62Kjs.parser.prettify(data);
273
- await _chunkTRSAM62Kjs.parser.save(data);
271
+ const data = await _chunk6OBJFY72js.parser.load(entryFile);
272
+ _chunk6OBJFY72js.parser.prettify(data);
273
+ await _chunk6OBJFY72js.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 _chunkTRSAM62Kjs.parser.load(entry);
290
- const theme = _chunkTRSAM62Kjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
289
+ const data = await _chunk6OBJFY72js.parser.load(entry);
290
+ const theme = _chunk6OBJFY72js.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 (_chunkTRSAM62Kjs.isPath.call(void 0, theme)) {
295
+ if (_chunk6OBJFY72js.isPath.call(void 0, theme)) {
296
296
  console.error("Theme is already ejected");
297
297
  process.exit(1);
298
298
  }
299
- const roots = _chunkTRSAM62Kjs.getThemeRoots.call(void 0, theme, entry);
299
+ const roots = _chunk6OBJFY72js.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 _chunkTRSAM62Kjs.parser.save(data);
311
+ await _chunk6OBJFY72js.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 _chunkTRSAM62Kjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
332
- const server = await _chunkTRSAM62Kjs.createServer.call(void 0,
331
+ const options = await _chunk6OBJFY72js.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
332
+ const server = await _chunk6OBJFY72js.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
- _chunkTRSAM62Kjs.parser.filterDisabled(options.data);
341
+ _chunk6OBJFY72js.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 _chunkTRSAM62Kjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
378
- const server = await _chunkTRSAM62Kjs.createServer.call(void 0,
377
+ const options = await _chunk6OBJFY72js.resolveOptions.call(void 0, { entry: entryFile }, "export");
378
+ const server = await _chunk6OBJFY72js.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
- _chunkTRSAM62Kjs.parser.filterDisabled(options.data);
387
+ _chunk6OBJFY72js.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${_chunkTRSAM62Kjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
448
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk6OBJFY72js.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,7 +9,7 @@ import {
9
9
  resolveOptions,
10
10
  resolveThemeName,
11
11
  version
12
- } from "./chunk-PL2KGP4V.mjs";
12
+ } from "./chunk-EXW5R6GH.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
15
  } from "./chunk-EQTZCSMP.mjs";
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkTRSAM62Kjs = require('./chunk-TRSAM62K.js');
12
+ var _chunk6OBJFY72js = require('./chunk-6OBJFY72.js');
13
13
 
14
14
 
15
15
  var _chunkYI4ZV27Kjs = require('./chunk-YI4ZV27K.js');
@@ -32,4 +32,4 @@ require('./chunk-MJQETB73.js');
32
32
 
33
33
 
34
34
 
35
- exports.ViteSlidevPlugin = _chunkQL6EDWJQjs.ViteSlidevPlugin; exports.createServer = _chunkTRSAM62Kjs.createServer; exports.createWindiCSSPlugin = _chunkYI4ZV27Kjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkTRSAM62Kjs.getAddonRoots; exports.getCLIRoot = _chunkTRSAM62Kjs.getCLIRoot; exports.getClientRoot = _chunkTRSAM62Kjs.getClientRoot; exports.getRoot = _chunkTRSAM62Kjs.getRoot; exports.getThemeRoots = _chunkTRSAM62Kjs.getThemeRoots; exports.getUserRoot = _chunkTRSAM62Kjs.getUserRoot; exports.isPath = _chunkTRSAM62Kjs.isPath; exports.parser = _chunkTRSAM62Kjs.parser; exports.resolveOptions = _chunkTRSAM62Kjs.resolveOptions;
35
+ exports.ViteSlidevPlugin = _chunkQL6EDWJQjs.ViteSlidevPlugin; exports.createServer = _chunk6OBJFY72js.createServer; exports.createWindiCSSPlugin = _chunkYI4ZV27Kjs.createWindiCSSPlugin; exports.getAddonRoots = _chunk6OBJFY72js.getAddonRoots; exports.getCLIRoot = _chunk6OBJFY72js.getCLIRoot; exports.getClientRoot = _chunk6OBJFY72js.getClientRoot; exports.getRoot = _chunk6OBJFY72js.getRoot; exports.getThemeRoots = _chunk6OBJFY72js.getThemeRoots; exports.getUserRoot = _chunk6OBJFY72js.getUserRoot; exports.isPath = _chunk6OBJFY72js.isPath; exports.parser = _chunk6OBJFY72js.parser; exports.resolveOptions = _chunk6OBJFY72js.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-PL2KGP4V.mjs";
12
+ } from "./chunk-EXW5R6GH.mjs";
13
13
  import {
14
14
  createWindiCSSPlugin
15
15
  } from "./chunk-X7P5WRYP.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.42.1",
3
+ "version": "0.42.3",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -94,9 +94,9 @@
94
94
  "vue": "^3.3.4",
95
95
  "windicss": "^3.5.6",
96
96
  "yargs": "^17.7.2",
97
- "@slidev/client": "0.42.1",
98
- "@slidev/parser": "0.42.1",
99
- "@slidev/types": "0.42.1"
97
+ "@slidev/client": "0.42.3",
98
+ "@slidev/parser": "0.42.3",
99
+ "@slidev/types": "0.42.3"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@types/plantuml-encoder": "^1.4.0",