@slidev/cli 0.27.2 → 0.27.6

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,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5EVCSIISjs = require('./chunk-5EVCSIIS.js');
3
+ var _chunkMI63EDKHjs = require('./chunk-MI63EDKH.js');
4
4
 
5
5
 
6
- var _chunkNLFQOKKUjs = require('./chunk-NLFQOKKU.js');
6
+ var _chunk37BJZLTEjs = require('./chunk-37BJZLTE.js');
7
7
 
8
8
  // node/server.ts
9
- _chunkNLFQOKKUjs.init_cjs_shims.call(void 0, );
9
+ _chunk37BJZLTEjs.init_cjs_shims.call(void 0, );
10
10
  var _path = require('path');
11
11
  var _vite = require('vite');
12
12
  async function createServer(options, viteConfig = {}, serverOptions = {}) {
@@ -20,7 +20,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
20
20
  ]
21
21
  },
22
22
  plugins: [
23
- await _chunk5EVCSIISjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
23
+ await _chunkMI63EDKHjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
24
24
  ]
25
25
  }));
26
26
  return server;
package/dist/cli.js CHANGED
@@ -1,25 +1,25 @@
1
1
  "use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkGCFWG7NWjs = require('./chunk-GCFWG7NW.js');
3
+ var _chunkZU4P7PRPjs = require('./chunk-ZU4P7PRP.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkBDPVGG72js = require('./chunk-BDPVGG72.js');
10
+ var _chunkZASSEGOWjs = require('./chunk-ZASSEGOW.js');
11
11
 
12
12
 
13
- var _chunk5EVCSIISjs = require('./chunk-5EVCSIIS.js');
13
+ var _chunkMI63EDKHjs = require('./chunk-MI63EDKH.js');
14
14
 
15
15
 
16
16
 
17
17
 
18
- var _chunkNLFQOKKUjs = require('./chunk-NLFQOKKU.js');
18
+ var _chunk37BJZLTEjs = require('./chunk-37BJZLTE.js');
19
19
 
20
20
  // node/cli.ts
21
- _chunkNLFQOKKUjs.init_cjs_shims.call(void 0, );
22
- var import_fast_deep_equal = _chunkNLFQOKKUjs.__toModule.call(void 0, _chunk5EVCSIISjs.require_fast_deep_equal.call(void 0, ));
21
+ _chunk37BJZLTEjs.init_cjs_shims.call(void 0, );
22
+ var import_fast_deep_equal = _chunk37BJZLTEjs.__toModule.call(void 0, _chunkMI63EDKHjs.require_fast_deep_equal.call(void 0, ));
23
23
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
24
24
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
25
25
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
@@ -42,7 +42,7 @@ var CONFIG_RESTART_FIELDS = [
42
42
  "routerMode",
43
43
  "fonts"
44
44
  ];
45
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkBDPVGG72js.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
45
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkZASSEGOWjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
46
46
  cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
47
47
  alias: "p",
48
48
  type: "number",
@@ -86,9 +86,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
86
86
  async function initServer() {
87
87
  if (server)
88
88
  await server.close();
89
- const options = await _chunkBDPVGG72js.resolveOptions.call(void 0, { entry, theme }, "dev");
89
+ const options = await _chunkZASSEGOWjs.resolveOptions.call(void 0, { entry, theme }, "dev");
90
90
  port = userPort || await findFreePort(3030);
91
- server = await _chunkGCFWG7NWjs.createServer.call(void 0, options, {
91
+ server = await _chunkZU4P7PRPjs.createServer.call(void 0, options, {
92
92
  server: {
93
93
  port,
94
94
  strictPort: true,
@@ -99,7 +99,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
99
99
  logLevel: log
100
100
  }, {
101
101
  onDataReload(newData, data) {
102
- if (!theme && _chunkBDPVGG72js.resolveThemeName.call(void 0, newData.config.theme) !== _chunkBDPVGG72js.resolveThemeName.call(void 0, data.config.theme)) {
102
+ if (!theme && _chunkZASSEGOWjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkZASSEGOWjs.resolveThemeName.call(void 0, data.config.theme)) {
103
103
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
104
104
  initServer();
105
105
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -169,8 +169,8 @@ 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(() => _chunkNLFQOKKUjs.__toModule.call(void 0, _chunkNLFQOKKUjs.__require.call(void 0, "./build-7GTTVGHH.js")));
173
- const options = await _chunkBDPVGG72js.resolveOptions.call(void 0, { entry, theme }, "build");
172
+ const { build } = await Promise.resolve().then(() => _chunk37BJZLTEjs.__toModule.call(void 0, _chunk37BJZLTEjs.__require.call(void 0, "./build-NVEGUEQH.js")));
173
+ const options = await _chunkZASSEGOWjs.resolveOptions.call(void 0, { entry, theme }, "build");
174
174
  if (download && !options.data.config.download)
175
175
  options.data.config.download = download;
176
176
  printInfo(options);
@@ -193,16 +193,16 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
193
193
  default: "theme"
194
194
  }), async ({ entry, dir, theme: themeInput }) => {
195
195
  const data = await _fs.load.call(void 0, entry);
196
- const theme = _chunkBDPVGG72js.resolveThemeName.call(void 0, themeInput || data.config.theme);
196
+ const theme = _chunkZASSEGOWjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
197
197
  if (theme === "none") {
198
198
  console.error('Can not eject theme "none"');
199
199
  process.exit(1);
200
200
  }
201
- if (_chunkBDPVGG72js.isPath.call(void 0, theme)) {
201
+ if (_chunkZASSEGOWjs.isPath.call(void 0, theme)) {
202
202
  console.error("Theme is already ejected");
203
203
  process.exit(1);
204
204
  }
205
- const roots = _chunkBDPVGG72js.getThemeRoots.call(void 0, theme, entry);
205
+ const roots = _chunkZASSEGOWjs.getThemeRoots.call(void 0, theme, entry);
206
206
  if (!roots.length) {
207
207
  console.error(`Does not found theme "${theme}"`);
208
208
  process.exit(1);
@@ -257,10 +257,10 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
257
257
  }) => {
258
258
  output = output || `${_path2.default.basename(entry, ".md")}-export`;
259
259
  process.env.NODE_ENV = "production";
260
- const { exportSlides } = await Promise.resolve().then(() => _chunkNLFQOKKUjs.__toModule.call(void 0, _chunkNLFQOKKUjs.__require.call(void 0, "./export-KNUM3J77.js")));
260
+ const { exportSlides } = await Promise.resolve().then(() => _chunk37BJZLTEjs.__toModule.call(void 0, _chunk37BJZLTEjs.__require.call(void 0, "./export-PTG2WTMI.js")));
261
261
  const port = await findFreePort(12445);
262
- const options = await _chunkBDPVGG72js.resolveOptions.call(void 0, { entry, theme }, "build");
263
- const server = await _chunkGCFWG7NWjs.createServer.call(void 0, options, {
262
+ const options = await _chunkZASSEGOWjs.resolveOptions.call(void 0, { entry, theme }, "build");
263
+ const server = await _chunkZU4P7PRPjs.createServer.call(void 0, options, {
264
264
  server: { port },
265
265
  clearScreen: false
266
266
  });
@@ -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${_chunkBDPVGG72js.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
306
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkZASSEGOWjs.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
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-CJJPYJNC.mjs";
3
+ } from "./chunk-VQUVBFPF.mjs";
4
4
  import {
5
5
  getThemeRoots,
6
6
  isPath,
7
7
  resolveOptions,
8
8
  resolveThemeName,
9
9
  version
10
- } from "./chunk-POOP77XV.mjs";
10
+ } from "./chunk-CD4RHQZ5.mjs";
11
11
  import {
12
12
  require_fast_deep_equal
13
- } from "./chunk-4T4RQZGD.mjs";
13
+ } from "./chunk-WV5JPB3F.mjs";
14
14
  import {
15
15
  __require,
16
16
  __toModule
@@ -167,7 +167,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
167
167
  type: "boolean",
168
168
  describe: "allow download as PDF"
169
169
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
170
- const { build } = await Promise.resolve().then(() => __toModule(__require("./build-PFCXTLJS.mjs")));
170
+ const { build } = await Promise.resolve().then(() => __toModule(__require("./build-NFYEZM3A.mjs")));
171
171
  const options = await resolveOptions({ entry, theme }, "build");
172
172
  if (download && !options.data.config.download)
173
173
  options.data.config.download = download;
@@ -255,7 +255,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
255
255
  }) => {
256
256
  output = output || `${path.basename(entry, ".md")}-export`;
257
257
  process.env.NODE_ENV = "production";
258
- const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-IUPI7O4L.mjs")));
258
+ const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-WWXR6L7F.mjs")));
259
259
  const port = await findFreePort(12445);
260
260
  const options = await resolveOptions({ entry, theme }, "build");
261
261
  const server = await createServer(options, {
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkBDPVGG72js = require('./chunk-BDPVGG72.js');
3
+ var _chunkZASSEGOWjs = require('./chunk-ZASSEGOW.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkNLFQOKKUjs = require('./chunk-NLFQOKKU.js');
8
+ var _chunk37BJZLTEjs = require('./chunk-37BJZLTE.js');
9
9
 
10
10
  // node/export.ts
11
- _chunkNLFQOKKUjs.init_cjs_shims.call(void 0, );
11
+ _chunk37BJZLTEjs.init_cjs_shims.call(void 0, );
12
12
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
13
13
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
14
14
  var _pdflib = require('pdf-lib');
@@ -62,9 +62,9 @@ async function exportSlides({
62
62
  height = 1080,
63
63
  withClicks = false
64
64
  }) {
65
- if (!_chunkBDPVGG72js.packageExists.call(void 0, "playwright-chromium"))
65
+ if (!_chunkZASSEGOWjs.packageExists.call(void 0, "playwright-chromium"))
66
66
  throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i playwright-chromium`");
67
- const { chromium } = await Promise.resolve().then(() => _chunkNLFQOKKUjs.__toModule.call(void 0, _chunkNLFQOKKUjs.__require.call(void 0, "playwright-chromium")));
67
+ const { chromium } = await Promise.resolve().then(() => _chunk37BJZLTEjs.__toModule.call(void 0, _chunk37BJZLTEjs.__require.call(void 0, "playwright-chromium")));
68
68
  const browser = await chromium.launch();
69
69
  const context = await browser.newContext({
70
70
  viewport: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  packageExists
3
- } from "./chunk-POOP77XV.mjs";
3
+ } from "./chunk-CD4RHQZ5.mjs";
4
4
  import {
5
5
  __require,
6
6
  __toModule
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
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; } }
2
2
 
3
- var _chunkGCFWG7NWjs = require('./chunk-GCFWG7NW.js');
3
+ var _chunkZU4P7PRPjs = require('./chunk-ZU4P7PRP.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkBDPVGG72js = require('./chunk-BDPVGG72.js');
10
+ var _chunkZASSEGOWjs = require('./chunk-ZASSEGOW.js');
11
11
 
12
12
 
13
13
 
14
- var _chunk5EVCSIISjs = require('./chunk-5EVCSIIS.js');
14
+ var _chunkMI63EDKHjs = require('./chunk-MI63EDKH.js');
15
15
 
16
16
 
17
- var _chunkNLFQOKKUjs = require('./chunk-NLFQOKKU.js');
17
+ var _chunk37BJZLTEjs = require('./chunk-37BJZLTE.js');
18
18
 
19
19
  // node/index.ts
20
- _chunkNLFQOKKUjs.init_cjs_shims.call(void 0, );
20
+ _chunk37BJZLTEjs.init_cjs_shims.call(void 0, );
21
21
 
22
22
  // node/declare.ts
23
- _chunkNLFQOKKUjs.init_cjs_shims.call(void 0, );
23
+ _chunk37BJZLTEjs.init_cjs_shims.call(void 0, );
24
24
 
25
25
  // node/index.ts
26
26
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
@@ -34,4 +34,4 @@ var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs
34
34
 
35
35
 
36
36
 
37
- exports.ViteSlidevPlugin = _chunk5EVCSIISjs.ViteSlidevPlugin; exports.createServer = _chunkGCFWG7NWjs.createServer; exports.createWindiCSSPlugin = _chunk5EVCSIISjs.createWindiCSSPlugin; exports.getCLIRoot = _chunkBDPVGG72js.getCLIRoot; exports.getClientRoot = _chunkBDPVGG72js.getClientRoot; exports.getThemeRoots = _chunkBDPVGG72js.getThemeRoots; exports.isPath = _chunkBDPVGG72js.isPath; exports.parser = parser; exports.resolveOptions = _chunkBDPVGG72js.resolveOptions;
37
+ exports.ViteSlidevPlugin = _chunkMI63EDKHjs.ViteSlidevPlugin; exports.createServer = _chunkZU4P7PRPjs.createServer; exports.createWindiCSSPlugin = _chunkMI63EDKHjs.createWindiCSSPlugin; exports.getCLIRoot = _chunkZASSEGOWjs.getCLIRoot; exports.getClientRoot = _chunkZASSEGOWjs.getClientRoot; exports.getThemeRoots = _chunkZASSEGOWjs.getThemeRoots; exports.isPath = _chunkZASSEGOWjs.isPath; exports.parser = parser; exports.resolveOptions = _chunkZASSEGOWjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-CJJPYJNC.mjs";
3
+ } from "./chunk-VQUVBFPF.mjs";
4
4
  import {
5
5
  getCLIRoot,
6
6
  getClientRoot,
7
7
  getThemeRoots,
8
8
  isPath,
9
9
  resolveOptions
10
- } from "./chunk-POOP77XV.mjs";
10
+ } from "./chunk-CD4RHQZ5.mjs";
11
11
  import {
12
12
  ViteSlidevPlugin,
13
13
  createWindiCSSPlugin
14
- } from "./chunk-4T4RQZGD.mjs";
14
+ } from "./chunk-WV5JPB3F.mjs";
15
15
  import "./chunk-DFNSCAEG.mjs";
16
16
 
17
17
  // node/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.27.2",
3
+ "version": "0.27.6",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -42,9 +42,9 @@
42
42
  "@antfu/utils": "^0.3.0",
43
43
  "@iconify-json/carbon": "^1.0.3",
44
44
  "@iconify-json/ph": "^1.0.1",
45
- "@slidev/client": "0.27.2",
46
- "@slidev/parser": "0.27.2",
47
- "@slidev/types": "0.27.2",
45
+ "@slidev/client": "0.27.6",
46
+ "@slidev/parser": "0.27.6",
47
+ "@slidev/types": "0.27.6",
48
48
  "@vitejs/plugin-vue": "^1.9.2",
49
49
  "@vue/compiler-sfc": "^3.2.19",
50
50
  "cli-progress": "^3.9.1",
@@ -55,7 +55,7 @@
55
55
  "fs-extra": "^10.0.0",
56
56
  "import-from": "^4.0.0",
57
57
  "is-installed-globally": "^0.4.0",
58
- "jiti": "^1.12.5",
58
+ "jiti": "^1.12.6",
59
59
  "js-base64": "^3.7.2",
60
60
  "katex": "^0.13.18",
61
61
  "kolorist": "^1.5.0",
@@ -72,7 +72,7 @@
72
72
  "resolve-from": "^5.0.0",
73
73
  "resolve-global": "^1.0.0",
74
74
  "shiki": "^0.9.11",
75
- "unplugin-icons": "^0.12.6",
75
+ "unplugin-icons": "^0.12.9",
76
76
  "unplugin-vue-components": "^0.15.6",
77
77
  "vite": "^2.6.2",
78
78
  "vite-plugin-md": "^0.11.1",
@@ -80,7 +80,7 @@
80
80
  "vite-plugin-vue-server-ref": "^0.2.4",
81
81
  "vite-plugin-windicss": "^1.4.9",
82
82
  "vue": "^3.2.19",
83
- "windicss": "^3.1.8",
83
+ "windicss": "^3.1.9",
84
84
  "yargs": "^17.2.1"
85
85
  },
86
86
  "devDependencies": {