mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:20:43 +00:00
fix(matrix): sort safe wrapper sdk subpaths
This commit is contained in:
@@ -83,12 +83,12 @@ function buildPluginSdkAliasMap(moduleUrl) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const exportKey of Object.keys(packageJson.exports ?? {})) {
|
||||
for (const exportKey of Object.keys(packageJson.exports ?? {}).toSorted()) {
|
||||
if (!exportKey.startsWith(PLUGIN_SDK_EXPORT_PREFIX)) {
|
||||
continue;
|
||||
}
|
||||
const subpath = exportKey.slice(PLUGIN_SDK_EXPORT_PREFIX.length);
|
||||
if (!subpath) {
|
||||
if (!/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(subpath)) {
|
||||
continue;
|
||||
}
|
||||
const resolvedPath =
|
||||
|
||||
Reference in New Issue
Block a user