From 30937d040613d12a7c2e444763f5f77579d1b79f Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 4 Nov 2024 13:50:41 +0100 Subject: [PATCH] feat(cli): add JS prebuild script --- libs/cli/langgraph_cli/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index 9293d164e..202e160c5 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -321,7 +321,10 @@ RUN cd {faux_path} && {install_cmd} ENV LANGSERVE_GRAPHS='{json.dumps(config["graphs"])}' -WORKDIR {faux_path}""" +WORKDIR {faux_path} + +RUN (test ! -f /api/langgraph_api/js/build.mts && echo "Prebuild script not found, skipping") || tsx /api/langgraph_api/js/build.mts +""" def config_to_docker(config_path: pathlib.Path, config: Config, base_image: str):