cerebro icon indicating copy to clipboard operation
cerebro copied to clipboard

feat: Specify plugin platform

Open dubisdev opened this issue 2 years ago • 2 comments

Some plugins are oriented to a specific platform image

We can use the os field in package.json to filter which plugins are shown to the user.

I think the best way would be to treat this field as npm or yarn treat it:

  • If os is not specified: we assume the plugin works in all platforms
  • If specified: we compare with process.platform and we filter the results

dubisdev avatar Jul 16 '22 08:07 dubisdev

There is so many plugin developers to get in touch, is not better to build an indice based on hotwords, like elasticsearch do, for example: "if this plugin has only 'macos' on the title or in it's description it's for mac, if this plugin has 'macos and windows' it's for both platforms" this would be great to solve the problem fast, before the developers can migrate to the new standard, a little thug but it works... :sweat_smile:

glmagicworks avatar Aug 17 '22 23:08 glmagicworks

Hi @gabriellacerda

I think this implementation is backwards compatible: If there is no os specified the plugin would be shown to all users (just as now)

And if there is, we would just respect the developer decision

Is just a new API utility the developers could have to build their plugins. But nothing breaks if they don't want to use it.

dubisdev avatar Aug 17 '22 23:08 dubisdev