@slidev/cli 0.27.17 → 0.27.18

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.
@@ -371,7 +371,7 @@ async function build(options, viteConfig = {}) {
371
371
  await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
372
372
  `, "utf-8");
373
373
  if ([true, "true", "auto"].includes(options.data.config.download)) {
374
- const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-P2HOWL7Q.mjs")));
374
+ const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-4IC3K3DC.mjs")));
375
375
  const port = 12445;
376
376
  const app = connect();
377
377
  const server = http.createServer(app);
@@ -379,7 +379,7 @@ async function build(options, viteConfig = {}) {
379
379
  await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
380
380
  `, "utf-8");
381
381
  if ([true, "true", "auto"].includes(options.data.config.download)) {
382
- const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-OUL6OBWA.js")));
382
+ const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-YPXOSS5M.js")));
383
383
  const port = 12445;
384
384
  const app = _connect2.default.call(void 0, );
385
385
  const server = _http2.default.createServer(app);
@@ -10094,7 +10094,7 @@ var require_semver2 = __commonJS({
10094
10094
  });
10095
10095
 
10096
10096
  // package.json
10097
- var version = "0.27.17";
10097
+ var version = "0.27.18";
10098
10098
 
10099
10099
  // node/themes.ts
10100
10100
  var import_ni = __toModule(require_dist());
@@ -10144,7 +10144,7 @@ var require_semver2 = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
10144
10144
  });
10145
10145
 
10146
10146
  // package.json
10147
- var version = "0.27.17";
10147
+ var version = "0.27.18";
10148
10148
 
10149
10149
  // node/themes.ts
10150
10150
  _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ var _chunk3QMXOBKWjs = require('./chunk-3QMXOBKW.js');
7
7
 
8
8
 
9
9
 
10
- var _chunkLJGOLBO3js = require('./chunk-LJGOLBO3.js');
10
+ var _chunkI4X2EWTIjs = require('./chunk-I4X2EWTI.js');
11
11
 
12
12
 
13
13
  var _chunkDVHCB7TLjs = require('./chunk-DVHCB7TL.js');
@@ -45,7 +45,7 @@ var CONFIG_RESTART_FIELDS = [
45
45
  "routerMode",
46
46
  "fonts"
47
47
  ];
48
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkLJGOLBO3js.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
48
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkI4X2EWTIjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
49
49
  cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
50
50
  alias: "p",
51
51
  type: "number",
