Add executable detection and export Codex from the SDK (#4532)

Executable detection uses the same rules as the codex wrapper.
This commit is contained in:
pakrym-oai authored and GitHub committed 2025-09-30 18:06:16 -07:00
1 parent 32853ecbc5
commit 8dd771d217
10 files changed
+116 -29

No files matched your search

+21 -6
View File
@@ -3,14 +3,29 @@ module.exports = {
preset: "ts-jest/presets/default-esm",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
globals: {
"ts-jest": {
useESM: true,
tsconfig: "tsconfig.json",
},
},
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
testMatch: ["**/tests/**/*.test.ts"],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
tsconfig: "tsconfig.json",
diagnostics: {
ignoreCodes: [1343],
},
astTransformers: {
before: [
{
path: "ts-jest-mock-import-meta",
// Workaround for meta.url not working in jest
options: { metaObjectReplacement: { url: "file://" + __dirname + "/dist/index.js" } },
},
],
},
},
],
},
};