@slidev/cli 0.43.8 → 0.43.9

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.
package/bin/slidev.mjs ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+ import ('../dist/cli.mjs')
@@ -2,10 +2,10 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-6A4F74ZN.mjs";
6
- import "./chunk-43ON36K4.mjs";
7
- import "./chunk-CPYGYVJ2.mjs";
8
- import "./chunk-QHOBBTS4.mjs";
5
+ } from "./chunk-CNR3FZCA.mjs";
6
+ import "./chunk-CYLMMBRG.mjs";
7
+ import "./chunk-2ZQP2W7X.mjs";
8
+ import "./chunk-65ITIFTL.mjs";
9
9
 
10
10
  // node/build.ts
11
11
  import { join as join3, resolve as resolve3 } from "node:path";
@@ -722,7 +722,7 @@ async function build(options, viteConfig = {}, args) {
722
722
  await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
723
723
  `, "utf-8");
724
724
  if ([true, "true", "auto"].includes(options.data.config.download)) {
725
- const { exportSlides, getExportOptions } = await import("./export-GFE5VFSA.mjs");
725
+ const { exportSlides, getExportOptions } = await import("./export-HQUH6WSD.mjs");
726
726
  const port = 12445;
727
727
  const app = connect();
728
728
  const server = http.createServer(app);
@@ -1,30 +1,31 @@
1
- import {
2
- __require
3
- } from "./chunk-QHOBBTS4.mjs";
4
-
5
1
  // node/utils.ts
6
- import { join } from "node:path";
2
+ import { dirname, join } from "node:path";
3
+ import { createRequire } from "node:module";
4
+ import { fileURLToPath } from "node:url";
7
5
  import { ensurePrefix, slash } from "@antfu/utils";
8
6
  import isInstalledGlobally from "is-installed-globally";
9
- import { sync as resolve } from "resolve";
7
+ import resolve from "resolve";
10
8
  import globalDirs from "global-dirs";
9
+ var require2 = createRequire(import.meta.url);
10
+ var __dirname = dirname(fileURLToPath(import.meta.url));
11
11
  function toAtFS(path) {
12
12
  return `/@fs${ensurePrefix("/", slash(path))}`;
13
13
  }
14
14
  function resolveImportPath(importName, ensure = false) {
15
15
  try {
16
- return resolve(importName, {
17
- preserveSymlinks: false
16
+ return resolve.sync(importName, {
17
+ preserveSymlinks: false,
18
+ basedir: __dirname
18
19
  });
19
20
  } catch {
20
21
  }
21
22
  if (isInstalledGlobally) {
22
23
  try {
23
- return __require.resolve(join(globalDirs.yarn.packages, importName));
24
+ return require2.resolve(join(globalDirs.yarn.packages, importName));
24
25
  } catch {
25
26
  }
26
27
  try {
27
- return __require.resolve(join(globalDirs.npm.packages, importName));
28
+ return require2.resolve(join(globalDirs.npm.packages, importName));
28
29
  } catch {
29
30
  }
30
31
  }
@@ -34,15 +35,18 @@ function resolveImportPath(importName, ensure = false) {
34
35
  }
35
36
  function resolveGlobalImportPath(importName) {
36
37
  try {
37
- return resolve(importName, { preserveSymlinks: false, basedir: __dirname });
38
+ return resolve.sync(importName, {
39
+ preserveSymlinks: false,
40
+ basedir: __dirname
41
+ });
38
42
  } catch {
39
43
  }
40
44
  try {
41
- return __require.resolve(join(globalDirs.yarn.packages, importName));
45
+ return require2.resolve(join(globalDirs.yarn.packages, importName));
42
46
  } catch {
43
47
  }
44
48
  try {
45
- return __require.resolve(join(globalDirs.npm.packages, importName));
49
+ return require2.resolve(join(globalDirs.npm.packages, importName));
46
50
  } catch {
47
51
  }
48
52
  throw new Error(`Failed to resolve global package "${importName}"`);
@@ -4,14 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined")
11
- return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __commonJS = (cb, mod) => function __require2() {
7
+ var __commonJS = (cb, mod) => function __require() {
15
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
9
  };
17
10
  var __copyProps = (to, from, except, desc) => {
@@ -32,7 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
25
  ));
33
26
 
34
27
  export {
35
- __require,
36
28
  __commonJS,
37
29
  __toESM
38
30
  };
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  loadSetups
3
- } from "./chunk-43ON36K4.mjs";
3
+ } from "./chunk-CYLMMBRG.mjs";
4
4
  import {
5
5
  resolveImportPath
6
- } from "./chunk-CPYGYVJ2.mjs";
6
+ } from "./chunk-2ZQP2W7X.mjs";
7
7
 
8
8
  // node/plugins/windicss.ts
9
9
  import { dirname, resolve } from "node:path";
10
10
  import { existsSync } from "node:fs";
11
+ import { fileURLToPath } from "node:url";
11
12
  import { slash, uniq } from "@antfu/utils";
12
13
  import jiti from "jiti";
13
14
  async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
@@ -20,7 +21,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
20
21
  resolve(clientRoot, "windi.config.ts")
21
22
  ]);
22
23
  const configFile = configFiles.find((i) => existsSync(i));
23
- let config = jiti(__filename)(configFile);
24
+ let config = jiti(fileURLToPath(import.meta.url))(configFile);
24
25
  if (config.default)
25
26
  config = config.default;
26
27
  config = await loadSetups(roots, "windicss.ts", {}, config, true);
@@ -1,18 +1,17 @@
1
1
  import {
2
2
  loadSetups
3
- } from "./chunk-43ON36K4.mjs";
3
+ } from "./chunk-CYLMMBRG.mjs";
4
4
  import {
5
5
  generateGoogleFontsUrl,
6
6
  resolveGlobalImportPath,
7
7
  resolveImportPath,
8
8
  stringifyMarkdownTokens,
9
9
  toAtFS
10
- } from "./chunk-CPYGYVJ2.mjs";
10
+ } from "./chunk-2ZQP2W7X.mjs";
11
11
  import {
12
12
  __commonJS,
13
- __require,
14
13
  __toESM
15
- } from "./chunk-QHOBBTS4.mjs";
14
+ } from "./chunk-65ITIFTL.mjs";
16
15
 
17
16
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
18
17
  var require_fast_deep_equal = __commonJS({
@@ -114,7 +113,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
114
113
 
115
114
  // node/plugins/preset.ts
116
115
  import { join as join8 } from "node:path";
117
- import { existsSync as existsSync4 } from "node:fs";
116
+ import { existsSync as existsSync3 } from "node:fs";
118
117
  import process3 from "node:process";
119
118
  import Vue from "@vitejs/plugin-vue";
120
119
  import VueJsx from "@vitejs/plugin-vue-jsx";
@@ -369,7 +368,7 @@ import { basename as basename2, join as join5 } from "node:path";
369
368
  import process from "node:process";
370
369
  import { isString, notNullish, objectMap, range, slash, uniq as uniq3 } from "@antfu/utils";
371
370
  import fg2 from "fast-glob";
372
- import fs4, { existsSync as existsSync2 } from "fs-extra";
371
+ import fs4 from "fs-extra";
373
372
  import Markdown from "markdown-it";
374
373
  import { bold, gray, red, yellow } from "kolorist";
375
374
  import mila from "markdown-it-link-attributes";
@@ -809,7 +808,7 @@ defineProps<{ no: number | string }>()`);
809
808
  join5(root, "style.css")
