feat: add profile reload expression to filter reload events#108
Merged
MacroPower merged 1 commit intomainfrom Aug 9, 2025
Merged
feat: add profile reload expression to filter reload events#108MacroPower merged 1 commit intomainfrom
MacroPower merged 1 commit intomainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
==========================================
+ Coverage 54.35% 54.77% +0.42%
==========================================
Files 43 45 +2
Lines 5365 5586 +221
==========================================
+ Hits 2916 3060 +144
- Misses 2357 2413 +56
- Partials 92 113 +21 ☔ View full report in Codecov by Sentry. |
5c92efa to
1b5d654
Compare
1b5d654 to
3640ab4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: #84
This PR adds a new
reloadfield to profiles that allows users to filter reload events using CEL expressions:If no
reloadexpression is provided, profiles will continue to work as before (reloading on all events). Note: existing path functions are also available.New CEL EnvOptions
New CEL functions and constants are available for these expressions.
File System Variables:
file- The subject of the event.fs.event- The triggering file system event.File System Functions:
has(event, flag...): Check if file system events contain specific flagsFile System Constants:
fs.CREATE,fs.WRITE,fs.REMOVE,fs.RENAME,fs.CHMOD: Event type constantsRender Status Variables:
render.stage- The current render stage.render.result- The last render result.Render Status Constants:
render.STAGE_*: Track current render stage (NONE, PRE_RENDER, RENDER, POST_RENDER)render.RESULT_*: Track last render result (NONE, OK, ERROR, CANCEL)Example Use Cases