From 30937d040613d12a7c2e444763f5f77579d1b79f Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 4 Nov 2024 13:50:41 +0100 Subject: [PATCH 1/4] 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): From 5deedfe5480d270f6ec945585ff4348cddbc1514 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 4 Nov 2024 13:51:46 +0100 Subject: [PATCH 2/4] Bump to 0.1.53 --- libs/cli/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index 20fe010d9..05ff3e506 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.52" +version = "0.1.53" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT" From e1467c27cb15990029de4299a197661d359e4702 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 4 Nov 2024 13:52:40 +0100 Subject: [PATCH 3/4] Remove newline --- libs/cli/langgraph_cli/config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index 202e160c5..16473083f 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -323,8 +323,7 @@ ENV LANGSERVE_GRAPHS='{json.dumps(config["graphs"])}' 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 -""" +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): From 44ff5f1a5a54b1eb74b1bfc62e3f35970f595b5c Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Mon, 4 Nov 2024 14:00:02 +0100 Subject: [PATCH 4/4] Update tests --- libs/cli/tests/unit_tests/test_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/cli/tests/unit_tests/test_config.py b/libs/cli/tests/unit_tests/test_config.py index e2afd214c..cff16ead6 100644 --- a/libs/cli/tests/unit_tests/test_config.py +++ b/libs/cli/tests/unit_tests/test_config.py @@ -252,7 +252,8 @@ ARG foo ADD . /deps/unit_tests RUN cd /deps/unit_tests && npm i ENV LANGSERVE_GRAPHS='{"agent": "./graphs/agent.js:graph"}' -WORKDIR /deps/unit_tests""" +WORKDIR /deps/unit_tests +RUN (test ! -f /api/langgraph_api/js/build.mts && echo "Prebuild script not found, skipping") || tsx /api/langgraph_api/js/build.mts""" assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin