Instatic
Instatic copied to clipboard
refactor(plugins): separate manifest validation stages
What changed
- split the monolithic plugin manifest parser into focused shape parsing, semantic validation, normalization, and result-construction stages
- keep
parsePluginManifestas a short, ordered coordinator - preserve every existing validation rule, error message, and normalized manifest field
Why
parsePluginManifest was a high-complexity maintenance hotspot. Isolating each invariant makes future plugin-schema work easier to review and test without adding a parallel parser or compatibility layer.
Impact
No intended user-facing behavior change. Valid manifests normalize as before; invalid manifests continue to fail with the same messages.
Verification
bun test src/__tests__/plugins/pluginManifest.test.ts src/__tests__/plugins/pluginMarketplaceFields.test.ts(30 pass)bun run lintbun run buildbun test(full suite passed)- live Chromium E2E on disposable SQLite: SETUP-001, AUTH-001, EDIT-001, SAVE-001, PUB-001, PUB-002, PUB-003, PLUGIN-001, PLUGIN-008
- live E2E confirmed invalid-upload recovery, valid review/install/reload, published content, and draft/public isolation with no browser errors