test(plugins): include source external plugin contracts · openclaw/openclaw@4e312d9
steipete
·
2026-05-03
·
via Recent Commits to openclaw:main
File tree
src/plugins/contracts/inventory
| Original file line number | Diff line number | Diff line change |
|---|
@@ -69,31 +69,7 @@ function readJsonRecord(filePath: string): Record<string, unknown> | undefined {
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | | -function collectExcludedPackagedExtensionDirs(): ReadonlySet<string> { |
73 | | -const packageJson = readJsonRecord(path.join(OPENCLAW_PACKAGE_ROOT, "package.json")); |
74 | | -const files = packageJson?.files; |
75 | | -if (!Array.isArray(files)) { |
76 | | -return new Set(); |
77 | | -} |
78 | | -const excluded = new Set<string>(); |
79 | | -for (const entry of files) { |
80 | | -if (typeof entry !== "string") { |
81 | | -continue; |
82 | | -} |
83 | | -const match = /^!dist\/extensions\/([^/]+)\/\*\*$/u.exec(entry); |
84 | | -if (match?.[1]) { |
85 | | -excluded.add(match[1]); |
86 | | -} |
87 | | -} |
88 | | -return excluded; |
89 | | -} |
90 | | - |
91 | | -const EXCLUDED_PACKAGED_EXTENSION_DIRS = collectExcludedPackagedExtensionDirs(); |
92 | | - |
93 | 72 | function readBundledCapabilityManifest(pluginDir: string): BundledCapabilityManifest | undefined { |
94 | | -if (EXCLUDED_PACKAGED_EXTENSION_DIRS.has(path.basename(pluginDir))) { |
95 | | -return undefined; |
96 | | -} |
97 | 73 | const packageJson = readJsonRecord(path.join(pluginDir, "package.json")); |
98 | 74 | const packageManifest = getPackageManifestMetadata(packageJson as PackageManifest); |
99 | 75 | const extensions = normalizeBundledPluginStringList(packageManifest?.extensions); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。