@christiandoxa/prodex 0.211.0 → 0.213.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/lib/codex-shim.cjs +13 -35
- package/package.json +7 -7
package/lib/codex-shim.cjs
CHANGED
|
@@ -150,43 +150,21 @@ function resolveNativeCodexCommand() {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
-
"Unable to locate @openai/codex. Reinstall @christiandoxa/prodex so its runtime dependency is present.\n",
|
|
158
|
-
);
|
|
159
|
-
process.exit(1);
|
|
160
|
-
}
|
|
161
|
-
const packageJsonPath = path.join(packageRoot, "package.json");
|
|
162
|
-
|
|
163
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
164
|
-
if (typeof packageJson.bin === "string") {
|
|
165
|
-
return {
|
|
166
|
-
command: process.execPath,
|
|
167
|
-
args: [path.resolve(packageRoot, packageJson.bin), ...process.argv.slice(2)],
|
|
168
|
-
env: process.env,
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
if (packageJson.bin && typeof packageJson.bin === "object") {
|
|
172
|
-
const candidate = packageJson.bin.codex ?? Object.values(packageJson.bin)[0];
|
|
173
|
-
if (typeof candidate === "string") {
|
|
174
|
-
return {
|
|
175
|
-
command: process.execPath,
|
|
176
|
-
args: [path.resolve(packageRoot, candidate), ...process.argv.slice(2)],
|
|
177
|
-
env: process.env,
|
|
178
|
-
};
|
|
179
|
-
}
|
|
153
|
+
function resolveCodexCommand() {
|
|
154
|
+
const nativeCommand = resolveNativeCodexCommand();
|
|
155
|
+
if (nativeCommand) {
|
|
156
|
+
return nativeCommand;
|
|
180
157
|
}
|
|
181
|
-
return {
|
|
182
|
-
command: process.execPath,
|
|
183
|
-
args: [path.resolve(packageRoot, "bin", "codex.js"), ...process.argv.slice(2)],
|
|
184
|
-
env: process.env,
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
158
|
|
|
188
|
-
|
|
189
|
-
|
|
159
|
+
process.stderr.write(
|
|
160
|
+
[
|
|
161
|
+
"Unable to locate bundled Codex native package for this platform.",
|
|
162
|
+
"Reinstall @christiandoxa/prodex with optional dependencies enabled, or set PRODEX_CODEX_BIN to an existing Codex CLI.",
|
|
163
|
+
"Prodex does not fall back to @openai/codex/bin/codex.js because npm/Node version skew can make Codex load the wrong optional native package.",
|
|
164
|
+
"",
|
|
165
|
+
].join("\n"),
|
|
166
|
+
);
|
|
167
|
+
process.exit(1);
|
|
190
168
|
}
|
|
191
169
|
|
|
192
170
|
const codexCommand = resolveCodexCommand();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christiandoxa/prodex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.213.0",
|
|
4
4
|
"description": "Multi-provider Codex wrapper with OpenAI quota-aware routing and Claude Code support",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"@openai/codex": "latest"
|
|
17
17
|
},
|
|
18
18
|
"optionalDependencies": {
|
|
19
|
-
"@christiandoxa/prodex-linux-x64": "0.
|
|
20
|
-
"@christiandoxa/prodex-linux-arm64": "0.
|
|
21
|
-
"@christiandoxa/prodex-darwin-x64": "0.
|
|
22
|
-
"@christiandoxa/prodex-darwin-arm64": "0.
|
|
23
|
-
"@christiandoxa/prodex-win32-x64": "0.
|
|
24
|
-
"@christiandoxa/prodex-win32-arm64": "0.
|
|
19
|
+
"@christiandoxa/prodex-linux-x64": "0.213.0",
|
|
20
|
+
"@christiandoxa/prodex-linux-arm64": "0.213.0",
|
|
21
|
+
"@christiandoxa/prodex-darwin-x64": "0.213.0",
|
|
22
|
+
"@christiandoxa/prodex-darwin-arm64": "0.213.0",
|
|
23
|
+
"@christiandoxa/prodex-win32-x64": "0.213.0",
|
|
24
|
+
"@christiandoxa/prodex-win32-arm64": "0.213.0",
|
|
25
25
|
"@openai/codex-linux-x64": "npm:@openai/codex@linux-x64",
|
|
26
26
|
"@openai/codex-linux-arm64": "npm:@openai/codex@linux-arm64",
|
|
27
27
|
"@openai/codex-darwin-x64": "npm:@openai/codex@darwin-x64",
|