refactor(cli): normalize route boundaries

This commit is contained in:
Peter Steinberger
2026-04-06 15:37:34 +01:00
parent e4fa414ed0
commit ff7fe37d17
7 changed files with 95 additions and 38 deletions

View File

@@ -29,6 +29,14 @@ describe("command-path-matches", () => {
).toBe(false);
});
it("treats structured rules without exact as prefix matches", () => {
expect(
matchesCommandPathRule(["plugins", "update", "now"], {
pattern: ["plugins", "update"],
}),
).toBe(true);
});
it("matches any command path from a rule set", () => {
expect(
matchesAnyCommandPath(