mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
feat(cli): fase 8.4 — profiles/contexts (omniroute config contexts)
- contexts.mjs: loadContexts/saveContexts/resolveActiveContext (~/.omniroute/config.json) - commands/contexts.mjs: CRUD completo (add/use/list/show/remove/rename/export/import) - config.mjs: subgroup contexts registrado sob config contexts - program.mjs: flag global --context <name> com env OMNIROUTE_CONTEXT - en.json/pt-BR.json: chaves program.context e config.contexts adicionadas - import usa validação explícita de campos (sem Object.assign cru)
This commit is contained in:
@@ -25,6 +25,12 @@ export function createProgram() {
|
||||
.addOption(new Option("--timeout <ms>", t("program.timeout")).default("30000"))
|
||||
.addOption(new Option("--api-key <key>", t("program.api_key")).env("OMNIROUTE_API_KEY"))
|
||||
.addOption(new Option("--base-url <url>", t("program.base_url")).env("OMNIROUTE_BASE_URL"))
|
||||
.addOption(
|
||||
new Option(
|
||||
"--context <name>",
|
||||
t("program.context") || "Server context/profile to use for this command"
|
||||
).env("OMNIROUTE_CONTEXT")
|
||||
)
|
||||
.showHelpAfterError(true)
|
||||
.exitOverride();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user