@crimson-education/sdk 0.3.13 → 0.3.14
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/core/tasks.js +3 -5
- package/package.json +1 -1
package/dist/core/tasks.js
CHANGED
|
@@ -22,11 +22,9 @@ const normalizeTask = (raw) => {
|
|
|
22
22
|
throw new Error("Task object missing required 'id' field");
|
|
23
23
|
}
|
|
24
24
|
const statusUpper = typeof raw.status === "string" ? raw.status.toUpperCase() : undefined;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
? statusUpper === "DONE"
|
|
29
|
-
: Boolean(raw.finishedAt);
|
|
25
|
+
// Use status as the source of truth for completion.
|
|
26
|
+
// Keep isComplete for backward compatibility with existing consumers.
|
|
27
|
+
const isComplete = statusUpper === "DONE";
|
|
30
28
|
return {
|
|
31
29
|
id: (_a = raw.id) !== null && _a !== void 0 ? _a : "",
|
|
32
30
|
name: (_c = (_b = raw.name) !== null && _b !== void 0 ? _b : raw.description) !== null && _c !== void 0 ? _c : "",
|