zors
zors copied to clipboard
feat(core): Support command hooks
Would be cool to to .addHook on a command to intercept its lifecycle and maybe do some modifications at runtime.
command.addHook("pre", (args, options, tools) => {
console.log("This command is about to run with: ", args, options)
})
command.addHook("post", (args, options, tools) => {
console.log("This command just finished running with: ", args, options)
})
@nexxeln what do u think? can be used for stuff like validation and pre checks
Yeah this is nice