refactor(bgm): use virtual: module specifiers

Rename the plugin's virtual modules to virtual:bgm/packages and
virtual:bgm/package/<id> so they read as plugin-provided modules rather
than real packages. Update the unit and build integration tests.
This commit is contained in:
2026-08-09 19:16:17 +08:00
parent ba16f17d8a
commit 845d510948
4 changed files with 52 additions and 13 deletions
@@ -1,9 +1,11 @@
import harbor from 'bgm/harbor';
import harbor from 'virtual:bgm/package/harbor';
import packages from 'virtual:bgm/packages';
// Re-export the package data so the test can assert the bundled output.
export const parts = [...harbor.parts.keys()];
export const surfaces = [...harbor.surfaces.keys()];
export const setups = [...harbor.setups.keys()];
export const title = harbor.meta.title;
export const allIds = packages.map((p) => p.meta.id);
console.log(title, parts, surfaces, setups);
console.log(title, parts, surfaces, setups, allIds);