@todoforai/cli 0.1.38 → 0.1.39
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/dist/todoforai-cli.js +9 -1
- package/package.json +1 -1
package/dist/todoforai-cli.js
CHANGED
|
@@ -42837,6 +42837,9 @@ class ApiClient {
|
|
|
42837
42837
|
getTodo(todoId) {
|
|
42838
42838
|
return this.request("GET", `/api/v1/todos/${todoId}`);
|
|
42839
42839
|
}
|
|
42840
|
+
linkBlockSubTodo(todoId, messageId, blockId, subTodoId) {
|
|
42841
|
+
return this.request("POST", `/api/v1/todos/${todoId}/blocks/${blockId}/subtodo`, { messageId, subTodoId });
|
|
42842
|
+
}
|
|
42840
42843
|
updateTodoStatus(todoId, status) {
|
|
42841
42844
|
return this.request("PATCH", `/api/v1/todos/${todoId}/status`, { status });
|
|
42842
42845
|
}
|
|
@@ -44323,7 +44326,7 @@ import { parseArgs } from "util";
|
|
|
44323
44326
|
// package.json
|
|
44324
44327
|
var package_default = {
|
|
44325
44328
|
name: "@todoforai/cli",
|
|
44326
|
-
version: "0.1.
|
|
44329
|
+
version: "0.1.39",
|
|
44327
44330
|
type: "module",
|
|
44328
44331
|
bin: {
|
|
44329
44332
|
"todoforai-cli": "bin/todoforai-cli.js",
|
|
@@ -48154,6 +48157,11 @@ Resumed: ${CYAN}${getFrontendUrl(apiUrl, todoId)}${RESET}
|
|
|
48154
48157
|
}
|
|
48155
48158
|
const actualTodoId = todo.id || crypto.randomUUID();
|
|
48156
48159
|
cfgScope.setLastTodoId(actualTodoId);
|
|
48160
|
+
const { TODOFORAI_TODO_ID: pTodo, TODOFORAI_MESSAGE_ID: pMsg, TODOFORAI_BLOCK_ID: pBlock } = process.env;
|
|
48161
|
+
if (pTodo && pMsg && pBlock && pTodo !== actualTodoId) {
|
|
48162
|
+
await api.linkBlockSubTodo(pTodo, pMsg, pBlock, actualTodoId).catch((e) => process.stderr.write(`${DIM}subtodo link failed: ${e?.message ?? e}${RESET}
|
|
48163
|
+
`));
|
|
48164
|
+
}
|
|
48157
48165
|
const frontendUrl = getFrontendUrl(apiUrl, actualTodoId);
|
|
48158
48166
|
if (args.json) {
|
|
48159
48167
|
console.log(JSON.stringify({ ...todo, frontend_url: frontendUrl }, null, 2));
|