cerebroapp / cerebro

🔵 Cerebro is an open-source launcher to improve your productivity and efficiency
https://www.cerebroapp.com/
MIT License
8.35k stars 457 forks source link

feat: Specify plugin platform #561

Open dubisdev opened 2 years ago

dubisdev commented 2 years ago

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:

glmagicworks commented 2 years ago

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:

dubisdev commented 2 years ago

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.