Merge pull request #2322 from langchain-ai/dqbd/cli-prebuild-js

feat(cli): add JS prebuild script
This commit is contained in:
David Duong
2024-11-04 18:13:25 +01:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -321,7 +321,9 @@ 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):
+2 -1
View File
@@ -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