markmap-cli 0.15.8-alpha.0 → 0.15.8

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/index.js CHANGED
@@ -16,7 +16,7 @@ import { Hono } from "hono";
16
16
  import chokidar from "chokidar";
17
17
  import { Readable } from "stream";
18
18
  import { finished } from "stream/promises";
19
- const TOOLBAR_VERSION = "0.15.6";
19
+ const TOOLBAR_VERSION = "0.15.8";
20
20
  const TOOLBAR_CSS = `markmap-toolbar@${TOOLBAR_VERSION}/dist/style.css`;
21
21
  const TOOLBAR_JS = `markmap-toolbar@${TOOLBAR_VERSION}/dist/index.js`;
22
22
  const ASSETS_PREFIX = "/assets/";
@@ -310,7 +310,7 @@ async function setUpServer(transformer, provider, options) {
310
310
  var _a;
311
311
  const { cmd, args } = await c.req.json();
312
312
  await ((_a = provider[cmd]) == null ? void 0 : _a.call(provider, ...args));
313
- return c.status(204);
313
+ return c.body(null, 204);
314
314
  });
315
315
  const assetsDir = await assetsDirPromise;
316
316
  app.get(`${ASSETS_PREFIX}*`, async (c) => {
@@ -321,7 +321,7 @@ async function setUpServer(transformer, provider, options) {
321
321
  if (!result.isFile())
322
322
  throw new Error("File not found");
323
323
  } catch {
324
- return c.status(404);
324
+ return c.body("File not found", 404);
325
325
  }
326
326
  const stream = createReadStream(realpath);
327
327
  const type = getMimeType(relpath);
@@ -485,11 +485,8 @@ async function createMarkmap(options) {
485
485
  });
486
486
  const output = options.output || "markmap.html";
487
487
  await writeFile(output, html, "utf8");
488
- if (options.open) {
489
- console.log("open", output);
490
- const p = await open(output);
491
- console.log(p.exitCode);
492
- }
488
+ if (options.open)
489
+ open(output);
493
490
  }
494
491
  async function main() {
495
492
  var _a;
package/dist/util.d.ts CHANGED
@@ -17,7 +17,7 @@ export interface IDevelopOptions {
17
17
  * Ignored in watching mode.
18
18
  */
19
19
  offline: boolean;
20
- /** A port for the devServer to listen. */
20
+ /** Port number for the devServer to listen. */
21
21
  port?: number;
22
22
  }
23
23
  export declare function addToolbar(urlBuilder: UrlBuilder, assets: IAssets): IAssets;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markmap-cli",
3
- "version": "0.15.8-alpha.0+a192279",
3
+ "version": "0.15.8",
4
4
  "description": "Create markmaps from CLI",
5
5
  "author": "Gerald <gera2ld@live.com>",
6
6
  "license": "MIT",
@@ -48,12 +48,12 @@
48
48
  "commander": "^11.1.0",
49
49
  "hono": "^3.11.8",
50
50
  "markmap-common": "0.15.6",
51
- "markmap-lib": "0.15.7",
52
- "markmap-toolbar": "0.15.6",
51
+ "markmap-lib": "0.15.8",
52
+ "markmap-toolbar": "0.15.8",
53
53
  "open": "^10.0.0",
54
54
  "pkg-dir": "^8.0.0",
55
55
  "read-package-up": "^11.0.0",
56
56
  "update-notifier": "^7.0.0"
57
57
  },
58
- "gitHead": "a1922793282449a9ebe2991a6e376e83de778a55"
58
+ "gitHead": "d5a29ab4064a5496f879de04d730d7192461d3c5"
59
59
  }