@slidev/cli 0.40.1 → 0.40.2

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.
@@ -2400,7 +2400,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2400
2400
  import * as parser from "@slidev/parser/fs";
2401
2401
 
2402
2402
  // package.json
2403
- var version = "0.40.1";
2403
+ var version = "0.40.2";
2404
2404
 
2405
2405
  // node/themes.ts
2406
2406
  import prompts2 from "prompts";
@@ -2400,7 +2400,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2400
2400
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2401
2401
 
2402
2402
  // package.json
2403
- var version = "0.40.1";
2403
+ var version = "0.40.2";
2404
2404
 
2405
2405
  // node/themes.ts
2406
2406
  var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkGE7PFCERjs = require('./chunk-GE7PFCER.js');
12
+ var _chunkRRNUXVEAjs = require('./chunk-RRNUXVEA.js');
13
13
 
14
14
 
15
15
 
@@ -43,14 +43,14 @@ var CONFIG_RESTART_FIELDS = [
43
43
  _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) => {
44
44
  const addons = _nullishCoalesce((headmatter == null ? void 0 : headmatter.addons), () => ( []));
45
45
  const roots = [
46
- _chunkGE7PFCERjs.getUserRoot.call(void 0, {}).userRoot,
47
- ..._chunkGE7PFCERjs.getAddonRoots.call(void 0, addons, ""),
48
- _chunkGE7PFCERjs.getClientRoot.call(void 0, )
46
+ _chunkRRNUXVEAjs.getUserRoot.call(void 0, {}).userRoot,
47
+ ..._chunkRRNUXVEAjs.getAddonRoots.call(void 0, addons, ""),
48
+ _chunkRRNUXVEAjs.getClientRoot.call(void 0, )
49
49
  ];
50
50
  const mergeArrays = (a, b) => a.concat(b);
51
51
  return await _chunkQU6XIJOBjs.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], false, mergeArrays);
52
52
  });
