@de-otio/epimethian-mcp 4.1.1 → 4.1.2

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/index.js CHANGED
@@ -45259,12 +45259,21 @@ async function deletePage(pageId) {
45259
45259
  }
45260
45260
  async function searchPages(cql, limit) {
45261
45261
  const cfg = await getConfig();
45262
- const url = new URL(`${cfg.apiV1}/content/search`);
45262
+ const url = new URL(`${cfg.url}/wiki/rest/api/search`);
45263
45263
  url.searchParams.set("cql", cql);
45264
45264
  url.searchParams.set("limit", String(limit));
45265
45265
  const res = await confluenceRequest(url.toString());
45266
45266
  const raw = await res.json();
45267
- return PagesResultSchema.parse(raw).results;
45267
+ const results = [];
45268
+ for (const r of raw.results ?? []) {
45269
+ const page = r.content ?? r;
45270
+ if (r.excerpt) page.excerpt = r.excerpt;
45271
+ try {
45272
+ results.push(PageSchema.parse(page));
45273
+ } catch {
45274
+ }
45275
+ }
45276
+ return results;
45268
45277
  }
45269
45278
  async function listPages(spaceId, limit, status) {
45270
45279
  const raw = await v2Get("/pages", {