diff --git a/apps/spu-ui/src/app/_components/env-menu.tsx b/apps/spu-ui/src/app/_components/env-menu.tsx index 1a064be..19539b9 100644 --- a/apps/spu-ui/src/app/_components/env-menu.tsx +++ b/apps/spu-ui/src/app/_components/env-menu.tsx @@ -1,6 +1,6 @@ "use client"; -import { useStatus } from "@sophys-web/api-client/hooks/use-status"; +import { useStatus } from "@sophys-web/api-client/hooks"; import { cn } from "@sophys-web/ui"; import { buttonVariants } from "@sophys-web/ui/button"; import { diff --git a/apps/spu-ui/src/app/_components/history.tsx b/apps/spu-ui/src/app/_components/history.tsx index cce14ed..8a6cdea 100644 --- a/apps/spu-ui/src/app/_components/history.tsx +++ b/apps/spu-ui/src/app/_components/history.tsx @@ -1,7 +1,7 @@ "use client"; import { RotateCcwIcon } from "lucide-react"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { api } from "@sophys-web/api-client/react"; import { cn } from "@sophys-web/ui"; import { Button } from "@sophys-web/ui/button"; diff --git a/apps/spu-ui/src/app/_components/on-demand/cleaning.tsx b/apps/spu-ui/src/app/_components/on-demand/cleaning.tsx index ac1169e..7a4a86d 100644 --- a/apps/spu-ui/src/app/_components/on-demand/cleaning.tsx +++ b/apps/spu-ui/src/app/_components/on-demand/cleaning.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { DropletIcon } from "lucide-react"; import { useForm } from "react-hook-form"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { Button } from "@sophys-web/ui/button"; import { Dialog, diff --git a/apps/spu-ui/src/app/_components/on-demand/queue-stop.tsx b/apps/spu-ui/src/app/_components/on-demand/queue-stop.tsx index 3fd4813..d8dd1f1 100644 --- a/apps/spu-ui/src/app/_components/on-demand/queue-stop.tsx +++ b/apps/spu-ui/src/app/_components/on-demand/queue-stop.tsx @@ -1,5 +1,5 @@ import { SquareIcon } from "lucide-react"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { Button } from "@sophys-web/ui/button"; export function QueueStop({ className }: { className?: string }) { diff --git a/apps/spu-ui/src/app/_components/on-demand/single-acquisition.tsx b/apps/spu-ui/src/app/_components/on-demand/single-acquisition.tsx index 4566cd1..00166cb 100644 --- a/apps/spu-ui/src/app/_components/on-demand/single-acquisition.tsx +++ b/apps/spu-ui/src/app/_components/on-demand/single-acquisition.tsx @@ -5,7 +5,7 @@ import { useState } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { CameraIcon } from "lucide-react"; import { useForm } from "react-hook-form"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { cn } from "@sophys-web/ui"; import { Button } from "@sophys-web/ui/button"; import { Checkbox } from "@sophys-web/ui/checkbox"; diff --git a/apps/spu-ui/src/app/_components/queue/item-edit-dialog.tsx b/apps/spu-ui/src/app/_components/queue/item-edit-dialog.tsx index 136fad9..b259d9c 100644 --- a/apps/spu-ui/src/app/_components/queue/item-edit-dialog.tsx +++ b/apps/spu-ui/src/app/_components/queue/item-edit-dialog.tsx @@ -2,7 +2,7 @@ import type { z } from "zod"; import { useCallback, useState } from "react"; import { PencilIcon } from "lucide-react"; import type { AnySchema } from "@sophys-web/widgets/lib/create-schema"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { api } from "@sophys-web/api-client/react"; import { Button } from "@sophys-web/ui/button"; import { diff --git a/apps/spu-ui/src/app/_components/queue/queue-item.tsx b/apps/spu-ui/src/app/_components/queue/queue-item.tsx index df12dd7..b9f7954 100644 --- a/apps/spu-ui/src/app/_components/queue/queue-item.tsx +++ b/apps/spu-ui/src/app/_components/queue/queue-item.tsx @@ -3,7 +3,7 @@ import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import { GripVerticalIcon, XIcon } from "lucide-react"; import { z } from "zod"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { cn } from "@sophys-web/ui"; import { Badge } from "@sophys-web/ui/badge"; import { Button } from "@sophys-web/ui/button"; diff --git a/apps/spu-ui/src/app/_components/queue/queue.tsx b/apps/spu-ui/src/app/_components/queue/queue.tsx index b396d78..c400a0c 100644 --- a/apps/spu-ui/src/app/_components/queue/queue.tsx +++ b/apps/spu-ui/src/app/_components/queue/queue.tsx @@ -10,8 +10,7 @@ import { verticalListSortingStrategy, } from "@dnd-kit/sortable"; import { PlayIcon, SquareIcon, Trash2Icon } from "lucide-react"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; -import { useStatus } from "@sophys-web/api-client/hooks/use-status"; +import { useQueue, useStatus } from "@sophys-web/api-client/hooks"; import { api } from "@sophys-web/api-client/react"; import { Button } from "@sophys-web/ui/button"; import { diff --git a/apps/spu-ui/src/app/_components/queue/upload.tsx b/apps/spu-ui/src/app/_components/queue/upload.tsx index 8338782..e553acc 100644 --- a/apps/spu-ui/src/app/_components/queue/upload.tsx +++ b/apps/spu-ui/src/app/_components/queue/upload.tsx @@ -6,7 +6,7 @@ import { CheckIcon, MoveRightIcon, UploadIcon } from "lucide-react"; import { useForm } from "react-hook-form"; import { z } from "zod"; import type { Session } from "@sophys-web/auth"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { api } from "@sophys-web/api-client/react"; import { cn } from "@sophys-web/ui"; import { Button } from "@sophys-web/ui/button"; diff --git a/apps/spu-ui/src/app/_components/run-engine-controls.tsx b/apps/spu-ui/src/app/_components/run-engine-controls.tsx index 2b75e33..4681652 100644 --- a/apps/spu-ui/src/app/_components/run-engine-controls.tsx +++ b/apps/spu-ui/src/app/_components/run-engine-controls.tsx @@ -7,7 +7,7 @@ import { Play, Square, } from "lucide-react"; -import { useStatus } from "@sophys-web/api-client/hooks/use-status"; +import { useStatus } from "@sophys-web/api-client/hooks"; import { api } from "@sophys-web/api-client/react"; import { Button } from "@sophys-web/ui/button"; import { diff --git a/apps/spu-ui/src/app/_components/sample.tsx b/apps/spu-ui/src/app/_components/sample.tsx index d94d2ce..beace67 100644 --- a/apps/spu-ui/src/app/_components/sample.tsx +++ b/apps/spu-ui/src/app/_components/sample.tsx @@ -4,7 +4,7 @@ import { useState } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { useQueue } from "@sophys-web/api-client/hooks/use-queue"; +import { useQueue } from "@sophys-web/api-client/hooks"; import { cn } from "@sophys-web/ui"; import { Button } from "@sophys-web/ui/button"; import { diff --git a/apps/spu-ui/turbo.json b/apps/spu-ui/turbo.json new file mode 100644 index 0000000..17dba28 --- /dev/null +++ b/apps/spu-ui/turbo.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://turborepo.org/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": [".next/**", "!.next/cache/**", "next-env.d.ts"] + }, + "dev": { + "persistent": true + } + } +} diff --git a/packages/api-client/package.json b/packages/api-client/package.json index ef9739c..4761a32 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -22,15 +22,15 @@ "types": "./dist/src/env.d.ts", "default": "./src/env.ts" }, - "./hooks/*": { - "types": "./dist/src/hooks/*.d.ts", - "default": "./src/hooks/*.ts" + "./hooks": { + "types": "./dist/src/hooks/index.d.ts", + "default": "./src/hooks/index.ts" } }, "license": "MIT", "scripts": { "build": "tsc", - "dev": "tsc --watch", + "dev": "tsc", "clean": "rm -rf dist .turbo .cache node_modules", "lint": "eslint src/", "type-check": "tsc --noEmit --emitDeclarationOnly false" diff --git a/packages/api-client/src/hooks/index.ts b/packages/api-client/src/hooks/index.ts new file mode 100644 index 0000000..10987fb --- /dev/null +++ b/packages/api-client/src/hooks/index.ts @@ -0,0 +1,2 @@ +export { useStatus } from "./use-status"; +export { useQueue } from "./use-queue"; diff --git a/packages/api/package.json b/packages/api/package.json index bcb784c..5e780d1 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -11,7 +11,7 @@ }, "scripts": { "build": "tsc", - "dev": "tsc --watch", + "dev": "tsc", "clean": "rm -rf .turbo .cache dist node_modules", "lint": "eslint", "typecheck": "tsc --noEmit --emitDeclarationOnly false" diff --git a/packages/ui/package.json b/packages/ui/package.json index bf46f91..7708c65 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -18,7 +18,7 @@ "build": "tailwindcss -i ./src/styles.css -o ./dist/index.css", "clean": "rm -rf dist .turbo .cache node_modules", "lint": "eslint src/", - "dev": "tailwindcss -i ./src/styles.css -o ./dist/index.css --watch", + "dev": "tailwindcss -i ./src/styles.css -o ./dist/index.css", "type-check": "tsc --noEmit" }, "peerDependencies": { diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 9fb933a..9c83c8e 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -6,7 +6,7 @@ "scripts": { "clean": "rm -rf .next .turbo .cache node_modules", "build": "tsc", - "dev": "tsc --watch", + "dev": "tsc", "lint": "eslint src/", "type-check": "tsc --noEmit" }, diff --git a/turbo.json b/turbo.json index 51f5915..7dcbe90 100644 --- a/turbo.json +++ b/turbo.json @@ -8,13 +8,7 @@ }, "build": { "dependsOn": ["^build"], - "outputs": [ - "dist/**", - ".next/**", - "!.next/cache/**", - ".cache/tsbuildinfo.json", - "dist/**" - ] + "outputs": ["dist/**", ".cache/tsbuildinfo.json", "dist/**"] }, "lint": { "dependsOn": ["^topo", "^build"],