From 9ebac2e437b7af2a31eb2393951248a9ff6d92e5 Mon Sep 17 00:00:00 2001 From: Ethan Niser Date: Thu, 14 Sep 2023 19:30:17 -0500 Subject: [PATCH] rename --- package.json | 2 +- src/lib/fileBasedRouting/handler.ts | 73 ----------------------------- src/lib/fileBasedRouting/index.ts | 0 src/lib/{dev => }/liveReload.ts | 0 4 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 src/lib/fileBasedRouting/handler.ts delete mode 100644 src/lib/fileBasedRouting/index.ts rename src/lib/{dev => }/liveReload.ts (100%) diff --git a/package.json b/package.json index 95d7343..1910167 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "concurrently \"bun run --hot src/main.ts\" \"bun run uno:dev\" \"bun run liveReload\"", - "liveReload": "bun run src/lib/dev/liveReload.ts", + "liveReload": "bun run src/lib/liveReload.ts", "start": "bun run uno && bun run src/main.ts", "db:push": "bunx drizzle-kit push:sqlite", "db:studio": "bunx drizzle-kit studio", diff --git a/src/lib/fileBasedRouting/handler.ts b/src/lib/fileBasedRouting/handler.ts deleted file mode 100644 index e1448f8..0000000 --- a/src/lib/fileBasedRouting/handler.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { - DecoratorBase, - DefinitionBase, - Handler, - InputSchema, - LocalHook, - MergeSchema, - RouteBase, - RouteSchema, - UnwrapRoute, -} from "elysia/types"; -import { type Elysia, t } from "elysia"; - -type RouteArgs< - BasePath extends string, - Decorators extends DecoratorBase, - Definitions extends DefinitionBase, - ParentSchema extends RouteSchema, - Routes extends RouteBase, - Path extends string, - LocalSchema extends InputSchema, - Route extends MergeSchema< - UnwrapRoute, - ParentSchema - >, - Function extends Handler -> = { - handler: Function; - hooks?: LocalHook< - LocalSchema, - Route, - Decorators, - Definitions["error"], - `${BasePath}${Path}` - >; -}; - -export function elysiaHandler< - BasePath extends string, - Decorators extends DecoratorBase, - Definitions extends DefinitionBase, - ParentSchema extends RouteSchema, - Routes extends RouteBase, - Path extends string, - LocalSchema extends InputSchema, - Route extends MergeSchema< - UnwrapRoute, - ParentSchema - >, - Function extends Handler ->( - elysiaInstance: Elysia< - BasePath, - Decorators, - Definitions, - ParentSchema, - Routes - >, - path: Path, - obj: RouteArgs< - BasePath, - Decorators, - Definitions, - ParentSchema, - Routes, - Path, - LocalSchema, - Route, - Function - > -) { - return obj; -} diff --git a/src/lib/fileBasedRouting/index.ts b/src/lib/fileBasedRouting/index.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/lib/dev/liveReload.ts b/src/lib/liveReload.ts similarity index 100% rename from src/lib/dev/liveReload.ts rename to src/lib/liveReload.ts