@doist/todoist-cli 3.2.2 → 3.3.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 +4 -0
- package/dist/commands/filter/index.d.ts.map +1 -1
- package/dist/commands/filter/index.js +5 -0
- package/dist/commands/filter/index.js.map +1 -1
- package/dist/commands/filter/view.d.ts +5 -1
- package/dist/commands/filter/view.d.ts.map +1 -1
- package/dist/commands/filter/view.js +130 -13
- package/dist/commands/filter/view.js.map +1 -1
- package/dist/lib/api/core.d.ts +9 -0
- package/dist/lib/api/core.d.ts.map +1 -1
- package/dist/lib/api/core.js +26 -0
- package/dist/lib/api/core.js.map +1 -1
- package/dist/lib/api/notifications.d.ts.map +1 -1
- package/dist/lib/api/notifications.js +13 -15
- package/dist/lib/api/notifications.js.map +1 -1
- package/dist/lib/skills/content.d.ts +1 -1
- package/dist/lib/skills/content.d.ts.map +1 -1
- package/dist/lib/skills/content.js +4 -0
- package/dist/lib/skills/content.js.map +1 -1
- package/dist/lib/task-list.d.ts +8 -0
- package/dist/lib/task-list.d.ts.map +1 -1
- package/dist/lib/task-list.js +9 -1
- package/dist/lib/task-list.js.map +1 -1
- package/dist/lib/task-sort.d.ts +91 -0
- package/dist/lib/task-sort.d.ts.map +1 -0
- package/dist/lib/task-sort.js +269 -0
- package/dist/lib/task-sort.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { isWorkspaceProject, sortTasks as sortTasksBySdk } from '@doist/todoist-sdk';
|
|
2
|
+
import { CliError } from './errors.js';
|
|
3
|
+
/**
|
|
4
|
+
* The CLI side of task ordering.
|
|
5
|
+
*
|
|
6
|
+
* The comparators themselves live in the SDK (`sortTasks`), which is where
|
|
7
|
+
* every Todoist client can share them. What stays here is the vocabulary the
|
|
8
|
+
* `--sort` flag speaks, the mapping from a saved view to that vocabulary, the
|
|
9
|
+
* sidebar layout the SDK wants as a lookup, and the guess at whether a filter
|
|
10
|
+
* query is date-driven, which the SDK asks the caller to decide.
|
|
11
|
+
*
|
|
12
|
+
* @see https://www.todoist.com/help/articles/default-sorting-order-for-todoist-tasks-mqmgerY7
|
|
13
|
+
*/
|
|
14
|
+
export const TASK_SORT_FIELDS = [
|
|
15
|
+
'default',
|
|
16
|
+
'priority',
|
|
17
|
+
'date',
|
|
18
|
+
'deadline',
|
|
19
|
+
'date-added',
|
|
20
|
+
'name',
|
|
21
|
+
'project',
|
|
22
|
+
'assignee',
|
|
23
|
+
'workspace',
|
|
24
|
+
'none',
|
|
25
|
+
];
|
|
26
|
+
export const TASK_SORT_DIRECTIONS = ['asc', 'desc'];
|
|
27
|
+
export const DEFAULT_TASK_SORT = { field: 'default', direction: 'asc' };
|
|
28
|
+
/** Saved `sorted_by` values → the vocabulary `--sort` speaks. */
|
|
29
|
+
const FIELD_BY_SORTED_BY = {
|
|
30
|
+
MANUAL: 'default',
|
|
31
|
+
ALPHABETICALLY: 'name',
|
|
32
|
+
ASSIGNEE: 'assignee',
|
|
33
|
+
DUE_DATE: 'date',
|
|
34
|
+
DEADLINE: 'deadline',
|
|
35
|
+
ADDED_DATE: 'date-added',
|
|
36
|
+
PRIORITY: 'priority',
|
|
37
|
+
PROJECT: 'project',
|
|
38
|
+
WORKSPACE: 'workspace',
|
|
39
|
+
};
|
|
40
|
+
/** And back again for the SDK call. `default` maps to MANUAL; only `none` is absent. */
|
|
41
|
+
const SORTED_BY_FIELD = Object.fromEntries(Object.entries(FIELD_BY_SORTED_BY).map(([sortedBy, field]) => [field, sortedBy]));
|
|
42
|
+
const FIELD_LABELS = {
|
|
43
|
+
default: { asc: 'Todoist default', desc: 'Todoist default' },
|
|
44
|
+
priority: { asc: 'Priority (p4 first)', desc: 'Priority (p1 first)' },
|
|
45
|
+
date: { asc: 'Due date (earliest first)', desc: 'Due date (latest first)' },
|
|
46
|
+
deadline: { asc: 'Deadline (earliest first)', desc: 'Deadline (latest first)' },
|
|
47
|
+
'date-added': { asc: 'Date added (oldest first)', desc: 'Date added (newest first)' },
|
|
48
|
+
name: { asc: 'Name (A-Z)', desc: 'Name (Z-A)' },
|
|
49
|
+
project: { asc: 'Project order', desc: 'Project order (reversed)' },
|
|
50
|
+
assignee: { asc: 'Assignee (A-Z)', desc: 'Assignee (Z-A)' },
|
|
51
|
+
workspace: { asc: 'Workspace order', desc: 'Workspace order (reversed)' },
|
|
52
|
+
none: { asc: 'None (API order)', desc: 'None (API order)' },
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Todoist sorts ascending everywhere except priority, which reads p1 to p4 and
|
|
56
|
+
* is stored as descending.
|
|
57
|
+
*/
|
|
58
|
+
export function defaultDirectionFor(field) {
|
|
59
|
+
return field === 'priority' ? 'desc' : 'asc';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The `--sort` flag is registered with Commander choices, so a bad value never
|
|
63
|
+
* reaches here from the command line. This guards the exported helper for any
|
|
64
|
+
* other caller, and keeps the error a `CliError` rather than a cast.
|
|
65
|
+
*/
|
|
66
|
+
export function parseTaskSortField(value) {
|
|
67
|
+
const normalized = value.trim().toLowerCase();
|
|
68
|
+
const match = TASK_SORT_FIELDS.find((field) => field === normalized);
|
|
69
|
+
if (match)
|
|
70
|
+
return match;
|
|
71
|
+
throw new CliError('INVALID_SORT', `Invalid sort field "${value}".`, [
|
|
72
|
+
`Valid fields: ${TASK_SORT_FIELDS.join(', ')}`,
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
export function parseTaskSortDirection(value) {
|
|
76
|
+
const normalized = value.trim().toLowerCase();
|
|
77
|
+
const match = TASK_SORT_DIRECTIONS.find((direction) => direction === normalized);
|
|
78
|
+
if (match)
|
|
79
|
+
return match;
|
|
80
|
+
throw new CliError('INVALID_SORT_ORDER', `Invalid sort order "${value}".`, [
|
|
81
|
+
`Valid orders: ${TASK_SORT_DIRECTIONS.join(', ')}`,
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
/** The sorting a saved view applies, or the Todoist default when it has none. */
|
|
85
|
+
export function taskSortFromViewOptions(viewOptions) {
|
|
86
|
+
const sortedBy = viewOptions?.sortedBy;
|
|
87
|
+
const field = sortedBy ? (FIELD_BY_SORTED_BY[sortedBy] ?? 'default') : 'default';
|
|
88
|
+
if (field === 'default')
|
|
89
|
+
return DEFAULT_TASK_SORT;
|
|
90
|
+
return { field, direction: directionFromSortOrder(viewOptions?.sortOrder, field) };
|
|
91
|
+
}
|
|
92
|
+
function directionFromSortOrder(sortOrder, field) {
|
|
93
|
+
if (sortOrder === 'ASC')
|
|
94
|
+
return 'asc';
|
|
95
|
+
if (sortOrder === 'DESC')
|
|
96
|
+
return 'desc';
|
|
97
|
+
return defaultDirectionFor(field);
|
|
98
|
+
}
|
|
99
|
+
export function formatTaskSort(sort) {
|
|
100
|
+
return FIELD_LABELS[sort.field][sort.direction];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Every sort but `none` needs the project list. Project order is the fourth
|
|
104
|
+
* criterion of the default hierarchy, and the default hierarchy is the
|
|
105
|
+
* tie-break under every named sort, so skipping the fetch for, say, a name
|
|
106
|
+
* sort would order equal names differently from the same sort in another
|
|
107
|
+
* output mode. Assignee sorting needs it too, to resolve collaborators.
|
|
108
|
+
*/
|
|
109
|
+
export function sortNeedsProjects(field) {
|
|
110
|
+
return field !== 'none';
|
|
111
|
+
}
|
|
112
|
+
/** Only assignee sorting needs collaborator names resolved. */
|
|
113
|
+
export function sortNeedsCollaborators(field) {
|
|
114
|
+
return field === 'assignee';
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Lay projects out in sidebar order: Inbox, the personal tree, then each
|
|
118
|
+
* workspace.
|
|
119
|
+
*
|
|
120
|
+
* Personal projects nest, so they walk their tree by `childOrder`. Workspace
|
|
121
|
+
* projects don't: they carry `defaultOrder` for their position and leave
|
|
122
|
+
* `childOrder` at 0, so ordering them by `childOrder` produces no order at
|
|
123
|
+
* all. Pass `workspaceNames` to sort the workspaces themselves the way the
|
|
124
|
+
* sidebar and `td project list` do, by name; without it they fall back to id,
|
|
125
|
+
* which is stable but arbitrary.
|
|
126
|
+
*/
|
|
127
|
+
export function buildProjectOrder(projects, { workspaceNames } = {}) {
|
|
128
|
+
const personal = [];
|
|
129
|
+
const byWorkspace = new Map();
|
|
130
|
+
for (const project of projects) {
|
|
131
|
+
if (isWorkspaceProject(project)) {
|
|
132
|
+
const bucket = byWorkspace.get(project.workspaceId) ?? [];
|
|
133
|
+
bucket.push(project);
|
|
134
|
+
byWorkspace.set(project.workspaceId, bucket);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
personal.push(project);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const orderedWorkspaceIds = [...byWorkspace.keys()].sort((a, b) => {
|
|
141
|
+
const nameA = workspaceNames?.get(a);
|
|
142
|
+
const nameB = workspaceNames?.get(b);
|
|
143
|
+
if (nameA && nameB)
|
|
144
|
+
return compareText(nameA, nameB);
|
|
145
|
+
return compareText(a, b);
|
|
146
|
+
});
|
|
147
|
+
const buckets = [
|
|
148
|
+
orderPersonalProjects(personal),
|
|
149
|
+
...orderedWorkspaceIds.map((id) => orderWorkspaceProjects(byWorkspace.get(id) ?? [])),
|
|
150
|
+
];
|
|
151
|
+
const projectOrder = new Map();
|
|
152
|
+
const workspaceOrder = new Map();
|
|
153
|
+
let position = 0;
|
|
154
|
+
for (const [bucket, projectsInBucket] of buckets.entries()) {
|
|
155
|
+
for (const project of projectsInBucket) {
|
|
156
|
+
projectOrder.set(project.id, position++);
|
|
157
|
+
workspaceOrder.set(project.id, bucket);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return { projectOrder, workspaceOrder };
|
|
161
|
+
}
|
|
162
|
+
function orderPersonalProjects(projects) {
|
|
163
|
+
const inbox = projects.filter(isInboxProject);
|
|
164
|
+
const rest = orderProjectTree(projects.filter((project) => !isInboxProject(project)));
|
|
165
|
+
return [...inbox, ...rest];
|
|
166
|
+
}
|
|
167
|
+
function isInboxProject(project) {
|
|
168
|
+
return 'inboxProject' in project && project.inboxProject === true;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* `defaultOrder` is the workspace's own sequence for its projects, folders
|
|
172
|
+
* included, which is what the sidebar draws.
|
|
173
|
+
*/
|
|
174
|
+
function orderWorkspaceProjects(projects) {
|
|
175
|
+
return [...projects].sort((a, b) => compare(a.defaultOrder, b.defaultOrder) || compareText(a.name, b.name));
|
|
176
|
+
}
|
|
177
|
+
/** Depth-first walk of the personal project tree, siblings in `childOrder` order. */
|
|
178
|
+
function orderProjectTree(projects) {
|
|
179
|
+
const ids = new Set(projects.map((project) => project.id));
|
|
180
|
+
const byParent = new Map();
|
|
181
|
+
for (const project of projects) {
|
|
182
|
+
const parent = isWorkspaceProject(project) ? null : project.parentId;
|
|
183
|
+
const parentId = parent && ids.has(parent) ? parent : null;
|
|
184
|
+
const siblings = byParent.get(parentId) ?? [];
|
|
185
|
+
siblings.push(project);
|
|
186
|
+
byParent.set(parentId, siblings);
|
|
187
|
+
}
|
|
188
|
+
for (const siblings of byParent.values()) {
|
|
189
|
+
siblings.sort((a, b) => compare(a.childOrder, b.childOrder) || compareText(a.name, b.name));
|
|
190
|
+
}
|
|
191
|
+
const ordered = [];
|
|
192
|
+
const visited = new Set();
|
|
193
|
+
function visit(parentId) {
|
|
194
|
+
for (const project of byParent.get(parentId) ?? []) {
|
|
195
|
+
if (visited.has(project.id))
|
|
196
|
+
continue;
|
|
197
|
+
visited.add(project.id);
|
|
198
|
+
ordered.push(project);
|
|
199
|
+
visit(project.id);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
visit(null);
|
|
203
|
+
return ordered;
|
|
204
|
+
}
|
|
205
|
+
function compare(a, b) {
|
|
206
|
+
if (a === b)
|
|
207
|
+
return 0;
|
|
208
|
+
return a < b ? -1 : 1;
|
|
209
|
+
}
|
|
210
|
+
function compareText(a, b) {
|
|
211
|
+
return a.localeCompare(b, undefined, { sensitivity: 'base', numeric: true });
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Sort a task list the way a Todoist client would, by handing the SDK the
|
|
215
|
+
* pieces only the CLI can know: which hierarchy this list falls back to, where
|
|
216
|
+
* each project sits in the sidebar, how to name an assignee, and which
|
|
217
|
+
* timezone a floating due time belongs to.
|
|
218
|
+
*/
|
|
219
|
+
export function sortTasks(tasks, sort, context = {}) {
|
|
220
|
+
if (sort.field === 'none')
|
|
221
|
+
return [...tasks];
|
|
222
|
+
return sortTasksBySdk(tasks, {
|
|
223
|
+
sortedBy: SORTED_BY_FIELD[sort.field] ?? null,
|
|
224
|
+
sortOrder: sort.direction === 'desc' ? 'DESC' : 'ASC',
|
|
225
|
+
defaultOrder: context.dateDriven ? 'DATE_FIRST' : 'PRIORITY_FIRST',
|
|
226
|
+
}, {
|
|
227
|
+
projectOrder: context.projectOrder,
|
|
228
|
+
workspaceOrder: context.workspaceOrder,
|
|
229
|
+
assigneeName: context.assigneeName,
|
|
230
|
+
timezone: context.timezone,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Tokens that make a filter query date-driven, which switches the default
|
|
235
|
+
* ordering from priority-first to date-first.
|
|
236
|
+
*
|
|
237
|
+
* Known limitation: these are the English keywords. The backend parses a saved
|
|
238
|
+
* query in the account's language when the request carries no `lang`, so a
|
|
239
|
+
* filter written as "hoy" or "heute" reads as priority-first here. Classifying
|
|
240
|
+
* properly means the query parser, which is Filterist's job rather than a
|
|
241
|
+
* regex's, so the fix belongs in the SDK. Until then the cost is one of two
|
|
242
|
+
* default hierarchies, not a wrong result set.
|
|
243
|
+
*/
|
|
244
|
+
const DATE_QUERY_PATTERN = new RegExp([
|
|
245
|
+
String.raw `\b(?:today|tomorrow|yesterday|overdue|due|dated?|datetime|deadlines?|recurring)\b`,
|
|
246
|
+
String.raw `\b(?:mon|tue|wed|thu|fri|sat|sun)\b`,
|
|
247
|
+
String.raw `\b(?:monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b`,
|
|
248
|
+
String.raw `\b(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\b`,
|
|
249
|
+
String.raw `\b(?:before|after)\s*:`,
|
|
250
|
+
String.raw `\b\d+\s*(?:days?|hours?|weeks?|months?)\b`,
|
|
251
|
+
String.raw `\b(?:next|last)\s+(?:week|month|year|\d+)`,
|
|
252
|
+
].join('|'), 'i');
|
|
253
|
+
/**
|
|
254
|
+
* Names and free-text searches can contain date words ("#May launch",
|
|
255
|
+
* "#due date", "search: due diligence"), so those operands are dropped before
|
|
256
|
+
* the query is inspected. Todoist ends a name at an operator rather than at a
|
|
257
|
+
* space, so these run to the next one and take the whole name with them.
|
|
258
|
+
*/
|
|
259
|
+
function stripNamedRefs(query) {
|
|
260
|
+
return query
|
|
261
|
+
.replace(/"[^"]*"/g, ' ')
|
|
262
|
+
.replace(/'[^']*'/g, ' ')
|
|
263
|
+
.replace(/\bsearch\s*:[^&|(),]*/gi, ' ')
|
|
264
|
+
.replace(/[#@/]{1,2}[^&|(),]*/g, ' ');
|
|
265
|
+
}
|
|
266
|
+
export function queryUsesDates(query) {
|
|
267
|
+
return DATE_QUERY_PATTERN.test(stripNamedRefs(query));
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=task-sort.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-sort.js","sourceRoot":"","sources":["../../src/lib/task-sort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAGpF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS;IACT,UAAU;IACV,MAAM;IACN,UAAU;IACV,YAAY;IACZ,MAAM;IACN,SAAS;IACT,UAAU;IACV,WAAW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AAG,CAAA,mFAAmF;IAC7F,MAAM,CAAC,GAAG,CAAA,qCAAqC;IAC/C,MAAM,CAAC,GAAG,CAAA,kEAAkE;IAC5E,MAAM,CAAC,GAAG,CAAA,yDAAyD;IACnE,MAAM,CAAC,GAAG,CAAA,wBAAwB;IAClC,MAAM,CAAC,GAAG,CAAA,2CAA2C;IACrD,MAAM,CAAC,GAAG,CAAA,2CAA2C;CACxD,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,GAAG,CACN,CAAA;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAa;IACjC,OAAO,KAAK;SACP,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,yBAAyB,EAAE,GAAG,CAAC;SACvC,OAAO,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAA;AAC7C,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IACxC,OAAO,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAA;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "TypeScript CLI for Todoist",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@doist/cli-core": "1.2.0",
|
|
56
|
-
"@doist/todoist-sdk": "14.0
|
|
56
|
+
"@doist/todoist-sdk": "14.1.0",
|
|
57
57
|
"@napi-rs/keyring": "1.3.0",
|
|
58
58
|
"@pnpm/tabtab": "0.5.4",
|
|
59
59
|
"chalk": "6.0.0",
|