@langchain/langgraph-cli 0.0.13 → 0.0.14-experimental.0
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.
- package/dist/cli/build.mjs +2 -0
- package/dist/cli/dev.mjs +2 -0
- package/dist/cli/docker.mjs +2 -0
- package/dist/cli/up.mjs +2 -0
- package/dist/utils/config.mjs +1 -0
- package/package.json +2 -2
package/dist/cli/build.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import * as path from "node:path";
|
|
|
9
9
|
import * as fs from "node:fs/promises";
|
|
10
10
|
import { logger } from "../utils/logging.mjs";
|
|
11
11
|
import { withAnalytics } from "./utils/analytics.mjs";
|
|
12
|
+
import { gracefulExit } from "exit-hook";
|
|
12
13
|
const stream = (proc) => {
|
|
13
14
|
logger.info(`Running "${proc.spawnargs.join(" ")}"`);
|
|
14
15
|
return proc;
|
|
@@ -21,6 +22,7 @@ builder
|
|
|
21
22
|
.option("--no-pull", "Running the server with locally-built images. By default LangGraph will pull the latest images from the registry")
|
|
22
23
|
.argument("[args...]")
|
|
23
24
|
.passThroughOptions()
|
|
25
|
+
.exitOverride((error) => gracefulExit(error.exitCode))
|
|
24
26
|
.hook("preAction", withAnalytics((command) => ({
|
|
25
27
|
config: command.opts().config !== process.cwd(),
|
|
26
28
|
pull: command.opts().pull,
|
package/dist/cli/dev.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { getConfig } from "../utils/config.mjs";
|
|
|
10
10
|
import { builder } from "./utils/builder.mjs";
|
|
11
11
|
import { logError, logger } from "../utils/logging.mjs";
|
|
12
12
|
import { withAnalytics } from "./utils/analytics.mjs";
|
|
13
|
+
import { gracefulExit } from "exit-hook";
|
|
13
14
|
builder
|
|
14
15
|
.command("dev")
|
|
15
16
|
.description("Run LangGraph API server in development mode with hot reloading.")
|
|
@@ -20,6 +21,7 @@ builder
|
|
|
20
21
|
.option("-c, --config <path>", "path to configuration file", process.cwd())
|
|
21
22
|
.allowExcessArguments()
|
|
22
23
|
.allowUnknownOption()
|
|
24
|
+
.exitOverride((error) => gracefulExit(error.exitCode))
|
|
23
25
|
.hook("preAction", withAnalytics((command) => ({
|
|
24
26
|
config: command.opts().config !== process.cwd(),
|
|
25
27
|
port: command.opts().port !== "2024",
|
package/dist/cli/docker.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import * as path from "node:path";
|
|
|
8
8
|
import dedent from "dedent";
|
|
9
9
|
import { logger } from "../utils/logging.mjs";
|
|
10
10
|
import { withAnalytics } from "./utils/analytics.mjs";
|
|
11
|
+
import { gracefulExit } from "exit-hook";
|
|
11
12
|
const fileExists = async (path) => {
|
|
12
13
|
try {
|
|
13
14
|
await fs.access(path);
|
|
@@ -23,6 +24,7 @@ builder
|
|
|
23
24
|
.argument("<save-path>", "Path to save the Dockerfile")
|
|
24
25
|
.option("--add-docker-compose", "Add additional files for running the LangGraph API server with docker-compose. These files include a docker-compose.yml, .env file, and a .dockerignore file.")
|
|
25
26
|
.option("-c, --config <path>", "Path to configuration file", process.cwd())
|
|
27
|
+
.exitOverride((error) => gracefulExit(error.exitCode))
|
|
26
28
|
.hook("preAction", withAnalytics((command) => ({
|
|
27
29
|
config: command.opts().config !== process.cwd(),
|
|
28
30
|
add_docker_compose: !!command.opts().addDockerCompose,
|
package/dist/cli/up.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import { $ } from "execa";
|
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import dedent from "dedent";
|
|
13
13
|
import { withAnalytics } from "./utils/analytics.mjs";
|
|
14
|
+
import { gracefulExit } from "exit-hook";
|
|
14
15
|
const sha256 = (input) => createHash("sha256").update(input).digest("hex");
|
|
15
16
|
const getProjectName = (configPath) => {
|
|
16
17
|
const cwd = path.dirname(configPath).toLocaleLowerCase();
|
|
@@ -41,6 +42,7 @@ builder
|
|
|
41
42
|
.option("--watch", "Restart on file changes", false)
|
|
42
43
|
.option("--wait", "Wait for services to start before returning. Implies --detach", false)
|
|
43
44
|
.option("--postgres-uri <uri>", "Postgres URI to use for the database. Defaults to launching a local database")
|
|
45
|
+
.exitOverride((error) => gracefulExit(error.exitCode))
|
|
44
46
|
.hook("preAction", withAnalytics((command) => ({
|
|
45
47
|
config: command.opts().config !== process.cwd(),
|
|
46
48
|
port: command.opts().port !== "8123",
|
package/dist/utils/config.mjs
CHANGED
|
@@ -6,6 +6,7 @@ const BaseConfigSchema = z.object({
|
|
|
6
6
|
graphs: z.record(z.string().refine((i) => i.includes(":"), {
|
|
7
7
|
message: "Import string must be in format '<file>:<export>'",
|
|
8
8
|
})),
|
|
9
|
+
ui: z.record(z.string()).optional(),
|
|
9
10
|
_INTERNAL_docker_tag: z.string().optional(),
|
|
10
11
|
env: z
|
|
11
12
|
.union([z.array(z.string()), z.record(z.string()), z.string()])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14-experimental.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^18.19.0 || >=20.16.0"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"yaml": "^2.7.0",
|
|
37
37
|
"zod": "^3.23.8",
|
|
38
38
|
"@babel/code-frame": "^7.26.2",
|
|
39
|
-
"@langchain/langgraph-api": "0.0.
|
|
39
|
+
"@langchain/langgraph-api": "0.0.14-experimental.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"tsx": "^4.19.2",
|