From c2fb406ccc6d48688f376c8b955ae51328bee70a Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 31 Mar 2025 17:02:07 +0200 Subject: [PATCH] Add behind `dev` subcommand --- libs/langgraph-ui/src/cli.mts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/langgraph-ui/src/cli.mts b/libs/langgraph-ui/src/cli.mts index 2fbdbbf..34b6ea6 100644 --- a/libs/langgraph-ui/src/cli.mts +++ b/libs/langgraph-ui/src/cli.mts @@ -5,8 +5,10 @@ import * as path from "node:path"; import { z } from "zod"; -const cwd = process.cwd(); +const cmd = process.argv.at(-1); +if (cmd !== "dev") throw new Error(`Invalid command "${cmd}"`); +const cwd = process.cwd(); const defs = z .record(z.string(), z.string()) .parse(JSON.parse(process.env.LANGGRAPH_UI || "{}"));