-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: plugins list json #94
Conversation
src/commands/plugin/index.ts
Outdated
const availablePlugins = JSON.parse(pluginsData); | ||
|
||
// Map to the format expected by the UI | ||
const pluginNames = availablePlugins.map((plugin: { value: any; name: any; description: any }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add types for value, name, description
src/commands/plugin/index.ts
Outdated
Description: plugin.description, | ||
})); | ||
|
||
console.log("Available plugins:", pluginNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove log
Description: plugin.description, | ||
}) | ||
); | ||
|
||
const commonPlugins = pluginNames.filter( | ||
(plugin: { value: string | number }) => pluginsList[plugin.value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need the number type, in value?
src/commands/plugin/index.ts
Outdated
const availablePlugins = JSON.parse(pluginsData); | ||
|
||
// Map to the format expected by the UI | ||
const pluginNames = availablePlugins.map((plugin: { value: any; name: any; description: any }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is repeated. Please see line #227
Merge the code if necessary.
src/commands/plugin/index.ts
Outdated
const availablePlugins = JSON.parse(pluginsData); | ||
|
||
// Map to the format expected by the UI | ||
const pluginNames = availablePlugins.map((plugin: { value: any; name: any; description: any }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same code repeated. Please check once
…into fix/plugins-list-json
"npm search @godspeedsystems/plugins --json" is not giving accurate results,
So parsed a json (containing available plugins) to all three functions to add, remove, update godspeed plugins.