diff options
| author | MohamedBassem <me@mbassem.com> | 2024-04-24 11:37:35 +0100 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-04-24 12:21:55 +0100 |
| commit | 3352a3ea393849550573deff8d774ba6bf149471 (patch) | |
| tree | a7d78db4fadbe7123c7d5045f5a537965382b84a /apps/cli/src | |
| parent | af0cf9c1ee10901ab91b04a1d73afdcb2191a88f (diff) | |
| download | karakeep-3352a3ea393849550573deff8d774ba6bf149471.tar.zst | |
build(cli): Prepare for publishing CLI to npm
Diffstat (limited to '')
| -rw-r--r-- | apps/cli/src/commands/bookmarks.ts (renamed from apps/cli/commands/bookmarks.ts) | 2 | ||||
| -rw-r--r-- | apps/cli/src/commands/lists.ts (renamed from apps/cli/commands/lists.ts) | 2 | ||||
| -rw-r--r-- | apps/cli/src/commands/tags.ts (renamed from apps/cli/commands/tags.ts) | 2 | ||||
| -rw-r--r-- | apps/cli/src/commands/whoami.ts (renamed from apps/cli/commands/whoami.ts) | 2 | ||||
| -rw-r--r-- | apps/cli/src/index.ts (renamed from apps/cli/index.ts) | 11 | ||||
| -rw-r--r-- | apps/cli/src/lib/globals.ts (renamed from apps/cli/lib/globals.ts) | 0 | ||||
| -rw-r--r-- | apps/cli/src/lib/trpc.ts (renamed from apps/cli/lib/trpc.ts) | 3 |
7 files changed, 11 insertions, 11 deletions
diff --git a/apps/cli/commands/bookmarks.ts b/apps/cli/src/commands/bookmarks.ts index 0da3dd71..264ad818 100644 --- a/apps/cli/commands/bookmarks.ts +++ b/apps/cli/src/commands/bookmarks.ts @@ -1,7 +1,7 @@ import * as fs from "node:fs"; +import { getAPIClient } from "@/lib/trpc"; import { Command } from "@commander-js/extra-typings"; import chalk from "chalk"; -import { getAPIClient } from "lib/trpc"; import type { ZBookmark } from "@hoarder/shared/types/bookmarks"; diff --git a/apps/cli/commands/lists.ts b/apps/cli/src/commands/lists.ts index 099b7869..abf6f78c 100644 --- a/apps/cli/commands/lists.ts +++ b/apps/cli/src/commands/lists.ts @@ -1,5 +1,5 @@ +import { getAPIClient } from "@/lib/trpc"; import { Command } from "@commander-js/extra-typings"; -import { getAPIClient } from "lib/trpc"; import { getBorderCharacters, table } from "table"; import { listsToTree } from "@hoarder/shared/utils/listUtils"; diff --git a/apps/cli/commands/tags.ts b/apps/cli/src/commands/tags.ts index f9df83cd..f74f1df6 100644 --- a/apps/cli/commands/tags.ts +++ b/apps/cli/src/commands/tags.ts @@ -1,5 +1,5 @@ +import { getAPIClient } from "@/lib/trpc"; import { Command } from "@commander-js/extra-typings"; -import { getAPIClient } from "lib/trpc"; import { getBorderCharacters, table } from "table"; export const tagsCmd = new Command() diff --git a/apps/cli/commands/whoami.ts b/apps/cli/src/commands/whoami.ts index 2b32f2f0..b55bfa67 100644 --- a/apps/cli/commands/whoami.ts +++ b/apps/cli/src/commands/whoami.ts @@ -1,5 +1,5 @@ +import { getAPIClient } from "@/lib/trpc"; import { Command } from "@commander-js/extra-typings"; -import { getAPIClient } from "lib/trpc"; export const whoamiCmd = new Command() .name("whoami") diff --git a/apps/cli/index.ts b/apps/cli/src/index.ts index 5971b811..cdb2956e 100644 --- a/apps/cli/index.ts +++ b/apps/cli/src/index.ts @@ -1,9 +1,10 @@ +#! /usr/bin/env node +import { bookmarkCmd } from "@/commands/bookmarks"; +import { listsCmd } from "@/commands/lists"; +import { tagsCmd } from "@/commands/tags"; +import { whoamiCmd } from "@/commands/whoami"; +import { setGlobalOptions } from "@/lib/globals"; import { Command, Option } from "@commander-js/extra-typings"; -import { bookmarkCmd } from "commands/bookmarks"; -import { listsCmd } from "commands/lists"; -import { tagsCmd } from "commands/tags"; -import { whoamiCmd } from "commands/whoami"; -import { setGlobalOptions } from "lib/globals"; const program = new Command() .name("hoarder-cli") diff --git a/apps/cli/lib/globals.ts b/apps/cli/src/lib/globals.ts index 771136da..771136da 100644 --- a/apps/cli/lib/globals.ts +++ b/apps/cli/src/lib/globals.ts diff --git a/apps/cli/lib/trpc.ts b/apps/cli/src/lib/trpc.ts index 6f0dccfe..aa7aec21 100644 --- a/apps/cli/lib/trpc.ts +++ b/apps/cli/src/lib/trpc.ts @@ -1,10 +1,9 @@ +import { getGlobalOptions } from "@/lib/globals"; 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>({ |
