deephaven / deephaven-core

Deephaven Community Core
Other
235 stars 79 forks source link

jsapi - improvements for 3rd party consumers #5537

Open bmingles opened 1 month ago

bmingles commented 1 month ago

Improve jsapi for 3rd party consumers

CommonJS / non-browser module support The current jsapi is exposed as 2 ES modules that have dependencies on browser apis. Certain nodejs environments like Electron and Vscode extensions only support CommonJS. They also require polyfilling a few select browser apis to make jsapi function. It would be helpful to

  1. Provide jsapi with zero browser dependencies
  2. Provide this as multiple module types, namely es + commonjs

Dynamic download of jsapi We currently provide jsapis via urls on running DH instances. This is great since it ensures the jsapi is compatible with the server. It does, however, require some boilerplate scripting that is a bit cumbersome for a consumer.

Npm package It seems we could address all of the above in a single npm package.

bmingles commented 1 month ago

@niloc132 @mofojed I created this task to facilitate some discussion / thoughts on jsapi improvements based on recent experience developing a dh vscode extension.

bmingles commented 4 weeks ago

@niloc132 I investigated node support for h2c a bit. Here's my understanding: