@slidev/cli 0.35.5 → 0.35.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.
package/dist/cli.js CHANGED
@@ -6,19 +6,19 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkAHXRM5NGjs = require('./chunk-AHXRM5NG.js');
9
+ var _chunk4UR3M5JDjs = require('./chunk-4UR3M5JD.js');
10
10
 
11
11
 
12
- var _chunkZJSOFQBRjs = require('./chunk-ZJSOFQBR.js');
12
+ var _chunkYUXTNPKAjs = require('./chunk-YUXTNPKA.js');
13
13
 
14
14
 
15
15
 
16
16
 
17
- var _chunkSQLX75IOjs = require('./chunk-SQLX75IO.js');
17
+ var _chunkAW7KQET4js = require('./chunk-AW7KQET4.js');
18
18
 
19
19
  // node/cli.ts
20
- _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
21
- var import_fast_deep_equal = _chunkSQLX75IOjs.__toESM.call(void 0, _chunkZJSOFQBRjs.require_fast_deep_equal.call(void 0, ));
20
+ _chunkAW7KQET4js.init_cjs_shims.call(void 0, );
21
+ var import_fast_deep_equal = _chunkAW7KQET4js.__toESM.call(void 0, _chunkYUXTNPKAjs.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);
@@ -38,262 +38,299 @@ var CONFIG_RESTART_FIELDS = [
38
38
  "fonts",
39
39
  "css"
40
40
  ];
41
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkAHXRM5NGjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
42
- cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
43
- alias: "p",
44
- type: "number",
45
- describe: "port"
46
- }).option("open", {
47
- alias: "o",
48
- default: false,
49
- type: "boolean",
50
- describe: "open in browser"
51
- }).option("remote", {
52
- type: "string",
53
- describe: "listen public host and enable remote control"
54
- }).option("log", {
55
- default: "warn",
56
- type: "string",
57
- choices: ["error", "warn", "info", "silent"],
58
- describe: "log level"
59
- }).option("force", {
60
- alias: "f",
61
- default: false,
62
- type: "boolean",
63
- describe: "force the optimizer to ignore the cache and re-bundle "
64
- }).strict().help(), async ({ entry, theme, port: userPort, open, log, remote, force }) => {
65
- if (!_fsextra2.default.existsSync(entry) && !entry.endsWith(".md"))
66
- entry = `${entry}.md`;
67
- if (!_fsextra2.default.existsSync(entry)) {
68
- const { create } = await _prompts2.default.call(void 0, {
69
- name: "create",
70
- type: "confirm",
71
- initial: "Y",
72
- message: `Entry file ${_kolorist.yellow.call(void 0, `"${entry}"`)} does not exist, do you want to create it?`
73
- });
74
- if (create)
75
- await _fsextra2.default.copyFile(_path2.default.resolve(__dirname, "../template.md"), entry);
76
- else
77
- process.exit(0);
78
- }
79
- let server;
80
- let port = 3030;
81
- async function initServer() {
82
- if (server)
83
- await server.close();
84
- const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
85
- port = userPort || await findFreePort(3030);
86
- server = await _chunkAHXRM5NGjs.createServer.call(void 0, options, {
87
- server: {
88
- port,
89
- strictPort: true,
90
- open,
91
- host: remote !== void 0 ? "0.0.0.0" : "localhost",
92
- force
93
- },
94
- logLevel: log
95
- }, {
96
- onDataReload(newData, data) {
97
- if (!theme && _chunkAHXRM5NGjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkAHXRM5NGjs.resolveThemeName.call(void 0, data.config.theme)) {
98
- console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
99
- initServer();
100
- } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
101
- console.log(_kolorist.yellow.call(void 0, "\n restarting on config change\n"));
41
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk4UR3M5JDjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
42
+ cli.command(
43
+ "* [entry]",
44
+ "Start a local server for Slidev",
45
+ (args) => commonOptions(args).option("port", {
46
+ alias: "p",
47
+ type: "number",
48
+ describe: "port"
49
+ }).option("open", {
50
+ alias: "o",
51
+ default: false,
52
+ type: "boolean",
53
+ describe: "open in browser"
54
+ }).option("remote", {
55
+ type: "string",
56
+ describe: "listen public host and enable remote control"
57
+ }).option("log", {
58
+ default: "warn",
59
+ type: "string",
60
+ choices: ["error", "warn", "info", "silent"],
61
+ describe: "log level"
62
+ }).option("force", {
63
+ alias: "f",
64
+ default: false,
65
+ type: "boolean",
66
+ describe: "force the optimizer to ignore the cache and re-bundle "
67
+ }).strict().help(),
68
+ async ({ entry, theme, port: userPort, open, log, remote, force }) => {
69
+ if (!_fsextra2.default.existsSync(entry) && !entry.endsWith(".md"))
70
+ entry = `${entry}.md`;
71
+ if (!_fsextra2.default.existsSync(entry)) {
72
+ const { create } = await _prompts2.default.call(void 0, {
73
+ name: "create",
74
+ type: "confirm",
75
+ initial: "Y",
76
+ message: `Entry file ${_kolorist.yellow.call(void 0, `"${entry}"`)} does not exist, do you want to create it?`
77
+ });
78
+ if (create)
79
+ await _fsextra2.default.copyFile(_path2.default.resolve(__dirname, "../template.md"), entry);
80
+ else
81
+ process.exit(0);
82
+ }
83
+ let server;
84
+ let port = 3030;
85
+ async function initServer() {
86
+ if (server)
87
+ await server.close();
88
+ const options = await _chunk4UR3M5JDjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
89
+ port = userPort || await findFreePort(3030);
90
+ server = await _chunk4UR3M5JDjs.createServer.call(void 0,
91
+ options,
92
+ {
93
+ server: {
94
+ port,
95
+ strictPort: true,
96
+ open,
97
+ host: remote !== void 0 ? "0.0.0.0" : "localhost",
98
+ force
99
+ },
100
+ logLevel: log
101
+ },
102
+ {
103
+ onDataReload(newData, data) {
104
+ if (!theme && _chunk4UR3M5JDjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunk4UR3M5JDjs.resolveThemeName.call(void 0, data.config.theme)) {
105
+ console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
106
+ initServer();
107
+ } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
108
+ console.log(_kolorist.yellow.call(void 0, "\n restarting on config change\n"));
109
+ initServer();
110
+ }
111
+ }
112
+ }
113
+ );
114
+ await server.listen();
115
+ printInfo(options, port, remote);
116
+ }
117
+ const SHORTCUTS = [
118
+ {
119
+ name: "r",
120
+ fullname: "restart",
121
+ action() {
102
122
  initServer();
103
123
  }
124
+ },
125
+ {
126
+ name: "o",
127
+ fullname: "open",
128
+ action() {
129
+ _open2.default.call(void 0, `http://localhost:${port}`);
130
+ }
131
+ },
132
+ {
133
+ name: "e",
134
+ fullname: "edit",
135
+ action() {
136
+ _child_process.exec.call(void 0, `code "${entry}"`);
137
+ }
104
138
  }
105
- });
106
- await server.listen();
107
- printInfo(options, port, remote);
108
- }
109
- const SHORTCUTS = [
110
- {
111
- name: "r",
112
- fullname: "restart",
113
- action() {
114
- initServer();
115
- }
116
- },
117
- {
118
- name: "o",
119
- fullname: "open",
120
- action() {
121
- _open2.default.call(void 0, `http://localhost:${port}`);
122
- }
123
- },
124
- {
125
- name: "e",
126
- fullname: "edit",
127
- action() {
128
- _child_process.exec.call(void 0, `code "${entry}"`);
129
- }
130
- }
131
- ];
132
- function bindShortcut() {
133
- process.stdin.resume();
134
- process.stdin.setEncoding("utf8");
135
- readline.emitKeypressEvents(process.stdin);
136
- if (process.stdin.isTTY)
137
- process.stdin.setRawMode(true);
138
- process.stdin.on("keypress", (str, key) => {
139
- if (key.ctrl && key.name === "c") {
140
- process.exit();
141
- } else {
142
- const [sh] = SHORTCUTS.filter((item) => item.name === str);
143
- if (sh) {
144
- try {
145
- sh.action();
146
- } catch (err) {
147
- console.error(`Failed to execute shortcut ${sh.fullname}`, err);
139
+ ];
140
+ function bindShortcut() {
141
+ process.stdin.resume();
142
+ process.stdin.setEncoding("utf8");
143
+ readline.emitKeypressEvents(process.stdin);
144
+ if (process.stdin.isTTY)
145
+ process.stdin.setRawMode(true);
146
+ process.stdin.on("keypress", (str, key) => {
147
+ if (key.ctrl && key.name === "c") {
148
+ process.exit();
149
+ } else {
150
+ const [sh] = SHORTCUTS.filter((item) => item.name === str);
151
+ if (sh) {
152
+ try {
153
+ sh.action();
154
+ } catch (err) {
155
+ console.error(`Failed to execute shortcut ${sh.fullname}`, err);
156
+ }
148
157
  }
149
158
  }
159
+ });
160
+ }
161
+ initServer();
162
+ bindShortcut();
163
+ }
164
+ );
165
+ cli.command(
166
+ "build [entry]",
167
+ "Build hostable SPA",
168
+ (args) => commonOptions(args).option("watch", {
169
+ alias: "w",
170
+ default: false,
171
+ describe: "build watch"
172
+ }).option("out", {
173
+ alias: "o",
174
+ type: "string",
175
+ default: "dist",
176
+ describe: "output dir"
177
+ }).option("base", {
178
+ type: "string",
179
+ describe: "output base"
180
+ }).option("download", {
181
+ alias: "d",
182
+ type: "boolean",
183
+ describe: "allow download as PDF"
184
+ }).strict().help(),
185
+ async ({ entry, theme, watch, base, download, out }) => {
186
+ const { build } = await Promise.resolve().then(() => _chunkAW7KQET4js.__toESM.call(void 0, _chunkAW7KQET4js.__require.call(void 0, "./build-3OBKYP4E.js")));
187
+ const options = await _chunk4UR3M5JDjs.resolveOptions.call(void 0, { entry, theme }, "build");
188
+ if (download && !options.data.config.download)
189
+ options.data.config.download = download;
190
+ printInfo(options);
191
+ await build(options, {
192
+ base,
193
+ build: {
194
+ watch: watch ? {} : void 0,
195
+ outDir: out
150
196
  }
151
197
  });
152
198
  }
153
- initServer();
154
- bindShortcut();
155
- });
156
- cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args).option("watch", {
157
- alias: "w",
158
- default: false,
159
- describe: "build watch"
160
- }).option("out", {
161
- alias: "o",
162
- type: "string",
163
- default: "dist",
164
- describe: "output dir"
165
- }).option("base", {
166
- type: "string",
167
- describe: "output base"
168
- }).option("download", {
169
- alias: "d",
170
- type: "boolean",
171
- describe: "allow download as PDF"
172
- }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
173
- const { build } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./build-PO2PXBSF.js")));
174
- const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, theme }, "build");
175
- if (download && !options.data.config.download)
176
- options.data.config.download = download;
177
- printInfo(options);
178
- await build(options, {
179
- base,
180
- build: {
181
- watch: watch ? {} : void 0,
182
- outDir: out
183
- }
184
- });
185
- });
186
- cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
187
- const data = await _chunkAHXRM5NGjs.parser.load(entry);
188
- _chunkAHXRM5NGjs.parser.prettify(data);
189
- await _chunkAHXRM5NGjs.parser.save(data);
190
- });
191
- cli.command("theme [subcommand]", "Theme related operations", (command) => {
192
- return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
199
+ );
200
+ cli.command(
201
+ "format [entry]",
202
+ "Format the markdown file",
203
+ (args) => commonOptions(args).strict().help(),
204
+ async ({ entry }) => {
205
+ const data = await _chunk4UR3M5JDjs.parser.load(entry);
206
+ _chunk4UR3M5JDjs.parser.prettify(data);
207
+ await _chunk4UR3M5JDjs.parser.save(data);
208
+ }
209
+ );
210
+ cli.command(
211
+ "theme [subcommand]",
212
+ "Theme related operations",
213
+ (command) => {
214
+ return command.command(
215
+ "eject",
216
+ "Eject current theme into local file system",
217
+ (args) => commonOptions(args).option("dir", {
218
+ type: "string",
219
+ default: "theme"
220
+ }),
221
+ async ({ entry, dir, theme: themeInput }) => {
222
+ const data = await _chunk4UR3M5JDjs.parser.load(entry);
223
+ const theme = _chunk4UR3M5JDjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
224
+ if (theme === "none") {
225
+ console.error('Can not eject theme "none"');
226
+ process.exit(1);
227
+ }
228
+ if (_chunk4UR3M5JDjs.isPath.call(void 0, theme)) {
229
+ console.error("Theme is already ejected");
230
+ process.exit(1);
231
+ }
232
+ const roots = _chunk4UR3M5JDjs.getThemeRoots.call(void 0, theme, entry);
233
+ if (!roots.length) {
234
+ console.error(`Does not found theme "${theme}"`);
235
+ process.exit(1);
236
+ }
237
+ const root = roots[0];
238
+ await _fsextra2.default.copy(root, _path2.default.resolve(dir), {
239
+ filter: (i) => !/node_modules|.git/.test(_path2.default.relative(root, i))
240
+ });
241
+ const dirPath = `./${dir}`;
242
+ data.slides[0].frontmatter.theme = dirPath;
243
+ data.slides[0].raw = null;
244
+ await _chunk4UR3M5JDjs.parser.save(data);
245
+ console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
246
+ }
247
+ );
248
+ },
249
+ () => {
250
+ cli.showHelp();
251
+ process.exit(1);
252
+ }
253
+ );
254
+ cli.command(
255
+ "export [entry]",
256
+ "Export slides to PDF",
257
+ (args) => commonOptions(args).option("output", {
193
258
  type: "string",
194
- default: "theme"
195
- }), async ({ entry, dir, theme: themeInput }) => {
196
- const data = await _chunkAHXRM5NGjs.parser.load(entry);
197
- const theme = _chunkAHXRM5NGjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
198
- if (theme === "none") {
199
- console.error('Can not eject theme "none"');
200
- process.exit(1);
201
- }
202
- if (_chunkAHXRM5NGjs.isPath.call(void 0, theme)) {
203
- console.error("Theme is already ejected");
204
- process.exit(1);
205
- }
206
- const roots = _chunkAHXRM5NGjs.getThemeRoots.call(void 0, theme, entry);
207
- if (!roots.length) {
208
- console.error(`Does not found theme "${theme}"`);
209
- process.exit(1);
210
- }
211
- const root = roots[0];
212
- await _fsextra2.default.copy(root, _path2.default.resolve(dir), {
213
- filter: (i) => !/node_modules|.git/.test(_path2.default.relative(root, i))
214
- });
215
- const dirPath = `./${dir}`;
216
- data.slides[0].frontmatter.theme = dirPath;
217
- data.slides[0].raw = null;
218
- await _chunkAHXRM5NGjs.parser.save(data);
219
- console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
220
- });
221
- }, () => {
222
- cli.showHelp();
223
- process.exit(1);
224
- });
225
- cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(args).option("output", {
226
- type: "string",
227
- describe: "path to the output"
228
- }).option("format", {
229
- default: "pdf",
230
- type: "string",
231
- choices: ["pdf", "png", "md"],
232
- describe: "output format"
233
- }).option("timeout", {
234
- default: 3e4,
235
- type: "number",
236
- describe: "timeout for rendering the print page"
237
- }).option("range", {
238
- type: "string",
239
- describe: 'page ranges to export, for example "1,4-5,6"'
240
- }).option("dark", {
241
- default: false,
242
- type: "boolean",
243
- describe: "export as dark theme"
244
- }).option("with-clicks", {
245
- alias: "c",
246
- default: false,
247
- type: "boolean",
248
- describe: "export pages for every clicks"
249
- }).option("executable-path", {
250
- type: "string",
251
- describe: "executable to override playwright bundled browser"
252
- }).strict().help(), async ({
253
- entry,
254
- theme,
255
- output,
256
- format,
257
- timeout,
258
- range,
259
- dark,
260
- "with-clicks": withClicks,
261
- "executable-path": executablePath
262
- }) => {
263
- process.env.NODE_ENV = "production";
264
- const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-JXFGVO7B.js")));
265
- const port = await findFreePort(12445);
266
- const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, theme }, "build");
267
- output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
268
- const server = await _chunkAHXRM5NGjs.createServer.call(void 0, options, {
269
- server: { port },
270
- clearScreen: false
271
- });
272
- await server.listen(port);
273
- printInfo(options);
274
- _chunkAHXRM5NGjs.parser.filterDisabled(options.data);
275
- const width = options.data.config.canvasWidth;
276
- const height = Math.round(width / options.data.config.aspectRatio);
277
- output = await exportSlides({
278
- port,
279
- slides: options.data.slides,
280
- total: options.data.slides.length,
281
- range,
282
- format,
259
+ describe: "path to the output"
260
+ }).option("format", {
261
+ default: "pdf",
262
+ type: "string",
263
+ choices: ["pdf", "png", "md"],
264
+ describe: "output format"
265
+ }).option("timeout", {
266
+ default: 3e4,
267
+ type: "number",
268
+ describe: "timeout for rendering the print page"
269
+ }).option("range", {
270
+ type: "string",
271
+ describe: 'page ranges to export, for example "1,4-5,6"'
272
+ }).option("dark", {
273
+ default: false,
274
+ type: "boolean",
275
+ describe: "export as dark theme"
276
+ }).option("with-clicks", {
277
+ alias: "c",
278
+ default: false,
279
+ type: "boolean",
280
+ describe: "export pages for every clicks"
281
+ }).option("executable-path", {
282
+ type: "string",
283
+ describe: "executable to override playwright bundled browser"
284
+ }).strict().help(),
285
+ async ({
286
+ entry,
287
+ theme,
283
288
  output,
289
+ format,
284
290
  timeout,
291
+ range,
285
292
  dark,
286
- routerMode: options.data.config.routerMode,
287
- width,
288
- height,
289
- withClicks,
290
- executablePath
291
- });
292
- console.log(`${_kolorist.green.call(void 0, " \u2713 ")}${_kolorist.dim.call(void 0, "exported to ")}./${output}
293
+ "with-clicks": withClicks,
294
+ "executable-path": executablePath
295
+ }) => {
296
+ process.env.NODE_ENV = "production";
297
+ const { exportSlides } = await Promise.resolve().then(() => _chunkAW7KQET4js.__toESM.call(void 0, _chunkAW7KQET4js.__require.call(void 0, "./export-3CTBMUMP.js")));
298
+ const port = await findFreePort(12445);
299
+ const options = await _chunk4UR3M5JDjs.resolveOptions.call(void 0, { entry, theme }, "build");
300
+ output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
301
+ const server = await _chunk4UR3M5JDjs.createServer.call(void 0,
302
+ options,
303
+ {
304
+ server: { port },
305
+ clearScreen: false
306
+ }
307
+ );
308
+ await server.listen(port);
309
+ printInfo(options);
310
+ _chunk4UR3M5JDjs.parser.filterDisabled(options.data);
311
+ const width = options.data.config.canvasWidth;
312
+ const height = Math.round(width / options.data.config.aspectRatio);
313
+ output = await exportSlides({
314
+ port,
315
+ slides: options.data.slides,
316
+ total: options.data.slides.length,
317
+ range,
318
+ format,
319
+ output,
320
+ timeout,
321
+ dark,
322
+ routerMode: options.data.config.routerMode,
323
+ width,
324
+ height,
325
+ withClicks,
326
+ executablePath
327
+ });
328
+ console.log(`${_kolorist.green.call(void 0, " \u2713 ")}${_kolorist.dim.call(void 0, "exported to ")}./${output}
293
329
  `);
294
- server.close();
295
- process.exit(0);
296
- });
330
+ server.close();
331
+ process.exit(0);
332
+ }
333
+ );
297
334
  cli.help().parse();
298
335
  function commonOptions(args) {
299
336
  return args.positional("entry", {
@@ -310,7 +347,7 @@ function printInfo(options, port, remote) {
310
347
  console.log();
311
348
  console.log();
312
349
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
313
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkAHXRM5NGjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
350
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk4UR3M5JDjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
314
351
  console.log();
315
352
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
316
353
  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));
@@ -323,9 +360,11 @@ function printInfo(options, port, remote) {
323
360
  console.log(`${_kolorist.dim.call(void 0, " private slide show ")} > ${_kolorist.cyan.call(void 0, `http://localhost:${_kolorist.bold.call(void 0, port)}/${query}`)}`);
324
361
  console.log(`${_kolorist.dim.call(void 0, " presenter mode ")} > ${_kolorist.blue.call(void 0, `http://localhost:${_kolorist.bold.call(void 0, port)}${presenterPath}`)}`);
325
362
  if (remote !== void 0) {
326
- Object.values(_os2.default.networkInterfaces()).forEach((v) => (v || []).filter((details) => String(details.family).slice(-1) === "4" && !details.address.includes("127.0.0.1")).forEach(({ address }) => {
327
- console.log(`${_kolorist.dim.call(void 0, " remote control ")} > ${_kolorist.blue.call(void 0, `http://${address}:${port}${presenterPath}`)}`);
328
- }));
363
+ Object.values(_os2.default.networkInterfaces()).forEach(
364
+ (v) => (v || []).filter((details) => String(details.family).slice(-1) === "4" && !details.address.includes("127.0.0.1")).forEach(({ address }) => {
365
+ console.log(`${_kolorist.dim.call(void 0, " remote control ")} > ${_kolorist.blue.call(void 0, `http://${address}:${port}${presenterPath}`)}`);
366
+ })
367
+ );
329
368
  } else {
330
369
  console.log(`${_kolorist.dim.call(void 0, " remote control ")} > ${_kolorist.dim.call(void 0, "pass --remote to enable")}`);
331
370
  }