gristlabs_grist-core/app/server
Paul Fitzpatrick cc9a9ae8c5 (core) support for bundling custom widgets with the Grist app
Summary:
This adds support for bundling custom widgets with the Grist app, as follows:

 * Adds a new `widgets` component to plugins mechanism.
 * When a set of widgets is provided in a plugin, the html/js/css assets for those widgets are served on the existing untrusted user content port.
 * Any bundled `grist-plugin-api.js` will be served with the Grist app's own version of that file. It is important that bundled widgets not refer to https://docs.getgrist.com for the plugin js, since they must be capable of working offline.
 * The logic for configuring that port is updated a bit.
 * I removed the CustomAttachedView class in favor of applying settings of bundled custom widgets more directly, without modification on view.

Any Grist installation via docker will need an extra step now, since there is an extra port that needs exposing for full functionality. I did add a `GRIST_TRUST_PLUGINS` option for anyone who really doesn't want to do this, and would prefer to trust the plugins and have them served on the same port.

Actually making use of bundling will be another step. It'll be important to mesh it with our SaaS's use of APP_STATIC_URL for serving most static assets.

Design sketch: https://grist.quip.com/bJlWACWzr2R9/Bundled-custom-widgets

Test Plan: added a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4069
2023-10-27 17:00:10 -04:00
..
declarations (core) disentangle some server tests, release to core, add GRIST_PROXY_AUTH_HEADER test 2022-03-24 15:11:32 -04:00
lib (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
utils (core) sanitizing redis errors 2023-06-06 10:51:17 +02:00
companion.ts (core) Add Support Grist page and nudge 2023-07-04 17:36:59 -04:00
declarations.d.ts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
devServerMain.ts (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
generateCheckpoint.ts (core) get all tests working under python3/gvisor 2021-10-18 17:44:15 -04:00
generateInitialDocSql.ts (core) Add optional telemetry to grist-core 2023-06-07 12:00:51 -04:00
localization.ts only offer languages that have been marked as substantially complete (#466) 2023-03-28 10:59:17 -04:00
mergedServerMain.ts (core) support for bundling custom widgets with the Grist app 2023-10-27 17:00:10 -04:00
tsconfig.json (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00