os-js / OS.js

OS.js - JavaScript Web Desktop Platform
https://www.os-js.org/
Other
6.89k stars 822 forks source link

[RFC] Dynamic (discoverable) providers #707

Open andersevenrud opened 5 years ago

andersevenrud commented 5 years ago

At the moment packages (apps, themes, icons, sounds) can be discovered and automatically used by client/server via package:discover.

It would be cool if this could be added to service providers as well.

Basically use the same approach, except change package.json to (instead of package value):

{
  "osjs": {
    "type": "service"
  }
}

Then have the CLI generate a list (just like /packages.json from packages discovery) which is used by the index.js bootstrap script.

A downside with this is that you'd have to explicitly set all options in config.js - but that's not a big deal.

Maybe look into configuration publishing as well to prevent that.

  1. [ ] Add package.json entry
  2. [ ] Add new CLI task (service:discover)
  3. [ ] Update all official providers
  4. [ ] Update documentation
17lwinn commented 4 years ago

Yep, would be better if i didn't have to build after installing providers

andersevenrud commented 4 years ago

@17lwinn You'd still have to rebuild after adding a client service provider.

17lwinn commented 4 years ago

I know but other providers should not require a rebuild