remove installDependencies
This commit is contained in:
@@ -11,7 +11,6 @@ export const codex = agent({
|
||||
packageName: "@openai/codex",
|
||||
version: "latest",
|
||||
executablePath: "bin/codex.js",
|
||||
installDependencies: true,
|
||||
});
|
||||
},
|
||||
run: async ({ prompt, mcpServers, apiKey, cliPath }) => {
|
||||
|
||||
@@ -39,12 +39,10 @@ export async function installFromNpmTarball({
|
||||
packageName,
|
||||
version,
|
||||
executablePath,
|
||||
installDependencies = false,
|
||||
}: {
|
||||
packageName: string;
|
||||
version: string;
|
||||
executablePath: string;
|
||||
installDependencies?: boolean;
|
||||
}): Promise<string> {
|
||||
// Resolve version if it's a range or "latest"
|
||||
let resolvedVersion = version;
|
||||
@@ -123,24 +121,6 @@ export async function installFromNpmTarball({
|
||||
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}`);
|
||||
|
||||
return cliPath;
|
||||
|
||||
@@ -41138,8 +41138,7 @@ var workflows = [
|
||||
async function installFromNpmTarball({
|
||||
packageName,
|
||||
version,
|
||||
executablePath,
|
||||
installDependencies = false
|
||||
executablePath
|
||||
}) {
|
||||
let resolvedVersion = version;
|
||||
if (version.startsWith("^") || version.startsWith("~") || version === "latest") {
|
||||
@@ -41197,22 +41196,6 @@ async function installFromNpmTarball({
|
||||
if (!existsSync2(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}`);
|
||||
return cliPath;
|
||||
}
|
||||
@@ -41402,8 +41385,7 @@ var codex = agent({
|
||||
return await installFromNpmTarball({
|
||||
packageName: "@openai/codex",
|
||||
version: "latest",
|
||||
executablePath: "bin/codex.js",
|
||||
installDependencies: true
|
||||
executablePath: "bin/codex.js"
|
||||
});
|
||||
},
|
||||
run: async ({ prompt, mcpServers, apiKey, cliPath }) => {
|
||||
|
||||
Reference in New Issue
Block a user