@hasna/todos 0.11.61 → 0.11.62
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkIzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAqzBvD"}
|
package/dist/cli/index.js
CHANGED
|
@@ -16631,6 +16631,42 @@ function parseJsonObjectOption(value, label) {
|
|
|
16631
16631
|
} catch {}
|
|
16632
16632
|
throw new Error(`${label} must be a JSON object`);
|
|
16633
16633
|
}
|
|
16634
|
+
function resolveTaskListFilter(input, projectId) {
|
|
16635
|
+
if (!input)
|
|
16636
|
+
return;
|
|
16637
|
+
const db = getDatabase();
|
|
16638
|
+
const id = input.length >= 36 ? db.query("SELECT id FROM task_lists WHERE id = ?").get(input) : null;
|
|
16639
|
+
if (id)
|
|
16640
|
+
return id.id;
|
|
16641
|
+
if (input.length < 36) {
|
|
16642
|
+
const partialIds = db.query("SELECT id FROM task_lists WHERE id LIKE ?").all(`${input}%`);
|
|
16643
|
+
if (partialIds.length === 1)
|
|
16644
|
+
return partialIds[0].id;
|
|
16645
|
+
if (partialIds.length > 1) {
|
|
16646
|
+
throw new Error(`Ambiguous task list ID: ${input}`);
|
|
16647
|
+
}
|
|
16648
|
+
}
|
|
16649
|
+
if (projectId) {
|
|
16650
|
+
const projectSlug = db.query("SELECT id FROM task_lists WHERE project_id = ? AND slug = ?").get(projectId, input);
|
|
16651
|
+
if (projectSlug)
|
|
16652
|
+
return projectSlug.id;
|
|
16653
|
+
const standaloneSlug = db.query("SELECT id FROM task_lists WHERE project_id IS NULL AND slug = ?").get(input);
|
|
16654
|
+
if (standaloneSlug)
|
|
16655
|
+
return standaloneSlug.id;
|
|
16656
|
+
const otherProjectSlugs = db.query("SELECT id FROM task_lists WHERE slug = ? LIMIT 2").all(input);
|
|
16657
|
+
if (otherProjectSlugs.length > 0) {
|
|
16658
|
+
throw new Error(`Task list slug "${input}" does not belong to the selected project`);
|
|
16659
|
+
}
|
|
16660
|
+
} else {
|
|
16661
|
+
const slugMatches = db.query("SELECT id FROM task_lists WHERE slug = ?").all(input);
|
|
16662
|
+
if (slugMatches.length === 1)
|
|
16663
|
+
return slugMatches[0].id;
|
|
16664
|
+
if (slugMatches.length > 1) {
|
|
16665
|
+
throw new Error(`Ambiguous task list slug: ${input}. Use --project or the task list ID.`);
|
|
16666
|
+
}
|
|
16667
|
+
}
|
|
16668
|
+
throw new Error(`Could not resolve task list ID: ${input}`);
|
|
16669
|
+
}
|
|
16634
16670
|
function buildSearchFilters(query, opts, projectId) {
|
|
16635
16671
|
const filterPatch = parseJsonObjectOption(opts.filter, "--filter");
|
|
16636
16672
|
const customFields = parseJsonObjectOption(opts.fieldCustom, "--field-custom");
|
|
@@ -16644,7 +16680,7 @@ function buildSearchFilters(query, opts, projectId) {
|
|
|
16644
16680
|
priority: splitList(opts.priority),
|
|
16645
16681
|
assigned_to: opts.assigned,
|
|
16646
16682
|
agent_id: opts.agentId,
|
|
16647
|
-
task_list_id: opts.taskList,
|
|
16683
|
+
task_list_id: filterPatch?.task_list_id === undefined ? resolveTaskListFilter(opts.taskList, projectId) : undefined,
|
|
16648
16684
|
plan_id: opts.plan,
|
|
16649
16685
|
task_id: opts.task,
|
|
16650
16686
|
tags,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@hasna/todos",
|
|
3
|
-
"packageVersion": "0.11.
|
|
3
|
+
"packageVersion": "0.11.62",
|
|
4
4
|
"repository": "https://github.com/hasna/todos.git",
|
|
5
|
-
"gitCommit": "
|
|
6
|
-
"generatedAt": "2026-06-
|
|
5
|
+
"gitCommit": "5a46ee0eef4646de46ae89504827c8e5f4169629",
|
|
6
|
+
"generatedAt": "2026-06-27T15:15:19.162Z"
|
|
7
7
|
}
|