* feat: Add version checking and update functionality - Add version display component with GitHub release comparison - Implement update.sh script execution via API - Add hover tooltip with update instructions - Create shadcn/ui style Badge component - Add version router with getCurrentVersion, getLatestRelease, and executeUpdate endpoints - Update homepage header to show version and update status - Add Update Now button with loading states and result feedback - Support automatic page refresh after successful update * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Update update script * Workflow * Workflow * Workflow * Update update script * Update update script * Update update script * Update update script * Update update script * Update update.sh * Update update.sh * Update update.sh * Update update.sh
30 lines
946 B
TypeScript
30 lines
946 B
TypeScript
import { scriptsRouter } from "~/server/api/routers/scripts";
|
|
import { installedScriptsRouter } from "~/server/api/routers/installedScripts";
|
|
import { serversRouter } from "~/server/api/routers/servers";
|
|
import { versionRouter } from "~/server/api/routers/version";
|
|
import { createCallerFactory, createTRPCRouter } from "~/server/api/trpc";
|
|
|
|
/**
|
|
* This is the primary router for your server.
|
|
*
|
|
* All routers added in /api/routers should be manually added here.
|
|
*/
|
|
export const appRouter = createTRPCRouter({
|
|
scripts: scriptsRouter,
|
|
installedScripts: installedScriptsRouter,
|
|
servers: serversRouter,
|
|
version: versionRouter,
|
|
});
|
|
|
|
// export type definition of API
|
|
export type AppRouter = typeof appRouter;
|
|
|
|
/**
|
|
* Create a server-side caller for the tRPC API.
|
|
* @example
|
|
* const trpc = createCaller(createContext);
|
|
* const res = await trpc.post.all();
|
|
* ^? Post[]
|
|
*/
|
|
export const createCaller = createCallerFactory(appRouter);
|