{"_id":"@microbackend/plugin-core","_rev":"51-5b9fc69e50ac8febcbe6da7c6be150dc","name":"@microbackend/plugin-core","dist-tags":{"canary":"1.0.1-alpha.43","latest":"1.0.1"},"versions":{"1.0.1-alpha.39":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"description":"Micro-backend plugin core","devDependencies":{"@microbackend/webpack-plugin":"^1.0.1-alpha.39+0a893a0","@types/lodash":"^4.14.176","lodash":"^4.17.21"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.39","gitHead":"0a893a0a6ec1a57cbfef382623af1afe4168c7d3","_id":"@microbackend/plugin-core@1.0.1-alpha.39","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-RYCWkgmq4MzUunN44rL2DkZ5hL7z+MBbnaKU1nrqh+/280S7mBXMVfWR50AHMEaxAeMopK+8zCzEfLonhHfWnw==","shasum":"82833d12231bd82fc67f57af7034e9465f085bf6","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.39.tgz","fileCount":9,"unpackedSize":19695,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDznjKnrzWtrI2Es48eO3/8Gf+Bqw7M/w8tZ+FDrmCt1AIgMaZbF94U6NwE7G9WwMLxo38n0RZzcDiE+SrC8NB1544="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.39_1636278062918_0.43610802245268876"},"_hasShrinkwrap":false},"1.0.1-alpha.40":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"description":"Micro-backend plugin core","devDependencies":{"@microbackend/webpack-plugin":"^1.0.1-alpha.40+65bf784","@types/lodash":"^4.14.176","lodash":"^4.17.21"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.40","gitHead":"65bf784643f962fd2bb55b11e75248e9baa232ad","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.40","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-/9X+RGUNv+JlDxpfiYVWui3TGb3xIm7ZdTiznakU+62ewxWxyRdWfYq0rqLS0WZ2whVIjl8/D0H1yuF0lhKpMQ==","shasum":"5ccda8ae347bd731664fa33c55f8d7f8de8f60c5","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.40.tgz","fileCount":9,"unpackedSize":19695,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHThPiN9ixJZAfqHsMXmElsvH/x2yLpA/H75GxuToqFBAiA9KhWlAL+4eWOEBawBaP9pKFn7SXOGg9OUE37zUbFMOw=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.40_1636278223220_0.24301409681179797"},"_hasShrinkwrap":false},"1.0.1-alpha.45":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.45+fb5c630","@microbackend/webpack-plugin":"^1.0.1-alpha.45+fb5c630","@types/lodash":"^4.14.176","lodash":"^4.17.21"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.45","gitHead":"fb5c630c8a25deb99e3c994bbf54a827f1cf533d","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.45","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-KKDzjyQLoe3F/WiIGrtTuqEVGP0fEeC0xPh3e1V7Fz0lL5qPLO7i7vBPQ3pstnShwjBeu85u1Pjn4vR5gZJsNw==","shasum":"34de8ad71495b54208d27a6888ed53a9bc6f9a13","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.45.tgz","fileCount":9,"unpackedSize":18569,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4NgLSYqn3RVMGr7inFTTKWCyoAvk7l6bbUibHXGLlYAiA3vU0q08CHh6ZVaPIofHC5qFaPFODQuFYdlyugVsI5nA=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.45_1636339411476_0.23963888426908442"},"_hasShrinkwrap":false},"1.0.1-alpha.47":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.47+00bd693","@microbackend/webpack-plugin":"^1.0.1-alpha.47+00bd693","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.47","gitHead":"00bd693d75acd73f97b128e5ac5e443cbe4a5b25","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.47","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-XjIN4Vr4aLfCwQOhrUiQ16qW63piagvQT066RjFsec8yTsCZ11o7mhf6VYHo7ai2hf15eNM9uq6XLvGWAjbSZw==","shasum":"0e2ccd559198410c08897a86da03b3b191cf0b62","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.47.tgz","fileCount":10,"unpackedSize":21799,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCz6l613ZhCKoULuiFvOjHz2ZqBqTpnigLt/XKkDFxVOwIhAL0FIgI4bSk66PJETyn+4pAWeHoiO7jgSQ1+DvoWnoko"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.47_1636569731017_0.7829796490875061"},"_hasShrinkwrap":false},"1.0.1-alpha.48":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.48+538effb","@microbackend/webpack-plugin":"^1.0.1-alpha.48+538effb","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.48","gitHead":"538effb61d2f9b6e4e07e8b187972435517dabd6","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.48","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-V7yXGCu94ZN9VNTML/XLnfyoHNENyYbUcjkqhZpHoCwkMaLpWguCAHa85L2T141fR9rS9c0yGrG0HVusqZOc0w==","shasum":"17f0426373b1d61fc700bf0aec926a3204f145d6","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.48.tgz","fileCount":10,"unpackedSize":21804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIqOGMOoIalk2WawMAdX0FLKxBbe/WW4UaofWbgTQP0wIgET4/MA2tarWmzsiIwwnfYFQgd0IIZ9E9Bc69G+da2Ik="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.48_1636649552020_0.9538700567596523"},"_hasShrinkwrap":false},"1.0.1-alpha.49":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.49+0211a3a","@microbackend/webpack-plugin":"^1.0.1-alpha.49+0211a3a","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0"},"license":"MIT","main":"src/index.ts","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"version":"1.0.1-alpha.49","gitHead":"0211a3ac642b1944929aa01595eeef1c5f766d0b","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.49","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-67zi+GV1CxUZMwPr2o/DdN+Pzl4pwQ9U2QAMq6ZmHYgy6YuRmtP/n1xGSJjQYf5Fli7N8Mm5X7px0n0UYB+2Qw==","shasum":"e2c8f0e5c3d6992f59eec4408fb0d8d6ee45e9b0","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.49.tgz","fileCount":10,"unpackedSize":21804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDO/qgdF8j4wrf0miF7uMmTCt3E25Kj9LU7mh6f4CyBCAIhAM+uS3zgvuEaATG/nbAiufeZ9KUXKi4cHApNMhHB2Txz"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.49_1636655083435_0.24584348789767674"},"_hasShrinkwrap":false},"1.0.1-alpha.52":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.52+dfd4bb6","@microbackend/webpack-plugin":"^1.0.1-alpha.52+dfd4bb6","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public","directory":"build"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.52","gitHead":"dfd4bb6871989e6d219115dc452bca2cd3ebde78","readme":"ERROR: No README data found!","_id":"@microbackend/plugin-core@1.0.1-alpha.52","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-qYXULVdu25lfFSy2uc8vHDGzqXB+NiHEs1VHLwbIookLfFY+iTrUFjfLxrSpi3PSzZtCaNm2E2TDP7GYnEmtEA==","shasum":"5406584f19d3321a1163fc5c7aef88afa8f383f6","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.52.tgz","fileCount":1,"unpackedSize":1071,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzsZUxkSzFzb553Sasx4OA8x0PMoOP1nE/knh2MSGVkgIgN2e9GFujRaMXHidu3JfBBSn/ZjepdEgen5x2RTkVRVo="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.52_1636686880540_0.25387105628002127"},"_hasShrinkwrap":false},"1.0.1-alpha.53":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.53+311849c","@microbackend/webpack-plugin":"^1.0.1-alpha.53+311849c","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.53","gitHead":"311849c45f988754ef6e7dfae0b5aa0cb3935c52","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.53","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-dl+U0dzS0Woc/vvNnvdeYmK91yMmLojtp/D0FS4YlSO65RFUgINxE810AWceY+3fQenjK4b6bvw1WKXs9mmuoA==","shasum":"b5bb19429d766faeb3ca6f6d5f364270271a19db","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.53.tgz","fileCount":16,"unpackedSize":44529,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA04LkHicsVSnZcfK1i5DENyrkpE4MI3TcfEUpyjt2cGAiEArsTTHSoVKa+pjzrObDSVKT7lG7MV3ETw8nYvqpaLFso="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.53_1636687511356_0.16966232473732967"},"_hasShrinkwrap":false},"1.0.1-alpha.56":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.56+cd88f30","@microbackend/webpack-plugin":"^1.0.1-alpha.56+cd88f30","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.56","gitHead":"cd88f30570365e0c847b5b4fcf92196b824214ac","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.56","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-jZF905LE9Zf0jN4ugbcVEUP5tmOOuyZk+HzkYnXfCIhIY5jdKhD/qj5YOOP0GOsXJ+6KnpqvBeZTcpL+qEfNIg==","shasum":"f95b51753b5a662e4da0e899f7aa812b2ba25c88","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.56.tgz","fileCount":16,"unpackedSize":44529,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4It8EktwLMUP3jrOrQgbw//4Ty5hvAgeCyRMGz4fs3AiEA5zN49gabkglahn9V+Vsl0xJReZ0szzu3wZr+0AeiTX0="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.56_1636689540640_0.23487399936313458"},"_hasShrinkwrap":false},"1.0.1-alpha.58":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.58+7be6d38","@microbackend/webpack-plugin":"^1.0.1-alpha.58+7be6d38","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.58","gitHead":"7be6d389cb6463adea2b378b892a26464c297f8a","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.58","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-sXwkFKbNN9PTmlNu1E2QblPbClSjdqfBYMCEjKRekJvULFEHx6LzN0NZv7kG4AtncmRpD3OGCmrVLdU1bm/Zmw==","shasum":"89fde19ed180eda649429fa4223603bda8f80f76","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.58.tgz","fileCount":22,"unpackedSize":56603,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEY7GYhwYg9iy5suuHP7kZBmOfo6St2HvsBBMuaOhMPLAiEA7CwUovJ4mFUgYkKLSL0GeXvF0DIvp/lrCpGY3Mmmyuw="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.58_1636691080441_0.48433563313508765"},"_hasShrinkwrap":false},"1.0.1-alpha.61":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.61+6aece84","@microbackend/webpack-plugin":"^1.0.1-alpha.61+6aece84","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.61","gitHead":"6aece84ae9f2b3dca995b101b22486af49bd0bc6","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.61","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-Z+CMe8X1VyQarqwCnSV1mktQVT6FRuLc49VrPEwIGiNooQvJUG/VuD0tWYtstG23t82pPGsHh/owmZwckGN+SQ==","shasum":"23e41dc9481132e521dda774672396749c8634e9","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.61.tgz","fileCount":22,"unpackedSize":56739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFhiU5C7It9ku8Q3fymnjb2qhN2nAMCJdh4ozH5JYmgAiBnqoLTUrUQnnBDFc/cezjS7/XLioViTNdav2uFvV3oEg=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.61_1636705175571_0.9997371464339062"},"_hasShrinkwrap":false},"1.0.1-alpha.62":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.62+93ba084","@microbackend/webpack-plugin":"^1.0.1-alpha.62+93ba084","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.62","gitHead":"93ba08408f99b7a8c101c72a6f67c1501712d008","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.62","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-VRtyamp6Wh/TAcCLdZkeLHCks+M+cwquzpm7nO4jf8bxHUwrrqt7/P/T3pJrBvneAA2Y+dRGvShAj7lFpjpjNQ==","shasum":"b7a691552bfcd6baee0268802ecb0aaf6e3da511","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.62.tgz","fileCount":22,"unpackedSize":56739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAHimJ4pIt4JUyS6e+eNrILG1r33EaCMsSQMCaV0x8zgIgagvQn5BvBbWdE4f+SRdhiMZ6QjlkBGe2JpaIjJWy8AA="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.62_1636706227468_0.3684178493121122"},"_hasShrinkwrap":false},"1.0.1-alpha.65":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.65+ad2620d","@microbackend/webpack-plugin":"^1.0.1-alpha.65+ad2620d","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.65","gitHead":"ad2620d3cb7459ab770a013a9e264ccd829aaa56","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.65","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-cTQoDs/F0p349ecugd68g1FF96JXZlemdpnCTHJRvwZQlGoK+OR3Vv1JC8Np6Q8zopXl6WOxAoCzGdXNqpC8WQ==","shasum":"70a8f3f71b38680d8787da68a8f24ea061492cf0","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.65.tgz","fileCount":22,"unpackedSize":56739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDamq7MMhhYwWPKhslNFuVR/oOmOy//RP+419xbfLn7jAiBmpTNq7hXyjR7L86684zmbyNkp4OCeCdCyyylZ8QOdpg=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.65_1636715435634_0.8825202888127732"},"_hasShrinkwrap":false},"1.0.1-alpha.68":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.68+beb847e","@microbackend/webpack-plugin":"^1.0.1-alpha.68+beb847e","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.68","gitHead":"beb847e91773671a140eabe414bc1834ef18afa7","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.68","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-Q+0XA9z1w4s47IpuUW2ooDalc5iKXpGJY9jHNt2coVfKX5e54yNflqGVJBrglty5qL2AXuewusT6PKgyyU2HJg==","shasum":"1cb5fb76a9ce118c8570917aefdea2a841b13105","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.68.tgz","fileCount":21,"unpackedSize":56904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDQMXOh+FIDiLwG/5xL5W8oPc0jMr7rDbeAfhJK/8vNAiAuvgx+6i83ijzH3fz+MnGLLhxiADl4f7WSqy8zxSykTQ=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.68_1636787666041_0.807769199665209"},"_hasShrinkwrap":false},"1.0.1-alpha.69":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.69+22d4953","@microbackend/webpack-plugin":"^1.0.1-alpha.69+22d4953","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.69","gitHead":"22d4953fa4eabae3fbc03ec0d1f5e576e883b546","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.69","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-nDYvRXbf5dcsJXiWEE48IntVHM5AEelW0r+TeeOvTGBxQtH+FK3a5nlFPynaoO/Rby1RPy8HWJo5KBCqgN1nag==","shasum":"6e959bff9fd6b8cb03cf8f4e8e028c06b14945e9","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.69.tgz","fileCount":21,"unpackedSize":56904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKbhX6M/znn3/YMPGZNe9pG7fDhDtTqRjxozLWxDk60AIgNUR6sH1pGQDJbkWykOZBgRXHh/6L03ZymRmHEvbh2Wk="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.69_1636788660599_0.5472519874874513"},"_hasShrinkwrap":false},"1.0.1-alpha.70":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.70+69248ee","@microbackend/webpack-plugin":"^1.0.1-alpha.70+69248ee","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.70","gitHead":"69248ee6a72296a4360d9d0787480cca9bd1c692","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.70","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-3k1OmIJ21SRS+tLznbZA1elHNezGGQUfrIjio8QLdoaX7ftNPNenrPZ9qFy4JfwLXWbgjI1MviNu2HglvpHzDA==","shasum":"e56f95d7c460ea8545f9fa6fbc27cca1de4e3a74","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.70.tgz","fileCount":21,"unpackedSize":56904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgLzukxNSwrMbpXCz06cmXHbViHdMbdoDuHRPG9uykFAiAYIN9Xws4HUSG346ntvOrogEbkuBqVOGDHWpNQG2z8VA=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.70_1636793845134_0.39429090909025954"},"_hasShrinkwrap":false},"1.0.1-alpha.75":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.75+1979bfb","@microbackend/webpack-plugin":"^1.0.1-alpha.75+1979bfb","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.75","gitHead":"1979bfbfda52b4498a1ded4bb205e4fcbe0845dc","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.75","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-SwhRbC/Hp8xggiCRS02OqqQEa+y5nDOOH4/oimi7sxkijyKW7pW8HV5FMnnGuLiB0/NjithdctnNglQpafkj2A==","shasum":"f2ebb0f89662cbd80565793f18ed510f8067c958","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.75.tgz","fileCount":21,"unpackedSize":56665,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbrOkRi4CNNm918hnWG/Z+FKVYkQE9xgnnAvwr56vSnAIhAI6wi+73SMvBK7NZBwGHqWpzZZdIHSK00mz9bTLvb2p4"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.75_1636864039761_0.06012983047360909"},"_hasShrinkwrap":false},"1.0.1-alpha.79":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.79+c864ebe","@microbackend/webpack-plugin":"^1.0.1-alpha.79+c864ebe","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.79","gitHead":"c864ebefd57a937792f2eeeac5797c6063384ca5","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.79","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-/JFCrCSGShkcSxvuS8lBKZVmk3AoeZxZr0Xqzv1tBzHhhsg0aPnyUlNYQ97TPedQb+7VNwINRk+ZXssnJSOXGw==","shasum":"a8cf9510c41bb846d0bcfb978cf0176662bdb74c","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.79.tgz","fileCount":21,"unpackedSize":57784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVtyYHXq81MyLvTkyXtH4EZ66EUH+pdAViFPgQeeelawIgbe5+w2wxMrFAj50zqdk44isJtZZAm42wAnHTUfg6r1s="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.79_1636944113337_0.4232402388068248"},"_hasShrinkwrap":false},"1.0.1-alpha.81":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.81+a37a60e","@microbackend/webpack-plugin":"^1.0.1-alpha.81+a37a60e","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.81","gitHead":"a37a60ef90ab97d6e7ea2548e84320467c547eb1","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.81","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-eVJTSTN4IUs6YYeFwQ62Yk/3mjDeAjmtbEKqgfoxKc/SDjyJkGwqNyBWcJh1MJmyzaAFB69lztZKfT1nqW+3FQ==","shasum":"97ab7f4c4498fe236062acc14192a051b3d4e7cb","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.81.tgz","fileCount":21,"unpackedSize":57784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkpcOCRA9TVsSAnZWagAABgEP/1sGPiHJYlaAhSqNRf1f\nnGsyaOHkNQZCzweX+r8DXjOxHB5p0tENwDLhmLCYlw+UAg6wW3oJ+dr3GlEU\nB11EqtGuMjsnYxFRzAbDXqLgxMNgZNoDXtd43IREbZzFkFjOFnsrsmwlLaqb\n3db89JJXRFQ5gUtrrVFmlbr0KytYJ25xPsoxaSh9YK+MUPCuwu2c+7YRLWCW\nV619Ac1K2u5pZgtQOc6q1POrB/UR6R7evdWsdBdlaopJnERded3D1zrBYA2C\nWKJRn+09/yYwMOMIYT2HnEXUrd4Zq2/4H/IJLojwo43Q5OydpxwBGZrT6qFI\nH0+wV9sSVoFHz4sKqeyOuIdN8cSF3xdN2rysg8YqrC7NU6NC5rnVSHWm5sUF\nqYiNVKwBwY6G6pNyVR8cFJE3YdOiFz8Dy1Iy5vQmHzFK2PKZE034lcC7zHZ2\n4hktMCGtehadxDcLD6Nas0RVnMdgvB3AUVJnPGxK+1jOc9e088iEBrvj6H1Q\nQZPeOofccEXoF/56FTVY95+VnCjBtgkPMJDHe7LnXoaIwF0QqUAqIK/lfAN4\nNVIBa98WAn43eH757I/m6zrWoQkMg0ZW1xJKCGjmACpsKtxdYitoPpUQfHe9\ntC9bEsBPJwo3A9r2iMMmmoOnG5zdkfJRpaCfevMIDJdDjePFOVXqAroklgQ7\nH+5k\r\n=AXUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEioxg+PZ1a65DrwJA2DCR+HxaKz8bI6dEUIgjmbnaTkAiEAhfHFNKCwR8EqbRV7QORtfUwPWEBUoO3qCWoiJR6WCHo="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.81_1636996878290_0.06396889476424139"},"_hasShrinkwrap":false},"1.0.1-alpha.82":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.82+c3de8df","@microbackend/webpack-plugin":"^1.0.1-alpha.82+c3de8df","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.82","gitHead":"c3de8dfe2904333e916e25d1581e2cd1f27a95eb","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.82","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-ZOzM2SBl16f7iEztT4nnuMimHsG/ZSCs6U63uqw2VKSoIx7F+9TsYznjIiTzzDaxFkTrSv8qgCR1YCYUpUE54A==","shasum":"8d507b1a4fc09809408fc017d561dc49a99ee13b","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.82.tgz","fileCount":21,"unpackedSize":57784,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2k90fhBFdStyza0KPuWWyIlU0q+fjO9Vvx9REAGB8vAiEAjn8YC8rHibpQeet6Wk/vTQqdNgqjNFEwS3bBIpRMBd0="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.82_1636998557879_0.5265061369865502"},"_hasShrinkwrap":false},"1.0.1-alpha.85":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.85+c74f19f","@microbackend/webpack-plugin":"^1.0.1-alpha.85+c74f19f","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.85","gitHead":"c74f19ffc5d6fe2092029f1e2263f692d993770c","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.85","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-vovQc9XBoVaLpIDU2S7cshoB/PF3ekl9wSta474M5bZ1V9xFtjiHQxXbMQXCwSmJjjgc7O25LVhR9w5YB2bb2A==","shasum":"1044f4abcdb8753c49275120af559ea58164038f","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.85.tgz","fileCount":21,"unpackedSize":57784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk2kVCRA9TVsSAnZWagAAj40QAI6UWsG5M0OZxz+n7BZ3\nf4p/fMbl+o2ARXeuDWe5LfWUZjF6o7cp8ijwbEYVZ6j0exU8VYjAO43YWF8y\nYpy6Ntx6YmYh3U0T/c/pqvEgEOdOGnGH+auAAPFnQT6jyindFyblP1sOL09u\nkYxkJ0Ey/ecIkePupp2S8+ttwe0DnWd0Uc9IycLXZsiV4YHZXRtdYqLouJgI\nvwiNaTDkoyyN/1ka2lYqEqXMynGHegEp4zKUbGOJvbLtUuaJpnKtMicttmvC\nW4YiAJWotkJiMXVtIe/KKszx4DW/26Q/maRL3sZ+UggUANCZ5O0e/OBU5MHT\nDXSBpMfXpe0KdcZOjhWWloKlyGKktfuCgylmyc+Kc5PQJ0A9gI16EP0/DAR5\neRRZTp7+wedaxJn/4cToIeyXDhfRSgMAN08BV+q/ZK3mZ+8ElakpmclmyLix\ncwBHJPt/5cYaHI4q1w1SDlk5G8KJTfI3v74IiDalEPltVJODFowiGxt8Zk3z\ntQ4Ofwf8Qorcoe7A/pGQzkZSwulMusmcUiAOvQyuRVP7VREWwj2u5+UN3zUd\nm2iI/AyHAA949/T3w0jkTIefKBQ5yCH9AVLOYZCe4elHz0RPaPgFObAmGKB6\ntgF9ikWHHicu64kAlk4QW2pB5Pgor05/MDZRfgA2USCyYJ7xtoVSxQFwIsdB\nC121\r\n=O2f4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAHv2titF5UItEnJVcXnVPPDReiKIFh7ntgiUwcBdC9gIhAKWehBnrxzhNWNOaqA7o7FRRdZN9jKZJgHZ9oZZvxmrX"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.85_1637050645160_0.9502006137016272"},"_hasShrinkwrap":false},"1.0.1-alpha.86":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.86+7d8e731","@microbackend/webpack-plugin":"^1.0.1-alpha.86+7d8e731","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.86","gitHead":"7d8e731618363c99e23497fbd1b3a31bd8fe3aea","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains all extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.86","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-j/zhGzNOI6N5D9PsYu2IBJyexVdd6A6RIspLgoz0IozSgsjSxUdDYDIdbwWkyt5BwgphGsat9ReCcQlrfGXVsg==","shasum":"4b8dc1464416b92f3858870a2b67cd473fd4c9cc","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.86.tgz","fileCount":21,"unpackedSize":57784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk4peCRA9TVsSAnZWagAAcEwP/3xwnMwczuiKWa4LmPEH\n5Ben33yj6N0+KJ+z6mK7iua8OUV22j1OS7WVM/PcAb2Jzey9qMBj72dzRu5/\nsQwFbzO7mjBFTI0r4SDGMPx5QRdd/vBc6Jn/MnF5N7d8Qc6XtZE+30aFl+JM\nDJUibpcYEISreYS/oqgzXEHaSV5CRQr50pe0sAwmvhPyDs5Wv7U2vLzIEELG\nzZsYGtPXuUOc0JrZsVRMnSCyxZCK1a6KTZe+x5UkzC66AmGs8lG/ghlHhqde\nzznlS1MecQXEM3F4xGAZ4WxIvNTKXoZkjxGgOl1qkxPUL0mFt5N6UV14+Tjs\nkkRvBwiuzcknf6SFegp/WPwxRsEx/goNNBmJj0w8ux/KgJOdV3QULLEvpWid\nMS8fcancqP2kEVABA80LXx8jpqEBbqREhn2ANILvVLOHAjiP6w3duQWmNkgN\nH4ldaHoM57vrSy7mghZ/V3C8VgqfPMqsTfTQJezDafODMi0VnTojIvNlWn4L\nf7zLmabR+Pl3XICJODUVDJP1Do/yUc/C5jGh8+bDMuw6NeDdQB78n+MR4Bre\nP0XlmG7NWqXdQOrmfsAz/1PJiaBYccTb12fZ2idgA6YMI4eed/DJejSU1SUx\nIKCbhOCrijgvvvPdAbDQ6P/2TbNPZr6ZzgotNLSpwiytqcxVoIRVHcxwQEta\nPUTh\r\n=kyMw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/FE7cmQadFLajQ1kil3tbz0yHFAFl8823YKhi4+VEjAiEAleHXd5zPTslGBAHKXlCFCntp9A67hsLyuA4PhcQPV34="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.86_1637059165943_0.416511805733887"},"_hasShrinkwrap":false},"1.0.1-alpha.91":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.91+9a5c29f","@microbackend/webpack-plugin":"^1.0.1-alpha.91+9a5c29f","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.91","gitHead":"9a5c29fd6dd8e301096d17a93aaf1905ee5f9082","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration's purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/\r\nRequest model, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.91","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-RCak/Mie4jumA2z49S3+vHqcEeCvc0QBJROn7z5mcYjIQKnW/PXfi5llVFYbuY0fDh1qzvOOhKRWopohSrSC7Q==","shasum":"27c32847a02face1ef4284dc6b6e50b262ebb83b","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.91.tgz","fileCount":21,"unpackedSize":63814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk/eHCRA9TVsSAnZWagAAm0EP/1A0vroUXzWgo3DsJu/t\n8EzNYsl/OpbuiuD5jiPTWFspxr57oK9e3+WT4uUUNBD0pzgzqVd+WMv3qumQ\ndj3/SJPSC+rdzMhR3l8T/F7XQ9Npf4htqvalYnRaCQZm+IRnWC5jzLgLEFgn\nbnt0ldKvFvvaRKM8BWR1Uc+nce4lSFuoz9bNFkPK3OP8UNMZpB5dKl/46f1A\na1pi5fpqPdQ2BzB76P6PBU7hvRn36piX48skERpKUwQx96nlwMT4RxwvL9vh\nnzvvsih/VOTxVO8v/PLhKu6bK5YLqJEMsO6M+eJq4B2DxpS7hIXxbxLGv8bf\n/+vQy0YYtErMvxvMLTjNdF+mgrHXyHUWzaiN29X558qsB6OZBFX9gO9SJrUG\n5lD4/F7yQZMIBMvdlefeDIw54Mk+bGQMQvRNZoV70Y9FUDZJSY6sJ90UNguQ\nBHw2GbrWiZqUDRM5jg7+GmcUqVDbNwpZJWDXqahDg027I2CJflUbCOX/OpBz\n2IKh6wkcwXXbeEzls89vACdk6XBMWOZtj0QNaKE+UYMBYkyXUhYsOy0Ek3vy\n5+a0Esv+F8BvA+lrxyLU118eJ3Z9jxH3j1T79+FycOGBcLLvp3T2UBpvhwF+\nzsrhXh6l4XxHFNQZJVTOBE3Ee6IZfhiGmGsRwJXWcO+JubYvSGdmZrlzzbWu\nLWmC\r\n=yo/2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5xTxdGrAjC3DvlePr+xBX8RSg5OLnKY6WM+Hlj1d8bAiEAvI6SsW1bjpL4ipv3E1eqyk45bmfSb8nCDTVP1uF7hwI="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.91_1637087111762_0.2434232759405559"},"_hasShrinkwrap":false},"1.0.1-alpha.94":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.94+29cd123","@microbackend/webpack-plugin":"^1.0.1-alpha.94+29cd123","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.94","gitHead":"29cd123a0898d43e2eb2b32aa1823018b0e0961f","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.94","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-lPGOzefUQg7J4B9k7FxpDHPheHIEcqESNhpHMqH9czxQ8/cqfvL+3apmY0LtaDpMEYZ2fVNhCyJoPj/tYEEY7w==","shasum":"931fdc26cb38b7058441f410a3344c487abd1dc8","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.94.tgz","fileCount":21,"unpackedSize":64191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlRKhCRA9TVsSAnZWagAAAgUP+gM7MX3VYsOCryMI+pqq\ngOgJpgFb9GM3RfQNbkbshGcLEB1ZhFAUHLljZZDicTVG60er3EHuFWm61GTb\ndOEYiEC3R7SEPPFL6U6Z03sgn8M+t2v8QFPC7WiYfwLQ1Kg5EK3VR597FvcM\nZ50ut2uggzZuGJby8mgJCvfGD67LFcUoOjmZVfbXRcLwvqsnSY8eV31rc9Fa\nVyMTVZf5WH7MSSTUp62fhc6FyUOHDSFCxJMdVN6+vUb0A+qeP4ioyLmc36ne\nTO6oeDLF9/ApFm6tDwUYZitYo2pvl+RBWj62okEF37IenoTZfPAS478g6ABx\n/Oh5pEHI2Uvs8PwduY/wKhr+jSIe455J6BMqZj+xZbmW+lxbJLinBjZ1oLFO\ndikKNeE82DNgO1owEq9INtsoU3FwH/yNvth4/kJw1CoUyWyUfe5L4a1QqNAk\nVreKb8tnaio5M7nbNqCEVXBOOz9Fg7DV365o4z6YpBUlTTyBzOwxQg21YoQg\n4tXsY1sPiBJ18KssC/SVLAFIPwUjX1T7PaIDLAL07nXDSCvGYF8YIIVVU65X\n0K9tSysrVanCIC2tNX6K50RdicSlAXrt4V1X2cplqUOtr0ok0tp0vex1M+jq\nDA8JTXxZ1DD3qRNxHaTxhd73T9C+ef1ujpVUcdIv8w1MzQeC3K8Folo5j/w4\n7MxZ\r\n=0D6S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhPNGO6Uk79m7bXe76xh6lLOkgfHrJBhYldK2zrxuMgAiEAoPdY6q5MWM9/gdmAKCkImOv1RCM2FhhvBGRFioZqHxc="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.94_1637159585408_0.0954066368197426"},"_hasShrinkwrap":false},"1.0.1-alpha.96":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.96+bd086fe","@microbackend/webpack-plugin":"^1.0.1-alpha.96+bd086fe","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.96","gitHead":"bd086fefa667135fcf8e84f61575dc72defc5eeb","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration_dev.ts`, `configuration_prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration_{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.96","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-vUU534g2eTxmhJo7KwQJeu4SBS7CYj4/GUkBdS89maHKZPpQg6JjZv1tpPYpq/k91C5d5d+/8NWruankAhpmCQ==","shasum":"47763e74b71af72be0d4b84a8c923b3030481c1a","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.96.tgz","fileCount":21,"unpackedSize":65561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlnviCRA9TVsSAnZWagAAjg0P/R6oV7biV4+MqqiW+guu\nZklZbe2PXrdST14nG7F5DP0yPt4sz5rPInKOpr06/l/MTnqZ5ITcE83xPfDo\nbRpzl8WryQRKlntEYwcjkfC1uqfS9CJCJjyIKTOAn3or1CfsDTOnWSIxx+eI\nfIXzI+coVuUpeg3nVDFQ2clF2ehj7amW2bRB+84B958mernZs0KKEDZT5r/n\nLwi5sQtcD0L4WBUsf929tSpliSteK++ktN1EzFKX8DmXNbT0qhvwxbiEdkDG\n+dANkE4cGj5LxzrobUG2hZRDzHELWU4BudxcX6gO2aGH0RICEavJYhru/38v\nu2+d3df4ydAUPfR1Qgnnml6h0kWcDKb1LCyaBJZs6vkPciGobGSaLsEvydAQ\nHqXre2WD2hLzGAFBAMrbv/v0o2PR6kypzRc44+Kpw5RnFAk1XUMprWQ9gx/Z\n/+c1FI3GBPn5GDSVWGa4SadAWVCHLQqd2ZiiIuF0byyFxOHfg3OOaH1lxpWe\nIG2y46wodEXBOLlMh8aMS8vOxh+sYMbNbRH1e6DYra2ukOqi+0OEKL9ipckc\nFn/Aop4uyTNbGV6jKe9zpksU7ZE5fxFqcIxmXHGhqeREp2tj/4iz+tXhzzBj\n1fYAOsRhJcNhfmlCik3ZvS+v0JthB/KjapfoU3F9Y2OMT/S7q1YoXZ/amzKr\ntdAp\r\n=eOWa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkHjUMfSQLiDY3s4Ic67uj2CaM1yIGvNCQdda5YmV3oAiBcKc+WQiz6dqPKtDci8NrcYaURL8Ay41mm+8Bm216RqA=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.96_1637252065883_0.15473249733352246"},"_hasShrinkwrap":false},"1.0.1-alpha.97":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.97+b17b1f1","@microbackend/webpack-plugin":"^1.0.1-alpha.97+b17b1f1","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.97","gitHead":"b17b1f13f216d921ff6a264b370c20b91c20008c","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration_dev.ts`, `configuration_prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration_{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.97","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-0WyI2SRK+MT72l49idmImjreJnfn8ejW4WtE8+XVzqGxErcd8AmU1VN+hKio7U7cY3zGLwsKUYqRSopiJbY7YQ==","shasum":"21ef71438b1b9c9008c540c4dd7d1096a1788979","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.97.tgz","fileCount":21,"unpackedSize":65561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlpg7CRA9TVsSAnZWagAABXMP/17GLzGH4+luU/1NC1jV\nc93ZMpeRgmzbGvS5UifURzeRMdURS+sEGUSRv+nSzyjx7L0QJ0mbw7oHUcnO\nCogRQCzH00eAgUSDIlASaUuErLMbh85PPKIBjobEcppe6soDBAI7LfZLXCxf\nAoC0DtaJx+Vu2FY5MHvD9jJRhL45GVck9Dzyk7/72tUdYjOUZTBaW3jalueK\nKG3Hu0Spt4ynM4PEs37JzhpNrMDKJHsCgH+MNrJwOmMbP4TszHW8b5oO6P+P\nMYI+ah5lHrqFj9cKESOnLzSZOF3gZ/JPi+FETWRnyZTDEnC3j5QTEJmllaVu\n0xKW9YsJ8gtahkpX3FEA/Oh+uTcMf7Vx80OrBF0JWdP4qNDnmqJHbkvBgvMk\nz3EUEq07RoxzasPGEiSGTPmXlhcZu7L5WFaSuSnO8lnmkU3uu9goUW+BX2JZ\nywFZJbgNO1KBXmec8UsJYbvyfVdkeBC2jIx2NuoqWV5c1ckNTEmdQJWrdoOQ\nxh6Nhmuk1bYc14/E0ALhOgSSRHX8JoeLKJKPv3kLoRLr2b3H1Yv1tufnOdRf\nKGxDJwZobfgjfuqlBjHdaJX9xbdPhBC38pZQHxdP5/MRfz4Bk2IOiOFHZtKe\npsq/DXK0a2lKz+fCWPzJNK+UpV7wJjzSXRBYo0P/Zc63rC9+JSMvCLN8nV/V\niF38\r\n=l0T3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDX6lFmq0NgNj4uV6hiua4geuMBKUzPmzJf/LKFUG0OAiEA+y2d5G8v7Rk3QYabFgcF7CCggirhvTERaaSKLJK6EIY="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.97_1637259323597_0.35328784154977866"},"_hasShrinkwrap":false},"1.0.1-alpha.99":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.99+860d78b","@microbackend/webpack-plugin":"^1.0.1-alpha.99+860d78b","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.99","gitHead":"860d78bec99d4c5b721e9d52cb0e7977a45aec0f","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration_dev.ts`, `configuration_prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration_{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.99","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-1X7cdLB811SQhzAzm3AkczwMiAhm2O6pa0eEvTMOnOM/Tz/pc8bM76xthpCwQogk6mc6UIXe/LZWabdHBL7jTQ==","shasum":"3d6aafb6a2f521b542ed7147daf18389e323b74c","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.99.tgz","fileCount":21,"unpackedSize":65561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlp3YCRA9TVsSAnZWagAAv2wP/315/qLajKF206nrEaEO\nDQX3c5HXZN/ClRboFzmOCydhS4v7ktVznHLL3Jpjj/0T+fEmfYurgj49LSD/\n5+PA9eXQzMODb1/EuDJu+SJsOR+UD4Bbjkn/ozFoRw9QxoAevgxnFDADv0S/\nmgH0oR2MTb+7BSVkBMD11cY+BB1z/xOe+OCV5aLfJtwuQSrHOsDMZKa358Ig\nGbQzlC8e5Ty9R3GQCSt0A497anoBYWhrA0FNqP4wnBhy2xCvOUGAfogafXKX\nf1mnQETT7iyBmn9k9oc6WJUFM9r8Vd0qqj+ls8dqzpZDMqSmBBpSveLyTQCH\nLsad1r1nnzAp12YfALUEsj+vI5VOVJb4h6nxB6Ky7+YKfcQNpqd4qH2KXelQ\nfCvv9HGmBsU1E+5GatuRKlkkxMnRBWmuixUcdEYE5nKV+r7lMh+z0L0kv35V\nzUs1wAbu8NGx8IAgDkej5ID9VYj3QGxK1l0oIul1LfRGKFzKc/VG9A6iPw3G\nwl8vVowrwcRYHGjg44Nrv/kNuKfCj190j8zcgdH40nWPKM56uHTa5hZG4mv9\nkXiFkW22/fHhlK0drFGfae81DsHwFVKJv6FdtjARARX/juCGOzaqjqN+Iihk\njEYylDwfU62vsj4P/DZbShIwllBC22fpBg4quPFnfzpGCnW4xw1t7TqwtsCp\nUDZq\r\n=ixxL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZOjOMWc4MgI/bkzHMsEBm+ESPJwU+WtCLx1A7dtjtaAIgZS3zFg1jI+a/HLxTmHPexgZqgJw3oUeo/ZIbGTZlCyk="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.99_1637260760719_0.22343835835251058"},"_hasShrinkwrap":false},"1.0.1-alpha.101":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.101+b714f58","@microbackend/webpack-plugin":"^1.0.1-alpha.101+b714f58","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","rimraf":"^3.0.2","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rimraf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.101","gitHead":"b714f5867cc568d62beadaa69ee6879830181134","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration_production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration_dev.ts`, `configuration_prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration_{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.101","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-e5Z7Q0DJiw+D5cejHcUqYmoQWKDavMt9UKydyBXOUQvCAIIqrOHw1vrSSnj2JoQEii5BSVgcUlSbl6tWYZMbOQ==","shasum":"653aae8550130e2f8409c69e76ba6ecde83449ac","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.101.tgz","fileCount":21,"unpackedSize":65615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl/dYCRA9TVsSAnZWagAAaagP/jasmJLEp6yDuLnhK3Vf\nzM/iBYTtq8HoSIWDD6iWhfv7mihCL+myzOk6sMijsBSTZXftO/4fnc6VePKO\nIEo6kwWNqiWuesqIVyu3LUkfiMtDtKtIjMKm9LeKaIWpD4lkxvRwrVrxKXpj\nzux9QqcTSTWp8q5qxS34aA0mOfm4I9iJaZbb1lsD+4Cb36RcfePvNoQXcJLf\n3VDn/MEApzmvDZkHPmrY+l2CcYFtiVozAxXRdnuWPDkRwlRpToWN3cs8Mo5S\nCEliwV7+U5iMtuwkM/w5GfzD6tfkBGcjNrzQIioDSDz2+avLSqjCG11pAH3U\nm1xQtma+V8AvaTLRpOhUOXccxvuRUbvBDhdcdK3P4dphiwHvCz4MXgyZgUbO\nvv3NJQMvj5e49jkCD3AKl8UXHr2CDf9T6KE5SknezPBSCXyZ+zu1llHwklYR\n0pEn6bzl4IqZvA4lf7x/Ou1RMIQFPWrLIET/JXznxcdEnHJH4hAtlb4k6JTO\nCjabNBES2WMhMrXvf8qLIASGzl8ZkFNS+QSW60hAhKrMJFzg/w/sNrLdzeMc\nffgTc0pQbVkxQLtqrWqaeFLnO2BwM+erEphCHFyOjHfpJPqsdnJ01IQbnv0Y\n83caY1/C0FiDVcdmzjMvsQzF1I5FCleMuvHf9GtphhoCNvMFehJn0cPaCBb6\nxEsY\r\n=gId0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGLjZOIk2TMvnQNkaXMsmini4b9jV0+SQ9PQczOYWsFAiAbdUWQzlnKKC9bk06K9jF3ShSEVcRJhCqoPgdBzGXQ+Q=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.101_1637349208185_0.11132918305843931"},"_hasShrinkwrap":false},"1.0.1-alpha.107":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.107+aeab92c","@microbackend/webpack-plugin":"^1.0.1-alpha.107+aeab92c","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.107","gitHead":"aeab92cb8898ce5d33a1113f006afe65f7f6076d","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.107","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-NZl/yf5A1RlcvegDsgn15q21NVzURVatP8AHa0ofCyzJJnjGSSO5031Np7c9GFMs5/Oiyi1IJuev+rvJx4p0RQ==","shasum":"2b7e4691642ba8299b22790f23a363042cea7ae0","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.107.tgz","fileCount":21,"unpackedSize":65591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmSigCRA9TVsSAnZWagAAdHYP/AjpOBIwmSftLLoeVg3Y\nU7B0I7Mm+yqlOHbxwxGviLOgM/C4uRVhBgeCSlvLwBdaT+FR8BShPtcJVPhK\nXZW+PHjumyXk70oW3k8gaEySOzt4Hw3J13BowjdWbRYCHo/g6JSSqIX1ubQB\nhMSl7/9y0fbCX8wli92jJmX+fcwhh2sq8uRsU2HHbeXiTkOGk8sH9JXmKeKs\nGdZw7O3HC9VAqAO7/viQkaZcGpiWkfUHH8aGv44jvWE8HR4F1Cw8Uv07P9VB\n3kAwI0uP0U9OMkawY6UX7X7syJeRTukWsgbccKs43YTx+brzsg21AD02MU/Z\nAWuiLD8aiszmORdsbQioMfQycNghh3HjLk5JpkN2B30YoH1SvLdRpg3QnLgi\nWmM0+WqSqeswAwVITx/AxZi+12M7BdlBWuGKB0DW0GMbjt7yEYMB7rWefQUo\nY+JTQo1LYyCWjA9FDtvWI+FkCRWdoyBKgvIf++h/uJDA0R5Xqw2CLtaECsuR\nPCRUdAOUPqA2bqQ/zWLU80yyuLqU9XFFUx3D0ATBhDXkbt42LBp9CKzc+VKb\n2fT+3ND7exIAxeVFYZLnV42UGLs7Ok0NR83ZEbOOsC0G2noj/slIHfmVmVba\nVKaFOipF0n+OlH92ZAlHQ0BTfDiV6gr2CvV2ABJwn1mkWsNlsRq7u4dgM8fx\nydRC\r\n=8j36\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJSw84QjOJur4/qDNAO0ajnv7gi6BJ6lisqBiPBNfNoAiALFfLPmf9654Xztheka+uY1uunrWW/czt1BtlqUzw0Sg=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.107_1637427360589_0.996045983345835"},"_hasShrinkwrap":false},"1.0.1-alpha.108":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.108+ccbabea","@microbackend/webpack-plugin":"^1.0.1-alpha.108+ccbabea","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.108","gitHead":"ccbabeac76934d93008e44afffa22b34999eccef","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.108","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-O/Knw7N1upchaeKyMKsLmf8w4OEhK9+v/RTbN8api3IbidLpkniRxZP1Qq8xmVuEMXkTwunz1Db5Wc5lCQtJOQ==","shasum":"6dcf3df9cb9e920be4fec7799b2035abb6cce7ca","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.108.tgz","fileCount":21,"unpackedSize":65591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmTqVCRA9TVsSAnZWagAAgjoP+wXtHU3ukmuaOQagP8Uy\ncraOVdMaGHs7SfNTkdB7ASYhRCzO9zuEjawHzKD/Hnji4SKw3CI8ZLETZp2Z\nN+Z/YBMKj/NAfRzmfwSZeCPN44MGHbS7giIV+2NxMT8Nz0AmyMHO47QjObfm\nYa8cEvcH9czBvvxw6gU1sutx9BDdejhjlsuwdN7pIpas2taV68jGpjL812zC\nCpKP+9P3SPhzr/u82sEppMcwIhOfShnPjBQmpVO5mDgBOanOuaaDdFfg2YIt\nh+/G6ULoarcrcH/zUTesoJAUwswm+42nAxYuTccZHo8n88b2I8lRmK4B8YWH\nbqo6C8sLm9eR8cZd+KLCOQtfYbI/uq6IW4e6FnXJ/ghcGOladCLreu6CCX2O\na+X92A/Td+ridxEkIx0WTrQ08ISGs78FcgQC6IhrBxObZbaLfV1xYXs4fvZv\nE3iyy0ZNsLTmbbdlAGgtn2If0mKddcABWYKDjv2w18uoBtyBaf58i6TF64ZW\noWYpqww3RGWpWYY5n8pJvalJdkGWwMR76gO7ALtW08cITrCAuSX4glrDn/gc\nn4vyWpdT3kqgMXmAs2M22MrdPJZpdD6FzS4U5x2HQ4lc1uZyPgT2ehSbe6r5\nJOw4TeTQonjNgzupo1qeFcjbiRP4LobN0Op/urXWMAOrXb0sy2ROvx+XZWK1\n24Sk\r\n=EG09\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkcJOQBWUVU7dntRwG1ldRXWnMeboX4G0dDsFU7rdSAAiApzBt2XMH/SBZK2WMD5242f+ns3FNj0cRCD3nSXDTEkg=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.108_1637431957445_0.531083822065735"},"_hasShrinkwrap":false},"1.0.1-alpha.113":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.113+19c241e","@microbackend/webpack-plugin":"^1.0.1-alpha.113+19c241e","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.113","gitHead":"19c241e3d3043890badf75cde7f2cdd2a9302395","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.113","_nodeVersion":"12.20.0","_npmVersion":"lerna/4.0.0/node@v12.20.0+x64 (win32)","dist":{"integrity":"sha512-0dGr0bEv9DhCI9E64hj6ht62uLWtyD7QGJwJNAKpigwOBCohPJaZhvPs6/K8EnsXBxMiy1IbEGmFk6IWoZq/Wg==","shasum":"e90d2b515582768079deb47a9c9144f1ba429055","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.113.tgz","fileCount":21,"unpackedSize":65833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn2qkCRA9TVsSAnZWagAAnbsQAJCxvq8pnpKt10iPaMMV\nziBG3Zd8t7ObzAf4txuRhm0eeDZfMJFem3KSlwyIK6JQmy6E4g2ChHCGeF6f\n6dtKGhm8B1IM+EY6FfzJhkYS7qhdABhMI+SP7NOVxK8o6yLQk452+1+eZCja\nK5WdAb04OI7P5cO3l7vuCYNmFJvsogpgZFfD9IC3s+Gew8A6ZBu71tX8ZoC3\nGwP+A9gXlG1cuWAHyKzzdBbcHMtP7wH1XMXxZJeYjb/Yu7ZwM4l9d5PoyIM4\nmzUtbNtl2fsVLDbK4vb/xSQkCQEszeZ8VQ6osS89ELIzOpmNfQXFxQmW4BI/\nf6Y1T9INBKABhUtjlm/SCBUe0rF3papw1nKzBjK1tAU/Mo3Q04ng/hUdi9DG\nTZ9hZCJKINermgIjYDNDIKOlkfQcog9ak7kwDFPB2IUG4RacNP3YQ8r2qe+e\nhdXxlBjsS5H/z2Uaak7TXZvgVLpC/wCQVlQogIyJICgItjuQR9e4uNNKjy0N\n2QqTCT5nBpetgdp1pPPWHykuCRzmYFA5c7ODYQr3/DeP/xSrsqUJsLKRKpIn\nWb7djNl2s2BPXnldgJIAZv4K+mGwkH41YIpyyHt0VNenJCnfBBBWed212Zx/\nX7mEC2KufJVMFEPlnSqd1j1vp5qWPoOqgwPUuKCIevJA7lxqi2b1JhUiIxk9\nwJ+2\r\n=hWdD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDqeTc3zbh46azVnQmH0bs+RGIRogHB0B+UTjukcAaYAiB2ntpCJjN+RL08fNfylnDGnkLZ8WTOtChiyvLZT9XMPQ=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.113_1637837476768_0.6488847935045781"},"_hasShrinkwrap":false},"1.0.1-alpha.120":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.120+a674009","@microbackend/webpack-plugin":"^1.0.1-alpha.120+a674009","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prebuild":"rm -rf build","prepublish":"yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.120","gitHead":"a674009b039b22884c48a1a84e9d8c49fb91edce","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.120","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-5HU7aIn23ogaH703g6fatuceli0kfyzqnWr7RkJ2oHxA1gp+AcnPxl0ULiSJ2j2E8Z09dz5Nbfnr8zfCBr4bSA==","shasum":"3bb9e888a95350c599fae759b151d07edaa28ff6","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.120.tgz","fileCount":21,"unpackedSize":65851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJho1sQCRA9TVsSAnZWagAAXfYP/1Xf1qCDOOe0FFHiRaFg\nsCvGcc9VnAGZF2kX4SAqFCZjgL37vQnB0HXv/rlNxXarogxat8rbwqraGM5G\nmeL+JMT8akd0DUIgLerrdHky+OjH7BgOyPu14ytpY4dXFFswXR9svvbA71nS\nBEgWag2MU+wKGOfFaHN7Xn6/EiHZ8J5OyFVFTb/QIttsf6ezBRbD5RATRQsR\nfNNyOgMuWO8bKW/G011+uB05n3yxk0RdHnw2rtsxnCqiRX2t+y45u2NtScCC\nWzHE4FmW92BUFdDQ7QtPnPO2y58LD146464HaT4uET+4qkZBGl5SQJx6d4RP\ntVHI9jV+UjPzBq21SpRYmLKoA+2Y9grt2FtnzlCg91ztrhDBciU4h4x9L/aJ\n785mbHFsX1kXgo2cUtl7RnoeQECFcMx8flMm+kGHMwPWX2e7WlynHtMEdwjp\nDiRxKKWTfPjC6OYGDgT3SAyqMZT+dvk/387WmIMsgFI2BhLNJU0LeHY9GSjb\ncTuu/hesAapUeQEBMMx2voY1WUSiRtlyCWyIKZHkk7QSdX62bZUMdSMhrh3Q\nwY91Fr+wXWo4ttaoBlAbJpmORJHmIrRGz9ecLB+p/Vz5jzm2v33UVyi/Unga\nSIEmLoXCug4EMZmgUDEF8lwjj7KrKZ4LBgb7nyoUqsLAw+SqxRsFM4B7PDGc\nSHOw\r\n=CYnX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWCJeScqJDoJ2pajMHtdz5NzELNjS2g1FFcboX5sE1tQIhAOoR1eMhRasMwtRvIi/e+o6YSkYDCkasawy+oIiAt7Tn"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.120_1638095632780_0.44702083151939864"},"_hasShrinkwrap":false},"1.0.1-alpha.122":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.122+bf99f7c","@microbackend/webpack-plugin":"^1.0.1-alpha.122+bf99f7c","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.176","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.122","gitHead":"bf99f7c260ed713ed569d3d2403e7bed18f3b571","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.122","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-nMYaKxHxbrwG8TQDoySOp+BaB7TvnJphEFPnURe2LsNIyCSMYvKjn1XTTeLIyipMoy0y6a3S0N/BAVZvf5ItwA==","shasum":"ed802ae248addccca43244cedbe54e2f762c4a8a","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.122.tgz","fileCount":21,"unpackedSize":66027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpmr1CRA9TVsSAnZWagAAILYQAJxFjPm324Fzx3EphD4A\nQX7ZTXQcpmSgCvgBLo61yYEkVCnKgB5G4wA6l1+XrM12u/xCZM76ACU6Thoo\nDtKPpn3/Uwd67PmFAahis5R+k2b6XaKiQa9MpYqkJqU+YKNMUs2BcLWY4LyG\nYxTc1wZDTvWOIWnUR/yKGY9vhqnuioRZaZW/0gZYRIKAfeFwUB4hMQReyWiT\n6AtIXyEkjelOoGudwCE2o+SkhAAN1wYJN85ntYRs2GXOjKX16cnN5ASwbb6E\nePoXMxGg8J7iPREM4UfXgnzGmd6GCCGig9Ip5YHhpJol1ykQ0ZJmLfN8X5+R\nkVSlaYP5i/h2hkhKwx4Maf7fgWT/NW2REIpb0yoE/9oGhW+x67gMSbM0/jq/\ngwoRy+sZvvSuv3xOGnYidJ47utDVtKDITxQnFBAa/BIYIAJaq4NZwJJvrp+Y\nP7smNLdiUGCkaJm9C/nqSOFgUV++RtIt34rvi5a34iiCyLHzE725LbZrtuhH\noPlkj7KLT6271mYyHWp5RULKUyYFBRlXCiLHEM4+XKCaNp7J1nhlA21ujLi+\nK0ZvKw7Z1pxtG4utEJcdrZqkcW7x99gcBemIFrPuhjX5yVwUYHVvuWaolneZ\njJfHNL/BTKqQg4U2ap6dAYCD1NpGmIGtERkDKbl58fcs6ZOCZMimVWiZA9Dz\n6IkH\r\n=nPg6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8Nqeauw59+iSN/yazIyepPzx43jJNBM4XenW8FU1r7wIhAJnrMZqcpjy/7j88RQAhbOThp3kDtcBj4c3T7IlWXUNm"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.122_1638296309385_0.6291311016759229"},"_hasShrinkwrap":false},"1.0.1-alpha.123":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.123+e6395b0","@microbackend/webpack-plugin":"^1.0.1-alpha.123+e6395b0","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.123","gitHead":"e6395b02a7de8e9af638872440a216c5b861aca0","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.123","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-akYqmLdYRgwvIjOaJAu/BvA1AEOtpD42dabdclFfHi0tg7z4mEVtj4ZuHBpomZntNfXJGjqyBVGys+wOzHbYgQ==","shasum":"031488ada11919ebdb015065dba31934b9c2cec7","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.123.tgz","fileCount":21,"unpackedSize":66027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp7zgCRA9TVsSAnZWagAAAG4P/3QQZbZadTYBQCMPaE/O\nZvIH1LlJCoq/dcAzr6sg6bx+aMTKSpYtyN5t8ncH5emFzZconFV4zM05KFox\nFbZrp/B/a97/bvJd5l1PciwCKIBSGt/HiXvebVaysYGnt2da45mbuL+nCEN8\nICbZlV8CTmY4g+sssCjS33dk6XbbzMDx7nlMfCncHp6+JQeNmGc6m9h1yDw4\nrJ6TCdx9AJDgeefHBUrOKDv1A+PLsXBGoyMhsTNPNDw5QGEpcFCMoaKu103J\nkpbdE/0Yr4xbsTlI09hA3bf94jiRcgGzHwEwMNw5mstTLIA0il9T8wtcnG1J\nv7RbLpYaZt/n/So1YFGRthhK9K1SwiWYMZnV+HnLB3dUFT+9n7koPxxrbs2c\nH1uXWI4OVexSUNB+nic/l5pfq0cnk9HaqyPiTGbz031lNvnznSsfT2m5fGiV\nQid/I/eWs3w4BClvoAcqJlMADL2oBpmucEpR103i18xkGvPhAu71xqYmqPEk\nP35kfR41oOXk9+80Gm3/lv8+Mplh5W5S77pxKplSsJ4UcWgU6qLxUXCstORw\np7sHOK2gHBUn5oW1Iw2hTlVoNSjkgl9kfg2ZYuoi7t2rAN+JvcMDHWmne+gs\npUGjt2DZHdIuRq4I+g9L54R+C5rMuhMQ+AuoVez4GIPNIQpn8evKu7YYvNWC\nUXDz\r\n=12MJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5Ozh4ZeRktaVwtWSZOmgDFVRqFBeO756lNXyNvjH/EwIhAJaGMasXcTWqb/C83r9d0dJRy8MaBo9+WQVeybAmfnXL"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.123_1638382816443_0.33582866867988237"},"_hasShrinkwrap":false},"1.0.1-alpha.124":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.124+de19ea3","@microbackend/webpack-plugin":"^1.0.1-alpha.124+de19ea3","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.124","gitHead":"de19ea3f8725dd48debc5d00a82ba7d3e39a0f17","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeWebpackConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeWebpackConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.config.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.124","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-sZXJqeh7u2TkAYrh9Te+k6kgT/XYhNMKmoMtbLyhuU9KvzDUZri2VeaVZTPzKNJxuZSCNv44WzFU38ixTw9v0w==","shasum":"53632f2bd7ac3262691c3ee69d823e0795b6eb49","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.124.tgz","fileCount":21,"unpackedSize":69620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqQMFCRA9TVsSAnZWagAAbHIP/13+oAxIRH3L8phxZcg6\nWEh2tw5t6G1fNjdoI1xUqtlJsMsMRPBxVhhadzolgMkdTNcYmcibOa476p05\n3DmtdZLEbj8Wd7IXgfNVOFqnVacDDgphlg8fidOgHmvi5g6TJktj4AbkUe1k\nUT5RCH9OF8+r7aHQBIrwBuv2OYnGk8V6biWZwngO3PmuorD36kvHZuMw7/3a\nRdZ26foQbP4k9yWCz05uXXx696ENsJR5FMklN4Lx4VA/JVcH8Fag/H/O2+e6\n2SfbbSRxg25zPQT+J476KKm1+94m8RHvIexOLLoGp76APpqySGYEUIV9v33R\nEhxMiS7d4QSy6zxIP+w5DdWL2OEzbDab15NIbcC6jXNfw/Ekl4e1p0ygpe6Q\no2hytcc9+Yi+uk4IpTySAsPT2/OlgG4o7yrgagndpJb2uaNokmB95wcJorO0\nwGCYQC9BKPh28FWxM4OuAitflzG36PM8x/+OP+C6Sks0SMhZwJsd6xPNt35V\n1vOreDu9wr1xi8lJTyuoywAU7hFiXku/RzLOyozBdnqbzzkpEEcZGuwee/Tq\nhh/Qu8TgFX5OKHeCT3wJuQmo1wT9eDELwK/O7/MTrYeOd9xGRDOtoPoxR5IG\nfkWr9rzosrhnYG/ej16TwRrJGw21iIEUdwlD1tg6I55xMVznAnyOmHrlOjbe\n9bXG\r\n=d+Mw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWsVFgNxGLQP1xGldi65px7zrxmZi705uE+XUaT4DndAiAG4ZVKt6j22vZV5QaYWeiejlpv7QxCImheLCDUulT2zQ=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.124_1638466309217_0.9813517476567859"},"_hasShrinkwrap":false},"1.0.1-alpha.126":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.126+23feecc","@microbackend/webpack-plugin":"^1.0.1-alpha.126+23feecc","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.126","gitHead":"23feeccadc6cc31223c62ec4062813aa77782e1e","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.126","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-6EVJIUr8lPhjNS4Dq81O/g5CekQ6i7a169FP2QJ+6ZPEhnQSJ2tM7EF3Z7v6yRnbANk4DBo+sN02GSiJRBwdmg==","shasum":"e217b9a10963dd1633c1cd221e201107e60a00c6","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.126.tgz","fileCount":21,"unpackedSize":68878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhquBsCRA9TVsSAnZWagAAI/8P/jVEsPVfFmtwPuTZyQNn\nhmnOy8GXzecPVzDGdhwcAjmr/yiDRVLE1i2Zv/wweVdQXNi/SlSMEFXaTxHE\nVCmhZg6bvFGs2hyA5jMX9zDaKY+bJYObcygTxO0CQNo6IUf0eQHCOH7Pvh0a\nWRvAz/TFOFWOlWXcMyVokScBIc4gtqMMt8AcTlXLwKjDS9lI0+XECSPpEOuk\n8PX3y9JRvRLXE/VkXnujDFQpQY0LJXp40IBrjoo/7DcKf9v7Ix9taYLyeVnL\n/tpSlxxeuonqql1J4SSxP7SP1NLfToGlLie0h2t6vnxBKpDzFdObOx1i9Cah\njq7+9j92vyyCDM/9Apg0dgc4Mr4bl24GPMTJOwr9B/hU+ioze2xCEZlY0wd1\n09xHgLZ+OECc1L1LhdAiXiSRgg8tDNsxOShURpEesBkKCTXH3q+HodQ1WL0z\nGDvt1B/EmoIBySRPy1rJNDU8zKZsMVKCb0g/DHHFhMKC8JdW3EhjU9ZZTbcs\nrIv2d7Xq20eivN/8mVnlmbubugy+hulyQv94E+jDc7jyVrctmRGQ2IDW/zDw\nDi/PLNWA6TUEokiCgUOta5s+dOmaopnGRbacsysKccV/4Ln40YFB6wWFX9ma\nU1135l6pgRyQq8ltDLnDbnrEQV5fLZnuOc9FH84/lXm5MLqI3YDHoR7MRs63\neVga\r\n=66VP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEG9WE2ro6h9vXGpJSGSmpLpnScihcsCkDr7Cnhn4bNFAiAzMEqJNk76gjsArHPYTbioYc7xk/B2QExS0sI57V6QnA=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.126_1638588523963_0.43596818215775457"},"_hasShrinkwrap":false},"1.0.1-alpha.129":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.129+4a4abf3","@microbackend/webpack-plugin":"^1.0.1-alpha.129+4a4abf3","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.129","gitHead":"4a4abf359896acf0bba147738570b8e0e6a1c443","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.129","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-3umhDrMEntrW7/0PxctJJ0PQY7AZo82/5Kbk9BjxNi79jzNYLw0YDVeuGYaQYXfxah8ceiMPZL5MJMUeDIRASQ==","shasum":"c6d1c3e1eb3fd221e13feb7c7c4daf99e30c00e0","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.129.tgz","fileCount":30,"unpackedSize":86466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrIV4CRA9TVsSAnZWagAAmwIP/22nYT2pyEWTtNNR/54F\nq+U98EdsVv/4C+gj9SmqTCjKSeHy5IJ4gjuHwW82flTz5GWmzUPSh4SFl/Mf\nzTLLAlz6LexCUXEINAv3S1fFRS1EwgYGhg1UIWYMZ8cgDSdmfjXcEdKhAVv1\nFrmMmil9DtZ1xe3ZpjNy1/zouZi5IViO/wpOyx8OOtt0SAFFGgrmpra0tlUk\njQP/tOn/Vx31hnQEL9TCV13nyKPjq+HYe6C31BZjzMMB1gFBMHRq+EXU6ZB2\nFYNJHdGmZTfEp4B1JdMlADGaVtaICNlsxBNSwjtBKMJKBxtfVzJ/Wrm1MBhJ\nqGGL6wEV+TnUAInRK44RX0guXM6KT8nWT3y735bk+uF/1P7AUjysITvbcS0D\ntm1aYR0vfzMNT+3879yLIh88v7qGFZDgWoVRuUVmtZEtCg8mydLw4NvqQSvO\ntc84j1EltOfrmw5ujfIkN2hbLK8aSVwRflfHeoik7DGazXkWfG//AQYxBRPE\n8S8EWaS+7MJoCp1Bf9EN2OONmY6GaZ03wdfneeFE6yMBuKSON6dupPdZdwLk\nemhWaiHlaJLnCuMY1KkFSWvgLUbYXT0cx39ACrd1cJmoxJG9nODurI6sl4WG\noYuOf3iTGhFAGGCE+OcVNaK7uOrg91E3bKwR7pluhFdTWZ4I3HSwZazmhVya\njfKq\r\n=gFrI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzwXyvbwp/QSsXRFM/Dc7PCj9CDtWwKMFgVFn5K/Zp3AiBgH8EDUDh1dvlO3Y/T+07cf5D0QCyyCn0kA8Mbm4cxwQ=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.129_1638696312313_0.5848789175589577"},"_hasShrinkwrap":false},"1.0.1-alpha.131":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.131+70d0637","@microbackend/webpack-plugin":"^1.0.1-alpha.131+70d0637","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.131","gitHead":"70d063748337d60545229d8e2a09cffae954c5d4","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.131","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-YkhV4uhPJPYw1MaCFNjyS7GeKc03xrIu8lXNfSpahb0QOs6UnYny5ITSbzZWhwPJwXGtRwVMVE3HxPRKhr+6Iw==","shasum":"d1f36d44509319d6416d2f42455c480f2b6f98b1","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.131.tgz","fileCount":30,"unpackedSize":86362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrQBHCRA9TVsSAnZWagAAu5cP/iFJmhQaYj7WXESSUpHf\ndJkq8hW3/9QTEiFzqzhTSmJjzFOTNcFfTqnx2QJfqpFb46wmf7G/ObJ2X/Lo\nbhsDVYxKSX2Z+pbNEsGgUDpZhJPkYdpENtE/cZWEmszpcKr00GeHOkJsc8RJ\nUN8+7zpcpwJYyQuxYklrF6T8PuSvJsDQunSK3cdWXSLnWJLHTDN3zatquQS0\nUlLGtfwUZJAnHyYYG0mo1UrJ0SLYx1+24e9P8IU+XGLKgSJ717KBmh+A9r3H\n7P4KI1TuxHKZF+0CeiCiW7XCEN9rgjprZz31x9qLXcK8Qf66pUbQXSzOim4p\nnxgiP92gRVu0em6oXAtmOhhx+1M5e1YtXlGjCpEpmorwrB0WbRZzdK85zgno\nIXYonxoo06G6fBE1y+zHh3DB4A3bputhKl7WafYC1bt98ipkC5WEOKtOqJau\nBFpn/BBRGVUUSRReOLHPAx09WsBgfsmDMHk1Nj6dafvAkL7fBzva8SXyD8Cc\n4zp4f7sZsE+edcuOMA1DHJNxn+4jK+lsb0O2JMeK/jDy0sA/r7T8hmHB6u5+\nb580fuV+P7LVc4eLGUi3S2XubN+N3t4Ht9yK39VMOguJY/rpwRrjepx/73Jj\n8TUO2YsiLfN1YV5ZM2NM3edp0dchXqQ3e0oxpYH308mgfNVoIiyjhiS2Sc8S\nkeGx\r\n=XjD5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWkoxXukiVxRhbfSkMeyHDPBKZdm+crT2LPCvGWKK1+QIgLnXvOT0JH4e31PYXmIttc6TE2nkVNtMqAKpa2/dDbBA="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.131_1638727750919_0.7533530682422378"},"_hasShrinkwrap":false},"1.0.1-alpha.133":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.133+fde7186","@microbackend/webpack-plugin":"^1.0.1-alpha.133+fde7186","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.133","gitHead":"fde71863c3cc4409e1c31378bdad4eed28c84bfe","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.133","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-KcNsvMiu9GYvECyE8sliYDy2pGPw84Wt9kfISC93fPEwqd1ell2heELtgPhvScf4/WeKQZY5oEn5Fa/PjTxqWg==","shasum":"e5aacb86854f370a502c290442a3585179136616","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.133.tgz","fileCount":30,"unpackedSize":86369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhreRgCRA9TVsSAnZWagAAv2IP/Ako1itV8+4a5FjI+ztZ\n/9q9Rqo0y9sdXRFA1hlPxq2hqbw1UypfLs5yQT14Zp7hxvRPUYgFZeQl6zj5\nNX7FyHExmF0c7dNDyT2KNwLrzzUZTsgb616MVPSEQyUKqtNilXXmDX4SjOvK\nCFTAiHtHZuufSMBhGHHNKoIcbfFzdDvlf0LS/BKM23RBTOPkXriM/rylTd1A\n3LZTBRgp5g0QEktgJMFOUnFQ08KaqSDWf5DucM8m7p9BpJpVADvJut0BzBtS\nPOv2YdfY10+6zBbtvyVJhLBR4Adp9QPfTFNi6xbZvMSHBvjQPrRAhFaMVNi9\n2+wrOyrN1lAuzyEwlbw17XbExGZLGxKJenjimWUQPC/AaoopxYuTLJ0/iJHf\nYSrgda5lq+7pr64G1p243uandbVzwZneOyhmXjWFeATE6D8vQMmBgo+zSg64\nDA+THpnyr0td/KA9strFNoMMp8LAH+j1LtDJt48UXHlDgdSVUckGWzGgs4PP\n6SonU/6WBibXQI4UKXkuPHzS+CukAy8lje2SUl7XBEDsn1h588H27yp3kYCt\nM+5/7saS1omkRdHmd6RZBBfhW3srDFi+25UCMd9pEuJO+4r7kjjhi+7/qZ8i\nYr8scqcK2BhnH89d5u/dpcqH141rzhnNyFnS8x2ety6RFwZoWRRowUSIS9FS\nMYP8\r\n=e6GT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAExf4k0H49Egldoyztto/u5sYGqwIIYl9JH/zdfe+7AiB0J5vBLUFeEtg4G5LvEQ0JmNz3EYHif7xMgvqikFUEQA=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.133_1638786144777_0.5453928196766733"},"_hasShrinkwrap":false},"1.0.1-alpha.135":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.135+6123f10","@microbackend/webpack-plugin":"^1.0.1-alpha.135+6123f10","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.135","gitHead":"6123f10e2bdcf819903bbd0e3cec4289d50d9bff","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.135","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-8BJbwqf1uy1YcGAQ64PTKUySPb7+jmQSvULNuAF0hAXoIHIW0FDlfVZDpTtlzBihdZBA9l9z22bqiEAWMLHMzg==","shasum":"7fe0afdceaa311548134fee84b371acfd5122c2b","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.135.tgz","fileCount":30,"unpackedSize":86378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhriYQCRA9TVsSAnZWagAAk7MP/R9YWUODqCIodLPb67DQ\nry6LK4lbb2bUsAzRoXr2I+vPY7wC687gRg1L4FG80oL4RsRSAhvJyUmLAQbz\nhkJUXf3zcQ/07VcY6VG111qcYxN3A56m9eAlEKLbZnt6Fi8rjPq2k3xLJTiS\np4hcGffJ5KFIAXRCSlKGCnCaLye2Il9o7tUdCVhbzai5TLp057woB/J6yMeN\nNuHvjleHFCF1x9PUPckHdQQpUEAoMQQl3ehsIevpX3gafwLhq9xSHImQszJB\n/mBDd6dQo8c5YPkJWMbPKyLnM8xrQdpkfc1xcVTS9ZZw0zXyKqhrLyU4WH1U\nxh5poQ+rHvmNCfVsr9rAvWuFzJnZ/YlPm+0H+ghrTepucodEzRSRDNuto5hj\nnv1yNj1M9WMeQOzuE6roJB+i/MRwDXL34lTMCoV/XcAt02YBaBvfz1We0OsP\nRRaVDlMwIASGlkiMIur/GFMNOWEQRHyUw6IuZXup0vmKRADlqMZ2h4Z7RJgT\n+938pTBrXk0yaB36Cgaff/yTTm08O5sQzGapGuZew2fD1CPYCQHRN/4sYuul\nwPS7iU3h+0DGQCPlzxa7Ghv0lw0O6AgQNGfiKSG/8v6A9mIcpk1U+k0mOxdK\nwofErGgBKNOYMkA1rNintFwHTK3W62Q9gUx+Yxom0IR5jMvjyRUqHlIFVjAq\nXjp5\r\n=2KNY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGi2A7g+UK/gPSRfoSJG3vjoEm3ycBVB4/JC4qyzm1qwIhANfjQcwq7aZCWjomdzMZZpCWagxJdFsSI05BmsPkb7Do"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.135_1638802960812_0.008773083191979225"},"_hasShrinkwrap":false},"1.0.0":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.0","gitHead":"f11865cf12e5a4d86eb48fb9e3461e7e6a8352b3","_id":"@microbackend/plugin-core@1.0.0","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-dx9Gf38h/pCVAz5gCYVxwOxEfkucSBnM6iXb4+4GtVxVAkU/QD9SlJzyKOpVel9M4zyTaUNXYtGOv0eF5F3S8g==","shasum":"b77cbca8b44267a7c31cf328836b67c3ac3e721f","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.0.tgz","fileCount":30,"unpackedSize":86324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrs8VCRA9TVsSAnZWagAA+msP/AurzqoqMjjC/82EMsDN\nQN5+cOUrRZuOWdbbHwkojLs/5hFbCZnb2hvIsgFlvPqIxToisrxsMrMFoDV7\nu8ghi7+JouDYI0/zIFPnzix5L297E+3Ipih+GWaZ1JSUDIaJD+uMXaPVM+Nw\nBJiB5X8fXQRNoJhWUqsi0XRIZnUNWnub708yTGy0bIiObFlDeSo4JLvdjWat\nENG4IEW8r2uuBuILLMDpCZ4lU5l5iK+8nU2h/XD76yeCUWHtZFsLDNLjtixK\nXDKTuxGZ1+NCBSgWCill1el7UlFjoaZW+jDV1laPISFNC6ofw6wPv5CMz96V\nOwlXDnxnNopO/1lLj5rcfgTc3EaF8DxRxmEnLKJ9/v3hhKBMPulypuo35/ow\njqY5S4oeR1XfKBfRCimHeqHQxrWy6Jvrq2q3S/XHTncPtI8U1WO2wCVE5Jzb\ni0OacD5cvoK757AiQN8Juj3GmvzqfFeMz1KivGdzlo2fmx5fL97A7bT3Umx0\nXGF3DXrTLMhFPEP2FykXltcMM3x6x2SrrCndGJpcXTrK1sueSjRorJHLtv1y\niN3OVnafz2TXDHkNg1h8hs/K92IiitGLuIQyJ0BCUB4odpI/hX996Ff6YNiM\n6+pzy/NVA+soA+OkOvsIYFvtl3npbUDytaFB2w5KCOhc053GkONkog65i6Y0\npcd2\r\n=Ltrb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHejDofPZGCUtrulD80hw9mCM1tA649esf71FVSgTgnEAiEAnKRu6W1nQGmleaV/Q7TdmWHOUGdvIDBE+tRV90Hod94="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.0_1638846229504_0.053252464157340196"},"_hasShrinkwrap":false},"1.0.1-alpha.0":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.177","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-node":"^10.4.0","typescript":"^4.4.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.0","gitHead":"f7563d79b6f145870b453d6f2fe939b3c69bc937","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.{environment}`:\r\n  An interface representing the environment-specific configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.0","_nodeVersion":"12.22.0","_npmVersion":"lerna/4.0.0/node@v12.22.0+x64 (win32)","dist":{"integrity":"sha512-LndS0pLTs73LMd3JyJtI+8BH9YoY78gYrjN1F8/9Uo8P6CS3lu2qqOf8f69Zn+AhqOdcEtqA/Q09bhEySovdaw==","shasum":"7f380ccbe2b4ca992e21fb69dff7e9a2883a58fe","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.0.tgz","fileCount":30,"unpackedSize":85731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhru52CRA9TVsSAnZWagAAhScQAICkKUOoUba0CMrhv7Ln\nmsZJ2Uf5Yhe5DkSqIppMIgxpyhoF+jdyKtlE6CmekCUOBdgksBTypj04IiKs\nAeGBZCC6mSORtVBZ/4/33E0Dk3vaFvv/hX0VASyJfNxK5btf9IJPVsxd/GVR\nWxYUQIU11GxqnJVFyJOXX5bKJA7YVaJdkgdURzrV5+C9Oknw9lbCh8Z4gvgL\nytUhrVXuzFPxscGFd+f31d8VY2/gJEbrIk4rW7wfLjS54lsTkgrpWYbtRB2g\nC+UoJS1i79kmU4LPr9d9LqGQfxlSNMIyzGsK6SqXZnW3Ys3jAOr5NbRLU6Ty\ngEOhQD9bCbOJ8wFb4TLHHQPcUm5iyOH2MjedDY0f6DB2TOgkH+EyYMYdEzk1\nnz4iHnh7v9ZmdciSTh9ugFuLiWMVcFNqcpAie9ZaR3DSvkY2pi37/bUFHC3Q\nt+STjP3hrZ6RwFYB+tqv9k0SkAoDars/Yk4rSvmeect6cJCgRuVKOHYPmSMR\nHOYOulbnmAX3Lv+4rEPHHn2dd8ol8nJGn7eP7731/ID4T8q1JOCmma/8GvPQ\n67lErWDtjNO40U7hoPAT+bOt92QE24cUcwbZ401AjTNfGuwDbfOUgpCoCSXc\nsS76D/7quc0l16HfH1RCAmnkxW/8/HREXubcmyCfrHG/vfgV21fuVXSGFJCn\nV+W2\r\n=w2Dj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLFsdgmii9Pk5GqYqZHC/bfnYSMXuEVVGL47vWzThn/AiEA81mLy3w9zPi6P1uJkOQbrdYZ74ETwATpEZVvvpIsaXQ="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.0_1638854262133_0.2959757934829357"},"_hasShrinkwrap":false},"1.0.1-alpha.15":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.1-alpha.154+7602e6a","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.15+7602e6a","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.15","gitHead":"7602e6aae34753dcbd1c016b9a2b79d187fb2571","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains core extensible interfaces and extension logic.\r\nThis plugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/init.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendInitFunction } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendInitFunction => {\r\n  // This will be called on application initialization.\r\n  return () => {\r\n    console.log(\"Initialized\");\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In development, this configuration will be served.\r\n    return { config1: 1 };\r\n  };\r\n})();\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendConfigurationCreator } from \"@microbackend/plugin-core\";\r\n\r\nexport default ((): IMicrobackendConfigurationCreator => {\r\n  return () => {\r\n    // Accessible via application.configuration.config1.\r\n    // In production, this configuration will be served.\r\n    return { config1: 2 };\r\n  };\r\n})();\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them. The configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\nIn short, the extension patterns supported by this plugin are:\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendInitFunction`, supported by `extension/init`: A function type\r\n  representing an initializer which will be called before the application starts.\r\n\r\n- `IMicrobackendDeinitFunction`, supported by `extension/deinit`: A function\r\n  type representing a deinitializer which will be called before the application\r\n  shuts down.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.common`\r\n  and `extension/configuration.{environment}`: An interface representing the environment-specific configurations, and is accessible via\r\n  `application.configuration`. `configuration.common` contains common\r\n  configurations for all environments, while `configuration.{environment}` is\r\n  environment-specific and can override values set in `configuration.common`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`.\r\n- `enhanceMicrobackendRequest`.\r\n- `initializeMicrobackend`.\r\n\r\nSince this plugin can work for any application that adheres to an Application/Request\r\nmodel, you can import and use these functions in your project like so:\r\n\r\n```typescript\r\nimport {\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n  initializeMicrobackend,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\ninitializeMicrobackend({ application }).then(() => {\r\n  application.start();\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Adding a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.15","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-7ECxBsWdla9RkWcUQUxAm1Petn/9pkPCFBt9vFXyOrHGfI5u8fj7/3sU+ntW8lWLwIyfxLc/+VniOL8vo3KYfQ==","shasum":"ffe72d701db2e7b37c141314e1176bf9d9959229","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.15.tgz","fileCount":57,"unpackedSize":105325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwJ6fCRA9TVsSAnZWagAAtx8P/1/+R56eygRSEzRt/UeM\nchKimpyR/5Az2hlBuOf5VRhUtFELCaLcAAIkxWslXRYVdhJ2NBgDHVBnVxVE\nb1+CQxpPvadLrhafFgtCB6XPN5YRd1ajwckbhhL5A4lMgyQM/nSijM7dCYWC\nGjJbmTNZcYTUCsNKfP9eJEh3XxA7HSCNXgnDUwHSPPbWaT8vZh2fgDJoPck6\n/4KkH7SFlP0vvskS6D/WbzClNDZIPuEsSfUrmN6Z6K/QJfrPrt/Xm386OV2Y\naD2x6rL10T9vXcUvzHfmFkMgG2szeoTd9S5EZFe9CfQYQ2RdBguL2pQNaxFQ\nbCgoassuJ6eXigUGduESTeGkmWz1Uphy7ju3y2YZ4LiCLdoRwAPZ/VteF9v6\nKurscYSIWbdnsE59yeejlITu7/xWoy8kU4WkRR2FgWMqkAm6EylDapqG2/wy\n3vCue6nGkayyloH4bDLWgYKr8bCLoH9wAWMwX0NAYH//PVeGcmaLWJ/Jl3bx\nMiCeCuCRT6E3OXLLsM06hGupSYyLpsP5kWYQMtWOtwjSfNDpu59fF/5WqMgB\n1wQaKybgk6mneMzi7T5Zq71I2kxhkZQeMAIUQ0v5lUZs8wNnepZetb+aUAQo\n42WZ/DKb7sYsW2idnhhgPzmHo4+I2mO3aZCwBJNWhE7vB+8GwfLxNo8y2l9y\nMQfx\r\n=2E9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/qi5Om6ZCDUReBYTrdqefzKq+VdRo2Ff3tWk2oNGo/wIhAOyRdTrytNwbKUww2vmAe+lVsAjeqUboHnhYP+3e3nNJ"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.15_1640013471370_0.6201403925699158"},"_hasShrinkwrap":false},"1.0.1-alpha.26":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.26","gitHead":"2de6cc469a1090e3e18fd6c97e68093e01107c4e","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class DevConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In development, this configuration will be served.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class PrdConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In production, this configuration will be served.\r\n      return { config1: 2 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\nThe configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\n## Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.common`\r\n  and `extension/configuration.{environment}`: An interface representing the\r\n  environment-specific configurations, and is accessible via\r\n  `application.configuration`. `configuration.common` contains common\r\n  configurations for all environments, while `configuration.{environment}` is environment-specific and can override values set in `configuration.common`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Installing a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.26","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-RkQ77gqmXObl5NXR8v7UVtyAFNZdabdeXDN6VJq/zvfYYBsWFXKF+McVqbZOltrryhWs2VjZGgQI9kHQCyCObA==","shasum":"645a8e3bbd9c74428da255c498bd1d4f8785d339","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.26.tgz","fileCount":54,"unpackedSize":101392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2XdYCRA9TVsSAnZWagAAPPEQAJSSJL8eK3UXXchToHnc\nmCHnlmAYvZtw6d7ldxOpKMIfuUMu4SGLLrzh0D35QSlX83XmbBptGDln6fBf\nOmi9uLlJC6AfsJGKoSvq/j/1ewyhBaJUOUUPKlkl2B0SxCkMhk+ulw1uw2F9\nGyy1KXOa+ML2QiYEFPa1eoURKl7/hx0BvEUh+Lx1i2RwBw8VHZBPVJdtxq6E\nXyQs6WsteBi1NOnxdKqz74JJj5JejFS0m2TTB/4jDWpoOs+lshlrbvuVsL41\nrZJPcJt+Ys0fOrn4mKc7NrRlpiKnKajuql/YPezKQSac7kETXEHJ+Td3G3kt\ndVREt4wTxQJ/mzGfDgJ0R/qVC+YBIcPooCII3Kob5+aLVtIM/KxjCfUr9dP4\nz0A7UEakeLaxA2grWtWC6bW6gmWqaYFHXB75p5l0lb2GwTokzIIBnYEvJyAH\nO6YUywdVTGM3Ct3BqtditPsKwzNTuP+SnDqV4Ff/OziZthztEVPIFXzeGBUa\niu58qCbDgkuO8si/dMiAKeUnkiKFoAEojn10/edJG0hewVRuZY4VB3hHgMM2\nzBjjDDcm9LdaHB3UT3BAOSr63+vx10sVb0s+vlWxAyEGC552GOjBJBZKi9NV\nfoULmUOpvwHlrI/KTKXl1fTK7+TXRt1hCo0qM0EM6UxxwN14lVRp0jqOerfV\nYcXb\r\n=lGsx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChDkqiVdVPvAzW3JGBQwYbinOuheQWQL8LOCXH/1jZ5wIhANf88J5AiJe6Mp/rWpn2KIZSSiNuEFo3JHWiHm7FtG5w"}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.26_1641641816099_0.8915790530149996"},"_hasShrinkwrap":false},"1.0.1-alpha.27":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.27","gitHead":"2b32fb361f88d9fac3cb1a019823a390876dcc54","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class DevConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In development, this configuration will be served.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class PrdConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In production, this configuration will be served.\r\n      return { config1: 2 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\nThe configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\n## Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.common`\r\n  and `extension/configuration.{environment}`: An interface representing the\r\n  environment-specific configurations, and is accessible via\r\n  `application.configuration`. `configuration.common` contains common\r\n  configurations for all environments, while `configuration.{environment}` is environment-specific and can override values set in `configuration.common`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n## Installing a new plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.27","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-+HRreG945NOlFQTQKO/hKXXGsGGCMDvHaJhS1o+BTLYCMkhtASKsQ9eODLESFqRwd57/CMZOfyH+1WVa9v7W+Q==","shasum":"9643a8779870c9f8a9e7f1724252af9c60b16b29","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.27.tgz","fileCount":54,"unpackedSize":101354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2XwECRA9TVsSAnZWagAAp4UQAJM53oap7H6avfVrHXJB\nzUdPeSv9hEORTMAeVwH8yqZcV9Yvmbo2VIYcyNVXXsDO4XIUzkd7E8WmaEmg\nmwPEz+r0PScWRWXqhzSxZIKI0ZlGsCYVFRn211rlbV45ekgqglLGd8vcGtr1\nYtbI/JeclMa7CmT+NIa06+qusp3O0bcsJpOXOMrFx2dj8654O4NZY7/doFQb\nspYMV6cb6Epp6zVdlQ23mqc56t1S2aBAOFloFzd/eJiKtRXp4EFQB/ZJXISc\nS8MuTF62bj/8aq6piS4kwURiZmQCM2cto+7n/qG3lfcLaNr2XeFp95KKYRGD\n0DSsVqkyMiG93JdTp1iAZ2w0A0vcqu8P9ooSuJcVKvn/tm1yOEmawEfNZBHS\nyFu+74sLFHfti2bUAB6+7IBpqegLPNK3RrIwXG/agpCobNR2gjwisrWaIMyv\nkalTYkaeC57oXX6Pk+fdVt4F37oNjE4S4zgCTd2Qv/QRLrNTJaJDzybOyOCX\nQiaXh3EsKLM2wZomsPZwaQLwzSRltsIR9MTMfEBk5aEKAEOSGpxOzu/Uusvx\nt2LsAkPzDsNQwgVo7WtGhrGoaZeVaIvTTyVSAQn1Gydm3QBHJB/JPMfA/edO\nm1KqLUczhx8CrNxPUfpY7gzpvIVky8IYfX593pF8LdVFoYbqPf5OdWgnFIob\nV4gH\r\n=5v8d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8tFWj5Al4jbLKvordye2C4Tk0e7nwdJOubZyHGCsx3AIgI7imSHUB3qWeumKo1I9MKnZjZkk5YZc1h67LOhzmcBM="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.27_1641643012637_0.20340957354509115"},"_hasShrinkwrap":false},"1.0.1-alpha.31":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.31","gitHead":"42d9bbf4831aa90bd9e19b8288275eec36567c9c","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\n### Extension patterns\r\n\r\nAn extension pattern represents the process of extending the capabilities of a\r\nmodule using plugins.\r\n\r\n`microbackend` uses `typescript` and `webpack` exclusively for building. At\r\ncompilation time, the webpack module rules in `@microbackend/plugin-core` look\r\nfor the files corresponding to each extension pattern, and import them into\r\nthe main extensible module.\r\n\r\nFor example, let's consider the extensible module\r\n`@microbackend/plugin-core/src/extension/application.ts`. When we run `webpack`\r\nto build the project, it looks for all files that match\r\n`[pluginName]/src/extension/application.ts`, extract their exports and import\r\nthem into `@microbackend/plugin-core/src/extension/application.ts`, resulting in\r\nthe following pre-bundling file contents:\r\n\r\n```typescript\r\n// @microbackend/plugin-core/src/extension/application.ts\r\nimport pluginname from \"pluginname/src/extension/application.ts\";\r\nexport { pluginName };\r\n```\r\n\r\nThe function `extendMicrobackendApplication` in `@microbackend/plugin-core` then\r\ntakes all these exports and merge them into the provided\r\n`IMicrobackendApplication` object using `Object.defineProperty`.\r\n\r\n### Extension pattern example\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.development.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class DevConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In development, this configuration will be served.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.production.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class PrdConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      // In production, this configuration will be served.\r\n      return { config1: 2 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\nThe configuration objects will be served based on the\r\ncurrent environment passed to `createPluginConfiguration` in `webpack.build.ts`\r\nThis means you have leeway with the naming conventions of the configuration\r\nfiles, as long as they are consistent with your available environments (e.g.\r\n`configuration.dev.ts`, `configuration.prd.ts`);\r\n\r\n### Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration.common`\r\n  and `extension/configuration.{environment}`: An interface representing the\r\n  environment-specific configurations, and is accessible via\r\n  `application.configuration`. `configuration.common` contains common\r\n  configurations for all environments, while `configuration.{environment}` is environment-specific and can override values set in `configuration.common`.\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n### Creating a new extension pattern\r\n\r\nTo create a new extension pattern:\r\n\r\n- Create a new file under `src/extension` in the plugin or project you are\r\n  working on, such as `src/extension/a.ts`.\r\n\r\n- Populate this file with the following contents:\r\n\r\n```typescript\r\n/** Replace with imports */\r\nexport default {};\r\n```\r\n\r\n- The `/** Replace with imports */` placeholder is necessary for webpack to\r\n  substitute the correct import/export statements.\r\n\r\n- Create a `webpack.build.ts` (unless it is already available), and import\r\n  `createMicrobackendExtension` from\r\n  `@microbackend/plugin-core/webpack.build.config`. Call this function, provide\r\n  the necessary arguments, and merge the resulting configuration with your\r\n  existing configuration (using\r\n  `@microbackend/plugin-core/webpack.build.ts > mergeConfigurations`).\r\n\r\n- For a practical example, please check out\r\n  `/package/plugin_graphql_core/webpack.build.ts`.\r\n\r\n## Creating a plugin\r\n\r\nA plugin in an installable package that can be consumed in a `microbackend`-based\r\napplication. Each plugin generally have the following structure:\r\n\r\n```\r\n/src\r\n  /extension        // contains extension modules\r\n    /application.ts // contains application extensions\r\n    /request.ts     // contains request extensions\r\n    /lifecycle.ts   // contains lifecycle extensions\r\n    /service.ts     // contains service extensions\r\n  /index.ts         // contains type declarations and other exports\r\n/package.json       // contains plugin package information\r\n/tsconfig.json      // contains TypeScript configurations\r\n/webpack.build.ts   // contains webpack configurations that will be merged\r\n                    // during compilation. Please note that this config is not\r\n                    // used to build the plugin itself, but to build the\r\n                    // microbackend application.\r\n```\r\n\r\n## Installing a plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.31","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-AzwYY+i5I7Bw9X4wrhSxaYQx2oWCSmbZMz2Sy+NZ15ZKQH4v5bhQasOp2deO6OpTi71JayAqfm5RtVB2nUaR5A==","shasum":"8ca70d227e1a0a60c1305f748a792e065765f680","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.31.tgz","fileCount":54,"unpackedSize":104489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2c+zCRA9TVsSAnZWagAAuioQAJGRG/y1uraCcHxXzbh/\nDR54Hp9QBtKjOWxS7T62VRcCZdklxvLwMGj4g4o7S+F34FqDxWQEHNG5qU6x\neIf+beOaQRhT7N9hq3KmPUeRnA8P+9H0sFX8Fb9CjVNLHr6+D3Q+skseIZbw\no/reqDSKGeY5mJhQ6+xncH7Bybjehcr4ejf7rvTkNwGhkJOnoDX0D47eo840\nUYBq1TE+mjNPdTJixnPYAj8cnRvZGwcwPaC+KdUNSzjF7eV6h6jr1dClJTXY\n/P6KN/mtte0bDChXqaKymFgO8CTyKSeAjtr6I3jTEOk/LFC0+FpilTnnbEC8\n8TSTC6n6oeSC0bnDrp0ExOye+Q6zZUkgFcLsr39uzCQ8QRAtRLcXXdpcU+C2\nKK0p2GtqB9lvfvupuuV3Y3RE0lYhoFWuW5Le6LBNU6kutwEOIDbeQhE+v7vh\nLtrIffd80obvXEdhS7NzDkLDDN7ezevQ0w9XhTuvopz7b10XNL+1nr/fmvyX\n8P6m2T7Dyix3hpNmHmeVzzU7OX5eMdTceVv7jeVf8dAl2916GHGMK2EmskxC\nomTLutiQ9zTkSGTV6bmhFomwI8Vg91pPy7roXgKSdYEqAjyzBlcSBk3Hf4Bn\ndxuSQ8VWHpC6rvRKWzk4Sxk+RwTnHq2hcJscZvL5idwQkVH81RMzOIJ90ZQq\nFHql\r\n=9OoR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvyvsQKXXcXZ1EbNrSh2XdgdWjHEAmfrH1Ic1+mLJlVAiBDZuc5xvy1Va4KZjctfdnzSj54vbzH3PV16IRyOJnPPQ=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.31_1641664435202_0.7475931162284384"},"_hasShrinkwrap":false},"1.0.1-alpha.41":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.0","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.41","gitHead":"b23b6ba3c3d8aeb0c9c3fa0843600c668071479d","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\n### Extension patterns\r\n\r\nAn extension pattern represents the process of extending the capabilities of a\r\nmodule using plugins.\r\n\r\n`microbackend` uses `typescript` and `webpack` exclusively for building. At\r\ncompilation time, the webpack module rules in `@microbackend/plugin-core` look\r\nfor the files corresponding to each extension pattern, and import them into\r\nthe main extensible module.\r\n\r\nFor example, let's consider the extensible module\r\n`@microbackend/plugin-core/src/extension/application.ts`. When we run `webpack`\r\nto build the project, it looks for all files that match\r\n`[pluginName]/src/extension/application.ts`, extract their exports and import\r\nthem into `@microbackend/plugin-core/src/extension/application.ts`, resulting in\r\nthe following pre-bundling file contents:\r\n\r\n```typescript\r\n// @microbackend/plugin-core/src/extension/application.ts\r\nimport pluginname from \"pluginname/src/extension/application.ts\";\r\nexport { pluginName };\r\n```\r\n\r\nThe function `extendMicrobackendApplication` in `@microbackend/plugin-core` then\r\ntakes all these exports and merge them into the provided\r\n`IMicrobackendApplication` object using `Object.defineProperty`.\r\n\r\n### Extension pattern example\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class CommonConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\n### Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration`: An\r\n  interface representing the current application's configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\n- Environment-specific extension overrides, supported by\r\n  `extension/env_overrides/{environment}`: Anything that can be extended\r\n  normally, such as application, request, configuration etc, can be overridden\r\n  depending on the current environment. The environment value depends on what\r\n  we pass to `createPluginConfiguration`, so we are free to declare any value\r\n  (not just development/production) - it could be prd/dev/local/test/e2e.\r\n\r\n  For example, if we want to serve different configurations in development and\r\n  production, we can do it like so:\r\n\r\n  ```typescript\r\n  // extension/env_overrides/development/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is development, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 2 };\r\n      };\r\n    }\r\n  }\r\n\r\n  // extension/env_overrides/production/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is production, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 3 };\r\n      };\r\n    }\r\n  }\r\n  ```\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n### Creating a new extension pattern\r\n\r\nTo create a new extension pattern:\r\n\r\n- Create a new file under `src/extension` in the plugin or project you are\r\n  working on, such as `src/extension/a.ts`.\r\n\r\n- Populate this file with the following contents:\r\n\r\n```typescript\r\n/** Replace with imports */\r\nexport default {};\r\n```\r\n\r\n- The `/** Replace with imports */` placeholder is necessary for webpack to\r\n  substitute the correct import/export statements.\r\n\r\n- Create a `webpack.build.ts` (unless it is already available), and import\r\n  `createMicrobackendExtension` from\r\n  `@microbackend/plugin-core/webpack.build.config`. Call this function, provide\r\n  the necessary arguments, and merge the resulting configuration with your\r\n  existing configuration (using\r\n  `@microbackend/plugin-core/webpack.build.ts > mergeConfigurations`).\r\n\r\n- For a practical example, please check out\r\n  `/package/plugin_graphql_core/webpack.build.ts`.\r\n\r\n## Creating a plugin\r\n\r\nA plugin in an installable package that can be consumed in a `microbackend`-based\r\napplication. Each plugin generally have the following structure:\r\n\r\n```\r\n/src\r\n  /extension          // contains extension modules\r\n    /application.ts   // contains application extensions\r\n    /request.ts       // contains request extensions\r\n    /configuration.ts // contains configuration extensions\r\n    /lifecycle.ts     // contains lifecycle extensions\r\n    /service.ts       // contains service extensions\r\n  /index.ts           // contains type declarations and other exports\r\n/package.json         // contains plugin package information\r\n/tsconfig.json        // contains TypeScript configurations\r\n/webpack.build.ts     // contains webpack configurations that will be merged\r\n                      // during compilation. Please note that this config is not\r\n                      // used to build the plugin itself, but to build the\r\n                      // microbackend application.\r\n```\r\n\r\n## Installing a plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.41","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-R+Q8nqXpKnu/YwNdv9B3Qopb/vk3/LcK1NdGQ62E838iRAPYfzomtEWtVIYhA/hfjM/xM8DENOVqIv60A71UyQ==","shasum":"c488b8a5b4224a49161339fef1a6e41e9774a0d2","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.41.tgz","fileCount":51,"unpackedSize":103694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4xkgCRA9TVsSAnZWagAA8zEQAJrhmpt5YDTk1VVBzN7T\niJdUI7MiV6V+M4JChTKohg8EGEEQTFxtF6CODOnHT7+TiEWPtC45mvtgEtQ0\n5HzAYEGJDDzNnH4ygqdQAo3WlHcn22+6y0bt3TfomOxggQauI2ojxpQHYblg\no9fH1BrVDjxtrtIdh1lYPweTMeZmwZBejlCybYvpZPTSuZ6+mxpmhZjvjEAU\nVrDvYpa6S/mE6DI6S0Q5hzyHgpxflDItU4Ttkirgu12q18JGqUwlhmU2gfRh\n9E1bZA8J0b9kwwoD7IIV4g/ZsyD7Cv8C+3b9UGtsvZ4f6Wi6svQMNMQqXvR+\ntIgABzO7dYCaD1siq/Dhq4w86vt+DdxpKg4NhzmTzIQKQ/W6n9TlN9hsI5Qj\nDzu80AvyadIVTDnUmRevr20RswFtLy/ELmlmMRrBjmnHe6V6U2BEZe87ggEz\n0/MVzUDUwvXc8JnCl40gM27mxqiFPl7j68eG1QQrDQjZDzb0hFfDfBNnCjwQ\nDtYAfKOlbWRABca2kU+HRG3j0G/oTYR9DwyVQRM/tEjkdz62HVy5ks8xmoo1\nsAharAvdoGPoJlIXhKXwxWHhU3cMw1wTOQSWyofWEcLgHyQvBp8thL0tf8Zz\n/oGBvy6ytydGs4VPHAOjCqDvG7AVUwnxa0ek6ikJqpx4y08rX6nHeMRoACMW\nbYdq\r\n=WvG0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/Ini8ezjQHuUH/AJxErw7lBGDA7lHv9ZX+HGOeT4bzAiEA0JTprfy/kdxnMHPfl9B8aryo8qYnlL8zmDREcnDh4sM="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.41_1642273056135_0.995258699448559"},"_hasShrinkwrap":false},"1.0.1-alpha.42":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.42+492176b","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.42","gitHead":"492176bc59b5d18e764739277c891465f4178d3d","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\n### Extension patterns\r\n\r\nAn extension pattern represents the process of extending the capabilities of a\r\nmodule using plugins.\r\n\r\n`microbackend` uses `typescript` and `webpack` exclusively for building. At\r\ncompilation time, the webpack module rules in `@microbackend/plugin-core` look\r\nfor the files corresponding to each extension pattern, and import them into\r\nthe main extensible module.\r\n\r\nFor example, let's consider the extensible module\r\n`@microbackend/plugin-core/src/extension/application.ts`. When we run `webpack`\r\nto build the project, it looks for all files that match\r\n`[pluginName]/src/extension/application.ts`, extract their exports and import\r\nthem into `@microbackend/plugin-core/src/extension/application.ts`, resulting in\r\nthe following pre-bundling file contents:\r\n\r\n```typescript\r\n// @microbackend/plugin-core/src/extension/application.ts\r\nimport pluginname from \"pluginname/src/extension/application.ts\";\r\nexport { pluginName };\r\n```\r\n\r\nThe function `extendMicrobackendApplication` in `@microbackend/plugin-core` then\r\ntakes all these exports and merge them into the provided\r\n`IMicrobackendApplication` object using `Object.defineProperty`.\r\n\r\n### Extension pattern example\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class CommonConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\n### Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration`: An\r\n  interface representing the current application's configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\n- Environment-specific extension overrides, supported by\r\n  `extension/env_overrides/{environment}`: Anything that can be extended\r\n  normally, such as application, request, configuration etc, can be overridden\r\n  depending on the current environment. The environment value depends on what\r\n  we pass to `createPluginConfiguration`, so we are free to declare any value\r\n  (not just development/production) - it could be prd/dev/local/test/e2e.\r\n\r\n  For example, if we want to serve different configurations in development and\r\n  production, we can do it like so:\r\n\r\n  ```typescript\r\n  // extension/env_overrides/development/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is development, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 2 };\r\n      };\r\n    }\r\n  }\r\n\r\n  // extension/env_overrides/production/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is production, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 3 };\r\n      };\r\n    }\r\n  }\r\n  ```\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n### Creating a new extension pattern\r\n\r\nTo create a new extension pattern:\r\n\r\n- Create a new file under `src/extension` in the plugin or project you are\r\n  working on, such as `src/extension/a.ts`.\r\n\r\n- Populate this file with the following contents:\r\n\r\n```typescript\r\n/** Replace with imports */\r\nexport default {};\r\n```\r\n\r\n- The `/** Replace with imports */` placeholder is necessary for webpack to\r\n  substitute the correct import/export statements.\r\n\r\n- Create a `webpack.build.ts` (unless it is already available), and import\r\n  `createMicrobackendExtension` from\r\n  `@microbackend/plugin-core/webpack.build.config`. Call this function, provide\r\n  the necessary arguments, and merge the resulting configuration with your\r\n  existing configuration (using\r\n  `@microbackend/plugin-core/webpack.build.ts > mergeConfigurations`).\r\n\r\n- For a practical example, please check out\r\n  `/package/plugin_graphql_core/webpack.build.ts`.\r\n\r\n## Creating a plugin\r\n\r\nA plugin in an installable package that can be consumed in a `microbackend`-based\r\napplication. Each plugin generally have the following structure:\r\n\r\n```\r\n/src\r\n  /extension          // contains extension modules\r\n    /application.ts   // contains application extensions\r\n    /request.ts       // contains request extensions\r\n    /configuration.ts // contains configuration extensions\r\n    /lifecycle.ts     // contains lifecycle extensions\r\n    /service.ts       // contains service extensions\r\n  /index.ts           // contains type declarations and other exports\r\n/package.json         // contains plugin package information\r\n/tsconfig.json        // contains TypeScript configurations\r\n/webpack.build.ts     // contains webpack configurations that will be merged\r\n                      // during compilation. Please note that this config is not\r\n                      // used to build the plugin itself, but to build the\r\n                      // microbackend application.\r\n```\r\n\r\n## Installing a plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.42","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-vNQKuneYWSjoFEzFlJkePRHTd6brlfiYcH93CZydKnucnMH15OtwwsF1rr2e/uoREtpsb9tkq/WiRSGeFzrg2Q==","shasum":"ae5efdda40e22329ef4af73b1af0805fa22b37b1","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.42.tgz","fileCount":51,"unpackedSize":103711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4yIPCRA9TVsSAnZWagAAkWMP/3kJDw3hjxzqH0jdelgZ\nYWyWVDIvSA+rwYINYdvh2R0Cd54o2BFcpXzwXm4pgJatyLDNPi7yVN3UAdLd\nyhayjr/U0/VP0lpEabTEtHrHNWqro2lpgg8/rhBiUFqMf18RNk57e+naKquN\n7s69q1S8+cZBn9AdVepp48ViQ3ewXqv3kb0L/BnggEnc5ksCUcY2UZ5d8OFD\n05+vvx7CbtLjjdbeg184UbGe8CZz6x7p4eoo4qAtlYOu3aW3ij97Qgred/2d\n1sZKADsAC09NhVSaFfb1JUnroHZqaKRA9fIiL3Scu2+OILkUOnS0d78zbdC5\n/uO5g+iSFupfLI9AMsQ+SP/oxZTQPPm6iM6CJXxWtvrfERa6u47AsFBMSPtD\nfWbWlZeQ772yxbdReowv0WJrdnzKPair+ugkyygpxVLmkMc0fjH1rwTdnfny\nIzRn7RwdKtirJXHua1kAfFbOOv4u2oIrgyclJSr2arrUA0ah0CG+QEUDkjc5\n7v0ff1q9occY1F+ZGVMwKQye/R/r5RdZ5HvGPzlhnp1aC9AGr6bcy0XdPDXh\no77+Ab/jQAP4Z7dSa+s+TebE6xeiCKUmT65P8fVgKJsfaagmpPN2Ep6gfbIZ\n8jbRv9rGY498ITOiDCIUbC/RDCuZU87C4Q/NlUCE2ByubR/Fi2vR1jRQPuf9\ndoro\r\n=kUjh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE36y/AWCVVwwLBd+K9Dg82bi3GwYn7aZRsgcwCaKNF/AiA+B3OCrlW7KiT0Hk3Rb4JYTs1nEn4PiLUl0S6X2Ltnsg=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.42_1642275343235_0.1773833473830475"},"_hasShrinkwrap":false},"1.0.1-alpha.43":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.0","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1-alpha.43+e1c7ce6","@microbackend/webpack-plugin":"^1.0.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1-alpha.43","gitHead":"e1c7ce669b232eea9550c66cf5267b140c44df72","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## How to use\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\n### Extension patterns\r\n\r\nAn extension pattern represents the process of extending the capabilities of a\r\nmodule using plugins.\r\n\r\n`microbackend` uses `typescript` and `webpack` exclusively for building. At\r\ncompilation time, the webpack module rules in `@microbackend/plugin-core` look\r\nfor the files corresponding to each extension pattern, and import them into\r\nthe main extensible module.\r\n\r\nFor example, let's consider the extensible module\r\n`@microbackend/plugin-core/src/extension/application.ts`. When we run `webpack`\r\nto build the project, it looks for all files that match\r\n`[pluginName]/src/extension/application.ts`, extract their exports and import\r\nthem into `@microbackend/plugin-core/src/extension/application.ts`, resulting in\r\nthe following pre-bundling file contents:\r\n\r\n```typescript\r\n// @microbackend/plugin-core/src/extension/application.ts\r\nimport pluginname from \"pluginname/src/extension/application.ts\";\r\nexport { pluginName };\r\n```\r\n\r\nThe function `extendMicrobackendApplication` in `@microbackend/plugin-core` then\r\ntakes all these exports and merge them into the provided\r\n`IMicrobackendApplication` object using `Object.defineProperty`.\r\n\r\n### Extension pattern example\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/application.ts`:\r\n\r\n```typescript\r\n// src/extension/application.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApplication {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.application.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).application.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/configuration.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\nexport default class CommonConfiguration extends MicrobackendConfiguration {\r\n  get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n    return () => {\r\n      // Accessible via application.configuration.config1.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApplication` has two additional properties `appProperty1`\r\nand `appProperty2`, as does `IMicrobackendRequest` - even without you having to\r\nexplicitly register them.\r\n\r\n### Supported extension patterns\r\n\r\n- `IMicrobackendApplication`, supported by `extension/application`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfiguration`, supported by `extension/configuration`: An\r\n  interface representing the current application's configurations, and is\r\n  accessible via `application.configuration`.\r\n\r\n- Environment-specific extension overrides, supported by\r\n  `extension/env_overrides/{environment}`: Anything that can be extended\r\n  normally, such as application, request, configuration etc, can be overridden\r\n  depending on the current environment. The environment value depends on what\r\n  we pass to `createPluginConfiguration`, so we are free to declare any value\r\n  (not just development/production) - it could be prd/dev/local/test/e2e.\r\n\r\n  For example, if we want to serve different configurations in development and\r\n  production, we can do it like so:\r\n\r\n  ```typescript\r\n  // extension/env_overrides/development/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is development, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 2 };\r\n      };\r\n    }\r\n  }\r\n\r\n  // extension/env_overrides/production/configuration.ts\r\n  import { MicrobackendConfiguration } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfiguration extends MicrobackendConfiguration {\r\n    get configuration(): MicrobackendConfiguration[\"configuration\"] {\r\n      return () => {\r\n        // If the current environment is production, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 3 };\r\n      };\r\n    }\r\n  }\r\n  ```\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApplication`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApplication,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApplication(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n### Creating a new extension pattern\r\n\r\nTo create a new extension pattern:\r\n\r\n- Create a new file under `src/extension` in the plugin or project you are\r\n  working on, such as `src/extension/a.ts`.\r\n\r\n- Populate this file with the following contents:\r\n\r\n```typescript\r\n/** Replace with imports */\r\nexport default {};\r\n```\r\n\r\n- The `/** Replace with imports */` placeholder is necessary for webpack to\r\n  substitute the correct import/export statements.\r\n\r\n- Create a `webpack.build.ts` (unless it is already available), and import\r\n  `createMicrobackendExtension` from\r\n  `@microbackend/plugin-core/webpack.build.config`. Call this function, provide\r\n  the necessary arguments, and merge the resulting configuration with your\r\n  existing configuration (using\r\n  `@microbackend/plugin-core/webpack.build.ts > mergeConfigurations`).\r\n\r\n- For a practical example, please check out\r\n  `/package/plugin_graphql_core/webpack.build.ts`.\r\n\r\n## Creating a plugin\r\n\r\nA plugin in an installable package that can be consumed in a `microbackend`-based\r\napplication. Each plugin generally have the following structure:\r\n\r\n```\r\n/src\r\n  /extension          // contains extension modules\r\n    /application.ts   // contains application extensions\r\n    /request.ts       // contains request extensions\r\n    /configuration.ts // contains configuration extensions\r\n    /lifecycle.ts     // contains lifecycle extensions\r\n    /service.ts       // contains service extensions\r\n  /index.ts           // contains type declarations and other exports\r\n/package.json         // contains plugin package information\r\n/tsconfig.json        // contains TypeScript configurations\r\n/webpack.build.ts     // contains webpack configurations that will be merged\r\n                      // during compilation. Please note that this config is not\r\n                      // used to build the plugin itself, but to build the\r\n                      // microbackend application.\r\n```\r\n\r\n## Installing a plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md","_id":"@microbackend/plugin-core@1.0.1-alpha.43","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-4cjgBb85TxyUAgRI69keI22G/rXNhmzSWgdVmfod7dQ8wQUR47g+yUHMDqzj201rbD2qWj3pGtSbrq9ecawPPQ==","shasum":"92e38bd3338c0e42e956331b92cd20e0fea7d7e4","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1-alpha.43.tgz","fileCount":51,"unpackedSize":103711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4yWpCRA9TVsSAnZWagAAx1MP/jlEozQcAv1oTknYvaPd\nCeNo4+CsPFD1ElETn1uqwvyDg0p7wHZcx8ePZFfGt3dpWiFYv/K+Uq/P36AA\nwaNalo+FN7LN5R0A2zaKP8IsEkr4Ss/4ZbsnXgCfOhIXHEatfMnXrK2dHdu6\nySGGvdAyrpKX7oC99ZKd9PBTEIGp4OCUR3zV++PGMG7ICCgjLQp5ZT3mvVAI\nkvXYW0yhY8J0zxsPQO6YsPdEycrkGVwsd5hsBkRyPu9SW/UVwHooBPFiEPnD\nlfVL6WGg5+IVQAlQRC5wgDHWm4PJ1pnVX2jR/HcMNAHgvhVfg+gzkYQ2nv2j\nhH0hvRPYNtfBMKzrf5xEPYY6+isKwGI+2/3htV2wpPItT9m8bJrJcfoxTaAb\nTIZ3qgnr3ugX98Qs9vPJdeXkPKcLODkDAOQWskq2kfBn2os6HxKMQfMVLwkZ\nhRFYoOhp6l3oxznYLrISYbj1Caf6B6NLQ3e5nfP6KrpxK5Po88QgMB7+XajI\nkV+sf1ehzvpi5r097XQ1oYYUtJwLP75zBCj+VQFA9VKUgf+KFwpTQp8zPY7E\nMlyL9q5CWKaJ66cuTAcPO48IRlXT9Z69hLAr8jwdxKg+o/mmPh50rD2KsbNT\nLXsZFzyGYjspGPnqohX5f5JcS2rgvCxyYTDjSsOiVd/Ne7gaQxmuDgWAgYHy\nViNY\r\n=kNHS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlpWntVHxoirvuiddaYH/VP4P14mGFEqxQuOzudZUTXAiAVf2e2zVqAu/j1E1MzQthykZ7PiBOO1Qke6Q2HHw3UBw=="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1-alpha.43_1642276265504_0.6243214116943765"},"_hasShrinkwrap":false},"1.0.1":{"author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"dependencies":{"@microbackend/common-utils":"^1.0.1","lodash":"^4.17.21"},"description":"Micro-backend core plugin","devDependencies":{"@microbackend/build-utils":"^1.0.1","@microbackend/webpack-plugin":"^1.0.1","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.3","@types/lodash":"^4.14.177","fs-extra":"^10.0.0","jest":"^27.4.5","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","ts-jest":"^27.1.1","ts-node":"^10.4.0","typescript":"^4.5.4","webpack":"^5.63.0","webpack-cli":"^4.9.1"},"license":"MIT","main":"build/src/index.js","microbackend":{"requiredDevDependencies":{"fs-extra":"^10.0.0","string-replace-loader":"^3.0.3","ts-essentials":"^9.0.0","webpack":"^5.63.0","webpack-cli":"^4.9.1"}},"name":"@microbackend/plugin-core","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublish":"rm -rf build && yarn build","test":"jest"},"types":"build/src/index.d.ts","version":"1.0.1","gitHead":"77ded684b6ddda6b4931770c58954075a866ae58","_id":"@microbackend/plugin-core@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (win32)","dist":{"integrity":"sha512-3Vb4T0RxYs/pR5/81fLEtaWsKtTaA+p6/Bxn3BVGEgrDwYAOGNJ/tf4Cu8t20e4TKvuqpNxC+GQEVXTAo6Ne8w==","shasum":"78813bcb6b23b799e71c0494c0721706c192e509","tarball":"https://registry.npmjs.org/@microbackend/plugin-core/-/plugin-core-1.0.1.tgz","fileCount":54,"unpackedSize":109101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+iAvCRA9TVsSAnZWagAA4BwP/3tNTd9jyNiXDa/OQ6me\nQtVHNG85KYmSF2RHu8rXpUimSYjnMzm8MzmylORzBIOji5cqM1wIDeA7Gn08\nxgIyikFR2en9IWyUcQu1NGRZ8tYF6RBhxEOaOtsE3c+qahBMdfobBtSPPtXB\nurhbg9Mf0EkzHYLQmIEVqb5haNkrY2qTkydjfGLbk34rVxQXhY3IqZExeSzd\nI9ZHZ3k62y8ecPp48mLur/9CRA12K4JfC5W7ODF6i3LhArR7r4pJYjCzP5sq\nBD/FFEPUGp/GwnBqR0BSdbzCiHjrG0/CLCD2kdgJK5+hY9WSlYJw8kbPfNPy\nUPaCdKU9blIZxvag5K2Jz6r7wWJNpoZyq9qK+8S8TjULx0BiMsRpuA9G4YXc\nyNDjCmNPTH6dwSQJ+L1ISyQd9dNs1OBfGaYt8ofnV3Jpi6oIkHkjVlTx1Z4a\nZyZiVK4GI7iA9Q2QuTgB5vyJ0jR8Mv+Lh9I8/lBE+xTscBbgppYDOv+PHdnK\nKrmz8BmBoeiPWsXPN7+PZQh8yCGURHKOG7oD1etI7a1nuA5faAe2UcsiFenO\npajUdnOWSMRD9+d4W1EHS48W6wH2ADaFgrQ4qdRLDYB+rJ8dPnX6T1PIc0jh\nuWOr2nqPyU/ZdUJpzwCjSXJ+AN6lTpLyPI0BqTRpO1+VxSOJRDLWK0cK4YUn\nUQfX\r\n=wzTx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhWQOhQMbBPAQkve8sVeHZTdrAlnFPES7mpA6RxspMsAiEAx5/cOxWg8kPS7apcp43J/Ok+qoOsZnMqEzGVFGtyiCU="}]},"_npmUser":{"name":"haipham","email":"swiften.svc@gmail.com"},"directories":{},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-core_1.0.1_1643782191722_0.10914253942921182"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-07T09:41:02.863Z","1.0.1-alpha.39":"2021-11-07T09:41:03.041Z","modified":"2022-04-06T05:22:44.738Z","1.0.1-alpha.40":"2021-11-07T09:43:43.366Z","1.0.1-alpha.45":"2021-11-08T02:43:31.606Z","1.0.1-alpha.47":"2021-11-10T18:42:11.189Z","1.0.1-alpha.48":"2021-11-11T16:52:32.152Z","1.0.1-alpha.49":"2021-11-11T18:24:43.561Z","1.0.1-alpha.52":"2021-11-12T03:14:40.671Z","1.0.1-alpha.53":"2021-11-12T03:25:11.637Z","1.0.1-alpha.56":"2021-11-12T03:59:00.823Z","1.0.1-alpha.58":"2021-11-12T04:24:40.629Z","1.0.1-alpha.61":"2021-11-12T08:19:35.742Z","1.0.1-alpha.62":"2021-11-12T08:37:07.632Z","1.0.1-alpha.65":"2021-11-12T11:10:35.768Z","1.0.1-alpha.68":"2021-11-13T07:14:26.254Z","1.0.1-alpha.69":"2021-11-13T07:31:00.787Z","1.0.1-alpha.70":"2021-11-13T08:57:25.358Z","1.0.1-alpha.75":"2021-11-14T04:27:19.922Z","1.0.1-alpha.79":"2021-11-15T02:41:53.501Z","1.0.1-alpha.81":"2021-11-15T17:21:18.450Z","1.0.1-alpha.82":"2021-11-15T17:49:18.033Z","1.0.1-alpha.85":"2021-11-16T08:17:25.703Z","1.0.1-alpha.86":"2021-11-16T10:39:26.194Z","1.0.1-alpha.91":"2021-11-16T18:25:11.908Z","1.0.1-alpha.94":"2021-11-17T14:33:05.593Z","1.0.1-alpha.96":"2021-11-18T16:14:26.051Z","1.0.1-alpha.97":"2021-11-18T18:15:23.780Z","1.0.1-alpha.99":"2021-11-18T18:39:20.934Z","1.0.1-alpha.101":"2021-11-19T19:13:28.333Z","1.0.1-alpha.107":"2021-11-20T16:56:00.738Z","1.0.1-alpha.108":"2021-11-20T18:12:37.676Z","1.0.1-alpha.113":"2021-11-25T10:51:16.966Z","1.0.1-alpha.120":"2021-11-28T10:33:52.957Z","1.0.1-alpha.122":"2021-11-30T18:18:29.547Z","1.0.1-alpha.123":"2021-12-01T18:20:16.616Z","1.0.1-alpha.124":"2021-12-02T17:31:49.390Z","1.0.1-alpha.126":"2021-12-04T03:28:44.102Z","1.0.1-alpha.129":"2021-12-05T09:25:12.489Z","1.0.1-alpha.131":"2021-12-05T18:09:11.099Z","1.0.1-alpha.133":"2021-12-06T10:22:24.914Z","1.0.1-alpha.135":"2021-12-06T15:02:40.965Z","1.0.0":"2021-12-07T03:03:49.693Z","1.0.1-alpha.0":"2021-12-07T05:17:42.312Z","1.0.1-alpha.15":"2021-12-20T15:17:51.580Z","1.0.1-alpha.26":"2022-01-08T11:36:56.273Z","1.0.1-alpha.27":"2022-01-08T11:56:52.779Z","1.0.1-alpha.31":"2022-01-08T17:53:55.356Z","1.0.1-alpha.41":"2022-01-15T18:57:36.342Z","1.0.1-alpha.42":"2022-01-15T19:35:43.368Z","1.0.1-alpha.43":"2022-01-15T19:51:05.655Z","1.0.1":"2022-02-02T06:09:51.857Z"},"maintainers":[{"name":"protoman92","email":"swiften.svc@gmail.com"},{"name":"haipham","email":"swiften.svc@gmail.com"}],"description":"Micro-backend core plugin","author":{"name":"Hai Pham","email":"swiften.svc@gmail.com"},"license":"MIT","readme":"# @microbackend/plugin-core\r\n\r\nThe core plugin that contains extensible interfaces and extension logic. This\r\nplugin must be included in all `microbackend`-based projects.\r\n\r\n## Installation\r\n\r\n```shell\r\nyarn add @microbackend/plugin-core\r\nnpm install @microbackend/plugin-core\r\n```\r\n\r\n## Usage\r\n\r\nIn your project's webpack configuration file (for examle, `webpack.config.ts`):\r\n\r\n```typescript\r\nimport createPluginConfig, {\r\n  mergeConfigurations,\r\n} from \"@microbackend/plugin-core/build/webpack.build\";\r\nimport \"./src/interface/microbackend\";\r\n\r\nconst webpackConfiguration = mergeConfigurations(\r\n  createPluginConfig({ environment: process.env.NODE_ENV }),\r\n  {\r\n    // Your own project's webpack configuration here.\r\n  }\r\n);\r\n\r\nexport default webpackConfiguration;\r\n```\r\n\r\n### Extension patterns\r\n\r\nAn extension pattern represents the process of extending the capabilities of a\r\nmodule using plugins.\r\n\r\n`microbackend` uses `typescript` and `webpack` exclusively for building. At\r\ncompilation time, the webpack module rules in `@microbackend/plugin-core` look\r\nfor the files corresponding to each extension pattern, and import them into\r\nthe main extensible module.\r\n\r\nFor example, let's consider the extensible module\r\n`@microbackend/plugin-core/src/extension/app.ts`. When we run `webpack` to build\r\nthe project, it looks for all files that match\r\n`[pluginName]/src/extension/app.ts`, extract their exports and import them into\r\n`@microbackend/plugin-core/src/extension/app.ts`, resulting in the\r\nfollowing pre-bundling file contents:\r\n\r\n```typescript\r\n// @microbackend/plugin-core/src/extension/app.ts\r\nimport pluginname from \"pluginname/src/extension/app.ts\";\r\nexport { pluginName };\r\n```\r\n\r\nThe function `extendMicrobackendApplication` in `@microbackend/plugin-core` then\r\ntakes all these exports and merge them into the provided\r\n`IMicrobackendApp` object using `Object.defineProperty`.\r\n\r\n### Extension pattern example\r\n\r\nFor illustration purposes, create the following files in your project:\r\n\r\n- `src/extension/app.ts`:\r\n\r\n```typescript\r\n// src/extension/app.ts\r\ndeclare module \"@microbackend/plugin-core\" {\r\n  interface IMicrobackendApp {\r\n    readonly appProperty1: () => number;\r\n    readonly appProperty2: number;\r\n  }\r\n}\r\n\r\nexport function appProperty1(): number {\r\n  return 1;\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    return 2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/request.ts`:\r\n\r\n```typescript\r\nimport { IMicrobackendRequest } from \"@microbackend/plugin-core\";\r\n\r\nexport function appProperty1(this: IMicrobackendRequest): number {\r\n  // Now the application object already possesses the \"appProperty1\" extension.\r\n  return this.app.appProperty1();\r\n}\r\n\r\nexport default {\r\n  get appProperty2(): number {\r\n    // Now the application object already possesses the \"appProperty2\" extension.\r\n    return (this as unknown as IMicrobackendRequest).app.appProperty2;\r\n  },\r\n};\r\n```\r\n\r\n- `src/extension/lifecycle.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendLifecycle } from \"@microbackend/plugin-core\";\r\n\r\nexport default class MainLifecycle extends MicrobackendLifecycle {\r\n  override initialize() {\r\n    console.log(\"Initialized\");\r\n  }\r\n\r\n  override deinitialize() {\r\n    console.log(\"Deinitialized\");\r\n  }\r\n}\r\n```\r\n\r\n- `src/extension/config.ts`:\r\n\r\n```typescript\r\nimport { MicrobackendConfig } from \"@microbackend/plugin-core\";\r\n\r\nexport default class CommonConfig extends MicrobackendConfig {\r\n  get config(): MicrobackendConfig[\"config\"] {\r\n    return () => {\r\n      // Accessible via app.config.config1.\r\n      return { config1: 1 };\r\n    };\r\n  }\r\n}\r\n```\r\n\r\nSo now, `IMicrobackendApp` has two additional properties `appProperty1` and\r\n`appProperty2`, as does `IMicrobackendRequest`.\r\n\r\n### Supported extension patterns\r\n\r\n- `IMicrobackendApp`, supported by `extension/app`: An interface\r\n  representing an application. For example, this could be `express.Application`\r\n  if we are using the plugin `@microbackend/plugin-express`.\r\n\r\n- `IMicrobackendRequest`, supported by `extension/request`: An interface\r\n  representing a request. For example, this could be `express.Request` if we are\r\n  using the plugin `@microbackend/plugin-express`. A microbackend request could\r\n  contain properties such as `body`, `headers`, `params`, `query` etc.\r\n\r\n- `IMicrobackendService`, supported by `extension/service`: An interface\r\n  representing services that handle business logic, and are available to access\r\n  using `request.service`. If the service extension is a folder (i.e.\r\n  `extension/service`), the service object can contain namespaces based on its\r\n  subfolders. For example:\r\n\r\n  ```typescript\r\n  // extension/service/auth/service1.ts\r\n  export default class Service {\r\n    method1() {}\r\n  }\r\n\r\n  // extension/service/logic/service2.ts\r\n  export default class Service {\r\n    method2() {}\r\n  }\r\n\r\n  // elsewhere\r\n  request.service.auth.service1.method1();\r\n  request.service.logic.service2.method2();\r\n  ```\r\n\r\n  Please note that only service extension modules in the current project are\r\n  included in `req.service`.\r\n\r\n- `IMicrobackendLifecycle`, supported by `extension/lifecycle`: An object\r\n  that contains methods to hook into the application's lifecycle events, such\r\n  as `init` and `deinit`.\r\n\r\n- `IMicrobackendConfig`, supported by `extension/config`: An interface\r\n  representing the current application's configurations, and is accessible via\r\n  `app.config`.\r\n\r\n- Environment-specific extension overrides, supported by\r\n  `extension/env_overrides/{environment}`: Anything that can be extended\r\n  normally, such as application, request, configuration etc, can be overridden\r\n  depending on the current environment. The environment value depends on what\r\n  we pass to `createPluginConfig`, so we are free to declare any value (not just\r\n  development/production) - it could be prd/dev/local/test/e2e.\r\n\r\n  For example, if we want to serve different configurations in development and\r\n  production, we can do it like so:\r\n\r\n  ```typescript\r\n  // extension/env_overrides/development/config.ts\r\n  import { MicrobackendConfig } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfig extends MicrobackendConfig {\r\n    get config(): MicrobackendConfig[\"config\"] {\r\n      return () => {\r\n        // If the current environment is development, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 2 };\r\n      };\r\n    }\r\n  }\r\n\r\n  // extension/env_overrides/production/config.ts\r\n  import { MicrobackendConfig } from \"@microbackend/plugin-core\";\r\n\r\n  export default class CommonConfig extends MicrobackendConfig {\r\n    get config(): MicrobackendConfig[\"config\"] {\r\n      return () => {\r\n        // If the current environment is production, this config will be picked\r\n        // and merged with the common configuration (if any).\r\n        return { config1: 3 };\r\n      };\r\n    }\r\n  }\r\n  ```\r\n\r\nThe corresponding functions for these extensions are:\r\n\r\n- `enhanceMicrobackendApp`\r\n- `enhanceMicrobackendRequest`\r\n- `createMicrobackendLifecycle`\r\n\r\nSince this plugin can work for any application that adheres to an\r\nApplication/Request model, you can import and use these functions in your\r\nproject like so:\r\n\r\n```typescript\r\nimport {\r\n  createMicrobackendLifecycle,\r\n  enhanceMicrobackendApp,\r\n  enhanceMicrobackendRequest,\r\n} from \"@microbackend/plugin-core\";\r\n\r\nclass Application {}\r\nclass Request {}\r\n\r\nconst application = new Application();\r\nenhanceMicrobackendApp(application);\r\n\r\napplication.onRequest((request: Request) => {\r\n  enhanceMicrobackendRequest(request);\r\n});\r\n\r\nconst lifecycle = createMicrobackendLifecycle({ application });\r\n\r\nlifecycle.initialize().then(() => {\r\n  return application.start({\r\n    onEnd: async () => {\r\n      await lifecycle.deinitialize();\r\n    },\r\n  });\r\n});\r\n```\r\n\r\nHowever, you should not have to call them manually to set up the extensions.\r\nInstead, please use one of the following framework-specific plugins:\r\n\r\n- [`@microbackend/plugin-express`](https://www.npmjs.com/package/@microbackend/plugin-express).\r\n\r\n### Creating a new extension pattern\r\n\r\nTo create a new extension pattern:\r\n\r\n- Create a new file under `src/extension` in the plugin or project you are\r\n  working on, such as `src/extension/a.ts`.\r\n\r\n- Populate this file with the following contents:\r\n\r\n```typescript\r\n/** Replace with imports */\r\nexport default {};\r\n```\r\n\r\n- The `/** Replace with imports */` placeholder is necessary for webpack to\r\n  substitute the correct import/export statements.\r\n\r\n- Create a `webpack.build.ts` (unless it is already available), and import\r\n  `createMicrobackendExtension` from\r\n  `@microbackend/plugin-core/webpack.build.config`. Call this function, provide\r\n  the necessary arguments, and merge the resulting configuration with your\r\n  existing configuration (using\r\n  `@microbackend/plugin-core/webpack.build.ts > mergeConfigurations`).\r\n\r\n- For a practical example, please check out\r\n  `/package/plugin_graphql_core/webpack.build.ts`.\r\n\r\n## Creating a plugin\r\n\r\nA plugin in an installable package that can be consumed in a `microbackend`-based\r\napplication. Each plugin generally have the following structure:\r\n\r\n```\r\n/src\r\n  /extension          // contains extension modules\r\n    /app.ts           // contains application extensions\r\n    /request.ts       // contains request extensions\r\n    /config.ts        // contains configuration extensions\r\n    /lifecycle.ts     // contains lifecycle extensions\r\n    /service.ts       // contains service extensions\r\n  /index.ts           // contains type declarations and other exports\r\n/package.json         // contains plugin package information\r\n/tsconfig.json        // contains TypeScript configurations\r\n/webpack.build.ts     // contains webpack configurations that will be merged\r\n                      // during compilation. Please note that this config is not\r\n                      // used to build the plugin itself, but to build the\r\n                      // microbackend application.\r\n```\r\n\r\n## Installing a plugin\r\n\r\nTo add a new plugin, there are two ways:\r\n\r\n### Via the `microbackend` CLI tool (recommended)\r\n\r\nCheck out the CLI package [here](https://www.npmjs.com/package/@microbackend/cli).\r\nYou can install and use it as follows:\r\n\r\n```shell\r\nyarn add @microbackend/cli\r\nnpm install @microbackend/cli\r\n\r\nnpx microbackend plugin add @microbackend/plugin-example-1 @microbackend/plugin-example-2\r\n```\r\n\r\n### Manually (not recommended)\r\n\r\nYou need to install the correct package from npm:\r\n\r\n```shell\r\nyarn add @microbackend/plugin-example\r\nnpm install @microbackend/plugin-example\r\n```\r\n\r\nSince `@microbackend/plugin-core` reads microbackend meta information from your\r\nproject's `package.json`, add the new plugin to `microbackend > plugin` section:\r\n\r\n```json\r\n{\r\n  \"microbackend\": {\r\n    \"plugins\": [\"@microbackend/plugin-core\", \"@microbackend/plugin-example\"]\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md"}