remove installDependencies

This commit is contained in:
David Blass
2025-11-13 10:53:53 -05:00
parent 515bd3a9d7
commit 203e9ef8cd
3 changed files with 2 additions and 41 deletions
-1
View File
@@ -11,7 +11,6 @@ export const codex = agent({
packageName: "@openai/codex", packageName: "@openai/codex",
version: "latest", version: "latest",
executablePath: "bin/codex.js", executablePath: "bin/codex.js",
installDependencies: true,
}); });
}, },
run: async ({ prompt, mcpServers, apiKey, cliPath }) => { run: async ({ prompt, mcpServers, apiKey, cliPath }) => {
-20
View File
@@ -39,12 +39,10 @@ export async function installFromNpmTarball({
packageName, packageName,
version, version,
executablePath, executablePath,
installDependencies = false,
}: { }: {
packageName: string; packageName: string;
version: string; version: string;
executablePath: string; executablePath: string;
installDependencies?: boolean;
}): Promise<string> { }): Promise<string> {
// Resolve version if it's a range or "latest" // Resolve version if it's a range or "latest"
let resolvedVersion = version; let resolvedVersion = version;
@@ -123,24 +121,6 @@ export async function installFromNpmTarball({
throw new Error(`Executable not found in extracted package at ${cliPath}`); throw new Error(`Executable not found in extracted package at ${cliPath}`);
} }
// Install dependencies if requested and package.json exists
if (installDependencies) {
const packageJsonPath = join(extractedDir, "package.json");
if (existsSync(packageJsonPath)) {
log.info(`Installing dependencies for ${packageName}...`);
const installResult = spawnSync("npm", ["install", "--production"], {
cwd: extractedDir,
stdio: "pipe",
encoding: "utf-8",
});
if (installResult.status !== 0) {
throw new Error(
`Failed to install dependencies: ${installResult.stderr || installResult.stdout || "Unknown error"}`
);
}
}
}
log.info(`${packageName} installed at ${cliPath}`); log.info(`${packageName} installed at ${cliPath}`);
return cliPath; return cliPath;
+2 -20
View File
@@ -41138,8 +41138,7 @@ var workflows = [
async function installFromNpmTarball({ async function installFromNpmTarball({
packageName, packageName,
version, version,
executablePath, executablePath
installDependencies = false
}) { }) {
let resolvedVersion = version; let resolvedVersion = version;
if (version.startsWith("^") || version.startsWith("~") || version === "latest") { if (version.startsWith("^") || version.startsWith("~") || version === "latest") {
@@ -41197,22 +41196,6 @@ async function installFromNpmTarball({
if (!existsSync2(cliPath)) { if (!existsSync2(cliPath)) {
throw new Error(`Executable not found in extracted package at ${cliPath}`); throw new Error(`Executable not found in extracted package at ${cliPath}`);
} }
if (installDependencies) {
const packageJsonPath = join5(extractedDir, "package.json");
if (existsSync2(packageJsonPath)) {
log.info(`Installing dependencies for ${packageName}...`);
const installResult = spawnSync("npm", ["install", "--production"], {
cwd: extractedDir,
stdio: "pipe",
encoding: "utf-8"
});
if (installResult.status !== 0) {
throw new Error(
`Failed to install dependencies: ${installResult.stderr || installResult.stdout || "Unknown error"}`
);
}
}
}
log.info(`\u2713 ${packageName} installed at ${cliPath}`); log.info(`\u2713 ${packageName} installed at ${cliPath}`);
return cliPath; return cliPath;
} }
@@ -41402,8 +41385,7 @@ var codex = agent({
return await installFromNpmTarball({ return await installFromNpmTarball({
packageName: "@openai/codex", packageName: "@openai/codex",
version: "latest", version: "latest",
executablePath: "bin/codex.js", executablePath: "bin/codex.js"
installDependencies: true
}); });
}, },
run: async ({ prompt, mcpServers, apiKey, cliPath }) => { run: async ({ prompt, mcpServers, apiKey, cliPath }) => {