feat: add customize callback to createApp, remove autoStart#280
feat: add customize callback to createApp, remove autoStart#280MarioCadenas wants to merge 1 commit intomainfrom
Conversation
Replace the post-await extend/start ceremony with a declarative `customize` callback on createApp config. The callback runs after plugin setup but before the server starts, giving access to the full appkit handle for registering custom routes or async setup. - Add `customize` option to createApp config - Server start is now orchestrated by createApp (lookup by name) - Remove `autoStart` from public API, ServerConfig, and manifest - Remove `start()` from server plugin exports - Remove autoStart guards from extend() and getServer() - Remove ServerError.autoStartConflict() - Migrate dev-playground, template, and all tests Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
d49f16d to
33e0b86
Compare
|
I think this is a step in the right direction and we should have this ASAP. That being said, as we talked on Slack (just surfacing this here), the API name could change. The use case we need to cover immediately is |
Summary
customizecallback option tocreateAppthat runs after plugin setup but before the server starts, replacing theautoStart: false+.extend()+.start()ceremonycreateApp(looks up"server"plugin by name), makingautoStartand manualstart()unnecessaryautoStartfrom public API (ServerConfig,DEFAULT_CONFIG, manifest) andstart()from server exportsBefore / After
Before:
After:
Test plan