create-task-ops 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-task-ops",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Next.js-first task-ops scaffold generator for task docs and task APIs",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,12 +1,4 @@
1
- async function getTasks() {
2
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
3
- const response = await fetch(`${baseUrl}/api/tasks`, { cache: "no-store" }).catch(() => null);
4
- if (!response?.ok) {
5
- return [];
6
- }
7
- const payload = (await response.json()) as { tasks?: Array<{ id: string; title: string; status: string; progress: number; nextAction: string }> };
8
- return payload.tasks ?? [];
9
- }
1
+ import { getTasks } from "@/lib/task-api";
10
2
 
11
3
  export default async function Home() {
12
4
  const tasks = await getTasks();