Instatic icon indicating copy to clipboard operation
Instatic copied to clipboard

refactor(plugins): separate manifest validation stages

Open DavidBabinec opened this issue 4 months ago • 0 comments

What changed

  • split the monolithic plugin manifest parser into focused shape parsing, semantic validation, normalization, and result-construction stages
  • keep parsePluginManifest as 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 lint
  • bun run build
  • bun 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

DavidBabinec avatar Jul 24 '26 07:07 DavidBabinec