test(build): respect non-core plugin package metadata

This commit is contained in:
Peter Steinberger
2026-05-02 18:04:50 +01:00
parent eeea77a559
commit 9bedcff904
2 changed files with 10 additions and 0 deletions

View File

@@ -47,6 +47,10 @@ function collectPluginSourceEntries(packageJson) {
return packageEntries.length > 0 ? packageEntries : ["./index.ts"];
}
function shouldIncludeBundledPluginInCore(packageJson) {
return packageJson?.openclaw?.bundle?.includeInCore !== false;
}
function collectTopLevelPublicSurfaceEntries(pluginDir) {
if (!fs.existsSync(pluginDir)) {
return [];
@@ -111,6 +115,9 @@ export function collectBundledPluginBuildEntries(params = {}) {
if (!shouldBuildBundledCluster(dirent.name, env, { packageJson })) {
continue;
}
if (!shouldIncludeBundledPluginInCore(packageJson)) {
continue;
}
entries.push({
id: dirent.name,