@beauraines/rtm-cli 1.10.0 → 1.12.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 +14 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/cmd/task.js +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.12.0](https://github.com/beauraines/rtm-cli/compare/v1.11.0...v1.12.0) (2025-12-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **task:** adds tasks as alias for task command ([#162](https://github.com/beauraines/rtm-cli/issues/162)) ([b9196ee](https://github.com/beauraines/rtm-cli/commit/b9196ee2d73680cce9ab01e39cd73e27b426fb7e)), closes [#152](https://github.com/beauraines/rtm-cli/issues/152)
|
|
11
|
+
|
|
12
|
+
## [1.11.0](https://github.com/beauraines/rtm-cli/compare/v1.10.0...v1.11.0) (2025-12-17)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **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))
|
|
18
|
+
|
|
5
19
|
## [1.10.0](https://github.com/beauraines/rtm-cli/compare/v1.9.3...v1.10.0) (2025-12-17)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ The main usage of the program:
|
|
|
98
98
|
setUrl|su [index] [url] Set the URL of a Task
|
|
99
99
|
start [index] [start...] Set the Start Date of a Task
|
|
100
100
|
tags|t Display all tags
|
|
101
|
-
task [indices...]
|
|
101
|
+
task|tasks [indices...] Display the Task details
|
|
102
102
|
uncomp|unc [indices...] Mark one or more Tasks as not complete
|
|
103
103
|
url [options] [indices...] Display the associated URL of a Task
|
|
104
104
|
whoami Display RTM user information
|
package/package.json
CHANGED
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]) {
|
|
@@ -70,6 +83,7 @@ async function action(args, env) {
|
|
|
70
83
|
|
|
71
84
|
module.exports = {
|
|
72
85
|
command: 'task [indices...]',
|
|
86
|
+
alias: 'tasks',
|
|
73
87
|
options: [],
|
|
74
88
|
description: 'Display the Task details',
|
|
75
89
|
action: action
|
|
@@ -80,9 +94,14 @@ function displayTask(taskDetails) {
|
|
|
80
94
|
let index = taskDetails.index;
|
|
81
95
|
// eslint-disable-next-line no-unused-vars
|
|
82
96
|
const { _list, list_id, taskseries_id, task_id, _index, name, priority, start, due, completed, isRecurring, isSubtask, estimate, url, tags, notes ,...otherAttributes } = taskDetails.task;
|
|
97
|
+
|
|
98
|
+
const listName = LIST_MAP.get(list_id) || "Not found";
|
|
99
|
+
|
|
83
100
|
log.style(index + " " + name,styles.list,true);
|
|
84
|
-
log.style(`List: `,styles.index)
|
|
85
|
-
log(`${
|
|
101
|
+
log.style(`List Name: `,styles.index)
|
|
102
|
+
log(`${listName}`)
|
|
103
|
+
log.style(`List Id: `,styles.index)
|
|
104
|
+
log(`${list_id}`)
|
|
86
105
|
log.style(`Priority: `,styles.index)
|
|
87
106
|
log.style(`${priority}`,styles.priority[priority],true)
|
|
88
107
|
log.style(`Start: `,styles.index)
|