@sodiumhq/mcp-pm 0.1.0-beta.2749 → 0.1.0-beta.2753
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 +10 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1678,7 +1678,7 @@ async function handleGetClientSummary(api, { code }) {
|
|
|
1678
1678
|
datesResult.status === "rejected" ? "key dates" : null,
|
|
1679
1679
|
overdueResult.status === "rejected" ? "overdue tasks" : null,
|
|
1680
1680
|
upcomingResult.status === "rejected" ? "upcoming tasks" : null,
|
|
1681
|
-
!customFieldsAvailable ?
|
|
1681
|
+
!customFieldsAvailable ? `custom fields (${gapReason(customFieldDefsResult, customFieldValsResult)})` : null
|
|
1682
1682
|
].filter((v) => v !== null)
|
|
1683
1683
|
})
|
|
1684
1684
|
}] };
|
|
@@ -1783,6 +1783,15 @@ function formatBusinessDetails(bd) {
|
|
|
1783
1783
|
function formatClientDate(d) {
|
|
1784
1784
|
return `- ${humanizeDateType(d.dateType ?? "")}: ${d.date ?? "(no date)"}${d.description ? ` — ${d.description}` : ""}`;
|
|
1785
1785
|
}
|
|
1786
|
+
function gapReason(...results) {
|
|
1787
|
+
for (const r of results) if (r.status === "rejected") {
|
|
1788
|
+
const err = r.reason;
|
|
1789
|
+
if (err instanceof SodiumApiError) return `${err.statusCode ?? "?"}: ${err.message}`;
|
|
1790
|
+
if (err instanceof Error) return err.message;
|
|
1791
|
+
return String(err);
|
|
1792
|
+
}
|
|
1793
|
+
return "unknown";
|
|
1794
|
+
}
|
|
1786
1795
|
function humanizeDateType(type) {
|
|
1787
1796
|
if (!type) return "(unknown)";
|
|
1788
1797
|
const words = type.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(" ");
|