@slidev/cli 0.32.1 → 0.32.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
3
 
4
- var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
4
+ var _chunkIW3TSLZFjs = require('./chunk-IW3TSLZF.js');
5
5
 
6
6
 
7
7
 
@@ -655,13 +655,13 @@ async function build(options, viteConfig = {}) {
655
655
  let originalIndexHTML;
656
656
  if (_fsextra2.default.existsSync(indexPath))
657
657
  originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
658
- await _fsextra2.default.writeFile(indexPath, await _chunk64ARPHPAjs.getIndexHtml.call(void 0, options), "utf-8");
658
+ await _fsextra2.default.writeFile(indexPath, await _chunkIW3TSLZFjs.getIndexHtml.call(void 0, options), "utf-8");
659
659
  let config = void 0;
660
660
  try {
661
661
  const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
662
662
  root: options.userRoot,
663
663
  plugins: [
664
- await _chunk64ARPHPAjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
664
+ await _chunkIW3TSLZFjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
665
665
  {
666
666
  name: "resolve-config",
667
667
  configResolved(_config) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml
4
- } from "./chunk-2OKC6HYP.mjs";
4
+ } from "./chunk-WZ6OPJJF.mjs";
5
5
  import {
6
6
  __require,
7
7
  __spreadValues,
@@ -250,13 +250,13 @@ var dependencies = {
250
250
  "@vueuse/core": "^8.5.0",
251
251
  "@vueuse/head": "^0.7.6",
252
252
  "@vueuse/motion": "^2.0.0-beta.18",
253
- codemirror: "^5.65.3",
253
+ codemirror: "^5.65.4",
254
254
  defu: "^6.0.0",
255
255
  drauu: "^0.3.0",
256
256
  "file-saver": "^2.0.5",
257
257
  "js-base64": "^3.7.2",
258
258
  "js-yaml": "^4.1.0",
259
- katex: "^0.15.3",
259
+ katex: "^0.15.6",
260
260
  mermaid: "^9.1.1",
261
261
  "monaco-editor": "^0.33.0",
262
262
  nanoid: "^3.3.4",
@@ -264,7 +264,7 @@ var dependencies = {
264
264
  recordrtc: "^5.6.2",
265
265
  resolve: "^1.22.0",
266
266
  "vite-plugin-windicss": "^1.8.4",
267
- vue: "^3.2.34",
267
+ vue: "^3.2.35",
268
268
  "vue-router": "^4.0.15",
269
269
  "vue-starport": "^0.2.10",
270
270
  windicss: "^3.5.4"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ViteSlidevPlugin
3
- } from "./chunk-2OKC6HYP.mjs";
3
+ } from "./chunk-WZ6OPJJF.mjs";
4
4
  import {
5
5
  __commonJS,
6
6
  __dirname,
@@ -2401,7 +2401,7 @@ init_esm_shims();
2401
2401
  import * as parser from "@slidev/parser/fs";
2402
2402
 
2403
2403
  // package.json
2404
- var version = "0.32.1";
2404
+ var version = "0.32.2";
2405
2405
 
2406
2406
  // node/themes.ts
2407
2407
  init_esm_shims();
@@ -251,13 +251,13 @@ var dependencies = {
251
251
  "@vueuse/core": "^8.5.0",
252
252
  "@vueuse/head": "^0.7.6",
253
253
  "@vueuse/motion": "^2.0.0-beta.18",
254
- codemirror: "^5.65.3",
254
+ codemirror: "^5.65.4",
255
255
  defu: "^6.0.0",
256
256
  drauu: "^0.3.0",
257
257
  "file-saver": "^2.0.5",
258
258
  "js-base64": "^3.7.2",
259
259
  "js-yaml": "^4.1.0",
260
- katex: "^0.15.3",
260
+ katex: "^0.15.6",
261
261
  mermaid: "^9.1.1",
262
262
  "monaco-editor": "^0.33.0",
263
263
  nanoid: "^3.3.4",
@@ -265,7 +265,7 @@ var dependencies = {
265
265
  recordrtc: "^5.6.2",
266
266
  resolve: "^1.22.0",
267
267
  "vite-plugin-windicss": "^1.8.4",
268
- vue: "^3.2.34",
268
+ vue: "^3.2.35",
269
269
  "vue-router": "^4.0.15",
270
270
  "vue-starport": "^0.2.10",
271
271
  windicss: "^3.5.4"
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
3
+ var _chunkIW3TSLZFjs = require('./chunk-IW3TSLZF.js');
4
4
 
5
5
 
6
6
 
@@ -2389,7 +2389,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2389
2389
  ]
2390
2390
  },
2391
2391
  plugins: [
2392
- await _chunk64ARPHPAjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2392
+ await _chunkIW3TSLZFjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2393
2393
  ]
2394
2394
  }));
2395
2395
  return server;
@@ -2400,7 +2400,7 @@ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
2400
2400
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2401
2401
 
2402
2402
  // package.json
2403
- var version = "0.32.1";
2403
+ var version = "0.32.2";
2404
2404
 
2405
2405
  // node/themes.ts
2406
2406
  _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
package/dist/cli.js CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkALT27UGEjs = require('./chunk-ALT27UGE.js');
9
+ var _chunkYCIQGGRRjs = require('./chunk-YCIQGGRR.js');
10
10
 
11
11
 
12
- var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
12
+ var _chunkIW3TSLZFjs = require('./chunk-IW3TSLZF.js');
13
13
 
14
14
 
15
15
 
@@ -18,7 +18,7 @@ var _chunkJWGORJY6js = require('./chunk-JWGORJY6.js');
18
18
 
19
19
  // node/cli.ts
20
20
  _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
21
- var import_fast_deep_equal = _chunkJWGORJY6js.__toESM.call(void 0, _chunk64ARPHPAjs.require_fast_deep_equal.call(void 0, ));
21
+ var import_fast_deep_equal = _chunkJWGORJY6js.__toESM.call(void 0, _chunkIW3TSLZFjs.require_fast_deep_equal.call(void 0, ));
22
22
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
23
23
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
24
24
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
@@ -36,7 +36,7 @@ var CONFIG_RESTART_FIELDS = [
36
36
  "routerMode",
37
37
  "fonts"
38
38
  ];
39
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkALT27UGEjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
39
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkYCIQGGRRjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
40
40
  cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
41
41
  alias: "p",
42
42
  type: "number",
@@ -79,9 +79,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
79
79
  async function initServer() {
80
80
  if (server)
81
81
  await server.close();
82
- const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
82
+ const options = await _chunkYCIQGGRRjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
83
83
  port = userPort || await findFreePort(3030);
84
- server = await _chunkALT27UGEjs.createServer.call(void 0, options, {
84
+ server = await _chunkYCIQGGRRjs.createServer.call(void 0, options, {
85
85
  server: {
86
86
  port,
87
87
  strictPort: true,
@@ -92,7 +92,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
92
92
  logLevel: log
93
93
  }, {
94
94
  onDataReload(newData, data) {
95
- if (!theme && _chunkALT27UGEjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkALT27UGEjs.resolveThemeName.call(void 0, data.config.theme)) {
95
+ if (!theme && _chunkYCIQGGRRjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkYCIQGGRRjs.resolveThemeName.call(void 0, data.config.theme)) {
96
96
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
97
97
  initServer();
98
98
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -168,8 +168,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
168
168
  type: "boolean",
169
169
  describe: "allow download as PDF"
170
170
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
171
- const { build } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "./build-OV5R3MX7.js")));
172
- const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, theme }, "build");
171
+ const { build } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "./build-M2QTEV63.js")));
172
+ const options = await _chunkYCIQGGRRjs.resolveOptions.call(void 0, { entry, theme }, "build");
173
173
  if (download && !options.data.config.download)
174
174
  options.data.config.download = download;
175
175
  printInfo(options);
@@ -182,26 +182,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
182
182
  });
