diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c651c..3c3fed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/lib/commands/build.js b/lib/commands/build.js index 69b4fee..bf839e1 100644 --- a/lib/commands/build.js +++ b/lib/commands/build.js @@ -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', diff --git a/lib/commands/serve.js b/lib/commands/serve.js index 5203616..bd7d7b1 100644 --- a/lib/commands/serve.js +++ b/lib/commands/serve.js @@ -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.', + type: 'boolean', + }) .option('existing-build', { describe: 'Serve an existing build from the supplied directory', type: 'string', diff --git a/lib/server.js b/lib/server.js index f6cb6a0..c22f765 100644 --- a/lib/server.js +++ b/lib/server.js @@ -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'); @@ -48,6 +49,8 @@ function onListening(server) { function start(dir, options) { const app = express(); + app.use(express.json()); + app.use(cors()); app.use(express.static(dir, {})); app.use(logger('tiny'));