langsmith
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -6,3 +6,3 @@ import * as fs from "fs"; | ||
import * as child_process from "child_process"; | ||
import { getDockerEnvironment, getLangChainEnvVars, getRuntimeEnvironment, setEnvironmentVariable, } from "../utils/env.js"; | ||
import { getLangChainEnvVars, getRuntimeEnvironment, setEnvironmentVariable, } from "../utils/env.js"; | ||
import { spawn } from "child_process"; | ||
@@ -265,7 +265,5 @@ const currentFileName = __filename; | ||
const env = await getRuntimeEnvironment(); | ||
const dockerEnv = await getDockerEnvironment(); | ||
const envVars = await getLangChainEnvVars(); | ||
const envDict = { | ||
...env, | ||
...dockerEnv, | ||
...envVars, | ||
@@ -272,0 +270,0 @@ }; |
@@ -7,3 +7,2 @@ import * as fs from "fs"; | ||
import { | ||
getDockerEnvironment, | ||
getLangChainEnvVars, | ||
@@ -299,7 +298,5 @@ getRuntimeEnvironment, | ||
const env = await getRuntimeEnvironment(); | ||
const dockerEnv = await getDockerEnvironment(); | ||
const envVars = await getLangChainEnvVars(); | ||
const envDict = { | ||
...env, | ||
...dockerEnv, | ||
...envVars, | ||
@@ -306,0 +303,0 @@ }; |
@@ -21,7 +21,2 @@ declare global { | ||
export declare function getRuntimeEnvironment(): Promise<RuntimeEnvironment>; | ||
export declare function getDockerEnvironment(): Promise<{ | ||
dockerVersion: string | undefined; | ||
dockerComposeCommand: string | undefined; | ||
dockerComposeVersion: string | undefined; | ||
}>; | ||
/** | ||
@@ -28,0 +23,0 @@ * Retrieves the LangChain-specific environment variables from the current runtime environment. |
@@ -1,2 +0,1 @@ | ||
import { exec } from "child_process"; | ||
export const isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined"; | ||
@@ -53,44 +52,2 @@ export const isWebWorker = () => typeof globalThis === "object" && | ||
} | ||
export async function getDockerEnvironment() { | ||
const getDockerVersion = () => new Promise((resolve) => { | ||
exec("docker --version", (error, stdout) => { | ||
if (error) { | ||
resolve(undefined); | ||
} | ||
else { | ||
resolve(stdout.trim()); | ||
} | ||
}); | ||
}); | ||
const getDockerComposeCommand = () => new Promise((resolve) => { | ||
exec("which docker-compose", (error, stdout) => { | ||
if (error) { | ||
resolve(undefined); | ||
} | ||
else { | ||
resolve(stdout.trim()); | ||
} | ||
}); | ||
}); | ||
const getDockerComposeVersion = () => new Promise((resolve) => { | ||
exec("docker-compose --version", (error, stdout) => { | ||
if (error) { | ||
resolve(undefined); | ||
} | ||
else { | ||
resolve(stdout.trim()); | ||
} | ||
}); | ||
}); | ||
const [dockerVersion, dockerComposeCommand, dockerComposeVersion] = await Promise.all([ | ||
getDockerVersion(), | ||
getDockerComposeCommand(), | ||
getDockerComposeVersion(), | ||
]); | ||
return { | ||
dockerVersion, | ||
dockerComposeCommand, | ||
dockerComposeVersion, | ||
}; | ||
} | ||
/** | ||
@@ -97,0 +54,0 @@ * Retrieves the LangChain-specific environment variables from the current runtime environment. |
{ | ||
"name": "langsmith", | ||
"version": "0.0.34", | ||
"version": "0.0.35", | ||
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
0
2
44
173469
4319