mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
Make codex-sdk depend on openai/codex (#11503)
Do not bundle all binaries inside the SDK as it makes the package huge. Instead depend on openai/codex
This commit is contained in:
@@ -76,7 +76,7 @@ PACKAGE_NATIVE_COMPONENTS: dict[str, list[str]] = {
|
||||
"codex-win32-x64": ["codex", "rg", "codex-windows-sandbox-setup", "codex-command-runner"],
|
||||
"codex-win32-arm64": ["codex", "rg", "codex-windows-sandbox-setup", "codex-command-runner"],
|
||||
"codex-responses-api-proxy": ["codex-responses-api-proxy"],
|
||||
"codex-sdk": ["codex"],
|
||||
"codex-sdk": [],
|
||||
}
|
||||
|
||||
PACKAGE_TARGET_FILTERS: dict[str, str] = {
|
||||
@@ -205,7 +205,6 @@ def main() -> int:
|
||||
f"Staged version {version} for release in {staging_dir_str}\n\n"
|
||||
"Verify the SDK contents:\n"
|
||||
f" ls {staging_dir_str}/dist\n"
|
||||
f" ls {staging_dir_str}/vendor\n"
|
||||
" node -e \"import('./dist/index.js').then(() => console.log('ok'))\"\n\n"
|
||||
)
|
||||
else:
|
||||
@@ -318,12 +317,11 @@ def stage_sources(staging_dir: Path, version: str, package: str) -> None:
|
||||
if isinstance(scripts, dict):
|
||||
scripts.pop("prepare", None)
|
||||
|
||||
files = package_json.get("files")
|
||||
if isinstance(files, list):
|
||||
if "vendor" not in files:
|
||||
files.append("vendor")
|
||||
else:
|
||||
package_json["files"] = ["dist", "vendor"]
|
||||
dependencies = package_json.get("dependencies")
|
||||
if not isinstance(dependencies, dict):
|
||||
dependencies = {}
|
||||
dependencies[CODEX_NPM_NAME] = version
|
||||
package_json["dependencies"] = dependencies
|
||||
|
||||
with open(staging_dir / "package.json", "w", encoding="utf-8") as out:
|
||||
json.dump(package_json, out, indent=2)
|
||||
|
||||
Reference in New Issue
Block a user