langgraph-cli 0.1.78__tar.gz → 0.1.80__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-cli
3
- Version: 0.1.78
3
+ Version: 0.1.80
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Home-page: https://www.github.com/langchain-ai/langgraph
6
6
  License: MIT
@@ -575,7 +575,7 @@ def dockerfile(save_path: str, config: pathlib.Path, add_docker_compose: bool) -
575
575
  default=False,
576
576
  )
577
577
  @click.option(
578
- "--studio_url",
578
+ "--studio-url",
579
579
  type=str,
580
580
  default=None,
581
581
  help="URL of the LangGraph Studio instance to connect to. Defaults to https://smith.langchain.com",
@@ -1022,6 +1022,28 @@ def node_config_to_docker(
1022
1022
  except OSError:
1023
1023
  return False
1024
1024
 
1025
+ # inspired by `package-manager-detector`
1026
+ def get_pkg_manager_name():
1027
+ try:
1028
+ with open(config_path.parent / "package.json") as f:
1029
+ pkg = json.load(f)
1030
+
1031
+ if (pkg_manager_name := pkg.get("packageManager")) and isinstance(
1032
+ pkg_manager_name, str
1033
+ ):
1034
+ return pkg_manager_name.lstrip("^").split("@")[0]
1035
+
1036
+ if (
1037
+ dev_engine_name := (
1038
+ (pkg.get("devEngines") or {}).get("packageManager") or {}
1039
+ ).get("name")
1040
+ ) and isinstance(dev_engine_name, str):
1041
+ return dev_engine_name
1042
+
1043
+ return None
1044
+ except Exception:
1045
+ return None
1046
+
1025
1047
  npm, yarn, pnpm, bun = [
1026
1048
  test_file("package-lock.json"),
1027
1049
  test_file("yarn.lock"),
@@ -1038,7 +1060,16 @@ def node_config_to_docker(
1038
1060
  elif bun:
1039
1061
  install_cmd = "bun i"
1040
1062
  else:
1041
- install_cmd = "npm i"
1063
+ pkg_manager_name = get_pkg_manager_name()
1064
+
1065
+ if pkg_manager_name == "yarn":
1066
+ install_cmd = "yarn install"
1067
+ elif pkg_manager_name == "pnpm":
1068
+ install_cmd = "pnpm i"
1069
+ elif pkg_manager_name == "bun":
1070
+ install_cmd = "bun i"
1071
+ else:
1072
+ install_cmd = "npm i"
1042
1073
  store_config = config.get("store")
1043
1074
  env_additional_config = (
1044
1075
  ""
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-cli"
3
- version = "0.1.78"
3
+ version = "0.1.80"
4
4
  description = "CLI for interacting with LangGraph API"
5
5
  authors = []
6
6
  license = "MIT"
File without changes
File without changes