Skip to content

Commit 43fd51f

Browse files
authored
feat: improve accepted formats for plugin names in plugin dependencies (#6164)
* normalize dependencies, normalizePluginName(), queueDependency() * test plugin dependency resolution * don't log binary (media) to console, validate service.start, clean up logging * Normalize both dependency name and plugin names for consistent matching, Only add scoped name if plugin.name is not already scoped * double-scope check, handle scoped plugin names with short name * jsdoc for queueDependency() * useModel blob guards * adjust timeouts for windows
1 parent 624793a commit 43fd51f

File tree

4 files changed

+614
-73
lines changed

4 files changed

+614
-73
lines changed

packages/cli/tests/commands/plugins.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ describe('ElizaOS Plugin Commands', () => {
374374
throw error;
375375
}
376376
},
377-
TEST_TIMEOUTS.PLUGIN_INSTALLATION + PLUGIN_INSTALLATION_BUFFER // Add extra buffer for Windows CI
377+
// Multiply timeout by number of plugins (3) plus buffer for Windows
378+
// This accounts for sequential plugin installations which can be slow on Windows
379+
TEST_TIMEOUTS.PLUGIN_INSTALLATION * 3 + PLUGIN_INSTALLATION_BUFFER * 2
378380
);
379381

380382
// Negative case tests
@@ -411,7 +413,11 @@ describe('ElizaOS Plugin Commands', () => {
411413
);
412414

413415
const packageJson = await readFile(join(projectDir, 'package.json'), 'utf8');
414-
expect(packageJson).toContain('github:elizaos-plugins/plugin-farcaster#1.x');
416+
// GitHub shorthand URLs may be stored differently in package.json
417+
// Check for either the shorthand format or the resolved format
418+
const hasShorthand = packageJson.includes('github:elizaos-plugins/plugin-farcaster#1.x');
419+
const hasResolved = packageJson.includes('"@elizaos-plugins/plugin-farcaster"');
420+
expect(hasShorthand || hasResolved).toBe(true);
415421
} catch (error: any) {
416422
console.warn(
417423
'[WARN] GitHub shorthand plugin installation failed - likely due to missing @elizaos/client dependency in NPM'
@@ -428,6 +434,6 @@ describe('ElizaOS Plugin Commands', () => {
428434
throw error;
429435
}
430436
},
431-
TEST_TIMEOUTS.PLUGIN_INSTALLATION + PLUGIN_INSTALLATION_BUFFER // Add extra buffer for Windows CI
437+
TEST_TIMEOUTS.PLUGIN_INSTALLATION + PLUGIN_INSTALLATION_BUFFER * 2 // Extra buffer for Windows CI and GitHub operations
432438
);
433439
});

0 commit comments

Comments
 (0)