vde-open 0.1.4 → 0.1.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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>vde-open</title>
7
- <script type="module" crossorigin src="/assets/index-BoCe8U41.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BsWikuUv.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-CC0ZOdtr.css">
9
9
  </head>
10
10
  <body>
@@ -1,8 +1,10 @@
1
- import { a as analyzeDocument, i as ParseLimitError, n as scanReferences, t as renderDocument } from "../render-BNZz0CjQ.js";
1
+ import { a as ParseLimitError, o as analyzeDocument } from "../rendering-rules-DiE2jI7I.js";
2
+ import { n as scanReferences, t as renderDocument } from "../render-BJnuEfHt.js";
2
3
  import { n as measureHeap, t as collectGarbage } from "../heap-C3qHm7SE.js";
3
4
  import { parentPort } from "node:worker_threads";
4
5
  //#region src/workers/parse-worker.ts
5
- function run(request) {
6
+ let printModule = null;
7
+ async function run(request) {
6
8
  if (request.op === "diagnostics") return {
7
9
  heapUsedBytes: measureHeap(request.collectGarbage),
8
10
  retained: {}
@@ -13,14 +15,18 @@ function run(request) {
13
15
  }
14
16
  if (request.op === "analyze") return analyzeDocument(request.text, request.format);
15
17
  if (request.op === "scan") return scanReferences(request.kind, request.text);
18
+ if (request.op === "print") {
19
+ printModule ??= import("../print-CR5-GDjQ.js");
20
+ return (await printModule).renderPrintDocument(request.input);
21
+ }
16
22
  return renderDocument(request.input);
17
23
  }
18
- parentPort?.on("message", (request) => {
24
+ parentPort?.on("message", async (request) => {
19
25
  try {
20
26
  parentPort?.postMessage({
21
27
  id: request.id,
22
28
  ok: true,
23
- result: run(request)
29
+ result: await run(request)
24
30
  });
25
31
  } catch (error) {
26
32
  parentPort?.postMessage({
@@ -1,4 +1,4 @@
1
- import { t as SearchIndex } from "../search-index-__laOomT.js";
1
+ import { t as SearchIndex } from "../search-index-B7DqaWh6.js";
2
2
  import { n as measureHeap, t as collectGarbage } from "../heap-C3qHm7SE.js";
3
3
  import { parentPort } from "node:worker_threads";
4
4
  //#region src/workers/search-worker.ts
@@ -18,10 +18,10 @@ Do not read every document in full each time. Fetch only what you need, in this
18
18
  ## Search
19
19
 
20
20
  ```bash
21
- vo search '認証 セッション' --limit 5 --json
21
+ vo search 'authentication session' --limit 5 --json
22
22
  vo search 'refresh_token' --mode exact --json
23
23
  vo search 'users.md' --mode path --json
24
- vo search '有効期限' --document <documentId> --json
24
+ vo search 'expiration' --document <documentId> --json
25
25
  ```
26
26
 
27
27
  - `--mode text` (the default) finds sections that contain every term. `exact` matches only a contiguous string, and `path` searches only file names and paths.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vde-open",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "A local document viewer shared by agents and people: open Markdown and HTML documents, search and read them from the CLI, and ask the person questions.",
5
5
  "keywords": [
6
6
  "agent",