183
183
  });
184
184
  cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
185
- const data = await _chunkALT27UGEjs.parser.load(entry);
186
- _chunkALT27UGEjs.parser.prettify(data);
187
- await _chunkALT27UGEjs.parser.save(data);
185
+ const data = await _chunkYCIQGGRRjs.parser.load(entry);
186
+ _chunkYCIQGGRRjs.parser.prettify(data);
187
+ await _chunkYCIQGGRRjs.parser.save(data);
188
188
  });
189
189
  cli.command("theme [subcommand]", "Theme related operations", (command) => {
190
190
  return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
191
191
  type: "string",
192
192
  default: "theme"
193
193
  }), async ({ entry, dir, theme: themeInput }) => {
194
- const data = await _chunkALT27UGEjs.parser.load(entry);
195
- const theme = _chunkALT27UGEjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
194
+ const data = await _chunkYCIQGGRRjs.parser.load(entry);
195
+ const theme = _chunkYCIQGGRRjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
196
196
  if (theme === "none") {
197
197
  console.error('Can not eject theme "none"');
198
198
  process.exit(1);
199
199
  }
200
- if (_chunkALT27UGEjs.isPath.call(void 0, theme)) {
200
+ if (_chunkYCIQGGRRjs.isPath.call(void 0, theme)) {
201
201
  console.error("Theme is already ejected");
202
202
  process.exit(1);
203
203
  }
204
- const roots = _chunkALT27UGEjs.getThemeRoots.call(void 0, theme, entry);
204
+ const roots = _chunkYCIQGGRRjs.getThemeRoots.call(void 0, theme, entry);
205
205
  if (!roots.length) {
206
206
  console.error(`Does not found theme "${theme}"`);
207
207
  process.exit(1);
@@ -213,7 +213,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
213
213
  const dirPath = `./${dir}`;
214
214
  data.slides[0].frontmatter.theme = dirPath;
215
215
  data.slides[0].raw = null;
216
- await _chunkALT27UGEjs.parser.save(data);
216
+ await _chunkYCIQGGRRjs.parser.save(data);
217
217
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
218
218
  });
219
219
  }, () => {
@@ -257,15 +257,15 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
257
257
  process.env.NODE_ENV = "production";
258
258
  const { exportSlides } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "./export-M6HJUIFY.js")));
