@sellable/mcp 0.1.296 → 0.1.297

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.
Files changed (2) hide show
  1. package/dist/tools/rows.js +19 -1
  2. package/package.json +1 -1
@@ -97,7 +97,25 @@ export async function getTableRowsMinimal(tableId, options) {
97
97
  return api.get(path);
98
98
  }
99
99
  export function normalizeRowIds(rowIds) {
100
- const rawIds = Array.isArray(rowIds) ? rowIds : rowIds.split(",");
100
+ if (Array.isArray(rowIds)) {
101
+ return rowIds.map((rowId) => rowId.trim()).filter(Boolean);
102
+ }
103
+ const trimmed = rowIds.trim();
104
+ if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
105
+ try {
106
+ const parsed = JSON.parse(trimmed);
107
+ if (Array.isArray(parsed)) {
108
+ return parsed
109
+ .filter((rowId) => typeof rowId === "string")
110
+ .map((rowId) => rowId.trim())
111
+ .filter(Boolean);
112
+ }
113
+ }
114
+ catch {
115
+ // Fall through to comma-splitting for malformed JSON-like input.
116
+ }
117
+ }
118
+ const rawIds = rowIds.split(",");
101
119
  return rawIds.map((rowId) => rowId.trim()).filter(Boolean);
102
120
  }
103
121
  export async function getRows(tableId, rowIds) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.296",
3
+ "version": "0.1.297",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",