The setup
function of the plugin will receive an api
imported parameter, and you can call some methods provided on the api to obtain information such as configuration and application context.
Used to retrieve the original configuration of the application.
Please refer to Configuration for the specific meanings of configuration fields.
This method returns a read-only configuration and cannot be modified. If you need to modify the configuration, please use config hook.
Used to retrieve the final configuration after parsing.
Please refer to Configuration for the specific meanings of configuration fields.
This method returns a read-only configuration and cannot be modified. If you need to modify the configuration, please use config hook.
Used to retrieve the runtime context of the application.
Some fields in the AppContext are dynamically set and will change as the program runs. Therefore, when plugins read these fields at different times, they may get different values.
Used to retrieve the executor of Hooks and trigger the execution of specific Hooks.
Please avoid executing the built-in hooks, as it may break the internal execution logic of the framework.