

























@@ -1,7 +1,10 @@
11import fs from "node:fs";
22import path from "node:path";
33import { pathToFileURL } from "node:url";
4-import { NON_PACKAGED_BUNDLED_PLUGIN_DIRS } from "./lib/bundled-plugin-build-entries.mjs";
4+import {
5+collectBundledPluginBuildEntries,
6+NON_PACKAGED_BUNDLED_PLUGIN_DIRS,
7+} from "./lib/bundled-plugin-build-entries.mjs";
58import { shouldBuildBundledCluster } from "./lib/optional-bundled-clusters.mjs";
69import {
710mergeGeneratedChannelConfigs,
@@ -17,7 +20,10 @@ const GENERATED_BUNDLED_SKILLS_DIR = "bundled-skills";
1720const TRANSIENT_COPY_ERROR_CODES = new Set(["EEXIST", "ENOENT", "ENOTEMPTY", "EBUSY"]);
1821const COPY_RETRY_DELAYS_MS = [10, 25, 50];
192220-function shouldCopyBundledPluginMetadata(id, env) {
23+function shouldCopyBundledPluginMetadata(id, env, buildablePluginDirs) {
24+if (!buildablePluginDirs.has(id)) {
25+return false;
26+}
2127if (!NON_PACKAGED_BUNDLED_PLUGIN_DIRS.has(id)) {
2228return true;
2329}
@@ -237,6 +243,9 @@ export function copyBundledPluginMetadata(params = {}) {
237243return;
238244}
239245246+const buildablePluginDirs = new Set(
247+collectBundledPluginBuildEntries({ cwd: repoRoot, env }).map((entry) => entry.id),
248+);
240249const generatedChannelConfigsByPlugin = readGeneratedBundledChannelConfigs(repoRoot);
241250const sourcePluginDirs = new Set();
242251for (const dirent of fs.readdirSync(extensionsRoot, { withFileTypes: true })) {
@@ -252,7 +261,7 @@ export function copyBundledPluginMetadata(params = {}) {
252261 ? JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
253262 : undefined;
254263const topLevelPublicSurfaceEntries = collectTopLevelPublicSurfaceEntries(pluginDir);
255-if (!shouldCopyBundledPluginMetadata(dirent.name, env)) {
264+if (!shouldCopyBundledPluginMetadata(dirent.name, env, buildablePluginDirs)) {
256265removePathIfExists(distPluginDir);
257266continue;
258267}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。