currently the publish function is enabled or disabled only on the condition that inputs & outputs are defined. the mocks actually have an additional state to watch: there are any local changes from what was last saved (in the case it is an edit to an existing function)
this requires watching for local state change and the hard part is figuring out when to consider the "old state" fully loaded, as heavily nested objects load in chunks