@krodak/clickup-cli 1.16.0 → 1.16.1
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 +29 -8
- package/package.json +1 -1
|
@@ -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.16.
|
|
4
|
+
"version": "1.16.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Krzysztof Rodak"
|
|
7
7
|
},
|
package/dist/index.js
CHANGED
|
@@ -4049,6 +4049,10 @@ ${renderZshTopLevelCommands(name)}
|
|
|
4049
4049
|
_arguments \\
|
|
4050
4050
|
'--days[Number of days to look back]:days:' \\
|
|
4051
4051
|
'--task[Filter by task ID]:task_id:' \\
|
|
4052
|
+
'--space[Filter by space ID]:space_id:' \\
|
|
4053
|
+
'--list[Filter by list ID]:list_id:' \\
|
|
4054
|
+
'--assignee[Filter by assignee user ID]:user_id:' \\
|
|
4055
|
+
'--all[Show all team entries]' \\
|
|
4052
4056
|
'--json[Force JSON output]'
|
|
4053
4057
|
;;
|
|
4054
4058
|
update)
|
|
@@ -4509,6 +4513,10 @@ complete -c ${name} -n '__fish_seen_subcommand_from start; and __fish_seen_subco
|
|
|
4509
4513
|
complete -c ${name} -n '__fish_seen_subcommand_from log; and __fish_seen_subcommand_from time' -s d -l description -d 'Description'
|
|
4510
4514
|
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l days -d 'Number of days to look back'
|
|
4511
4515
|
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l task -d 'Filter by task ID'
|
|
4516
|
+
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l space -d 'Filter by space ID'
|
|
4517
|
+
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l list -d 'Filter by list ID'
|
|
4518
|
+
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l assignee -d 'Filter by assignee user ID'
|
|
4519
|
+
complete -c ${name} -n '__fish_seen_subcommand_from list; and __fish_seen_subcommand_from time' -l all -d 'Show all team entries'
|
|
4512
4520
|
complete -c ${name} -n '__fish_seen_subcommand_from update; and __fish_seen_subcommand_from time' -s d -l description -d 'New description'
|
|
4513
4521
|
complete -c ${name} -n '__fish_seen_subcommand_from update; and __fish_seen_subcommand_from time' -l duration -d 'New duration'
|
|
4514
4522
|
|
|
@@ -5731,7 +5739,7 @@ function isAllowedFilterCommand(tokens) {
|
|
|
5731
5739
|
if (tokens[0] === "time" && tokens[1] === "list") return true;
|
|
5732
5740
|
return ALLOWED_FILTER_COMMANDS.has(tokens[0]);
|
|
5733
5741
|
}
|
|
5734
|
-
function runFilter(
|
|
5742
|
+
function runFilter(_name, entry) {
|
|
5735
5743
|
const result = spawnSync(process.execPath, [process.argv[1], ...entry.command], {
|
|
5736
5744
|
stdio: "inherit"
|
|
5737
5745
|
});
|
|
@@ -5786,18 +5794,29 @@ async function createListWithOptions(config, spaceId, name, opts) {
|
|
|
5786
5794
|
}
|
|
5787
5795
|
const list = opts.folder ? await client.createFolderList(opts.folder, name) : await client.createList(spaceId, name);
|
|
5788
5796
|
if (statuses) {
|
|
5789
|
-
|
|
5797
|
+
try {
|
|
5798
|
+
await client.updateList(list.id, { statuses });
|
|
5799
|
+
} catch (err) {
|
|
5800
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
5801
|
+
throw new Error(`List "${name}" (${list.id}) was created but status copy failed: ${reason}`, {
|
|
5802
|
+
cause: err
|
|
5803
|
+
});
|
|
5804
|
+
}
|
|
5790
5805
|
}
|
|
5791
5806
|
return {
|
|
5792
5807
|
...list,
|
|
5793
5808
|
...statuses ? { statusesCopied: statuses.length } : {}
|
|
5794
5809
|
};
|
|
5795
5810
|
}
|
|
5811
|
+
function isNotFound(err) {
|
|
5812
|
+
return err instanceof Error && /ClickUp API error 4(04|03)/.test(err.message);
|
|
5813
|
+
}
|
|
5796
5814
|
async function copyStatusesFrom(client, sourceId) {
|
|
5797
5815
|
try {
|
|
5798
5816
|
const list = await client.getListWithStatuses(sourceId);
|
|
5799
5817
|
return list.statuses.map((s) => ({ status: s.status, color: s.color, type: s.type ?? "custom" }));
|
|
5800
|
-
} catch {
|
|
5818
|
+
} catch (err) {
|
|
5819
|
+
if (!isNotFound(err)) throw err;
|
|
5801
5820
|
try {
|
|
5802
5821
|
const space = await client.getSpaceWithStatuses(sourceId);
|
|
5803
5822
|
return space.statuses.map((s) => ({
|
|
@@ -5805,9 +5824,11 @@ async function copyStatusesFrom(client, sourceId) {
|
|
|
5805
5824
|
color: s.color,
|
|
5806
5825
|
type: s.type ?? "custom"
|
|
5807
5826
|
}));
|
|
5808
|
-
} catch {
|
|
5827
|
+
} catch (spaceErr) {
|
|
5828
|
+
if (!isNotFound(spaceErr)) throw spaceErr;
|
|
5809
5829
|
throw new Error(
|
|
5810
|
-
`Could not find a list or space with ID "${sourceId}". Check the ID and try again
|
|
5830
|
+
`Could not find a list or space with ID "${sourceId}". Check the ID and try again.`,
|
|
5831
|
+
{ cause: spaceErr }
|
|
5811
5832
|
);
|
|
5812
5833
|
}
|
|
5813
5834
|
}
|
|
@@ -6623,10 +6644,9 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
6623
6644
|
outputBulkResult(result, opts.json ?? false, "due-date");
|
|
6624
6645
|
})
|
|
6625
6646
|
);
|
|
6626
|
-
bulkCmd.command("tag <tagName> <taskIds...>").description("Bulk add or remove a tag on tasks
|
|
6647
|
+
bulkCmd.command("tag <tagName> <taskIds...>").description("Bulk add or remove a tag on tasks (default: add)").option("--remove", "Remove tag instead of adding").option("--json", "Force JSON output even in terminal").action(
|
|
6627
6648
|
wrapAction(
|
|
6628
6649
|
async (tagName, taskIds, opts) => {
|
|
6629
|
-
if (opts.add && opts.remove) throw new Error("Cannot use --add and --remove together");
|
|
6630
6650
|
const action = opts.remove ? "remove" : "add";
|
|
6631
6651
|
const config = loadConfig(getProfileName());
|
|
6632
6652
|
const result = await bulkTag(config, tagName, taskIds, action);
|
|
@@ -7104,8 +7124,9 @@ function buildProgram(programName = basename(process.argv[1] ?? "cup")) {
|
|
|
7104
7124
|
);
|
|
7105
7125
|
}
|
|
7106
7126
|
if (!isAllowedFilterCommand(args)) {
|
|
7127
|
+
const allowed = [...ALLOWED_FILTER_COMMANDS, "time list"].join(", ");
|
|
7107
7128
|
throw new Error(
|
|
7108
|
-
`Command "${args[0]}" is not allowed in saved filters. Allowed:
|
|
7129
|
+
`Command "${args[0]}" is not allowed in saved filters. Allowed: ${allowed}`
|
|
7109
7130
|
);
|
|
7110
7131
|
}
|
|
7111
7132
|
const entry = { command: args };
|