diff --git a/webpack.config.federate.remote.js b/webpack.config.federate.remote.js index f10a799..afb8932 100644 --- a/webpack.config.federate.remote.js +++ b/webpack.config.federate.remote.js @@ -13,6 +13,10 @@ const buildConfig = (metadata) => { const stripesModulePaths = getStripesModulesPaths(); const translationsPath = path.join(process.cwd(), 'translations', displayName.split('.').shift()); const iconsPath = path.join(process.cwd(), 'icons'); + + // yeah, yeah, soundsPath vs sound. sorry. `sound` is a legacy name. + // other paths are plural and I'm sticking with that convention. + const soundsPath = path.join(process.cwd(), 'sound'); const shared = processShared(singletons, { singleton: true }); const config = { @@ -38,6 +42,10 @@ const buildConfig = (metadata) => { directory: iconsPath, publicPath: '/icons' }, + { + directory: soundsPath, + publicPath: '/sounds' + }, ] }, module: { diff --git a/webpack/registryServer.js b/webpack/registryServer.js index edf2e69..b4e3fb4 100644 --- a/webpack/registryServer.js +++ b/webpack/registryServer.js @@ -20,9 +20,12 @@ const registryServer = { res.status(200).send(`Remote ${name} metadata updated`); }); - // return entire registry + // return entire registry for machines app.get('/registry', (_, res) => res.json(registry)); + // return entire registry for humans + app.get('/code', (_, res) => res.send(`
${JSON.stringify(registry, null, 2)}
`)); + app.delete('/registry', (req, res) => { const metadata = req.body; const { name } = metadata; diff --git a/webpack/serve.js b/webpack/serve.js index 29c0291..2afddf2 100644 --- a/webpack/serve.js +++ b/webpack/serve.js @@ -34,7 +34,12 @@ module.exports = function serve(stripesConfig, options) { serviceWorkerConfig.resolveLoader = { modules: ['node_modules', platformModulePath, coreModulePath] }; // stripes module registry - registryServer.start(); + try { + registryServer.start(); + } + catch (e) { + console.error(e) + } let config = buildConfig(stripesConfig);