Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
## 4.1.0 IN PROGRESS

* Populate module descriptor's `name` field with module-name if `description` is missing. Refs STCLI-272.
* Use node-native glob functionality in `translate compile`. Refs STCLI-273.
* Populate module descriptor's `metadata` field with remaining `stripes` properties. Refs STCLI-274.
* Expose the `--federate` flag on `build` and `serve` command. Refs STRIPES-861.
* Build static federated ui-bundles, host app. Refs STRIPES-861.

## [4.0.0](https://github.com/folio-org/stripes-cli/tree/v4.0.0) (2025-02-24)
[Full Changelog](https://github.com/folio-org/stripes-cli/compare/v3.2.0...v4.0.0)
Expand Down
5 changes: 5 additions & 0 deletions lib/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ module.exports = {
implies: 'createDll',
requiresArg: true
})
.option('federate', {
describe: 'Enables module-federation in build process',
type: 'boolean',
default: false
})
.option('skipStripesBuild', {
describe: 'Bypass Stripes-specific steps in build (useful when building third-party Webpack DLLs).',
type: 'boolean',
Expand Down
4 changes: 4 additions & 0 deletions lib/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ module.exports = {
stripesConfigMiddleware(),
])
.positional('configFile', stripesConfigFile.configFile)
.option('federate', {
describe: 'At platform level, serves an empty host platform, using configured entitlementUrl to procure a list or remote apps. At the module level, this registers/serves the app as a locally federated remote.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos: "At THE platform...", "a list OF..."

"At the platform level": it also spins up a local registry, right? Should we say that?

type: 'boolean',
})
.option('existing-build', {
describe: 'Serve an existing build from the supplied directory',
type: 'string',
Expand Down
3 changes: 3 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path');
const fs = require('fs');
const http = require('http');
const express = require('express');
const cors = require('cors');
const logger = require('morgan');
const debug = require('debug');

Expand Down Expand Up @@ -48,6 +49,8 @@ function onListening(server) {

function start(dir, options) {
const app = express();
app.use(express.json());
app.use(cors());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wide-open cors() makes Sonar grumpy. Do we think Sonar is correct here and we should limit dev-stuff to localhost, or do we want to leave it wide-open, knowing that it's insecure from some points of view but ack'ing that this is how things go during development when we don't have all those configurations ironed out.

app.use(express.static(dir, {}));
app.use(logger('tiny'));

Expand Down
Loading