@aborruso/ckan-mcp-server 0.4.36 → 0.4.37

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/AGENTS.md CHANGED
@@ -64,6 +64,24 @@ Line 2
64
64
  EOF
65
65
  ```
66
66
 
67
+ When writing GitHub release notes, avoid literal `\n` in `--notes`. Always pass a here-doc
68
+ via `--notes-file -` so line breaks render correctly:
69
+
70
+ ```bash
71
+ cat <<'EOF' | gh release create v0.X.Y --title "v0.X.Y - Title" --notes-file -
72
+ ## What's New
73
+
74
+ ### Changes
75
+ - Item 1
76
+ - Item 2
77
+
78
+ ### No Breaking Changes
79
+ - All existing functionality preserved
80
+
81
+ **Full Changelog**: https://github.com/ondata/ckan-mcp-server/compare/v0.X-1.Y...v0.X.Y
82
+ EOF
83
+ ```
84
+
67
85
  ## TypeScript Style
68
86
 
69
87
  Use strict typing, avoid `any` unless from CKAN payloads. Prefer explicit return types, `type` aliases, ESM imports with `.js` extensions. Keep `noUnusedLocals` and `noUnusedParameters` clean.
package/LOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## 2026-02-01
4
4
 
5
+ ### Release v0.4.37
6
+
7
+ - Feature: add support for custom API paths in portal configuration
8
+ - Feature: add data.gov.uk portal support (uses `/api/action/` instead of `/api/3/action/`)
9
+ - Enhancement: extend portal configuration with `api_path` field
10
+ - Enhancement: dynamic API path construction based on portal config
11
+ - Files: `src/utils/portal-config.ts`, `src/utils/http.ts`, `src/portals.json`
12
+ - No breaking changes
13
+
5
14
  ### Release v0.4.36
6
15
 
7
16
  - Fix: align server and worker reported version with package version
package/dist/index.js CHANGED
@@ -46,6 +46,19 @@ var portals_default = {
46
46
  "https://dati.anticorruzione.it",
47
47
  "http://dati.anticorruzione.it"
48
48
  ]
49
+ },
50
+ {
51
+ id: "data-gov-uk",
52
+ name: "data.gov.uk",
53
+ api_url: "https://data.gov.uk",
54
+ api_url_aliases: [
55
+ "https://www.data.gov.uk",
56
+ "http://data.gov.uk",
57
+ "http://www.data.gov.uk"
58
+ ],
59
+ api_path: "/api/action",
60
+ dataset_view_url: "https://data.gov.uk/dataset/{name}",
61
+ organization_view_url: "https://data.gov.uk/publisher/{name}"
49
62
  }
50
63
  ],
51
64
  defaults: {
@@ -94,6 +107,10 @@ function getPortalApiUrlForHostname(hostname) {
94
107
  });
95
108
  return portal ? normalizeUrl(portal.api_url) : null;
96
109
  }
110
+ function getPortalApiPath(serverUrl) {
111
+ const portal = getPortalConfig(serverUrl);
112
+ return portal?.api_path || "/api/3/action";
113
+ }
97
114
 
98
115
  // src/utils/http.ts
99
116
  var loadZlib = /* @__PURE__ */ (() => {
@@ -240,7 +257,8 @@ async function makeCkanRequest(serverUrl, action, params = {}) {
240
257
  } catch {
241
258
  }
242
259
  const baseUrl = resolvedServerUrl.replace(/\/$/, "");
243
- const url = `${baseUrl}/api/3/action/${action}`;
260
+ const apiPath = getPortalApiPath(resolvedServerUrl);
261
+ const url = `${baseUrl}${apiPath}/${action}`;
244
262
  try {
245
263
  let decodedData;
246
264
  if (isNode) {