How to run a pre-build processor?

Hi,

as part of running wrangler publish, I would like to run a pre-build command specific to the worker (updating a json file)

I was thinking of using custom build command

[build]
command = npm run prebuild && the_default_esbuild

what is the default build command? how can I run the default esbuild command from my custom build?

alternatively, is there a way to run an additional command from the wrangler deploy?