@krodak/clickup-cli 1.31.1 → 1.31.2
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/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +32 -9
- package/package.json +1 -1
- package/skills/clickup-cli/SKILL.md +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clickup-cli",
|
|
3
3
|
"description": "ClickUp CLI skills for managing tasks, sprints, comments, checklists, custom fields, tags, and time tracking via the cup command",
|
|
4
|
-
"version": "1.31.
|
|
4
|
+
"version": "1.31.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -1792,6 +1792,12 @@ function stringifyFieldValue(value) {
|
|
|
1792
1792
|
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
1793
1793
|
return JSON.stringify(value);
|
|
1794
1794
|
}
|
|
1795
|
+
function optionDisplayName(option) {
|
|
1796
|
+
return option.label ?? option.name;
|
|
1797
|
+
}
|
|
1798
|
+
function dropdownOptionName(option) {
|
|
1799
|
+
return option.name ?? option.label;
|
|
1800
|
+
}
|
|
1795
1801
|
function formatCustomFieldValue(field) {
|
|
1796
1802
|
if (field.value === null || field.value === void 0) return null;
|
|
1797
1803
|
const options = field.type_config?.options;
|
|
@@ -1799,11 +1805,14 @@ function formatCustomFieldValue(field) {
|
|
|
1799
1805
|
case "drop_down": {
|
|
1800
1806
|
if (!options) return stringifyFieldValue(field.value);
|
|
1801
1807
|
const match = options.find((o) => o.orderindex === Number(field.value));
|
|
1802
|
-
return match
|
|
1808
|
+
return match ? dropdownOptionName(match) ?? stringifyFieldValue(field.value) : stringifyFieldValue(field.value);
|
|
1803
1809
|
}
|
|
1804
1810
|
case "labels": {
|
|
1805
1811
|
if (!Array.isArray(field.value) || !options) return stringifyFieldValue(field.value);
|
|
1806
|
-
const names = field.value.map((id) =>
|
|
1812
|
+
const names = field.value.map((id) => {
|
|
1813
|
+
const match = options.find((o) => o.id === id);
|
|
1814
|
+
return match ? optionDisplayName(match) : void 0;
|
|
1815
|
+
}).filter((n) => n !== void 0);
|
|
1807
1816
|
return names.length > 0 ? names.join(", ") : null;
|
|
1808
1817
|
}
|
|
1809
1818
|
case "date": {
|
|
@@ -6330,6 +6339,15 @@ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
|
|
|
6330
6339
|
"tasks",
|
|
6331
6340
|
"users"
|
|
6332
6341
|
]);
|
|
6342
|
+
function labelOptionName(option) {
|
|
6343
|
+
return option.label ?? option.name;
|
|
6344
|
+
}
|
|
6345
|
+
function dropdownOptionName2(option) {
|
|
6346
|
+
return option.name ?? option.label;
|
|
6347
|
+
}
|
|
6348
|
+
function availableOptionNames(options, getOptionName) {
|
|
6349
|
+
return options.map((option) => getOptionName(option) ?? option.id).join(", ");
|
|
6350
|
+
}
|
|
6333
6351
|
function findFieldByName(fields, name) {
|
|
6334
6352
|
const lower = name.toLowerCase();
|
|
6335
6353
|
const match = fields.find((f) => f.name.toLowerCase() === lower);
|
|
@@ -6360,13 +6378,15 @@ function parseFieldValue(field, rawValue) {
|
|
|
6360
6378
|
const options = field.type_config?.options;
|
|
6361
6379
|
if (!options?.length) throw new Error("Dropdown field has no configured options");
|
|
6362
6380
|
const lower = rawValue.toLowerCase();
|
|
6363
|
-
const option = options.find((o) => o
|
|
6381
|
+
const option = options.find((o) => dropdownOptionName2(o)?.toLowerCase() === lower);
|
|
6364
6382
|
if (!option) {
|
|
6365
|
-
const available = options
|
|
6383
|
+
const available = availableOptionNames(options, dropdownOptionName2);
|
|
6366
6384
|
throw new Error(`Option "${rawValue}" not found. Available options: ${available}`);
|
|
6367
6385
|
}
|
|
6368
6386
|
if (option.orderindex === void 0) {
|
|
6369
|
-
throw new Error(
|
|
6387
|
+
throw new Error(
|
|
6388
|
+
`Dropdown option "${dropdownOptionName2(option) ?? option.id}" has no orderindex`
|
|
6389
|
+
);
|
|
6370
6390
|
}
|
|
6371
6391
|
return option.orderindex;
|
|
6372
6392
|
}
|
|
@@ -6378,9 +6398,9 @@ function parseFieldValue(field, rawValue) {
|
|
|
6378
6398
|
const ids = [];
|
|
6379
6399
|
for (const name of names) {
|
|
6380
6400
|
const lower = name.toLowerCase();
|
|
6381
|
-
const option = options.find((o) => o
|
|
6401
|
+
const option = options.find((o) => labelOptionName(o)?.toLowerCase() === lower);
|
|
6382
6402
|
if (!option) {
|
|
6383
|
-
const available = options
|
|
6403
|
+
const available = availableOptionNames(options, labelOptionName);
|
|
6384
6404
|
throw new Error(`Label "${name}" not found. Available: ${available}`);
|
|
6385
6405
|
}
|
|
6386
6406
|
ids.push(option.id);
|
|
@@ -7223,6 +7243,9 @@ var FIELD_COLUMNS = [
|
|
|
7223
7243
|
},
|
|
7224
7244
|
{ key: "options", label: "Options", maxWidth: 40 }
|
|
7225
7245
|
];
|
|
7246
|
+
function optionDisplayName2(option) {
|
|
7247
|
+
return option.label ?? option.name ?? option.id;
|
|
7248
|
+
}
|
|
7226
7249
|
async function listFields(config, listId) {
|
|
7227
7250
|
const client = new ClickUpClient(config);
|
|
7228
7251
|
return client.getListCustomFields(listId);
|
|
@@ -7234,14 +7257,14 @@ function formatFields(fields) {
|
|
|
7234
7257
|
name: f.name,
|
|
7235
7258
|
type: f.type,
|
|
7236
7259
|
required: f.required ? "yes" : "no",
|
|
7237
|
-
options: f.type_config?.options?.map(
|
|
7260
|
+
options: f.type_config?.options?.map(optionDisplayName2).join(", ") ?? ""
|
|
7238
7261
|
}));
|
|
7239
7262
|
return formatTable(rows, FIELD_COLUMNS);
|
|
7240
7263
|
}
|
|
7241
7264
|
function formatFieldsMarkdown(fields) {
|
|
7242
7265
|
if (fields.length === 0) return "No custom fields";
|
|
7243
7266
|
return fields.map((f) => {
|
|
7244
|
-
const options = f.type_config?.options?.map(
|
|
7267
|
+
const options = f.type_config?.options?.map(optionDisplayName2).join(", ");
|
|
7245
7268
|
const optStr = options ? ` [${options}]` : "";
|
|
7246
7269
|
return `- **${f.name}** \`${f.id}\` (${f.type})${f.required ? " - required" : ""}${optStr}`;
|
|
7247
7270
|
}).join("\n");
|
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@ name: clickup
|
|
|
3
3
|
description: 'Use when managing ClickUp tasks, sprints, or comments via the `cup` CLI tool. Triggers: task queries, status updates, sprint tracking, creating subtasks, posting comments, threaded replies, standup summaries, searching tasks, checking overdue items, assigning tasks, listing spaces and lists, opening tasks in browser, checking auth or config, setting custom fields, deleting tasks, managing tags, managing checklists, editing comments, task links, time tracking, attachments, file uploads, listing members, listing fields, duplicating tasks, bulk operations, goals, key results, saved filters, favorites.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# ClickUp CLI (`cup`) - skill version 1.31.
|
|
6
|
+
# ClickUp CLI (`cup`) - skill version 1.31.2
|
|
7
7
|
|
|
8
8
|
Reference for AI agents using the `cup` CLI tool. Covers task management, sprint tracking, comments, time tracking, custom fields, goals, docs, and project workflows.
|
|
9
9
|
|
|
10
|
-
> **Version check:** Run `cup --version`. If your installed version is older than 1.31.
|
|
10
|
+
> **Version check:** Run `cup --version`. If your installed version is older than 1.31.2, update with `npm install -g @krodak/clickup-cli` and refresh this skill with `cup skill`.
|
|
11
11
|
|
|
12
12
|
## Install & Configure
|
|
13
13
|
|