{"_id":"@embrapa/module-federation-enhanced-plugin-helper","_rev":"1-6c7f74645874c0fd6fa2916ef21b5e0b","name":"@embrapa/module-federation-enhanced-plugin-helper","dist-tags":{"latest":"2.0.3"},"versions":{"2.0.2":{"name":"@embrapa/module-federation-enhanced-plugin-helper","version":"2.0.2","author":{"name":"@embrapa"},"description":"A helper to dynamic load remotes and modules","main":"index.js","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/schirrel/ModuleFederationEnhancedPlugin.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"dependencies":{"@module-federation/utilities":"^1.0.1"},"gitHead":"e5c5b36dd594a48f721520f65b88d1e401235271","bugs":{"url":"https://github.com/schirrel/ModuleFederationEnhancedPlugin/issues"},"homepage":"https://github.com/schirrel/ModuleFederationEnhancedPlugin#readme","_id":"@embrapa/module-federation-enhanced-plugin-helper@2.0.2","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-giwr70jl/AjEAFR9rhoeNsZM1lfWMRvFwLnrdTfugoOy/KDL7QMNW56xC5inNSEc1RA05B7x+RUbzHiBRyD5nw==","shasum":"020f89e839c57af4191c1538375a6d648b6ee9db","tarball":"https://registry.npmjs.org/@embrapa/module-federation-enhanced-plugin-helper/-/module-federation-enhanced-plugin-helper-2.0.2.tgz","fileCount":5,"unpackedSize":4965,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDwhzqg2wQM43V6Bm7r0URS+cjG66Bau1JWxPQuqHn6gIgI9eSBMoty2rIvrqK7zMKErXUQRpoUN7TI7k6cIpshGc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQxhVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrExg//etUrBfWRL5987TolwDE1Y9zh4oKrUrt3NwtypJHKiqrswe3z\r\nk4ox8vK2djx5gNTzO0aIykq+VVxKbEgyWXSriU9OEX952LyAx2dc78SikeCq\r\nVjEnKTTIvAg8sA3OEBx8BuSZwv6boOhR1wXW8vFVXe6AH95tx2rKKuFdKTOo\r\nXZYcdM2Op3+Bm5R+G9kfdddWGYWQnZ3c5l2MW+44arJeuKzlkJZDNJGoMFvZ\r\njE6Ohhcp2pv+xD+orCKP/BJ+rBN3jTPUk9BtoZhblNuSnA6zq+PaaR0Gt2by\r\n8lgmPRDQADgpGT7fukoxqV+2mb1upt/mFMTZbVGrF8L/OYVRnHlMQE4zQzYd\r\nV89DG0wdL/a5eGPWxLZhpjww3gTvm5kl5djCudls8wAYqSONAlKqCnGuRFxW\r\nXYUJpcx5F4lkkK5DABJekyjWfJLr4hRFqyx/Atsta5kFMmZHh8qsM3PtGS6a\r\ne6VPfKrgh28FJuiikU73dRXp6y5BusaxfJhwRWjPXurmzpRLiKT5rChTNldo\r\nQtgeu7helFd0UOL8VRIx6WyM0ajMbnthX5B4sW7vRIRZWI/DafpSkv6X8xcs\r\nfN1MhkP5nmfZZgmMx8WGeNpZsCadCcQfXSKO8uFX0mqfgK7AYv37bZBmkDUy\r\n0wbPX34HIP3NRgu9cJwqOewdIoLnHRgGoUQ=\r\n=YWoD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"schirrel","email":"alanbschio@gmail.com"},"directories":{},"maintainers":[{"name":"schirrel","email":"alanbschio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/module-federation-enhanced-plugin-helper_2.0.2_1682118741089_0.9188943879645457"},"_hasShrinkwrap":false},"2.0.3":{"name":"@embrapa/module-federation-enhanced-plugin-helper","version":"2.0.3","author":{"name":"@embrapa"},"description":"A helper to dynamic load remotes and modules","main":"index.js","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/embrapa/ModuleFederationEnhancedPlugin.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"dependencies":{"@module-federation/utilities":"^1.0.1"},"gitHead":"23dc262fc88f37fe74c45b543eb8b7c2fa6d1d08","bugs":{"url":"https://github.com/embrapa/ModuleFederationEnhancedPlugin/issues"},"homepage":"https://github.com/embrapa/ModuleFederationEnhancedPlugin#readme","_id":"@embrapa/module-federation-enhanced-plugin-helper@2.0.3","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-7qu5dk75N9LDMYWtXPRg4PHwAlFPc004LODiAo7BKURSytz4gNJgzN7qMGEfTS77zibNBlR0GQvxlikC9qEFlQ==","shasum":"2f5f1764fd4dd2692b86992b93bb04eb852622df","tarball":"https://registry.npmjs.org/@embrapa/module-federation-enhanced-plugin-helper/-/module-federation-enhanced-plugin-helper-2.0.3.tgz","fileCount":5,"unpackedSize":4964,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+xiDwixNdjYx4iIQPvI1B/utGEaIUFlXPT3zHk/3zzAiEAxQvg0cWqVbojt5CiHf3/9Bb4E8yATEfmf3VAyoF52fk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQxmTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxUhAAmaFvEduWQINpSXKX/KY1ViK8a++5czjEx/7u+6ytx6TMst7Y\r\nbLZ7enT+VJtZQuOVxfiRCuG5vNdflJ4D9kl1YN/j0AqFN005OMHch83CBSPr\r\ngts5B4tWsGWbzIliXWc2PkoK8/Ek9FExcBpjS/U3nhSY4Sd3/RaEWCnSJOxo\r\nOm2Ui0OMio89b+LzElJeHgQMa880tCnIrnvJWCwAZ7BAg8fTZUu0xOXhxkuX\r\nm84fP6Vdig9t2oEemndZQWG7/pJj4RaRxxv2zUe+HmusijQskyneLOe8rAxI\r\nyy0IAtP0gpovaSHWDx1ILa2PsNfl9xJ68bqV72iNxMj4/kNNmEALS+B0gETK\r\nQT7XcbTaHMikM0iM9XgeUaNMiSB2Mg1ENLkW+Nmt7LhCt7Wj/UOLEZv6FGYu\r\n/UNRWveNYsRI0h8Ons2jPYPFPcutYeaE+g7IVOp1lrka0zkk+UmeRsnHbw/R\r\nrFIpXX/ODYCi9deAHye7qipn5FXX8zo/P26RF46e38TvBlex7kI3O96J0mIJ\r\n19jHHykSmS7p79V/+M70199KLMGnswLIf3tsBNJOlpPCqaPxlm6W4Hme1OWB\r\nrQE5SQrKD8ukvUUHgxiIuVtsp78dn3IVH7ptB7h/vGXEBg8fiDx+ZEoWH7CW\r\nNrDeBZOsMyXeoF8r+QhEkbkz8qo0exuqukQ=\r\n=EPCS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"schirrel","email":"alanbschio@gmail.com"},"directories":{},"maintainers":[{"name":"schirrel","email":"alanbschio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/module-federation-enhanced-plugin-helper_2.0.3_1682119059688_0.7621258465188188"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-21T23:12:21.012Z","2.0.2":"2023-04-21T23:12:21.251Z","modified":"2023-04-21T23:17:40.065Z","2.0.3":"2023-04-21T23:17:39.938Z"},"maintainers":[{"name":"schirrel","email":"alanbschio@gmail.com"}],"description":"A helper to dynamic load remotes and modules","homepage":"https://github.com/embrapa/ModuleFederationEnhancedPlugin#readme","repository":{"type":"git","url":"git+ssh://git@github.com/embrapa/ModuleFederationEnhancedPlugin.git"},"author":{"name":"@embrapa"},"bugs":{"url":"https://github.com/embrapa/ModuleFederationEnhancedPlugin/issues"},"license":"MIT","readme":"# Dynamic Load\n\nUtilities for dynamic load content for remotes, if you need to pre initialize it (in case of offline PWA for example)\n\n## Install\n\n```sh\nnpm i @embrapa/module-federation-enhanced-plugin-helper\n```\n\n## Usage\n\n```js\nimport {\n  loadRemoteAndModules,\n  getModule,\n} from \"@embrapa/module-federation-enhanced-plugin-helper\";\n\nloadRemoteAndModules();\n\nconst module = getModule({ remote: \"myApp\", module: \"./Component\" });\n```\n\n## Features\n\n### loadRemoteAndModules\n\nThis function load all needed and available for consumption, step:\n\n- Get `remoteUrlMap` to know remotes\n- Dynamic register by calling `getModule`\n- List all remotes available for consumption using `moduleNameList` for each remote\n- Load all modules for each remote\n- Return all modules the app-shell, root-remote.\n\nThe scenario where we built this uppon was a scenario where the app shell only have remotes that only exposes what it is needed here. In our screnario, we need to offline install a PWA and cache all features, include remotes.\nAs many of then where being used im some sort of \"lazy chunk load\", \"manualy\" deal with ensure all ealy registration was being a pain.\n\nWith `dynamicLoad` we ensure all files needs for remotes are laoded and cached.\n\n### getModule\n\nLoad a module from a remote using low level API, once dynamic import `impot()` dont work with dynamic passed names, as can bee read about [here](https://github.com/module-federation/module-federation-examples/issues/1323)\n","readmeFilename":"README.md"}