@plannotator/pi-extension 0.17.2 → 0.17.4

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.
@@ -15,7 +15,13 @@ import { html, json, parseBody, requestUrl } from "./helpers.js";
15
15
  import { listenOnPort } from "./network.js";
16
16
 
17
17
  import { getRepoInfo } from "./project.js";
18
- import { handleDocRequest, handleFileBrowserRequest } from "./reference.js";
18
+ import {
19
+ handleDocRequest,
20
+ handleFileBrowserRequest,
21
+ handleObsidianVaultsRequest,
22
+ handleObsidianFilesRequest,
23
+ handleObsidianDocRequest,
24
+ } from "./reference.js";
19
25
  import { createExternalAnnotationHandler } from "./external-annotations.js";
20
26
 
21
27
  export interface AnnotateServerResult {
@@ -106,6 +112,12 @@ export async function startAnnotateServer(options: {
106
112
  url.searchParams.set("base", dirname(resolvePath(options.filePath)));
107
113
  }
108
114
  handleDocRequest(res, url);
115
+ } else if (url.pathname === "/api/obsidian/vaults") {
116
+ handleObsidianVaultsRequest(res);
117
+ } else if (url.pathname === "/api/reference/obsidian/files" && req.method === "GET") {
118
+ handleObsidianFilesRequest(res, url);
119
+ } else if (url.pathname === "/api/reference/obsidian/doc" && req.method === "GET") {
120
+ handleObsidianDocRequest(res, url);
109
121
  } else if (url.pathname === "/api/reference/files" && req.method === "GET") {
110
122
  handleFileBrowserRequest(res, url);
111
123
  } else if (url.pathname === "/favicon.svg") {