mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
feat(dispatch)!: scope stop and fallback to each group
A match in one group must not suppress delivery in another group. Track regular matches and stopped scopes independently, and document the routing-table boundary. BREAKING CHANGE: stop and fallback no longer apply globally across groups. Put mutually exclusive routes in the same group and define fallback routes in each group that needs its own catch-all.
This commit is contained in:
1 parent
a8418c06d9
commit
a2ad4f699e
10 files changed
+78
-26
No files matched your search
+8
-6
@@ -67,15 +67,17 @@ export interface Route {
|
||||
*/
|
||||
ast?: FilterNode;
|
||||
/**
|
||||
* Fallback route: only fires when no other (non-fallback) route matched the
|
||||
* event. Multiple fallback routes may exist; they are all skipped whenever at
|
||||
* least one regular route matches. Its own filters are ignored.
|
||||
* Fallback route: only fires when no other (non-fallback) route of the same
|
||||
* group matched the event. Multiple fallback routes may exist; a group's are
|
||||
* all skipped whenever one of its regular routes matches. Its own filters
|
||||
* still apply.
|
||||
*/
|
||||
fallback?: boolean;
|
||||
/**
|
||||
* Stop: when true and this route matches, no further routes are evaluated
|
||||
* for this event. Useful for exclusive routing where a match should prevent
|
||||
* fallthrough to subsequent routes.
|
||||
* Stop: when true and this route matches, no further routes of the same
|
||||
* group are evaluated for this event (other groups are unaffected). Useful
|
||||
* for exclusive routing where a match should prevent fallthrough to the
|
||||
* group's subsequent routes.
|
||||
*/
|
||||
stop?: boolean;
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user