refactor: split cli backend live helpers

This commit is contained in:
Peter Steinberger
2026-04-07 03:46:18 +01:00
parent 1092691d14
commit 416a3148e9
10 changed files with 630 additions and 516 deletions

View File

@@ -56,10 +56,6 @@ export const cliCommandCatalog: readonly CliCommandCatalogEntry[] = [
policy: { routeConfigGuard: "always" },
route: { id: "gateway-status" },
},
{
commandPath: ["cron"],
policy: { bypassConfigGuard: true },
},
{
commandPath: ["sessions"],
exact: true,

View File

@@ -1,3 +1,4 @@
import { isGatewayConfigBypassCommandPath } from "../gateway/explicit-connection-policy.js";
import { cliCommandCatalog, type CliCommandPathPolicy } from "./command-catalog.js";
import { matchesCommandPath } from "./command-path-matches.js";
@@ -23,5 +24,11 @@ export function resolveCliCommandPathPolicy(commandPath: string[]): CliCommandPa
...entry.policy,
};
}
if (isGatewayConfigBypassCommandPath(commandPath)) {
resolvedPolicy = {
...resolvedPolicy,
bypassConfigGuard: true,
};
}
return resolvedPolicy;
}