810
809
  ];
811
810
  for (const style of styles) {
812
- if (existsSync2(style)) {
811
+ if (fs4.existsSync(style)) {
813
812
  imports.push(`import "${toAtFS(style)}"`);
814
813
  continue;
815
814
  }
@@ -980,7 +979,7 @@ function createMonacoTypesLoader() {
980
979
  }
981
980
 
982
981
  // node/plugins/setupClient.ts
983
- import { existsSync as existsSync3 } from "node:fs";
982
+ import { existsSync as existsSync2 } from "node:fs";
984
983
  import { join as join7, resolve as resolve2 } from "node:path";
985
984
  import { slash as slash3, uniq as uniq4 } from "@antfu/utils";
986
985
  function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot }) {
@@ -1003,7 +1002,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
1003
1002
  userRoot
1004
1003
  ]).map((i) => join7(i, "setup", name));
1005
1004
  setups.forEach((path, idx) => {
1006
- if (!existsSync3(path))
1005
+ if (!existsSync2(path))
1007
1006
  return;
1008
1007
  imports.push(`import __n${idx} from '${toAtFS(path)}'`);
1009
1008
  let fn = `:AWAIT:__n${idx}`;
@@ -1193,9 +1192,11 @@ function math_plugin(md2, options) {
1193
1192
  }
1194
1193
 
1195
1194
  // node/plugins/markdown-it-prism.ts
1195
+ import { createRequire } from "node:module";
1196
1196
  import Prism from "prismjs";
1197
- import loadLanguages from "prismjs/components/";
1197
+ import loadLanguages from "prismjs/components/index.js";
1198
1198
  import * as htmlparser2 from "htmlparser2";
1199
+ var require2 = createRequire(import.meta.url);
1199
1200
  var Tag = class {
1200
1201
  constructor(tagname, attributes) {
1201
1202
  this.tagname = tagname;
@@ -1228,7 +1229,7 @@ function loadPrismLang(lang) {
1228
1229
  }
1229
1230
  function loadPrismPlugin(name) {
1230
1231
  try {
1231
- __require(`prismjs/plugins/${name}/prism-${name}`);
1232
+ require2(`prismjs/plugins/${name}/prism-${name}`);
1232
1233
  } catch (e) {
1233
1234
  throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
1234
1235
  }
@@ -1614,7 +1615,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1614
1615
  const VueJsxPlugin = VueJsx(vuejsxOptions);
1615
1616
  const MarkdownPlugin = await createMarkdownPlugin(options, pluginOptions);
1616
1617
  const drawingData = await loadDrawings(options);
1617
- const publicRoots = themeRoots.map((i) => join8(i, "public")).filter(existsSync4);
1618
+ const publicRoots = themeRoots.map((i) => join8(i, "public")).filter(existsSync3);
1618
1619
  const plugins = [
1619
1620
  MarkdownPlugin,
1620
1621
  VueJsxPlugin,
@@ -1692,7 +1693,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1692
1693
  dev: true,
1693
1694
  build: true
1694
1695
  })) : null,
1695
- config.css === "none" ? null : config.css === "windicss" ? import("./windicss-5I6DSVQN.mjs").then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : import("./unocss-EBBZWMQM.mjs").then((r) => r.createUnocssPlugin(options, pluginOptions))
1696
+ config.css === "none" ? null : config.css === "windicss" ? import("./windicss-GLRSRVVQ.mjs").then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : import("./unocss-BTVZWCXM.mjs").then((r) => r.createUnocssPlugin(options, pluginOptions))
1696
1697
  ];
1697
1698
  return (await Promise.all(plugins)).flat().filter(notNullish2);
1698
1699
  }
@@ -1,6 +1,7 @@
1
1
  // node/plugins/setupNode.ts
2
2
  import { resolve } from "node:path";
3
- import { pathExists } from "fs-extra";
3
+ import { fileURLToPath } from "node:url";
4
+ import fs from "fs-extra";
4
5
  import { isObject } from "@antfu/utils";
5
6
  import jiti from "jiti";
6
7
  function deepMerge(a, b, rootPath = "") {
@@ -19,8 +20,8 @@ async function loadSetups(roots, name, arg, initial, merge = true) {
19
20
  let returns = initial;
20
21
  for (const root of roots) {
21
22
  const path = resolve(root, "setup", name);
22
- if (await pathExists(path)) {
23
- const { default: setup } = jiti(__filename)(path);
23
+ if (await fs.pathExists(path)) {
24
+ const { default: setup } = jiti(fileURLToPath(import.meta.url))(path);
24
25
  const result = await setup(arg);
25
26
  if (result !== null) {
26
27
  returns = typeof merge === "function" ? merge(returns, result) : merge ? deepMerge(returns, result) : result;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-6A4F74ZN.mjs";
4
+ } from "./chunk-CNR3FZCA.mjs";
5
5
  import {
6
6
  packageExists,
7
7
  resolveImportPath
8
- } from "./chunk-CPYGYVJ2.mjs";
8
+ } from "./chunk-2ZQP2W7X.mjs";
9
9
  import {
10
10
  __commonJS,
11
11
  __toESM
12
- } from "./chunk-QHOBBTS4.mjs";
12
+ } from "./chunk-65ITIFTL.mjs";
13
13
 
14
14
  // ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
15
15
  var require_constants = __commonJS({
@@ -2519,7 +2519,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2519
2519
  import * as parser from "@slidev/parser/fs";
2520
2520
 
2521
2521
  // package.json
2522
- var version = "0.43.8";
2522
+ var version = "0.43.9";
2523
2523
 
2524
2524
  // node/themes.ts
2525
2525
  import prompts2 from "prompts";
@@ -7613,6 +7613,7 @@ import fs3 from "fs-extra";
7613
7613
  // node/options.ts
7614
7614
  import { dirname as dirname2, join as join3, resolve as resolve2 } from "node:path";
7615
7615
  import process3 from "node:process";
7616
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
7616
7617
  import { uniq } from "@antfu/utils";
7617
7618
  import _debug from "debug";
7618
7619
 
@@ -7663,6 +7664,7 @@ function resolvePluginName(name) {
7663
7664
 
7664
7665
  // node/options.ts
7665
7666
  var debug = _debug("slidev:options");
7667
+ var __dirname = dirname2(fileURLToPath2(import.meta.url));
7666
7668
  function getClientRoot() {
7667
7669
  return dirname2(resolveImportPath("@slidev/client/package.json", true));
7668
7670
  }
package/dist/cli.mjs CHANGED
@@ -9,17 +9,17 @@ import {
9
9
  resolveOptions,
10
10
  resolveThemeName,
11
11
  version
12
- } from "./chunk-CUDG3G2A.mjs";
12
+ } from "./chunk-P35Z4724.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
- } from "./chunk-6A4F74ZN.mjs";
15
+ } from "./chunk-CNR3FZCA.mjs";
16
16
  import {
17
17
  loadSetups
18
- } from "./chunk-43ON36K4.mjs";
19
- import "./chunk-CPYGYVJ2.mjs";
18
+ } from "./chunk-CYLMMBRG.mjs";
19
+ import "./chunk-2ZQP2W7X.mjs";
20
20
  import {
21
21
  __toESM
22
- } from "./chunk-QHOBBTS4.mjs";
22
+ } from "./chunk-65ITIFTL.mjs";
23
23
 
24
24
  // node/cli.ts
25
25
  var import_fast_deep_equal = __toESM(require_fast_deep_equal());
@@ -59,7 +59,7 @@ injectPreparserExtensionLoader(async (headmatter, filepath) => {
59
59
  const mergeArrays = (a, b) => a.concat(b);
60
60
  return await loadSetups(roots, "preparser.ts", { filepath, headmatter }, [], mergeArrays);
61
61
  });
62
- var cli = yargs.scriptName("slidev").usage("$0 [args]").version(version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
62
+ var cli = yargs(process.argv.slice(2)).scriptName("slidev").usage("$0 [args]").version(version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
63
63
  cli.command(
64
64
  "* [entry]",
65
65
  "Start a local server for Slidev",
@@ -149,7 +149,10 @@ cli.command(
149
149
  else
150
150
  console.log(yellow("\n --remote is required for tunneling, localtunnel is not enabled.\n"));
151
151
  }
152
- lastRemoteUrl = printInfo(options, port, remote, tunnelUrl);
152
+ let publicIp;
153
+ if (remote)
154
+ publicIp = await import("public-ip").then((r) => r.publicIpv4());
155
+ lastRemoteUrl = printInfo(options, port, remote, tunnelUrl, publicIp);
153
156
  }
154
157
  async function openTunnel(port2) {
155
158
  const localtunnel = await import("localtunnel").then((r) => r.default || r);
@@ -198,13 +201,18 @@ cli.command(
198
201
  async action() {
199
202
  if (!lastRemoteUrl)
200
203
  return;
201
- await import("uqr").then((r) => {
204
+ await import("uqr").then(async (r) => {
202
205
  const code = r.renderUnicodeCompact(lastRemoteUrl);
203
206
  console.log(`
204
207
  ${dim(" QR Code for remote control: ")}
205
208
  ${blue(lastRemoteUrl)}
206
209
  `);
207
210
  console.log(code.split("\n").map((i) => ` ${i}`).join("\n"));
211
+ const publicIp = await import("public-ip").then((r2) => r2.publicIpv4());
212
+ if (publicIp)
213
+ console.log(`
214
+ ${dim(" Public IP: ")} ${blue(publicIp)}
215
+ `);
208
216
  });
209
217
  }
210
218
  }
@@ -260,7 +268,7 @@ cli.command(
260
268
  }).strict().help(),
261
269
  async (args) => {
262
270
  const { entry, theme, watch, base, download, out, inspect } = args;
263
- const { build } = await import("./build-MWRJFN43.mjs");
271
+ const { build } = await import("./build-O4767R4S.mjs");
264
272
  for (const entryFile of entry) {
265
273
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
266
274
  if (download && !options.data.config.download)
@@ -339,7 +347,7 @@ cli.command(
339
347
  async (args) => {
340
348
  const { entry, theme } = args;
341
349
  process.env.NODE_ENV = "production";
342
- const { exportSlides, getExportOptions } = await import("./export-GFE5VFSA.mjs");
350
+ const { exportSlides, getExportOptions } = await import("./export-HQUH6WSD.mjs");
343
351
  const port = await findFreePort(12445);
344
352
  for (const entryFile of entry) {
345
353
  const options = await resolveOptions({ entry: entryFile, theme }, "export");
@@ -385,7 +393,7 @@ cli.command(
385
393
  timeout
386
394
  }) => {
387
395
  process.env.NODE_ENV = "production";
388
- const { exportNotes } = await import("./export-GFE5VFSA.mjs");
396
+ const { exportNotes } = await import("./export-HQUH6WSD.mjs");
389
397
  const port = await findFreePort(12445);
390
398
  for (const entryFile of entry) {
391
399
  const options = await resolveOptions({ entry: entryFile }, "export");
@@ -455,7 +463,7 @@ function exportOptions(args) {
455
463
  describe: "slide slides slide by slide. Works better with global components, but will break cross slide links and TOC in PDF"
456
464
  });
457
465
  }
458
- function printInfo(options, port, remote, tunnelUrl) {
466
+ function printInfo(options, port, remote, tunnelUrl, publicIp) {
459
467
  console.log();
460
468
  console.log();
461
469
  console.log(` ${cyan("\u25CF") + blue("\u25A0") + yellow("\u25B2")}`);
@@ -468,6 +476,7 @@ function printInfo(options, port, remote, tunnelUrl) {
468
476
  if (port) {
469
477
  const query = remote ? `?password=${remote}` : "";
470
478
  const presenterPath = `${options.data.config.routerMode === "hash" ? "/#/" : "/"}presenter/${query}`;
479
+ const entryPath = `${options.data.config.routerMode === "hash" ? "/#/" : "/"}entry${query}/`;
471
480
  console.log();
472
481
  console.log(`${dim(" public slide show ")} > ${cyan(`http://localhost:${bold(port)}/`)}`);
473
482
  if (query)
@@ -478,11 +487,15 @@ function printInfo(options, port, remote, tunnelUrl) {
478
487
  let lastRemoteUrl = "";
479
488
  if (remote !== void 0) {
480
489
  Object.values(os.networkInterfaces()).forEach((v) => (v || []).filter((details) => String(details.family).slice(-1) === "4" && !details.address.includes("127.0.0.1")).forEach(({ address }) => {
481
- lastRemoteUrl = `http://${address}:${port}${presenterPath}`;
490
+ lastRemoteUrl = `http://${address}:${port}${entryPath}`;
482
491
  console.log(`${dim(" remote control ")} > ${blue(lastRemoteUrl)}`);
483
492
  }));
493
+ if (publicIp) {
494
+ lastRemoteUrl = `http://${publicIp}:${port}${entryPath}`;
495
+ console.log(`${dim(" remote control ")} > ${blue(lastRemoteUrl)}`);
496
+ }
484
497
  if (tunnelUrl) {
485
- lastRemoteUrl = `${tunnelUrl}${presenterPath}`;
498
+ lastRemoteUrl = `${tunnelUrl}${entryPath}`;
486
499
  console.log(`${dim(" remote via tunnel")} > ${yellow(lastRemoteUrl)}`);
487
500
  }
488
501
  } else {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  packageExists
3
- } from "./chunk-CPYGYVJ2.mjs";
4
- import "./chunk-QHOBBTS4.mjs";
3
+ } from "./chunk-2ZQP2W7X.mjs";
4
+ import "./chunk-65ITIFTL.mjs";
5
5
 
6
6
  // node/export.ts
7
7
  import path from "node:path";
package/dist/index.mjs CHANGED
@@ -9,16 +9,16 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-CUDG3G2A.mjs";
12
+ } from "./chunk-P35Z4724.mjs";
13
13
  import {
14
14
  createWindiCSSPlugin
15
- } from "./chunk-PZQGSMNY.mjs";
15
+ } from "./chunk-AA5PR2W4.mjs";
16
16
  import {
17
17
  ViteSlidevPlugin
18
- } from "./chunk-6A4F74ZN.mjs";
19
- import "./chunk-43ON36K4.mjs";
20
- import "./chunk-CPYGYVJ2.mjs";
21
- import "./chunk-QHOBBTS4.mjs";
18
+ } from "./chunk-CNR3FZCA.mjs";
19
+ import "./chunk-CYLMMBRG.mjs";
20
+ import "./chunk-2ZQP2W7X.mjs";
21
+ import "./chunk-65ITIFTL.mjs";
22
22
  export {
23
23
  ViteSlidevPlugin,
24
24
  createServer,
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  loadSetups
3
- } from "./chunk-43ON36K4.mjs";
4
- import "./chunk-QHOBBTS4.mjs";
3
+ } from "./chunk-CYLMMBRG.mjs";
4
+ import "./chunk-65ITIFTL.mjs";
5
5
 
6
6
  // node/plugins/unocss.ts
7
7
  import { resolve } from "node:path";
8
8
  import { existsSync } from "node:fs";
9
+ import { fileURLToPath } from "node:url";
9
10
  import { uniq } from "@antfu/utils";
10
11
  import { mergeConfigs } from "unocss";
11
12
  import jiti from "jiti";
@@ -22,7 +23,7 @@ async function createUnocssPlugin({ themeRoots, addonRoots, clientRoot, roots, u
22
23
  resolve(clientRoot, "unocss.config.ts")
23
24
  ]).filter((i) => existsSync(i));
24
25
  const configs = configFiles.map((i) => {
25
- const loaded = jiti(__filename)(i);
26
+ const loaded = jiti(fileURLToPath(import.meta.url))(i);
26
27
  const config2 = "default" in loaded ? loaded.default : loaded;
27
28
  return config2;
28
29
  }).filter(Boolean);
@@ -0,0 +1,9 @@
1
+ import {
2
+ createWindiCSSPlugin
3
+ } from "./chunk-AA5PR2W4.mjs";
4
+ import "./chunk-CYLMMBRG.mjs";
5
+ import "./chunk-2ZQP2W7X.mjs";
6
+ import "./chunk-65ITIFTL.mjs";
7
+ export {
8
+ createWindiCSSPlugin
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.43.8",
3
+ "version": "0.43.9",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "module": "dist/index.mjs",
23
23
  "types": "dist/index.d.ts",
24
24
  "bin": {
25
- "slidev": "./bin/slidev.js"
25
+ "slidev": "./bin/slidev.mjs"
26
26
  },
27
27
  "files": [
28
28
  "bin",
@@ -75,12 +75,13 @@
75
75
  "markdown-it-mdc": "^0.1.4",
76
76
  "monaco-editor": "^0.37.1",
77
77
  "nanoid": "^5.0.2",
78
- "open": "^8.4.1",
78
+ "open": "^9.1.0",
79
79
  "pdf-lib": "^1.17.1",
80
80
  "plantuml-encoder": "^1.4.0",
81
81
  "postcss-nested": "^6.0.1",
82
82
  "prismjs": "^1.29.0",
83
83
  "prompts": "^2.4.2",
84
+ "public-ip": "^6.0.1",
84
85
  "resolve": "^1.22.8",
85
86
  "resolve-from": "^5.0.0",
86
87
  "resolve-global": "^1.0.0",
@@ -100,9 +101,9 @@
100
101
  "vue": "^3.3.7",
101
102
  "windicss": "^3.5.6",
102
103
  "yargs": "^17.7.2",
103
- "@slidev/parser": "0.43.8",
104
- "@slidev/client": "0.43.8",
105
- "@slidev/types": "0.43.8"
104
+ "@slidev/client": "0.43.9",
105
+ "@slidev/parser": "0.43.9",
106
+ "@slidev/types": "0.43.9"
106
107
  },
107
108
  "devDependencies": {
108
109
  "@types/plantuml-encoder": "^1.4.1",
package/bin/slidev.js DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict'
3
-
4
- const process = require('node:process')
5
- const path = require('node:path')
6
- const resolveFrom = require('resolve-from')
7
-
8
- let modulePath = '../dist/cli'
9
- try {
10
- // use local cli if exists
11
- modulePath = path.join(path.dirname(resolveFrom(process.cwd(), '@slidev/cli')), 'cli.js')
12
- }
13
- catch {}
14
-
15
- require(modulePath)