53
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkGE7PFCERjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
53
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkRRNUXVEAjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
54
54
  cli.command(
55
55
  "* [entry]",
56
56
  "Start a local server for Slidev",
@@ -106,9 +106,9 @@ cli.command(
106
106
  async function initServer() {
107
107
  if (server)
108
108
  await server.close();
109
- const options = await _chunkGE7PFCERjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
109
+ const options = await _chunkRRNUXVEAjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
110
110
  port = userPort || await findFreePort(3030);
111
- server = await _chunkGE7PFCERjs.createServer.call(void 0,
111
+ server = await _chunkRRNUXVEAjs.createServer.call(void 0,
112
112
  options,
113
113
  {
114
114
  server: {
@@ -122,7 +122,7 @@ cli.command(
122
122
  },
123
123
  {
124
124
  onDataReload(newData, data) {
125
- if (!theme && _chunkGE7PFCERjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkGE7PFCERjs.resolveThemeName.call(void 0, data.config.theme)) {
125
+ if (!theme && _chunkRRNUXVEAjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkRRNUXVEAjs.resolveThemeName.call(void 0, data.config.theme)) {
126
126
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
127
127
  initServer();
128
128
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -241,7 +241,7 @@ cli.command(
241
241
  async (args) => {
242
242
  const { entry, theme, watch, base, download, out, inspect } = args;
243
243
  const { build } = await Promise.resolve().then(() => require("./build-L4S5TZG4.js"));
244
- const options = await _chunkGE7PFCERjs.resolveOptions.call(void 0, { entry, theme, inspect }, "build");
244
+ const options = await _chunkRRNUXVEAjs.resolveOptions.call(void 0, { entry, theme, inspect }, "build");
245
245
  if (download && !options.data.config.download)
246
246
  options.data.config.download = download;
247
247
  printInfo(options);
@@ -259,9 +259,9 @@ cli.command(
259
259
  "Format the markdown file",
260
260
  (args) => commonOptions(args).strict().help(),
261
261
  async ({ entry }) => {
262
- const data = await _chunkGE7PFCERjs.parser.load(entry);
263
- _chunkGE7PFCERjs.parser.prettify(data);
264
- await _chunkGE7PFCERjs.parser.save(data);
262
+ const data = await _chunkRRNUXVEAjs.parser.load(entry);
263
+ _chunkRRNUXVEAjs.parser.prettify(data);
264
+ await _chunkRRNUXVEAjs.parser.save(data);
265
265
  }
266
266
  );
267
267
  cli.command(
@@ -276,17 +276,17 @@ cli.command(
276
276
  default: "theme"
277
277
  }),
278
278
  async ({ entry, dir, theme: themeInput }) => {
279
- const data = await _chunkGE7PFCERjs.parser.load(entry);
280
- const theme = _chunkGE7PFCERjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
279
+ const data = await _chunkRRNUXVEAjs.parser.load(entry);
280
+ const theme = _chunkRRNUXVEAjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
281
281
  if (theme === "none") {
282
282
  console.error('Cannot eject theme "none"');
283
283
  process.exit(1);
284
284
  }
285
- if (_chunkGE7PFCERjs.isPath.call(void 0, theme)) {
285
+ if (_chunkRRNUXVEAjs.isPath.call(void 0, theme)) {
286
286
  console.error("Theme is already ejected");
287
287
  process.exit(1);
288
288
  }
289
- const roots = _chunkGE7PFCERjs.getThemeRoots.call(void 0, theme, entry);
289
+ const roots = _chunkRRNUXVEAjs.getThemeRoots.call(void 0, theme, entry);
290
290
  if (!roots.length) {
291
291
  console.error(`Could not find theme "${theme}"`);
292
292
  process.exit(1);
@@ -298,7 +298,7 @@ cli.command(
298
298
  const dirPath = `./${dir}`;
299
299
  data.slides[0].frontmatter.theme = dirPath;
300
300
  data.slides[0].raw = null;
301
- await _chunkGE7PFCERjs.parser.save(data);
301
+ await _chunkRRNUXVEAjs.parser.save(data);
302
302
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
303
303
  }
304
304
  );
@@ -317,8 +317,8 @@ cli.command(
317
317
  process.env.NODE_ENV = "production";
318
318
  const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-BRPXINGP.js"));
319
319
  const port = await findFreePort(12445);
320
- const options = await _chunkGE7PFCERjs.resolveOptions.call(void 0, { entry, theme }, "export");
321
- const server = await _chunkGE7PFCERjs.createServer.call(void 0,
320
+ const options = await _chunkRRNUXVEAjs.resolveOptions.call(void 0, { entry, theme }, "export");
321
+ const server = await _chunkRRNUXVEAjs.createServer.call(void 0,
322
322
  options,
323
323
  {
324
324
  server: { port },
@@ -327,7 +327,7 @@ cli.command(
327
327
  );
328
328
  await server.listen(port);
329
329
  printInfo(options);
330
- _chunkGE7PFCERjs.parser.filterDisabled(options.data);
330
+ _chunkRRNUXVEAjs.parser.filterDisabled(options.data);
331
331
  const output = await exportSlides({
332
332
  port,
333
333
  ...getExportOptions(args, options)
@@ -361,10 +361,10 @@ cli.command(
361
361
  process.env.NODE_ENV = "production";
362
362
  const { exportNotes } = await Promise.resolve().then(() => require("./export-BRPXINGP.js"));
363
363
  const port = await findFreePort(12445);
364
- const options = await _chunkGE7PFCERjs.resolveOptions.call(void 0, { entry }, "export");
364
+ const options = await _chunkRRNUXVEAjs.resolveOptions.call(void 0, { entry }, "export");
365
365
  if (!output)
366
366
  output = options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entry, ".md")}-export-notes`;
367
- const server = await _chunkGE7PFCERjs.createServer.call(void 0,
367
+ const server = await _chunkRRNUXVEAjs.createServer.call(void 0,
368
368
  options,
369
369
  {
370
370
  server: { port },
@@ -373,7 +373,7 @@ cli.command(
373
373
  );
374
374
  await server.listen(port);
375
375
  printInfo(options);
376
- _chunkGE7PFCERjs.parser.filterDisabled(options.data);
376
+ _chunkRRNUXVEAjs.parser.filterDisabled(options.data);
377
377
  output = await exportNotes({
378
378
  port,
379
379
  output,
@@ -433,7 +433,7 @@ function printInfo(options, port, remote, tunnelUrl) {
433
433
  console.log();
434
434
  console.log();
435
435
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
436
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkGE7PFCERjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
436
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkRRNUXVEAjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
437
437
  console.log();
438
438
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
439
439
  console.log(_kolorist.dim.call(void 0, " entry ") + _kolorist.dim.call(void 0, _path2.default.dirname(options.entry) + _path2.default.sep) + _path2.default.basename(options.entry));
package/dist/cli.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  resolveOptions,
10
10
  resolveThemeName,
11
11
  version
12
- } from "./chunk-Y7LPFI3G.mjs";
12
+ } from "./chunk-EZ2J7PMK.mjs";
13
13
  import {
14
14
  loadSetups,
15
15
  require_fast_deep_equal
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkGE7PFCERjs = require('./chunk-GE7PFCER.js');
12
+ var _chunkRRNUXVEAjs = require('./chunk-RRNUXVEA.js');
13
13
 
14
14
 
15
15
 
@@ -28,4 +28,4 @@ require('./chunk-UJ5GHVII.js');
28
28
 
29
29
 
30
30
 
31
- exports.ViteSlidevPlugin = _chunkQU6XIJOBjs.ViteSlidevPlugin; exports.createServer = _chunkGE7PFCERjs.createServer; exports.createWindiCSSPlugin = _chunkQU6XIJOBjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkGE7PFCERjs.getAddonRoots; exports.getCLIRoot = _chunkGE7PFCERjs.getCLIRoot; exports.getClientRoot = _chunkGE7PFCERjs.getClientRoot; exports.getRoot = _chunkGE7PFCERjs.getRoot; exports.getThemeRoots = _chunkGE7PFCERjs.getThemeRoots; exports.getUserRoot = _chunkGE7PFCERjs.getUserRoot; exports.isPath = _chunkGE7PFCERjs.isPath; exports.parser = _chunkGE7PFCERjs.parser; exports.resolveOptions = _chunkGE7PFCERjs.resolveOptions;
31
+ exports.ViteSlidevPlugin = _chunkQU6XIJOBjs.ViteSlidevPlugin; exports.createServer = _chunkRRNUXVEAjs.createServer; exports.createWindiCSSPlugin = _chunkQU6XIJOBjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkRRNUXVEAjs.getAddonRoots; exports.getCLIRoot = _chunkRRNUXVEAjs.getCLIRoot; exports.getClientRoot = _chunkRRNUXVEAjs.getClientRoot; exports.getRoot = _chunkRRNUXVEAjs.getRoot; exports.getThemeRoots = _chunkRRNUXVEAjs.getThemeRoots; exports.getUserRoot = _chunkRRNUXVEAjs.getUserRoot; exports.isPath = _chunkRRNUXVEAjs.isPath; exports.parser = _chunkRRNUXVEAjs.parser; exports.resolveOptions = _chunkRRNUXVEAjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-Y7LPFI3G.mjs";
12
+ } from "./chunk-EZ2J7PMK.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.40.1",
3
+ "version": "0.40.2",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -93,9 +93,9 @@
93
93
  "vue": "^3.2.47",
94
94
  "windicss": "^3.5.6",
95
95
  "yargs": "^17.6.2",
96
- "@slidev/client": "0.40.1",
97
- "@slidev/parser": "0.40.1",
98
- "@slidev/types": "0.40.1"
96
+ "@slidev/client": "0.40.2",
97
+ "@slidev/parser": "0.40.2",
98
+ "@slidev/types": "0.40.2"
99
99
  },
100
100
  "devDependencies": {
101
101
  "@types/plantuml-encoder": "^1.4.0",