flowcollab 0.3.4 → 0.3.5
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/bin/claim.mjs +1 -0
- package/bin/create.mjs +2 -1
- package/package.json +1 -1
package/bin/claim.mjs
CHANGED
|
@@ -35,6 +35,7 @@ async function main() {
|
|
|
35
35
|
} else {
|
|
36
36
|
r = await flowFetch('/api/flow/claim', { method: 'POST', body });
|
|
37
37
|
}
|
|
38
|
+
if (!r?.task?.id) throw new Error('Server returned no task. Check your connection and try again.');
|
|
38
39
|
process.stdout.write(`Claimed #${r.task.issue_num ?? r.task.id.slice(0, 6)} — "${r.task.title}"\n`);
|
|
39
40
|
|
|
40
41
|
// Warn on file conflicts
|
package/bin/create.mjs
CHANGED
|
@@ -100,7 +100,8 @@ async function main() {
|
|
|
100
100
|
|
|
101
101
|
try {
|
|
102
102
|
const r = await flowFetch('/api/flow/tasks', { method: 'POST', body });
|
|
103
|
-
const t = r.task;
|
|
103
|
+
const t = r.task || r;
|
|
104
|
+
if (!t?.id) throw new Error('Server returned no task. Check your connection and try again.');
|
|
104
105
|
process.stdout.write(`Created #${t.id.slice(0, 6)} — "${t.title}"\n`);
|
|
105
106
|
process.stdout.write(` id: ${t.id}\n`);
|
|
106
107
|
process.stdout.write(` status: ${t.status}\n`);
|