fix(cli): apply targets config after add

Summary

Closes #201 (closed).

After postgresai mon targets add saves a new target to instances.yml, immediately regenerate pgwatch sources with sources-generator and recreate pgwatch-prometheus / pgwatch-postgres so the new target starts being monitored without requiring a separate postgresai mon restart.

Verification

bun test cli/test/targets-add-config.test.ts
# 1 pass

Notes

No local product/PostgreSQL stack was started for this release fix. The added test is a focused static CLI guard for the required compose actions and ordering described in #201 (closed).

Merge request reports

Loading