@thehammer/danx-dashboard-mcp 0.1.162 → 0.1.165

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.
@@ -102,7 +102,16 @@ export class DashboardHttpClient {
102
102
  for (const [k, v] of Object.entries(extraQuery)) {
103
103
  if (v === undefined || v === null)
104
104
  continue;
105
- params.set(k, String(v));
105
+ // DX-3465 (code-quality gate finding, at 275f82c0d) — a field TREE
106
+ // (`fields`, and any other tree-shaped route param) arrives here as a
107
+ // real object/array, not a string; `String(v)` on either produces
108
+ // the useless literal "[object Object]" (objects) or a comma-joined
109
+ // list that drops all nesting (arrays). JSON-encode both so the
110
+ // server's own `fields=` query-string parser (which expects exactly
111
+ // this shape — see `src/dashboard/...` field-tree route handling)
112
+ // receives what it can actually parse; a plain scalar still
113
+ // stringifies the same way it always did.
114
+ params.set(k, typeof v === "object" ? JSON.stringify(v) : String(v));
106
115
  }
107
116
  }
108
117
  return `${base}${basePath}${cleanPath}?${params.toString()}`;