mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
15 lines
428 B
JavaScript
15 lines
428 B
JavaScript
export function collectExcludedPackagedExtensionDirs(rootPackageJson) {
|
|
const excluded = new Set();
|
|
const files = Array.isArray(rootPackageJson?.files) ? rootPackageJson.files : [];
|
|
for (const entry of files) {
|
|
if (typeof entry !== "string") {
|
|
continue;
|
|
}
|
|
const match = /^!dist\/extensions\/([^/]+)\/\*\*$/u.exec(entry);
|
|
if (match?.[1]) {
|
|
excluded.add(match[1]);
|
|
}
|
|
}
|
|
return excluded;
|
|
}
|