Migrate Admin UI plugins to native ESM and support local extension development - #717
Conversation
8278c4c to
09e8221
Compare
|
Also added a sortOrder to nav items so that the plugin-injected side navigation items can be displayed anywhere in the side nav |
587599f to
339cd14
Compare
|
@pozylon I changed my mind on this. Earlier, I was leaning toward the IIFE approach because it was simpler, and ESM kept running into issues I couldn't explain. But after digging deeper, those turned out to be a Next.js build/dev cache bug that affects the IIFE branch too. ESM was never the real issue. IIFE is simpler to get started with, but I think ESM is simpler to live with. The migration is already done, please review and merge :) |
20908ef to
d78021b
Compare
d78021b to
bbb5bd2
Compare
d27782d to
b3be64f
Compare
…ugin projects are reflected
…on handshake, duplicate-name dedupe, and plugin author docs
b3be64f to
22bbf92
Compare
Admin UI plugins now load as native ES modules through a shared browser import map. Plugin builds emit
dist/index.js; Express and Fastify serve the plugin bundles and packaged SDK, preserve route-specific HTML, and support CSP nonces. Existing plugins must be rebuilt and theirbundlePathchanged from.global.jsto.js.Client projects can develop extensions against the prebuilt Admin UI package. Both Kitchensink examples build their local Bookmark Manager before backend startup and watch its source alongside the backend; refreshing the browser loads the rebuilt extension. The examples and SDK documentation describe setup and the distinction from developing the Admin UI through Next.js.
The change also validates plugin exports and SDK versions, keeps optional Admin UI dependencies lazy, adds runtime and HTML-routing tests, adjusts bookmark search input spacing, and includes the workspace's dependency lockfile refresh.
Validation: 729 unit tests pass; both Bookmark Manager builds pass; plugin watch rebuilding verified. Full Admin UI production build, including SDK bundles and TypeScript declarations, passes after merging the latest master.
CodeQL identified potentially expensive route-normalization regexes. Trailing slash removal now uses a linear scan, with regression coverage for long slash-heavy paths and mount prefixes. Targeted ESLint checks pass.