259
259
  const port = await findFreePort(12445);
260
- const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, theme }, "build");
260
+ const options = await _chunkYCIQGGRRjs.resolveOptions.call(void 0, { entry, theme }, "build");
261
261
  output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
262
- const server = await _chunkALT27UGEjs.createServer.call(void 0, options, {
262
+ const server = await _chunkYCIQGGRRjs.createServer.call(void 0, options, {
263
263
  server: { port },
264
264
  clearScreen: false
265
265
  });
266
266
  await server.listen(port);
267
267
  printInfo(options);
268
- _chunkALT27UGEjs.parser.filterDisabled(options.data);
268
+ _chunkYCIQGGRRjs.parser.filterDisabled(options.data);
269
269
  const width = options.data.config.canvasWidth;
270
270
  const height = Math.round(width / options.data.config.aspectRatio);
271
271
  output = await exportSlides({
@@ -303,7 +303,7 @@ function printInfo(options, port, remote) {
303
303
  console.log();
304
304
  console.log();
305
305
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
306
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkALT27UGEjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
306
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkYCIQGGRRjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
307
307
  console.log();
308
308
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
309
309
  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
@@ -6,10 +6,10 @@ import {
6
6
  resolveOptions,
7
7
  resolveThemeName,
8
8
  version
9
- } from "./chunk-36AQIIEM.mjs";
9
+ } from "./chunk-KIXPXAQ6.mjs";
10
10
  import {
11
11
  require_fast_deep_equal
12
- } from "./chunk-2OKC6HYP.mjs";
12
+ } from "./chunk-WZ6OPJJF.mjs";
13
13
  import {
14
14
  __dirname,
15
15
  __require,
@@ -169,7 +169,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
169
169
  type: "boolean",
170
170
  describe: "allow download as PDF"
171
171
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
172
- const { build } = await Promise.resolve().then(() => __toESM(__require("./build-RKDPZPJ4.mjs")));
172
+ const { build } = await Promise.resolve().then(() => __toESM(__require("./build-YVXTTUTD.mjs")));
173
173
  const options = await resolveOptions({ entry, theme }, "build");
174
174
  if (download && !options.data.config.download)
175
175
  options.data.config.download = download;
package/dist/index.js CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkALT27UGEjs = require('./chunk-ALT27UGE.js');
12
+ var _chunkYCIQGGRRjs = require('./chunk-YCIQGGRR.js');
13
13
 
14
14
 
15
15
 
16
- var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
16
+ var _chunkIW3TSLZFjs = require('./chunk-IW3TSLZF.js');
17
17
 
18
18
 
19
19
  var _chunkJWGORJY6js = require('./chunk-JWGORJY6.js');
@@ -36,4 +36,4 @@ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
36
36
 
37
37
 
38
38
 
39
- exports.ViteSlidevPlugin = _chunk64ARPHPAjs.ViteSlidevPlugin; exports.createServer = _chunkALT27UGEjs.createServer; exports.createWindiCSSPlugin = _chunk64ARPHPAjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkALT27UGEjs.getAddonRoots; exports.getCLIRoot = _chunkALT27UGEjs.getCLIRoot; exports.getClientRoot = _chunkALT27UGEjs.getClientRoot; exports.getRoot = _chunkALT27UGEjs.getRoot; exports.getThemeRoots = _chunkALT27UGEjs.getThemeRoots; exports.getUserRoot = _chunkALT27UGEjs.getUserRoot; exports.isPath = _chunkALT27UGEjs.isPath; exports.parser = _chunkALT27UGEjs.parser; exports.resolveOptions = _chunkALT27UGEjs.resolveOptions;
39
+ exports.ViteSlidevPlugin = _chunkIW3TSLZFjs.ViteSlidevPlugin; exports.createServer = _chunkYCIQGGRRjs.createServer; exports.createWindiCSSPlugin = _chunkIW3TSLZFjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkYCIQGGRRjs.getAddonRoots; exports.getCLIRoot = _chunkYCIQGGRRjs.getCLIRoot; exports.getClientRoot = _chunkYCIQGGRRjs.getClientRoot; exports.getRoot = _chunkYCIQGGRRjs.getRoot; exports.getThemeRoots = _chunkYCIQGGRRjs.getThemeRoots; exports.getUserRoot = _chunkYCIQGGRRjs.getUserRoot; exports.isPath = _chunkYCIQGGRRjs.isPath; exports.parser = _chunkYCIQGGRRjs.parser; exports.resolveOptions = _chunkYCIQGGRRjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,11 +9,11 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-36AQIIEM.mjs";
12
+ } from "./chunk-KIXPXAQ6.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
16
- } from "./chunk-2OKC6HYP.mjs";
16
+ } from "./chunk-WZ6OPJJF.mjs";
17
17
  import {
18
18
  init_esm_shims
19
19
  } from "./chunk-NOFZO6W4.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -42,13 +42,13 @@
42
42
  "@antfu/utils": "^0.5.2",
43
43
  "@iconify-json/carbon": "^1.1.5",
44
44
  "@iconify-json/ph": "^1.1.1",
45
- "@slidev/client": "0.32.1",
46
- "@slidev/parser": "0.32.1",
47
- "@slidev/types": "0.32.1",
45
+ "@slidev/client": "0.32.2",
46
+ "@slidev/parser": "0.32.2",
47
+ "@slidev/types": "0.32.2",
48
48
  "@vitejs/plugin-vue": "^2.3.3",
49
- "@vue/compiler-sfc": "^3.2.34",
49
+ "@vue/compiler-sfc": "^3.2.35",
50
50
  "cli-progress": "^3.11.1",
51
- "codemirror": "^5.65.3",
51
+ "codemirror": "^5.65.4",
52
52
  "connect": "^3.7.0",
53
53
  "debug": "^4.3.4",
54
54
  "fast-glob": "^3.2.11",
@@ -58,7 +58,7 @@
58
58
  "is-installed-globally": "^0.4.0",
59
59
  "jiti": "^1.13.0",
60
60
  "js-base64": "^3.7.2",
61
- "katex": "^0.15.3",
61
+ "katex": "^0.15.6",
62
62
  "kolorist": "^1.5.1",
63
63
  "markdown-it": "^13.0.1",
64
64
  "markdown-it-footnote": "^3.0.3",
@@ -80,7 +80,7 @@
80
80
  "vite-plugin-remote-assets": "^0.2.2",
81
81
  "vite-plugin-vue-server-ref": "^0.2.4",
82
82
  "vite-plugin-windicss": "^1.8.4",
83
- "vue": "^3.2.34",
83
+ "vue": "^3.2.35",
84
84
  "windicss": "^3.5.4",
85
85
  "yargs": "^17.5.1"
86
86
  },