aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cli/lib/trpc.ts
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-04-24 11:37:35 +0100
committerMohamedBassem <me@mbassem.com>2024-04-24 12:21:55 +0100
commit3352a3ea393849550573deff8d774ba6bf149471 (patch)
treea7d78db4fadbe7123c7d5045f5a537965382b84a /apps/cli/lib/trpc.ts
parentaf0cf9c1ee10901ab91b04a1d73afdcb2191a88f (diff)
downloadkarakeep-3352a3ea393849550573deff8d774ba6bf149471.tar.zst
build(cli): Prepare for publishing CLI to npm
Diffstat (limited to 'apps/cli/lib/trpc.ts')
-rw-r--r--apps/cli/lib/trpc.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/apps/cli/lib/trpc.ts b/apps/cli/lib/trpc.ts
deleted file mode 100644
index 6f0dccfe..00000000
--- a/apps/cli/lib/trpc.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { createTRPCClient, httpBatchLink } from "@trpc/client";
-import superjson from "superjson";
-
-import type { AppRouter } from "@hoarder/trpc/routers/_app";
-
-import { getGlobalOptions } from "./globals";
-
-export function getAPIClient() {
- const globals = getGlobalOptions();
- return createTRPCClient<AppRouter>({
- links: [
- httpBatchLink({
- url: `${globals.serverAddr}/api/trpc`,
- transformer: superjson,
- headers() {
- return {
- authorization: `Bearer ${globals.apiKey}`,
- };
- },
- }),
- ],
- });
-}