mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 07:57:40 +00:00
refactor: simplify plugin sdk compatibility aliases
This commit is contained in:
@@ -1439,6 +1439,13 @@ describe("loadOpenClawPlugins", () => {
|
||||
expect(candidates.indexOf(srcFile)).toBeLessThan(candidates.indexOf(distFile));
|
||||
});
|
||||
|
||||
it("derives plugin-sdk subpaths from package exports", () => {
|
||||
const subpaths = __testing.listPluginSdkExportedSubpaths();
|
||||
expect(subpaths).toContain("compat");
|
||||
expect(subpaths).toContain("telegram");
|
||||
expect(subpaths).not.toContain("root-alias");
|
||||
});
|
||||
|
||||
it("falls back to src plugin-sdk alias when dist is missing in production", () => {
|
||||
const { root, srcFile, distFile } = createPluginSdkAliasFixture();
|
||||
fs.rmSync(distFile);
|
||||
|
||||
Reference in New Issue
Block a user