@kaddo/mcp 3.88.3 → 3.88.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.
- package/dist/index.js +11 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12317,7 +12317,9 @@ async function handleJiraResponse(res) {
|
|
|
12317
12317
|
let detail = "";
|
|
12318
12318
|
try {
|
|
12319
12319
|
const body = await res.json();
|
|
12320
|
-
|
|
12320
|
+
const msgs = body.errorMessages?.filter(Boolean) ?? [];
|
|
12321
|
+
const fieldErrs = body.errors ? Object.entries(body.errors).map(([k2, v]) => `${k2}: ${v}`) : [];
|
|
12322
|
+
detail = [...msgs, ...fieldErrs].join("; ");
|
|
12321
12323
|
} catch {
|
|
12322
12324
|
}
|
|
12323
12325
|
throw integrationError("INTEGRATION_PROVIDER_ERROR", detail || `Jira responded with status ${res.status}.`);
|
|
@@ -12473,19 +12475,19 @@ function createJiraAdapter() {
|
|
|
12473
12475
|
const auth = authHeader(email, apiToken);
|
|
12474
12476
|
const jql = buildJql(request.filters);
|
|
12475
12477
|
const pageSize = Math.min(Math.max(1, request.pageSize ?? DEFAULT_PAGE_SIZE), 100);
|
|
12476
|
-
const
|
|
12478
|
+
const nextPageToken = request.cursor || void 0;
|
|
12477
12479
|
try {
|
|
12478
|
-
const fullJql = jql ? jql + " ORDER BY updated DESC" : "ORDER BY updated DESC";
|
|
12479
|
-
const
|
|
12480
|
+
const fullJql = jql ? jql + " ORDER BY updated DESC" : "updated >= -30d ORDER BY updated DESC";
|
|
12481
|
+
const body = {
|
|
12480
12482
|
jql: fullJql,
|
|
12481
|
-
startAt,
|
|
12482
12483
|
maxResults: pageSize,
|
|
12483
12484
|
fields: SEARCH_FIELDS.split(",")
|
|
12484
|
-
}
|
|
12485
|
+
};
|
|
12486
|
+
if (nextPageToken) body.nextPageToken = nextPageToken;
|
|
12487
|
+
const data = await jiraPost(baseUrl, "/rest/api/3/search/jql", auth, request.context.timeoutMs, body);
|
|
12485
12488
|
const items = data.issues.map((issue) => normalizeIssue(issue, baseUrl, request.context.integrationId));
|
|
12486
|
-
const
|
|
12487
|
-
|
|
12488
|
-
return { items, hasMore, ...hasMore ? { nextCursor: String(nextStart) } : {} };
|
|
12489
|
+
const hasMore = data.isLast === false;
|
|
12490
|
+
return { items, hasMore, ...hasMore && data.nextPageToken ? { nextCursor: data.nextPageToken } : {} };
|
|
12489
12491
|
} catch (err) {
|
|
12490
12492
|
throw normalizeProviderError(err);
|
|
12491
12493
|
}
|
package/package.json
CHANGED