mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-23 23:52:18 +03:00
Release v3.8.31 (#4377)
Release v3.8.31 — see CHANGELOG.md [3.8.31] for full notes and contributors. Merged over known non-blocking reds (all correctness gates green): Integration Tests (2/2) is env/flaky (polls a real upstream batch that did not complete in the poll window); SonarQube/SonarCloud is the advisory server-side new-code quality gate. Unit (8 shards), Coverage, Node 22/24/26, Lint, PR Test Policy, Quality Ratchet, Docs-Strict, Quality-Extended and all 4 CodeQL analyses are green.
This commit is contained in:
committed by
GitHub
parent
3b2a2f02a9
commit
d0396c200d
30
src/shared/utils/codexConfig.ts
Normal file
30
src/shared/utils/codexConfig.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Helpers for generating/maintaining the Codex CLI `config.toml`.
|
||||
*/
|
||||
|
||||
interface ParsedCodexToml {
|
||||
_root: Record<string, unknown>;
|
||||
_sections: Record<string, Record<string, unknown>>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate the deprecated Codex `[features].codex_hooks` flag to `[features].hooks`.
|
||||
*
|
||||
* Codex renamed the feature flag; recent Codex CLI versions ignore the old key and
|
||||
* print a deprecation notice. When OmniRoute rewrites an existing `config.toml` it
|
||||
* should carry the user's intent forward by renaming the key (preserving its value)
|
||||
* and dropping the deprecated one. A no-op when `[features]` or `codex_hooks` is
|
||||
* absent, and it never clobbers an already-present `hooks` value. (#1327)
|
||||
*
|
||||
* Operates in place on the route's parsed-TOML shape (`{ _root, _sections }`).
|
||||
*/
|
||||
export function migrateCodexFeatureFlags(parsed: ParsedCodexToml): ParsedCodexToml {
|
||||
const features = parsed?._sections?.features;
|
||||
if (!features || typeof features !== "object") return parsed;
|
||||
if (!Object.prototype.hasOwnProperty.call(features, "codex_hooks")) return parsed;
|
||||
if (!Object.prototype.hasOwnProperty.call(features, "hooks")) {
|
||||
features.hooks = features.codex_hooks;
|
||||
}
|
||||
delete features.codex_hooks;
|
||||
return parsed;
|
||||
}
|
||||
Reference in New Issue
Block a user