@devpad/cli 2.2.15 → 2.2.17
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/index.js +22 -5
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -23767,6 +23767,19 @@ async function resolve_owner_id2(client) {
|
|
|
23767
23767
|
return result.value.id;
|
|
23768
23768
|
}
|
|
23769
23769
|
|
|
23770
|
+
// src/task-response.ts
|
|
23771
|
+
init_zod();
|
|
23772
|
+
var task_mutation_response = exports_external.object({
|
|
23773
|
+
task: exports_external.object({ id: exports_external.string(), title: exports_external.string() }).passthrough()
|
|
23774
|
+
}).passthrough();
|
|
23775
|
+
function parse_task_response(data) {
|
|
23776
|
+
const parsed = task_mutation_response.safeParse(data);
|
|
23777
|
+
if (!parsed.success) {
|
|
23778
|
+
throw new Error(`Unexpected task response shape: ${parsed.error.message}`);
|
|
23779
|
+
}
|
|
23780
|
+
return parsed.data;
|
|
23781
|
+
}
|
|
23782
|
+
|
|
23770
23783
|
// src/task-progress.ts
|
|
23771
23784
|
var STATUS_TO_PROGRESS2 = {
|
|
23772
23785
|
todo: "UNSTARTED",
|
|
@@ -23959,8 +23972,9 @@ tasks.command("create").description("Create a new task").requiredOption("-t, --t
|
|
|
23959
23972
|
progress: task_status_to_progress(options.status) ?? "UNSTARTED",
|
|
23960
23973
|
owner_id: owner_id2
|
|
23961
23974
|
});
|
|
23962
|
-
|
|
23963
|
-
|
|
23975
|
+
const { task: task2 } = parse_task_response(result);
|
|
23976
|
+
spinner.succeed(`Task "${task2.title}" created`);
|
|
23977
|
+
console.log(source_default.green(`ID: ${task2.id}`));
|
|
23964
23978
|
} catch (error) {
|
|
23965
23979
|
spinner.fail("Failed to create task");
|
|
23966
23980
|
handleError(error);
|
|
@@ -23980,7 +23994,8 @@ tasks.command("update <id>").description("Update a task (partial \u2014 only pro
|
|
|
23980
23994
|
const client = getApiClient();
|
|
23981
23995
|
const owner_id2 = await resolve_owner_id2(client);
|
|
23982
23996
|
const result = await tool.execute(client, { ...input, owner_id: owner_id2 });
|
|
23983
|
-
|
|
23997
|
+
const { task: task2 } = parse_task_response(result);
|
|
23998
|
+
spinner.succeed(`Task "${task2.title}" updated`);
|
|
23984
23999
|
} catch (error) {
|
|
23985
24000
|
spinner.fail("Failed to update task");
|
|
23986
24001
|
handleError(error);
|
|
@@ -23999,7 +24014,8 @@ tasks.command("done <id>").description("Mark a task as done").action(async (id2)
|
|
|
23999
24014
|
owner_id: owner_id2,
|
|
24000
24015
|
progress: "COMPLETED"
|
|
24001
24016
|
});
|
|
24002
|
-
|
|
24017
|
+
const { task: task2 } = parse_task_response(result);
|
|
24018
|
+
spinner.succeed(`Task "${task2.title}" marked as done`);
|
|
24003
24019
|
} catch (error) {
|
|
24004
24020
|
spinner.fail("Failed to update task");
|
|
24005
24021
|
handleError(error);
|
|
@@ -24018,7 +24034,8 @@ tasks.command("todo <id>").description("Mark a task as todo").action(async (id2)
|
|
|
24018
24034
|
owner_id: owner_id2,
|
|
24019
24035
|
progress: "UNSTARTED"
|
|
24020
24036
|
});
|
|
24021
|
-
|
|
24037
|
+
const { task: task2 } = parse_task_response(result);
|
|
24038
|
+
spinner.succeed(`Task "${task2.title}" marked as todo`);
|
|
24022
24039
|
} catch (error) {
|
|
24023
24040
|
spinner.fail("Failed to update task");
|
|
24024
24041
|
handleError(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"description": "Command line interface for devpad project management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"mime": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@devpad/api": "^2.2.
|
|
54
|
-
"@devpad/pipeline-fakes": "^2.2.
|
|
55
|
-
"@devpad/pipeline-templates": "^2.2.
|
|
56
|
-
"@devpad/schema": "^2.2.
|
|
53
|
+
"@devpad/api": "^2.2.17",
|
|
54
|
+
"@devpad/pipeline-fakes": "^2.2.17",
|
|
55
|
+
"@devpad/pipeline-templates": "^2.2.17",
|
|
56
|
+
"@devpad/schema": "^2.2.17",
|
|
57
57
|
"@types/node": "^20.11.24",
|
|
58
58
|
"bun-types": "latest",
|
|
59
59
|
"chalk": "^5.3.0",
|