mirror of
https://github.com/coder/registry.git
synced 2026-06-02 20:48:14 +00:00
refactor(coder-labs/modules/codex): build config as JSON via jq, single dasel conversion
Replace TOML string concatenation with jq-native JSON building: - Extract write_minimal_default_config() back as its own function, now returning JSON on stdout via jq. - populate_config_toml() assembles all config sources as JSON, deep-merges with jq, and does a single dasel JSON-to-TOML conversion at the end. - Remove merge_toml_config() and all TOML string building. - Update test assertions to accept either quote style since all output now goes through dasel.
This commit is contained in:
@@ -346,7 +346,9 @@ describe("codex", async () => {
|
||||
id,
|
||||
"/home/coder/.codex/config.toml",
|
||||
);
|
||||
expect(configToml).toMatch(new RegExp(`projects.*${workdir.replace(/\//g, '\\/')}.*`));
|
||||
expect(configToml).toMatch(
|
||||
new RegExp(`projects.*${workdir.replace(/\//g, "\\/")}.*`),
|
||||
);
|
||||
expect(configToml).toMatch(/trust_level\s*=\s*['"]trusted['"]/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user