@@ -89,7 +89,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
89
89
  async function initServer() {
90
90
  if (server)
91
91
  await server.close();
92
- const options = await _chunkLJGOLBO3js.resolveOptions.call(void 0, { entry, theme }, "dev");
92
+ const options = await _chunkI4X2EWTIjs.resolveOptions.call(void 0, { entry, theme }, "dev");
93
93
  port = userPort || await findFreePort(3030);
94
94
  server = await _chunk3QMXOBKWjs.createServer.call(void 0, options, {
95
95
  server: {
@@ -102,7 +102,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
102
102
  logLevel: log
103
103
  }, {
104
104
  onDataReload(newData, data) {
105
- if (!theme && _chunkLJGOLBO3js.resolveThemeName.call(void 0, newData.config.theme) !== _chunkLJGOLBO3js.resolveThemeName.call(void 0, data.config.theme)) {
105
+ if (!theme && _chunkI4X2EWTIjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkI4X2EWTIjs.resolveThemeName.call(void 0, data.config.theme)) {
106
106
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
107
107
  initServer();
108
108
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -178,8 +178,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
178
178
  type: "boolean",
179
179
  describe: "allow download as PDF"
180
180
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
181
- const { build } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./build-DYELZSUV.js")));
182
- const options = await _chunkLJGOLBO3js.resolveOptions.call(void 0, { entry, theme }, "build");
181
+ const { build } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./build-IDWUSCWC.js")));
182
+ const options = await _chunkI4X2EWTIjs.resolveOptions.call(void 0, { entry, theme }, "build");
183
183
  if (download && !options.data.config.download)
184
184
  options.data.config.download = download;
185
185
  printInfo(options);
@@ -202,16 +202,16 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
202
202
  default: "theme"
203
203
  }), async ({ entry, dir, theme: themeInput }) => {
204
204
  const data = await _fs.load.call(void 0, entry);
205
- const theme = _chunkLJGOLBO3js.resolveThemeName.call(void 0, themeInput || data.config.theme);
205
+ const theme = _chunkI4X2EWTIjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
206
206
  if (theme === "none") {
207
207
  console.error('Can not eject theme "none"');
208
208
  process.exit(1);
209
209
  }
210
- if (_chunkLJGOLBO3js.isPath.call(void 0, theme)) {
210
+ if (_chunkI4X2EWTIjs.isPath.call(void 0, theme)) {
211
211
  console.error("Theme is already ejected");
212
212
  process.exit(1);
213
213
  }
214
- const roots = _chunkLJGOLBO3js.getThemeRoots.call(void 0, theme, entry);
214
+ const roots = _chunkI4X2EWTIjs.getThemeRoots.call(void 0, theme, entry);
215
215
  if (!roots.length) {
216
216
  console.error(`Does not found theme "${theme}"`);
217
217
  process.exit(1);
@@ -266,9 +266,9 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
266
266
  }) => {
267
267
  output = output || `${_path2.default.basename(entry, ".md")}-export`;
268
268
  process.env.NODE_ENV = "production";
269
- const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-OUL6OBWA.js")));
269
+ const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-YPXOSS5M.js")));
270
270
  const port = await findFreePort(12445);
271
- const options = await _chunkLJGOLBO3js.resolveOptions.call(void 0, { entry, theme }, "build");
271
+ const options = await _chunkI4X2EWTIjs.resolveOptions.call(void 0, { entry, theme }, "build");
272
272
  const server = await _chunk3QMXOBKWjs.createServer.call(void 0, options, {
273
273
  server: { port },
274
274
  clearScreen: false
@@ -312,7 +312,7 @@ function printInfo(options, port, remote) {
312
312
  console.log();
313
313
  console.log();
314
314
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
315
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkLJGOLBO3js.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
315
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkI4X2EWTIjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
316
316
  console.log();
317
317
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
318
318
  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
@@ -7,7 +7,7 @@ import {
7
7
  resolveOptions,
8
8
  resolveThemeName,
9
9
  version
10
- } from "./chunk-NIUZ32MT.mjs";
10
+ } from "./chunk-4A5D2CTX.mjs";
11
11
  import {
12
12
  require_fast_deep_equal
13
13
  } from "./chunk-L7QFSRQN.mjs";
@@ -176,7 +176,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
176
176
  type: "boolean",
177
177
  describe: "allow download as PDF"
178
178
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
179
- const { build } = await Promise.resolve().then(() => __toModule(__require("./build-3PYDYXWL.mjs")));
179
+ const { build } = await Promise.resolve().then(() => __toModule(__require("./build-G4KCH5XF.mjs")));
180
180
  const options = await resolveOptions({ entry, theme }, "build");
181
181
  if (download && !options.data.config.download)
182
182
  options.data.config.download = download;
@@ -264,7 +264,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
264
264
  }) => {
265
265
  output = output || `${path.basename(entry, ".md")}-export`;
266
266
  process.env.NODE_ENV = "production";
267
- const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-P2HOWL7Q.mjs")));
267
+ const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-4IC3K3DC.mjs")));
268
268
  const port = await findFreePort(12445);
269
269
  const options = await resolveOptions({ entry, theme }, "build");
270
270
  const server = await createServer(options, {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  packageExists
3
- } from "./chunk-NIUZ32MT.mjs";
3
+ } from "./chunk-4A5D2CTX.mjs";
4
4
  import {
5
5
  __require,
6
6
  __toModule
@@ -75,8 +75,8 @@ async function exportSlides({
75
75
  const progress = createSlidevProgress();
76
76
  async function go(no, clicks) {
77
77
  progress.update(no);
78
- const path2 = `${base}${no}?print${withClicks ? "=clicks" : ""}${clicks ? `&clicks=${clicks}` : ""}`;
79
- const url = routerMode === "hash" ? `http://localhost:${port}/#${path2}` : `http://localhost:${port}${path2}`;
78
+ const path2 = `${no}?print${withClicks ? "=clicks" : ""}${clicks ? `&clicks=${clicks}` : ""}`;
79
+ const url = routerMode === "hash" ? `http://localhost:${port}${base}#${path2}` : `http://localhost:${port}${base}${path2}`;
80
80
  await page.goto(url, {
81
81
  waitUntil: "networkidle"
82
82
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkLJGOLBO3js = require('./chunk-LJGOLBO3.js');
3
+ var _chunkI4X2EWTIjs = require('./chunk-I4X2EWTI.js');
4
4
 
5
5
 
6
6
 
@@ -62,7 +62,7 @@ async function exportSlides({
62
62
  height = 1080,
63
63
  withClicks = false
64
64
  }) {
65
- if (!_chunkLJGOLBO3js.packageExists.call(void 0, "playwright-chromium"))
65
+ if (!_chunkI4X2EWTIjs.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
67
  const { chromium } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "playwright-chromium")));
68
68
  const browser = await chromium.launch();
@@ -77,8 +77,8 @@ async function exportSlides({
77
77
  const progress = createSlidevProgress();
78
78
  async function go(no, clicks) {
79
79
  progress.update(no);
80
- const path2 = `${base}${no}?print${withClicks ? "=clicks" : ""}${clicks ? `&clicks=${clicks}` : ""}`;
81
- const url = routerMode === "hash" ? `http://localhost:${port}/#${path2}` : `http://localhost:${port}${path2}`;
80
+ const path2 = `${no}?print${withClicks ? "=clicks" : ""}${clicks ? `&clicks=${clicks}` : ""}`;
81
+ const url = routerMode === "hash" ? `http://localhost:${port}${base}#${path2}` : `http://localhost:${port}${base}${path2}`;
82
82
  await page.goto(url, {
83
83
  waitUntil: "networkidle"
84
84
  });
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var _chunk3QMXOBKWjs = require('./chunk-3QMXOBKW.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkLJGOLBO3js = require('./chunk-LJGOLBO3.js');
11
+ var _chunkI4X2EWTIjs = require('./chunk-I4X2EWTI.js');
12
12
 
13
13
 
14
14
 
@@ -36,4 +36,4 @@ var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs
36
36
 
37
37
 
38
38
 
39
- exports.ViteSlidevPlugin = _chunkDVHCB7TLjs.ViteSlidevPlugin; exports.createServer = _chunk3QMXOBKWjs.createServer; exports.createWindiCSSPlugin = _chunkDVHCB7TLjs.createWindiCSSPlugin; exports.getCLIRoot = _chunkLJGOLBO3js.getCLIRoot; exports.getClientRoot = _chunkLJGOLBO3js.getClientRoot; exports.getThemeRoots = _chunkLJGOLBO3js.getThemeRoots; exports.getUserRoot = _chunkLJGOLBO3js.getUserRoot; exports.isPath = _chunkLJGOLBO3js.isPath; exports.parser = parser; exports.resolveOptions = _chunkLJGOLBO3js.resolveOptions;
39
+ exports.ViteSlidevPlugin = _chunkDVHCB7TLjs.ViteSlidevPlugin; exports.createServer = _chunk3QMXOBKWjs.createServer; exports.createWindiCSSPlugin = _chunkDVHCB7TLjs.createWindiCSSPlugin; exports.getCLIRoot = _chunkI4X2EWTIjs.getCLIRoot; exports.getClientRoot = _chunkI4X2EWTIjs.getClientRoot; exports.getThemeRoots = _chunkI4X2EWTIjs.getThemeRoots; exports.getUserRoot = _chunkI4X2EWTIjs.getUserRoot; exports.isPath = _chunkI4X2EWTIjs.isPath; exports.parser = parser; exports.resolveOptions = _chunkI4X2EWTIjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  getUserRoot,
9
9
  isPath,
10
10
  resolveOptions
11
- } from "./chunk-NIUZ32MT.mjs";
11
+ } from "./chunk-4A5D2CTX.mjs";
12
12
  import {
13
13
  ViteSlidevPlugin,
14
14
  createWindiCSSPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.27.17",
3
+ "version": "0.27.18",
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.7",
44
44
  "@iconify-json/ph": "^1.0.1",
45
- "@slidev/client": "0.27.17",
46
- "@slidev/parser": "0.27.17",
47
- "@slidev/types": "0.27.17",
45
+ "@slidev/client": "0.27.18",
46
+ "@slidev/parser": "0.27.18",
47
+ "@slidev/types": "0.27.18",
48
48
  "@vitejs/plugin-vue": "^1.9.3",
49
49
  "@vue/compiler-sfc": "^3.2.20",
50
50
  "cli-progress": "^3.9.1",