@beauraines/rtm-cli 1.10.0 → 1.11.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.11.0](https://github.com/beauraines/rtm-cli/compare/v1.10.0...v1.11.0) (2025-12-17)
6
+
7
+
8
+ ### Features
9
+
10
+ * **tasks:** adds list name to command output ([#161](https://github.com/beauraines/rtm-cli/issues/161)) ([174c669](https://github.com/beauraines/rtm-cli/commit/174c669e3c667278ffe3a295331d1e9041feae35))
11
+
5
12
  ## [1.10.0](https://github.com/beauraines/rtm-cli/compare/v1.9.3...v1.10.0) (2025-12-17)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beauraines/rtm-cli",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "RTM CLI",
5
5
  "keywords": [
6
6
  "rtm",
package/src/cmd/task.js CHANGED
@@ -9,6 +9,7 @@ const debug = require('debug')('rtm-cli-task');
9
9
 
10
10
 
11
11
  let TASKS = [];
12
+ let LIST_MAP = new Map();
12
13
 
13
14
  // Get Display Styles
14
15
  let styles = config.get().styles;
@@ -34,6 +35,18 @@ async function action(args, env) {
34
35
  }
35
36
 
36
37
 
38
+ // Fetch all RTM lists to map IDs to names
39
+ try {
40
+ log.spinner.start('Fetching Lists');
41
+ const lists = await new Promise((res, rej) => user.lists.get((err, lists) => err ? rej(err) : res(lists)));
42
+ LIST_MAP = new Map(lists.map(l => [l.id, l.name]));
43
+ } catch (e) {
44
+ log.spinner.warn(`Could not fetch lists: ${e.message || e}`);
45
+ } finally {
46
+ log.spinner.stop();
47
+ }
48
+
49
+
37
50
  log.spinner.start("Getting Task(s)");
38
51
  // Use provided args
39
52
  for (const arg in args[0]) {
@@ -80,9 +93,14 @@ function displayTask(taskDetails) {
80
93
  let index = taskDetails.index;
81
94
  // eslint-disable-next-line no-unused-vars
82
95
  const { _list, list_id, taskseries_id, task_id, _index, name, priority, start, due, completed, isRecurring, isSubtask, estimate, url, tags, notes ,...otherAttributes } = taskDetails.task;
96
+
97
+ const listName = LIST_MAP.get(list_id) || "Not found";
98
+
83
99
  log.style(index + " " + name,styles.list,true);
84
- log.style(`List: `,styles.index)
85
- log(`${list_id}`) // TODO lookup the list name
100
+ log.style(`List Name: `,styles.index)
101
+ log(`${listName}`)
102
+ log.style(`List Id: `,styles.index)
103
+ log(`${list_id}`)
86
104
  log.style(`Priority: `,styles.index)
87
105
  log.style(`${priority}`,styles.priority[priority],true)
88
106
  log.style(`Start: `,styles.index)