-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STRIPES-861: Setup module federation #105
base: master
Are you sure you want to change the base?
Conversation
Quality Gate failedFailed conditions |
* map the `sounds` directory for remote applications, analogous to how translations and icons are served * provide `/code` to make the registry human-readable * catch and display startup errors in case humans make stupid coding mistakes and need help finding them
Icons in stripes-components are imported as components whereas those in applications are just resources, so we need to load them differently.
Quality Gate failedFailed conditions |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
const { name } = metadata; | ||
|
||
registry.remotes[name] = metadata; | ||
res.status(200).send(`Remote ${name} metadata updated`); |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks High
app.get('/registry', (_, res) => res.json(registry)); | ||
|
||
// return entire registry for humans | ||
app.get('/code', (_, res) => res.send(`<pre>${JSON.stringify(registry, null, 2)}</pre>`)); |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks High
|
||
delete registry.remotes[name]; | ||
|
||
res.status(200).send(`Remote ${name} removed`); |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks High
https://issues.folio.org/browse/STRIPES-861
POC for Webpack Module Federation.
This PR is associated with additional PRs:
And a new repo:
https://github.com/folio-org/stripes-shared-context
How to test it
yarn stripes ./stripes.config.js
cd ui-users && yarn stripes federate
. This will start a remote on port 3002cd ui-inventory && yarn stripes federate
. This will start a remote on port 3003