diff --git a/.changeset/ai-eager-cat.md b/.changeset/ai-eager-cat.md new file mode 100644 index 0000000000..163b13d847 --- /dev/null +++ b/.changeset/ai-eager-cat.md @@ -0,0 +1,14 @@ +--- +"@module-federation/enhanced": minor +--- + +Introduce minimal runtime and experiment options for FederationRuntimePlugin. + +- Added support for minimal federation runtime dependency in `FederationRuntimeDependency` class. +- Introduced `experiments` property to `EmbedFederationRuntimePlugin` class. +- Enhanced `FederationRuntimePlugin` to support both standard and minimal runtime dependencies. + - Added logic to handle `useMinimalRuntime` option. + - Conditionally modified entry file path based on the runtime mode. +- Adjusted constructor to initialize new experimental paths and dependencies. +- Modified `getTemplate` and `getFilePath` methods to accommodate minimal runtime. +- Updated `setRuntimeAlias` and `apply` methods to utilize new experiment options and embedded paths. \ No newline at end of file diff --git a/.changeset/ai-eager-tiger.md b/.changeset/ai-eager-tiger.md new file mode 100644 index 0000000000..13277bd8a6 --- /dev/null +++ b/.changeset/ai-eager-tiger.md @@ -0,0 +1,11 @@ +--- +"@module-federation/runtime": patch +--- + +Refactored the script loading mechanism to use a more generalized loaderHook. + +- Replaced `createScriptHook` with `loaderHook` across various functions. + - Updated `loadEntryScript` function to use `loaderHook.lifecycle.createScript`. + - Modified `loadEntryDom` function to accept `loaderHook` instead of `createScriptHook`. + - Adjusted `loadEntryNode` function to handle `loaderHook.lifecycle.createScript`. +- Streamlined the handling of script loading in `getRemoteEntry`. \ No newline at end of file diff --git a/.changeset/ai-gentle-eagle.md b/.changeset/ai-gentle-eagle.md new file mode 100644 index 0000000000..29d241bd63 --- /dev/null +++ b/.changeset/ai-gentle-eagle.md @@ -0,0 +1,11 @@ +--- +"@module-federation/runtime": patch +--- + +Added support for defining and setting a shareable runtime globally to enhance modularity and reusability within the Federation system. + +- Defined a `ShareableRuntime` type encapsulating the core functionalities of the module federation. +- Introduced `__SHAREABLE_RUNTIME__` to the `Federation` interface to store the `ShareableRuntime`. +- Implemented `setGlobalShareableRuntime` function to set the shareable runtime if not already set. +- Modified `FederationManager` methods (`preloadRemote`, `registerRemotes`, `registerPlugins`) to use the spread operator for cleaner code. +- Initialized the global shareable runtime at the module's root with key components like `FederationManager`, `FederationHost`, etc. diff --git a/.changeset/ai-noisy-fox.md b/.changeset/ai-noisy-fox.md new file mode 100644 index 0000000000..1be2b76d60 --- /dev/null +++ b/.changeset/ai-noisy-fox.md @@ -0,0 +1,8 @@ +--- +"@module-federation/runtime": patch +--- + +- Added optional `bundlerId` parameter to FederationHost constructor. +- Modified default logic to choose `bundlerId` if provided, otherwise fallback to `getBuilderId()`. +- Updated `getGlobalFederationInstance` function to accept and utilize an optional `builderId`. +- Ensured internal checks compare with the provided `bundlerId` for consistency in federation instances lookup. diff --git a/.changeset/ai-sleepy-bear.md b/.changeset/ai-sleepy-bear.md new file mode 100644 index 0000000000..b54cfec079 --- /dev/null +++ b/.changeset/ai-sleepy-bear.md @@ -0,0 +1,12 @@ +--- +"@module-federation/runtime": minor +--- + +Refactor initialization and management of Federation instances with the new FederationManager class. + +- Introduced FederationManager class to encapsulate federation management logic. + - FederationManager class now handles the initialization and operation methods. + - Methods `init`, `loadRemote`, `loadShare`, `loadShareSync`, `preloadRemote`, `registerRemotes`, and `registerPlugins` are now routed through an instance of FederationManager. +- Updated test to exclude `FederationManager` from index.ts exports. +- Minor code cleanup and added import for `getBuilderId` in `index.ts`. +- Removed direct manipulation of a singleton FederationHost instance and replaced it with the FederationManager pattern. \ No newline at end of file diff --git a/.changeset/ai-sleepy-fox.md b/.changeset/ai-sleepy-fox.md new file mode 100644 index 0000000000..9fa45449f8 --- /dev/null +++ b/.changeset/ai-sleepy-fox.md @@ -0,0 +1,5 @@ +--- +"@module-federation/enhanced": patch +--- + +Use shareable runtime from federation global over custom global top levels diff --git a/.changeset/real-baboons-complain.md b/.changeset/real-baboons-complain.md new file mode 100644 index 0000000000..7a0c6139d2 --- /dev/null +++ b/.changeset/real-baboons-complain.md @@ -0,0 +1,5 @@ +--- +'@module-federation/nextjs-mf': minor +--- + +support shareable runtime with experiments `use-host`. Defaults to `hoisted` diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3b6dc3a57f..f188a9e82c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -66,6 +66,11 @@ jobs: uses: ./.github/workflows/e2e-runtime.yml secrets: inherit + e2e-shareable-runtime: + needs: checkout-install + uses: ./.github/workflows/e2e-shareruntime.yml + secrets: inherit + e2e-manifest: needs: checkout-install uses: ./.github/workflows/e2e-manifest.yml diff --git a/.github/workflows/e2e-shareruntime.yml b/.github/workflows/e2e-shareruntime.yml new file mode 100644 index 0000000000..2431c63d57 --- /dev/null +++ b/.github/workflows/e2e-shareruntime.yml @@ -0,0 +1,46 @@ +# .github/workflows/e2e-share-host.yml +name: E2E Test for Shared Runtime + +on: + workflow_call: + +jobs: + e2e-runtime: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Pnpm + run: corepack enable + + - name: Setup Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'pnpm' + + - name: Set Nx SHA + uses: nrwl/nx-set-shas@v3 + + - name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable + run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> $GITHUB_ENV + + - name: Install Dependencies + run: pnpm install + + - name: Install Cypress + run: npx cypress install + + - name: Run Build for All + run: npx nx run-many --targets=build --projects=tag:type:pkg + + - name: Run condition check script + id: check-ci + run: node tools/scripts/ci-is-affected.mjs --appName=3005-runtime-host + + - name: E2E Test for Runtime Demo + if: steps.check-ci.outcome == 'success' + run: npx kill-port --port 3005,3006,3007 && pnpm run app:shareable:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3005-share-host --parallel=1 && lsof -ti tcp:3005,3006,3007 | xargs kill diff --git a/apps/3000-home/next-env.d.ts b/apps/3000-home/next-env.d.ts index 4f11a03dc6..a4a7b3f5cf 100644 --- a/apps/3000-home/next-env.d.ts +++ b/apps/3000-home/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/apps/3001-shop/next-env.d.ts b/apps/3001-shop/next-env.d.ts index 4f11a03dc6..a4a7b3f5cf 100644 --- a/apps/3001-shop/next-env.d.ts +++ b/apps/3001-shop/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/apps/3001-shop/next.config.js b/apps/3001-shop/next.config.js index 7f56ae93d5..0d94427c5e 100644 --- a/apps/3001-shop/next.config.js +++ b/apps/3001-shop/next.config.js @@ -26,6 +26,9 @@ const nextConfig = { isServer ? 'ssr' : 'chunks' }/remoteEntry.js`, }, + experiments: { + federationRuntime: 'use-host', + }, exposes: { './useCustomRemoteHook': './components/useCustomRemoteHook', './WebpackSvg': './components/WebpackSvg', diff --git a/apps/3002-checkout/next-env.d.ts b/apps/3002-checkout/next-env.d.ts index 4f11a03dc6..a4a7b3f5cf 100644 --- a/apps/3002-checkout/next-env.d.ts +++ b/apps/3002-checkout/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/apps/shared-runtime/3005-share-host/.babelrc b/apps/shared-runtime/3005-share-host/.babelrc new file mode 100644 index 0000000000..88ee27b140 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/.babelrc @@ -0,0 +1,11 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic" + } + ] + ], + "plugins": [] +} diff --git a/apps/shared-runtime/3005-share-host/cypress.config.ts b/apps/shared-runtime/3005-share-host/cypress.config.ts new file mode 100644 index 0000000000..3d66abaa6e --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress.config.ts @@ -0,0 +1,7 @@ +import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset'; +import { defineConfig } from 'cypress'; + +export default defineConfig({ + e2e: nxE2EPreset(__filename, { cypressDir: 'cypress' }), + defaultCommandTimeout: 20000, +}); diff --git a/apps/shared-runtime/3005-share-host/cypress/e2e/app.cy.ts b/apps/shared-runtime/3005-share-host/cypress/e2e/app.cy.ts new file mode 100644 index 0000000000..d57b22cbae --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/e2e/app.cy.ts @@ -0,0 +1,80 @@ +import { getH1, getH3 } from '../support/app.po'; + +describe('3005-share-host/', () => { + beforeEach(() => cy.visit('/')); + + describe('Welcome message', () => { + it('should display welcome message', () => { + getH1().contains('Runtime Demo'); + }); + }); + + describe('Image checks', () => { + it('should check that the home-webpack-png and remote1-webpack-png images are not 404', () => { + // Get the src attribute of the home-webpack-png image + cy.get('img.home-webpack-png') + .invoke('attr', 'src') + .then((src) => { + if (!src) { + throw new Error('src must not be empty'); + } + cy.log(src); + cy.request(src).its('status').should('eq', 200); + }); + + // Get the src attribute of the shop-webpack-png image + cy.get('img.remote1-webpack-png') + .invoke('attr', 'src') + .then((src) => { + if (!src) { + throw new Error('src must not be empty'); + } + // Send a GET request to the src URL + cy.request(src).its('status').should('eq', 200); + }); + }); + + it('should check that the home-webpack-svg and remote1-webpack-svg images are not 404', () => { + // Get the src attribute of the home-webpack-png image + cy.get('img.home-webpack-svg') + .invoke('attr', 'src') + .then((src) => { + if (!src) { + throw new Error('src must not be empty'); + } + cy.log(src); + cy.request(src).its('status').should('eq', 200); + }); + + // Get the src attribute of the shop-webpack-png image + cy.get('img.remote1-webpack-svg') + .invoke('attr', 'src') + .then((src) => { + if (!src) { + throw new Error('src must not be empty'); + } + // Send a GET request to the src URL + cy.request(src).its('status').should('eq', 200); + }); + }); + }); + + describe('Shared react hook check', () => { + it('should display text which comes from remote1 hook', () => { + cy.get('.remote1-text') + .invoke('html') + .should('equal', 'Custom hook from localhost:3006 works!'); + }); + }); + + describe('dynamic remote check', () => { + describe('dynamic-remote/ButtonOldAnt', () => { + it('should display remote button', () => { + cy.get('button.test-remote2').contains('Button'); + }); + it('should use host shared(antd)', () => { + cy.get('button.test-remote2').contains('Button from antd@4.24.15'); + }); + }); + }); +}); diff --git a/apps/shared-runtime/3005-share-host/cypress/fixtures/example.json b/apps/shared-runtime/3005-share-host/cypress/fixtures/example.json new file mode 100644 index 0000000000..02e4254378 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/apps/shared-runtime/3005-share-host/cypress/support/app.po.ts b/apps/shared-runtime/3005-share-host/cypress/support/app.po.ts new file mode 100644 index 0000000000..1fc2527567 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/support/app.po.ts @@ -0,0 +1,3 @@ +export const getH1 = () => cy.get('h1'); +export const getH2 = () => cy.get('h2'); +export const getH3 = () => cy.get('h3'); diff --git a/apps/shared-runtime/3005-share-host/cypress/support/commands.ts b/apps/shared-runtime/3005-share-host/cypress/support/commands.ts new file mode 100644 index 0000000000..c302a3260e --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/support/commands.ts @@ -0,0 +1,35 @@ +/// + +// *********************************************** +// This example commands.ts shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** + +// eslint-disable-next-line @typescript-eslint/no-namespace +declare namespace Cypress { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface Chainable { + login(email: string, password: string): void; + } +} + +// -- This is a parent command -- +Cypress.Commands.add('login', (email, password) => { + // console.log('Custom command example: Login', email, password); +}); +// +// -- This is a child command -- +// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/apps/shared-runtime/3005-share-host/cypress/support/e2e.ts b/apps/shared-runtime/3005-share-host/cypress/support/e2e.ts new file mode 100644 index 0000000000..1c1a9e772b --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/support/e2e.ts @@ -0,0 +1,17 @@ +// *********************************************************** +// This example support/e2e.ts is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.ts using ES2015 syntax: +import './commands'; diff --git a/apps/shared-runtime/3005-share-host/cypress/tsconfig.json b/apps/shared-runtime/3005-share-host/cypress/tsconfig.json new file mode 100644 index 0000000000..0285a6e4c6 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/cypress/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "allowJs": true, + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["cypress", "node"], + "sourceMap": false + }, + "include": [ + "**/*.ts", + "**/*.js", + "../cypress.config.ts", + "../**/*.cy.ts", + "../**/*.cy.tsx", + "../**/*.cy.js", + "../**/*.cy.jsx", + "../**/*.d.ts" + ] +} diff --git a/apps/shared-runtime/3005-share-host/package.json b/apps/shared-runtime/3005-share-host/package.json new file mode 100644 index 0000000000..d71407fdc7 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/package.json @@ -0,0 +1,17 @@ +{ + "name": "share-host", + "private": true, + "version": "0.0.0", + "devDependencies": { + "@module-federation/core": "workspace:*", + "@module-federation/runtime": "workspace:*", + "@module-federation/typescript": "workspace:*", + "@module-federation/enhanced": "workspace:*", + "@module-federation/dts-plugin": "workspace:*", + "@pmmmwh/react-refresh-webpack-plugin": "0.5.15", + "react-refresh": "0.14.0" + }, + "dependencies": { + "antd": "4.24.15" + } +} diff --git a/apps/shared-runtime/3005-share-host/project.json b/apps/shared-runtime/3005-share-host/project.json new file mode 100644 index 0000000000..ccbac42802 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/project.json @@ -0,0 +1,135 @@ +{ + "name": "3005-share-host", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/shared-runtime/3005-share-host/src", + "projectType": "application", + "tags": [], + "targets": { + "build": { + "executor": "@nx/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "compiler": "babel", + "outputPath": "apps/shared-runtime/3005-share-host/dist", + "index": "apps/shared-runtime/3005-share-host/src/index.html", + "baseHref": "/", + "main": "apps/shared-runtime/3005-share-host/src/index.ts", + "tsConfig": "apps/shared-runtime/3005-share-host/tsconfig.app.json", + "styles": [], + "scripts": [], + "webpackConfig": "apps/shared-runtime/3005-share-host/webpack.config.js", + "babelUpwardRootMode": true + }, + "configurations": { + "development": { + "extractLicenses": false, + "optimization": false, + "sourceMap": true, + "vendorChunk": true + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": false, + "vendorChunk": false + } + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "serve": { + "executor": "@nx/webpack:dev-server", + "defaultConfiguration": "production", + "options": { + "buildTarget": "3005-share-host:build", + "hmr": true, + "port": 3005, + "devRemotes": ["3006-runtime-remote"] + }, + "configurations": { + "development": { + "buildTarget": "3005-share-host:build:development" + }, + "production": { + "buildTarget": "3005-share-host:build:production", + "hmr": false + } + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/shared-runtime/host/**/*.{ts,tsx,js,jsx}"] + } + }, + "serve-static": { + "executor": "@nx/web:file-server", + "defaultConfiguration": "development", + "options": { + "buildTarget": "3005-share-host:build", + "port": 3005 + }, + "configurations": { + "development": { + "buildTarget": "3005-share-host:build:development" + }, + "production": { + "buildTarget": "3005-share-host:build:production" + } + } + }, + "e2e": { + "executor": "@nx/cypress:cypress", + "options": { + "cypressConfig": "apps/shared-runtime/3005-share-host/cypress.config.ts", + "testingType": "e2e", + "baseUrl": "http://127.0.0.1:3005", + "browser": "chrome" + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ], + "configurations": { + "development": { + "runnerUi": true, + "browser": "electron", + "exit": false, + "watch": true + } + } + }, + "test:e2e": { + "executor": "nx:run-commands", + "options": { + "parallel": true, + "commands": [ + { + "command": "lsof -i :3005 || nx run 3005-share-host:serve", + "forwardAllArgs": false + }, + { + "command": "sleep 4 && nx run 3005-share-host:e2e", + "forwardAllArgs": true + } + ] + } + } + } +} diff --git a/apps/shared-runtime/3005-share-host/remotes.d.ts b/apps/shared-runtime/3005-share-host/remotes.d.ts new file mode 100644 index 0000000000..3c64dfcc44 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/remotes.d.ts @@ -0,0 +1,4 @@ +// declare module 'remote1/useCustomRemoteHook'; +// declare module 'remote1/WebpackSvg'; +// declare module 'remote1/WebpackPng'; +// declare module 'dynamic-remote/ButtonOldAnt'; diff --git a/apps/shared-runtime/3005-share-host/src/App.tsx b/apps/shared-runtime/3005-share-host/src/App.tsx new file mode 100644 index 0000000000..2cf2933f74 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/App.tsx @@ -0,0 +1,30 @@ +import React, { lazy } from 'react'; +import { loadRemote } from '@module-federation/runtime'; +import { Link, Routes, Route, BrowserRouter } from 'react-router-dom'; +import Root from './Root'; +import Remote1 from './Remote1'; +import Remote2 from './Remote2'; + +const App = () => ( + +

Runtime Demo

+
    +
  • + Home +
  • +
  • + remote1 +
  • +
  • + remote2 +
  • +
+ + } /> + } /> + } /> + +
+); + +export default App; diff --git a/apps/shared-runtime/3005-share-host/src/Button.tsx b/apps/shared-runtime/3005-share-host/src/Button.tsx new file mode 100644 index 0000000000..6abbdf0b18 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/Button.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +const style = { + background: '#800', + color: '#fff', + padding: 12, +}; + +const Button = () => ; + +export default Button; diff --git a/apps/shared-runtime/3005-share-host/src/Remote1.tsx b/apps/shared-runtime/3005-share-host/src/Remote1.tsx new file mode 100644 index 0000000000..5939167be4 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/Remote1.tsx @@ -0,0 +1,32 @@ +import React, { Suspense, lazy } from 'react'; + +export const WebpackSvgRemote = function () { + const WebpackSvgRemote = lazy(() => import('remote1/WebpackSvg')); + return ( + + + + ); +}; + +export const WebpackPngRemote = function () { + const WebpackPngRemote = lazy(() => import('remote1/WebpackPng')); + return ( + + + + ); +}; + +function Remote1() { + return ( +
+

WebpackSvgRemote

+ +

WebpackPngRemote

+ +
+ ); +} + +export default Remote1; diff --git a/apps/shared-runtime/3005-share-host/src/Remote2.tsx b/apps/shared-runtime/3005-share-host/src/Remote2.tsx new file mode 100644 index 0000000000..9d8c17220d --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/Remote2.tsx @@ -0,0 +1,19 @@ +import React, { Suspense, lazy } from 'react'; +import { loadRemote } from '@module-federation/runtime'; + +function DynamicRemoteButton() { + // @ts-ignore ignore + const Comp = React.lazy(async () => { + //@ts-ignore + const Button = await loadRemote('dynamic-remote/ButtonOldAnt'); + console.log(Button); + return Button; + }); + return ( + + + + ); +} + +export default DynamicRemoteButton; diff --git a/apps/shared-runtime/3005-share-host/src/Root.tsx b/apps/shared-runtime/3005-share-host/src/Root.tsx new file mode 100644 index 0000000000..ede13ed7b3 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/Root.tsx @@ -0,0 +1,95 @@ +import React, { Suspense, lazy } from 'react'; +import TestRemoteHook from './test-remote-hook'; +import LocalBtn from './components/ButtonOldAnt'; +import WebpackPng from './webpack.png'; +import WebpackSvg from './webpack.svg'; +import { WebpackPngRemote, WebpackSvgRemote } from './Remote1'; +import Remote2 from './Remote2'; + +const Root = () => ( +
+

Host

+

check static remote

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test caseExpectedActual
Test hook from remote localhost:3006 +
+ Page with custom remote hook. You must see text in red box below: +
+ Custom hook from localhost:3006 works! +
+
+
+ +
+ Loading remote component with PNG image from localhost:3006 +
+
(check publicPath fix in image-loader)
+
+ + + +
+ Loading remote component with SVG from localhost:3006 +
+
(check publicPath fix in url-loader)
+
+ + + +
+ +

check dynamic remote

+ + + + + + + + + + + + + + + + + +
Test caseExpectedActual
Loading dynamic remote Button from localhost:3007 + + + +
+
+); + +export default Root; diff --git a/apps/shared-runtime/3005-share-host/src/bootstrap.tsx b/apps/shared-runtime/3005-share-host/src/bootstrap.tsx new file mode 100644 index 0000000000..3f87d871a1 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/bootstrap.tsx @@ -0,0 +1,27 @@ +import React, { StrictMode } from 'react'; +import { + init, + registerGlobalPlugins, +} from '@module-federation/enhanced/runtime'; +import * as ReactDOM from 'react-dom/client'; +import App from './App'; + +init({ + name: 'runtime_host', + remotes: [ + { + name: 'runtime_remote2', + alias: 'dynamic-remote', + entry: 'http://127.0.0.1:3007/mf-manifest.json', + }, + ], +}); + +const root = ReactDOM.createRoot( + document.getElementById('root') as HTMLElement, +); +root.render( + + + , +); diff --git a/apps/shared-runtime/3005-share-host/src/components/ButtonOldAnt.tsx b/apps/shared-runtime/3005-share-host/src/components/ButtonOldAnt.tsx new file mode 100644 index 0000000000..b076eba803 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/components/ButtonOldAnt.tsx @@ -0,0 +1,7 @@ +import Button from 'antd/lib/button'; +import { version } from 'antd/package.json'; +import stuff from './stuff.module.css'; + +export default function ButtonOldAnt() { + return ; +} diff --git a/apps/shared-runtime/3005-share-host/src/components/stuff.module.css b/apps/shared-runtime/3005-share-host/src/components/stuff.module.css new file mode 100644 index 0000000000..5a853caf0d --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/components/stuff.module.css @@ -0,0 +1,3 @@ +.test { + background: red; +} diff --git a/apps/shared-runtime/3005-share-host/src/components/stuff.module.css.d.ts b/apps/shared-runtime/3005-share-host/src/components/stuff.module.css.d.ts new file mode 100644 index 0000000000..a364d3102c --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/components/stuff.module.css.d.ts @@ -0,0 +1,3 @@ +const classes: { readonly test: string }; + +export default classes; diff --git a/apps/shared-runtime/3005-share-host/src/index.html b/apps/shared-runtime/3005-share-host/src/index.html new file mode 100644 index 0000000000..19f0d60626 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/index.html @@ -0,0 +1,6 @@ + + + +
+ + diff --git a/apps/shared-runtime/3005-share-host/src/index.ts b/apps/shared-runtime/3005-share-host/src/index.ts new file mode 100644 index 0000000000..51ffb285cf --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/index.ts @@ -0,0 +1,9 @@ +import { + init, + registerGlobalPlugins, +} from '@module-federation/enhanced/runtime'; +import customPlugin from './runtimePlugin'; + +registerGlobalPlugins([customPlugin()]); + +require('./bootstrap'); diff --git a/apps/shared-runtime/3005-share-host/src/runtimePlugin.ts b/apps/shared-runtime/3005-share-host/src/runtimePlugin.ts new file mode 100644 index 0000000000..e45bce9631 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/runtimePlugin.ts @@ -0,0 +1,55 @@ +import { FederationRuntimePlugin } from '@module-federation/runtime/types'; +export default function (): FederationRuntimePlugin { + return { + name: 'custom-plugin', + beforeInit(args) { + const { userOptions, shareInfo } = args; + const { shared } = userOptions; + + if (shared) { + Object.keys(shared || {}).forEach((sharedKey) => { + const sharedItem = shared[sharedKey]; + if (!Array.isArray(sharedItem) && !sharedItem.strategy) { + sharedItem.strategy = 'loaded-first'; + } + }); + } + return args; + }, + beforeRequest(args) { + console.log('beforeRequest: ', args); + return args; + }, + //@ts-ignore + // async createScript(args) { + // // anything can be script loader + // console.log('createScript', args); + // return fetch(args.url).then((res) => { + // res.text().then((text) => { + // eval(text); + // }); + // }); + // }, + afterResolve(args) { + console.log('afterResolve', args); + // randomly switch between different modules + // if (Math.random() > 0.5) { + // args.expose = './Button1'; + // return args; + // } + + return args; + }, + onLoad(args) { + console.log('onLoad: ', args); + return args; + }, + async loadShare(args) { + console.log('loadShare:', args); + }, + async beforeLoadShare(args) { + console.log('beforeloadShare:', args); + return args; + }, + }; +} diff --git a/apps/shared-runtime/3005-share-host/src/test-remote-hook.tsx b/apps/shared-runtime/3005-share-host/src/test-remote-hook.tsx new file mode 100644 index 0000000000..47dd0a35bf --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/test-remote-hook.tsx @@ -0,0 +1,38 @@ +import useCustomRemoteHook from 'remote1/useCustomRemoteHook'; + +// function RemoteHookText() { +// // @ts-ignore ignore +// const RemoteText = React.lazy(async () => { +// //@ts-ignore +// const useCustomRemoteHook = await loadRemote('app2/useCustomRemoteHook') as ()=>string; +// console.log(111,useCustomRemoteHook) +// const text = useCustomRemoteHook.default(); +// console.log(23424,text) +// return text; +// }); +// return ( +// +//
{RemoteText}
+//
+// ); +// } + +const TestRemoteHook = () => { + const text = useCustomRemoteHook(); + + return ( + <> +
+ Page with custom remote hook. You must see text in red box below: +
+ {text} +
+
+ + ); +}; + +export default TestRemoteHook; diff --git a/apps/shared-runtime/3005-share-host/src/webpack.png b/apps/shared-runtime/3005-share-host/src/webpack.png new file mode 100644 index 0000000000..76ad6c0767 Binary files /dev/null and b/apps/shared-runtime/3005-share-host/src/webpack.png differ diff --git a/apps/shared-runtime/3005-share-host/src/webpack.svg b/apps/shared-runtime/3005-share-host/src/webpack.svg new file mode 100644 index 0000000000..7b49ff1185 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/src/webpack.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/shared-runtime/3005-share-host/tsconfig.app.json b/apps/shared-runtime/3005-share-host/tsconfig.app.json new file mode 100644 index 0000000000..a3afa8cdf7 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/tsconfig.app.json @@ -0,0 +1,31 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts" + ], + "paths": { + "*": ["./@mf-types/*"] + } + }, + "files": [ + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" + ], + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "dist/**" + ], + "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] +} diff --git a/apps/shared-runtime/3005-share-host/tsconfig.json b/apps/shared-runtime/3005-share-host/tsconfig.json new file mode 100644 index 0000000000..1253e3c31f --- /dev/null +++ b/apps/shared-runtime/3005-share-host/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "./", + "jsx": "react-jsx", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "resolveJsonModule": true, + "paths": { + "*": ["./@mf-types/*"] + } + }, + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + } + ] +} diff --git a/apps/shared-runtime/3005-share-host/webpack.config.js b/apps/shared-runtime/3005-share-host/webpack.config.js new file mode 100644 index 0000000000..2fdaa3a8b4 --- /dev/null +++ b/apps/shared-runtime/3005-share-host/webpack.config.js @@ -0,0 +1,83 @@ +const path = require('path'); +const { + ModuleFederationPlugin, +} = require('@module-federation/enhanced/webpack'); +const { composePlugins, withNx } = require('@nx/webpack'); +const { withReact } = require('@nx/react'); + +module.exports = composePlugins(withNx(), withReact(), (config, context) => { + config.watchOptions = { + ignored: ['**/node_modules/**', '**/@mf-types/**', '**/dist/**'], + }; + + config.plugins.push( + new ModuleFederationPlugin({ + name: 'runtime_host', + experiments: { federationRuntime: 'use-host' }, + remotes: { + remote1: 'runtime_remote1@http://127.0.0.1:3006/mf-manifest.json', + }, + filename: 'remoteEntry.js', + exposes: { + './Button': './src/Button.tsx', + }, + dts: { + tsConfigPath: path.resolve(__dirname, 'tsconfig.app.json'), + }, + shareStrategy: 'loaded-first', + shared: { + lodash: { + singleton: true, + requiredVersion: '^4.0.0', + }, + antd: { + singleton: true, + requiredVersion: '^4.0.0', + }, + react: { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + }, + }), + ); + if (!config.devServer) { + config.devServer = {}; + } + config.devServer.host = '127.0.0.1'; + config.plugins.forEach((p) => { + if (p.constructor.name === 'ModuleFederationPlugin') { + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + p._options.library = undefined; + } + }); + + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + config.experiments = { outputModule: false }; + + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + config.output = { + ...config.output, + scriptType: 'text/javascript', + }; + config.optimization = { + runtimeChunk: false, + minimize: false, + moduleIds: 'named', + }; + // const mf = await withModuleFederation(defaultConfig); + return config; +}); diff --git a/apps/shared-runtime/3006-share-remote/.babelrc b/apps/shared-runtime/3006-share-remote/.babelrc new file mode 100644 index 0000000000..88ee27b140 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/.babelrc @@ -0,0 +1,11 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic" + } + ] + ], + "plugins": [] +} diff --git a/apps/shared-runtime/3006-share-remote/CHANGELOG.md b/apps/shared-runtime/3006-share-remote/CHANGELOG.md new file mode 100644 index 0000000000..3b38c29ae7 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/CHANGELOG.md @@ -0,0 +1,7 @@ +# runtime-remote1 + +## 0.0.1 + +### Patch Changes + +- a2bfb9b: fix: In load remote, link preload is not used to preload resources, preventing resource reloading diff --git a/apps/shared-runtime/3006-share-remote/package.json b/apps/shared-runtime/3006-share-remote/package.json new file mode 100644 index 0000000000..7f6b85ddb0 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/package.json @@ -0,0 +1,15 @@ +{ + "name": "share-remote1", + "version": "0.0.1", + "private": true, + "devDependencies": { + "@module-federation/core": "workspace:*", + "@module-federation/enhanced": "workspace:*", + "@module-federation/typescript": "workspace:*", + "@pmmmwh/react-refresh-webpack-plugin": "0.5.15", + "react-refresh": "0.14.0" + }, + "dependencies": { + "antd": "4.24.15" + } +} diff --git a/apps/shared-runtime/3006-share-remote/project.json b/apps/shared-runtime/3006-share-remote/project.json new file mode 100644 index 0000000000..49f70222cb --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/project.json @@ -0,0 +1,93 @@ +{ + "name": "3006-share-remote", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/shared-runtime/3006-share-remote/src", + "projectType": "application", + "tags": [], + "targets": { + "build": { + "executor": "@nx/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "compiler": "babel", + "outputPath": "apps/shared-runtime/3006-share-remote/dist", + "index": "apps/shared-runtime/3006-share-remote/src/index.html", + "baseHref": "/", + "main": "apps/shared-runtime/3006-share-remote/src/index.tsx", + "tsConfig": "apps/shared-runtime/3006-share-remote/tsconfig.app.json", + "styles": [], + "scripts": [], + "webpackConfig": "apps/shared-runtime/3006-share-remote/webpack.config.js", + "babelUpwardRootMode": true + }, + "configurations": { + "development": { + "extractLicenses": false, + "optimization": false, + "sourceMap": true, + "vendorChunk": true + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": false, + "vendorChunk": false + } + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "serve": { + "executor": "@nx/webpack:dev-server", + "defaultConfiguration": "production", + "options": { + "buildTarget": "3006-share-remote:build", + "hmr": true, + "port": 3006 + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ], + "configurations": { + "development": { + "buildTarget": "3006-share-remote:build:development" + }, + "production": { + "buildTarget": "3006-share-remote:build:production", + "hmr": false + } + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/node-remote/**/*.{ts,tsx,js,jsx}"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "apps/node-remote/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + } +} diff --git a/apps/shared-runtime/3006-share-remote/public/.gitkeep b/apps/shared-runtime/3006-share-remote/public/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/shared-runtime/3006-share-remote/public/webpack.png b/apps/shared-runtime/3006-share-remote/public/webpack.png new file mode 100644 index 0000000000..76ad6c0767 Binary files /dev/null and b/apps/shared-runtime/3006-share-remote/public/webpack.png differ diff --git a/apps/shared-runtime/3006-share-remote/public/webpack.svg b/apps/shared-runtime/3006-share-remote/public/webpack.svg new file mode 100644 index 0000000000..7b49ff1185 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/public/webpack.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/shared-runtime/3006-share-remote/src/App.tsx b/apps/shared-runtime/3006-share-remote/src/App.tsx new file mode 100644 index 0000000000..de01fce4f5 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/App.tsx @@ -0,0 +1,12 @@ +import LocalButton from './Button'; +import React from 'react'; + +const App = () => ( +
+

Bi-Directional

+

App 2

+ +
+); + +export default App; diff --git a/apps/shared-runtime/3006-share-remote/src/Button.tsx b/apps/shared-runtime/3006-share-remote/src/Button.tsx new file mode 100644 index 0000000000..f75802b9d5 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/Button.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +const style = { + background: '#00c', + color: '#fff', + padding: 12, +}; + +const Button = () => ; + +export default Button; diff --git a/apps/shared-runtime/3006-share-remote/src/components/WebpackPng.tsx b/apps/shared-runtime/3006-share-remote/src/components/WebpackPng.tsx new file mode 100644 index 0000000000..f371359bfc --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/components/WebpackPng.tsx @@ -0,0 +1,6 @@ +import png from '../../public/webpack.png'; +import './a.css'; + +export default function WebpackPng() { + return webpack png; +} diff --git a/apps/shared-runtime/3006-share-remote/src/components/WebpackSvg.tsx b/apps/shared-runtime/3006-share-remote/src/components/WebpackSvg.tsx new file mode 100644 index 0000000000..8679f254bf --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/components/WebpackSvg.tsx @@ -0,0 +1,5 @@ +import svg from '../../public/webpack.svg'; + +export default function WebpackSvg() { + return webpack svg; +} diff --git a/apps/shared-runtime/3006-share-remote/src/components/a.css b/apps/shared-runtime/3006-share-remote/src/components/a.css new file mode 100644 index 0000000000..0701c191b1 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/components/a.css @@ -0,0 +1,3 @@ +span { + color: black; +} diff --git a/apps/shared-runtime/3006-share-remote/src/components/useCustomRemoteHook.tsx b/apps/shared-runtime/3006-share-remote/src/components/useCustomRemoteHook.tsx new file mode 100644 index 0000000000..c4d66981f7 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/components/useCustomRemoteHook.tsx @@ -0,0 +1,12 @@ +import React, { useState, useEffect } from 'react'; + +function useCustomRemoteHook() { + const [isOnline, setIsOnline] = useState(null); + console.log(isOnline); + useEffect(() => { + console.log('some custom hook'); + }, []); + + return 'Custom hook from localhost:3006 works!'; +} +export default useCustomRemoteHook; diff --git a/apps/shared-runtime/3006-share-remote/src/index.html b/apps/shared-runtime/3006-share-remote/src/index.html new file mode 100644 index 0000000000..19f0d60626 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/index.html @@ -0,0 +1,6 @@ + + + +
+ + diff --git a/apps/shared-runtime/3006-share-remote/src/index.tsx b/apps/shared-runtime/3006-share-remote/src/index.tsx new file mode 100644 index 0000000000..e1ff62d67f --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/src/index.tsx @@ -0,0 +1,13 @@ +import { StrictMode } from 'react'; +import * as ReactDOM from 'react-dom/client'; + +import App from './App'; + +const root = ReactDOM.createRoot( + document.getElementById('root') as HTMLElement, +); +root.render( + + + , +); diff --git a/apps/shared-runtime/3006-share-remote/tsconfig.app.json b/apps/shared-runtime/3006-share-remote/tsconfig.app.json new file mode 100644 index 0000000000..2e3e2ca97a --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/tsconfig.app.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts" + ] + }, + "files": [ + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" + ], + "include": ["src/**/*"] +} diff --git a/apps/shared-runtime/3006-share-remote/tsconfig.json b/apps/shared-runtime/3006-share-remote/tsconfig.json new file mode 100644 index 0000000000..e4c42c6665 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "jsx": "react-jsx", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + } + ] +} diff --git a/apps/shared-runtime/3006-share-remote/webpack.config.js b/apps/shared-runtime/3006-share-remote/webpack.config.js new file mode 100644 index 0000000000..e88085fa72 --- /dev/null +++ b/apps/shared-runtime/3006-share-remote/webpack.config.js @@ -0,0 +1,133 @@ +// const { registerPluginTSTranspiler } = require('nx/src/utils/nx-plugin.js'); +// registerPluginTSTranspiler(); + +const { composePlugins, withNx } = require('@nx/webpack'); +const { withReact } = require('@nx/react'); + +const path = require('path'); +// const { withModuleFederation } = require('@nx/react/module-federation'); +const { + ModuleFederationPlugin, +} = require('@module-federation/enhanced/webpack'); +const packageJson = require('./package.json'); + +process.env.FEDERATION_DEBUG = true; +module.exports = composePlugins( + withNx(), + withReact(), + async (config, context) => { + config.watchOptions = { + ignored: ['**/node_modules/**', '**/@mf-types/**'], + }; + // const ModuleFederationPlugin = webpack.container.ModuleFederationPlugin; + config.watchOptions = { + ignored: ['**/dist/**'], + }; + if (!config.devServer) { + config.devServer = {}; + } + config.devServer.host = '127.0.0.1'; + + config.plugins.push( + new ModuleFederationPlugin({ + name: 'runtime_remote1', + filename: 'remoteEntry.js', + exposes: { + './useCustomRemoteHook': './src/components/useCustomRemoteHook', + './WebpackSvg': './src/components/WebpackSvg', + './WebpackPng': './src/components/WebpackPng', + }, + experiments: { + federationRuntime: 'use-host', + }, + shareStrategy: 'loaded-first', + shared: { + lodash: { + singleton: true, + requiredVersion: '^4.0.0', + }, + antd: { + singleton: true, + requiredVersion: '^4.0.0', + }, + react: { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + }, + dts: { + tsConfigPath: path.resolve(__dirname, 'tsconfig.app.json'), + }, + }), + ); + // config.externals={ + // 'react':'React', + // 'react-dom':'ReactDom' + // } + config.optimization.runtimeChunk = false; + config.plugins.forEach((p) => { + if (p.constructor.name === 'ModuleFederationPlugin') { + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + p._options.library = undefined; + } + }); + + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + config.experiments = { outputModule: false }; + + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + config.output = { + ...config.output, + publicPath: 'http://127.0.0.1:3006/', + scriptType: 'text/javascript', + }; + config.optimization = { + // ...config.optimization, + runtimeChunk: false, + minimize: false, + moduleIds: 'named', + }; + // const mf = await withModuleFederation(defaultConfig); + return config; + /** @type {import('webpack').Configuration} */ + // const parsedConfig = mf(config, context); + + // parsedConfig.plugins.forEach((p) => { + // if (p.constructor.name === 'ModuleFederationPlugin') { + // //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + // p._options.library = undefined; + // } + // }); + + // parsedConfig.devServer = { + // ...(parsedConfig.devServer || {}), + // //Needs to resolve static files from the dist folder (@mf-types) + // static: path.resolve(__dirname, '../../dist/apps/shared-runtime/remote'), + // }; + + // //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + // parsedConfig.experiments = { outputModule: false }; + + // // Update the webpack config as needed here. + // // e.g. `config.plugins.push(new MyPlugin())` + // parsedConfig.output = { + // ...parsedConfig.output, + // scriptType: 'text/javascript', + // }; + + // return parsedConfig; + }, +); diff --git a/apps/shared-runtime/3007-share-remote/.babelrc b/apps/shared-runtime/3007-share-remote/.babelrc new file mode 100644 index 0000000000..88ee27b140 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/.babelrc @@ -0,0 +1,11 @@ +{ + "presets": [ + [ + "@nx/react/babel", + { + "runtime": "automatic" + } + ] + ], + "plugins": [] +} diff --git a/apps/shared-runtime/3007-share-remote/package.json b/apps/shared-runtime/3007-share-remote/package.json new file mode 100644 index 0000000000..f8eda9b510 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/package.json @@ -0,0 +1,15 @@ +{ + "name": "share-remote2", + "version": "0.0.0", + "private": true, + "devDependencies": { + "@module-federation/core": "workspace:*", + "@module-federation/enhanced": "workspace:*", + "@module-federation/typescript": "workspace:*", + "@pmmmwh/react-refresh-webpack-plugin": "0.5.15", + "react-refresh": "0.14.0" + }, + "dependencies": { + "antd": "4.24.15" + } +} diff --git a/apps/shared-runtime/3007-share-remote/project.json b/apps/shared-runtime/3007-share-remote/project.json new file mode 100644 index 0000000000..ba23e82efe --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/project.json @@ -0,0 +1,93 @@ +{ + "name": "3007-share-remote", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/shared-runtime/3007-share-remote/src", + "projectType": "application", + "tags": [], + "targets": { + "build": { + "executor": "@nx/webpack:webpack", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "compiler": "babel", + "outputPath": "apps/shared-runtime/3007-share-remote/dist", + "index": "apps/shared-runtime/3007-share-remote/src/index.html", + "baseHref": "/", + "main": "apps/shared-runtime/3007-share-remote/src/index.tsx", + "tsConfig": "apps/shared-runtime/3007-share-remote/tsconfig.app.json", + "styles": [], + "scripts": [], + "webpackConfig": "apps/shared-runtime/3007-share-remote/webpack.config.js", + "babelUpwardRootMode": true + }, + "configurations": { + "development": { + "extractLicenses": false, + "optimization": false, + "sourceMap": true, + "vendorChunk": true + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": false, + "vendorChunk": false + } + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "serve": { + "executor": "@nx/webpack:dev-server", + "defaultConfiguration": "production", + "options": { + "buildTarget": "3007-share-remote:build", + "hmr": true, + "port": 3007 + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ], + "configurations": { + "development": { + "buildTarget": "3007-share-remote:build:development" + }, + "production": { + "buildTarget": "3007-share-remote:build:production", + "hmr": false + } + } + }, + "lint": { + "executor": "@nx/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/node-remote/**/*.{ts,tsx,js,jsx}"] + } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "apps/node-remote/jest.config.ts", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + } + } +} diff --git a/apps/shared-runtime/3007-share-remote/src/App.tsx b/apps/shared-runtime/3007-share-remote/src/App.tsx new file mode 100644 index 0000000000..a7d1ac1bdc --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/App.tsx @@ -0,0 +1,11 @@ +import LocalButton from './Button'; + +const App = () => ( +
+

Bi-Directional

+

App 2

+ +
+); + +export default App; diff --git a/apps/shared-runtime/3007-share-remote/src/Button.tsx b/apps/shared-runtime/3007-share-remote/src/Button.tsx new file mode 100644 index 0000000000..19a4ba3358 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/Button.tsx @@ -0,0 +1,9 @@ +const style = { + background: '#f00505', + color: '#fff', + padding: 12, +}; + +const Button = () => ; + +export default Button; diff --git a/apps/shared-runtime/3007-share-remote/src/components/ButtonOldAnt.tsx b/apps/shared-runtime/3007-share-remote/src/components/ButtonOldAnt.tsx new file mode 100644 index 0000000000..9be30f28df --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/components/ButtonOldAnt.tsx @@ -0,0 +1,11 @@ +import Button from 'antd/lib/button'; +import { version } from 'antd/package.json'; +import stuff from './stuff.module.css'; + +export default function ButtonOldAnt() { + return ( + + ); +} diff --git a/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css b/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css new file mode 100644 index 0000000000..d5dd873125 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css @@ -0,0 +1,3 @@ +.test-remote2 { + background: red; +} diff --git a/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css.d.ts b/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css.d.ts new file mode 100644 index 0000000000..9c66e6a39a --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/components/stuff.module.css.d.ts @@ -0,0 +1,3 @@ +const classes: { readonly 'test-remote2': string }; + +export default classes; diff --git a/apps/shared-runtime/3007-share-remote/src/index.html b/apps/shared-runtime/3007-share-remote/src/index.html new file mode 100644 index 0000000000..19f0d60626 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/index.html @@ -0,0 +1,6 @@ + + + +
+ + diff --git a/apps/shared-runtime/3007-share-remote/src/index.tsx b/apps/shared-runtime/3007-share-remote/src/index.tsx new file mode 100644 index 0000000000..e1ff62d67f --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/src/index.tsx @@ -0,0 +1,13 @@ +import { StrictMode } from 'react'; +import * as ReactDOM from 'react-dom/client'; + +import App from './App'; + +const root = ReactDOM.createRoot( + document.getElementById('root') as HTMLElement, +); +root.render( + + + , +); diff --git a/apps/shared-runtime/3007-share-remote/tsconfig.app.json b/apps/shared-runtime/3007-share-remote/tsconfig.app.json new file mode 100644 index 0000000000..a7eb506691 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/tsconfig.app.json @@ -0,0 +1,28 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [ + "node", + "@nx/react/typings/cssmodule.d.ts", + "@nx/react/typings/image.d.ts" + ] + }, + "files": [ + "../../../node_modules/@nx/react/typings/cssmodule.d.ts", + "../../../node_modules/@nx/react/typings/image.d.ts" + ], + "exclude": [ + "jest.config.ts", + "**/*.spec.ts", + "**/*.test.ts", + "**/*.spec.tsx", + "**/*.test.tsx", + "**/*.spec.js", + "**/*.test.js", + "**/*.spec.jsx", + "**/*.test.jsx", + "dist/**" + ], + "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] +} diff --git a/apps/shared-runtime/3007-share-remote/tsconfig.json b/apps/shared-runtime/3007-share-remote/tsconfig.json new file mode 100644 index 0000000000..4b374b7af4 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "jsx": "react-jsx", + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "resolveJsonModule": true + }, + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + } + ] +} diff --git a/apps/shared-runtime/3007-share-remote/webpack.config.js b/apps/shared-runtime/3007-share-remote/webpack.config.js new file mode 100644 index 0000000000..3d0edc4215 --- /dev/null +++ b/apps/shared-runtime/3007-share-remote/webpack.config.js @@ -0,0 +1,80 @@ +const { composePlugins, withNx } = require('@nx/webpack'); +const { withReact } = require('@nx/react'); + +const { + ModuleFederationPlugin, +} = require('@module-federation/enhanced/webpack'); + +module.exports = composePlugins(withNx(), withReact(), (config, context) => { + config.watchOptions = { + ignored: ['**/node_modules/**', '**/@mf-types/**', '**/dist/**'], + }; + config.plugins.push( + new ModuleFederationPlugin({ + name: 'runtime_remote2', + filename: 'remoteEntry.js', + exposes: { + './ButtonOldAnt': './src/components/ButtonOldAnt', + }, + experiments: { federationRuntime: 'use-host' }, + shared: { + lodash: { + singleton: true, + requiredVersion: '^4.0.0', + }, + antd: { + singleton: true, + requiredVersion: '^4.0.0', + }, + react: { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom': { + singleton: true, + requiredVersion: '^18.2.0', + }, + 'react-dom/': { + singleton: true, + requiredVersion: '^18.2.0', + }, + }, + shareStrategy: 'loaded-first', + dev: { + disableLiveReload: true, + }, + }), + ); + if (!config.devServer) { + config.devServer = {}; + } + config.devServer.host = '127.0.0.1'; + config.optimization.runtimeChunk = false; + config.plugins.forEach((p) => { + if (p.constructor.name === 'ModuleFederationPlugin') { + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + p._options.library = undefined; + } + }); + + //Temporary workaround - https://github.com/nrwl/nx/issues/16983 + config.experiments = { outputModule: false }; + + // Update the webpack config as needed here. + // e.g. `config.plugins.push(new MyPlugin())` + config.output = { + ...config.output, + publicPath: 'http://127.0.0.1:3007/', + scriptType: 'text/javascript', + }; + config.optimization = { + ...config.optimization, + runtimeChunk: false, + minimize: false, + }; + return config; +}); diff --git a/apps/shared-runtime/3008-share-remote/CHANGELOG.md b/apps/shared-runtime/3008-share-remote/CHANGELOG.md new file mode 100644 index 0000000000..23519ffb6e --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/CHANGELOG.md @@ -0,0 +1,244 @@ +# 3008-share-remote + +## 1.0.37 + +### Patch Changes + +- Updated dependencies [1b6bf0e] +- Updated dependencies [9e32644] +- Updated dependencies [9e32644] +- Updated dependencies [9e32644] + - @module-federation/enhanced@0.6.7 + +## 1.0.36 + +### Patch Changes + +- @module-federation/enhanced@0.6.6 + +## 1.0.35 + +### Patch Changes + +- @module-federation/enhanced@0.6.5 + +## 1.0.34 + +### Patch Changes + +- @module-federation/enhanced@0.6.4 + +## 1.0.33 + +### Patch Changes + +- @module-federation/enhanced@0.6.3 + +## 1.0.32 + +### Patch Changes + +- @module-federation/enhanced@0.6.2 + +## 1.0.31 + +### Patch Changes + +- Updated dependencies [2855583] +- Updated dependencies [2855583] + - @module-federation/enhanced@0.6.1 + +## 1.0.30 + +### Patch Changes + +- Updated dependencies [f245bb3] +- Updated dependencies [1d9bb77] + - @module-federation/enhanced@0.6.0 + +## 1.0.29 + +### Patch Changes + +- Updated dependencies [b90fa7d] + - @module-federation/enhanced@0.5.2 + +## 1.0.28 + +### Patch Changes + +- @module-federation/enhanced@0.5.1 + +## 1.0.27 + +### Patch Changes + +- @module-federation/enhanced@0.5.0 + +## 1.0.26 + +### Patch Changes + +- Updated dependencies [a335707] + - @module-federation/enhanced@0.4.0 + +## 1.0.25 + +### Patch Changes + +- Updated dependencies [59db2fd] + - @module-federation/enhanced@0.3.5 + +## 1.0.24 + +### Patch Changes + +- @module-federation/enhanced@0.3.4 + +## 1.0.23 + +### Patch Changes + +- @module-federation/enhanced@0.3.3 + +## 1.0.22 + +### Patch Changes + +- Updated dependencies [85ae159] + - @module-federation/enhanced@0.3.2 + +## 1.0.21 + +### Patch Changes + +- @module-federation/enhanced@0.3.1 + +## 1.0.20 + +### Patch Changes + +- Updated dependencies [fa37cc4] + - @module-federation/enhanced@0.3.0 + +## 1.0.19 + +### Patch Changes + +- @module-federation/enhanced@0.2.8 + +## 1.0.18 + +### Patch Changes + +- Updated dependencies [b00ef13] + - @module-federation/enhanced@0.2.7 + +## 1.0.17 + +### Patch Changes + +- Updated dependencies [4488064] + - @module-federation/enhanced@0.2.6 + +## 1.0.16 + +### Patch Changes + +- @module-federation/enhanced@0.2.5 + +## 1.0.15 + +### Patch Changes + +- @module-federation/enhanced@0.2.4 + +## 1.0.14 + +### Patch Changes + +- @module-federation/enhanced@0.2.3 + +## 1.0.13 + +### Patch Changes + +- @module-federation/enhanced@0.2.2 + +## 1.0.12 + +### Patch Changes + +- Updated dependencies [88445e7] + - @module-federation/enhanced@0.2.1 + +## 1.0.11 + +### Patch Changes + +- @module-federation/enhanced@0.2.0 + +## 1.0.10 + +### Patch Changes + +- Updated dependencies [1e93c5e] + - @module-federation/enhanced@0.1.21 + +## 1.0.9 + +### Patch Changes + +- Updated dependencies [766de80] +- Updated dependencies [d5ac542] + - @module-federation/enhanced@0.1.20 + +## 1.0.8 + +### Patch Changes + +- Updated dependencies [e1518e2] + - @module-federation/enhanced@0.1.19 + +## 1.0.7 + +### Patch Changes + +- @module-federation/enhanced@0.1.18 + +## 1.0.6 + +### Patch Changes + +- @module-federation/enhanced@0.1.17 + +## 1.0.5 + +### Patch Changes + +- @module-federation/enhanced@0.1.16 + +## 1.0.4 + +### Patch Changes + +- @module-federation/enhanced@0.1.15 + +## 1.0.3 + +### Patch Changes + +- @module-federation/enhanced@0.1.14 + +## 1.0.2 + +### Patch Changes + +- Updated dependencies [0113b81] + - @module-federation/enhanced@0.1.13 + +## 1.0.1 + +### Patch Changes + +- @module-federation/enhanced@0.1.12 diff --git a/apps/shared-runtime/3008-share-remote/package.json b/apps/shared-runtime/3008-share-remote/package.json new file mode 100644 index 0000000000..2254a7d71e --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/package.json @@ -0,0 +1,19 @@ +{ + "name": "3008-share-remote", + "private": true, + "version": "1.0.37", + "scripts": { + "dev": "rsbuild dev", + "build": "rsbuild build", + "preview": "rsbuild preview" + }, + "dependencies": { + "@module-federation/enhanced": "workspace:*", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@rsbuild/core": "^0.6.15", + "@rsbuild/plugin-react": "^0.6.15" + } +} diff --git a/apps/shared-runtime/3008-share-remote/project.json b/apps/shared-runtime/3008-share-remote/project.json new file mode 100644 index 0000000000..70d7f4e901 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/project.json @@ -0,0 +1,48 @@ +{ + "name": "3008-share-remote", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "application", + "sourceRoot": "apps/shared-runtime/3008-share-remote/src", + "tags": [], + "targets": { + "build": { + "executor": "nx:run-commands", + "options": { + "command": "npm run build", + "cwd": "apps/shared-runtime/3008-share-remote" + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "serve": { + "executor": "nx:run-commands", + "options": { + "command": "npm run dev", + "cwd": "apps/shared-runtime/3008-share-remote" + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + }, + "dev": { + "executor": "nx:run-commands", + "options": { + "command": "npm run dev", + "cwd": "apps/shared-runtime/3008-share-remote" + }, + "dependsOn": [ + { + "target": "build", + "dependencies": true + } + ] + } + } +} diff --git a/apps/shared-runtime/3008-share-remote/rsbuild.config.mjs b/apps/shared-runtime/3008-share-remote/rsbuild.config.mjs new file mode 100644 index 0000000000..912f8ff3e8 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/rsbuild.config.mjs @@ -0,0 +1,28 @@ +import { defineConfig } from '@rsbuild/core'; +import { pluginReact } from '@rsbuild/plugin-react'; +import { ModuleFederationPlugin } from '@module-federation/enhanced/rspack'; + +export default defineConfig({ + server: { + port: 3008, + }, + dev: { + // It is necessary to configure assetPrefix, and in the production environment, you need to configure output.assetPrefix + assetPrefix: 'http://localhost:3008', + }, + tools: { + rspack: (config, { appendPlugins }) => { + config.output.uniqueName = 'runtime_remote3'; + appendPlugins([ + new ModuleFederationPlugin({ + name: 'runtime_remote3', + exposes: { + './button': './src/Button.tsx', + }, + shared: ['react', 'react-dom'], + }), + ]); + }, + }, + plugins: [pluginReact()], +}); diff --git a/apps/shared-runtime/3008-share-remote/src/App.css b/apps/shared-runtime/3008-share-remote/src/App.css new file mode 100644 index 0000000000..164c0a6aa5 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/src/App.css @@ -0,0 +1,26 @@ +body { + margin: 0; + color: #fff; + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + background-image: linear-gradient(to bottom, #020917, #101725); +} + +.content { + display: flex; + min-height: 100vh; + line-height: 1.1; + text-align: center; + flex-direction: column; + justify-content: center; +} + +.content h1 { + font-size: 3.6rem; + font-weight: 700; +} + +.content p { + font-size: 1.2rem; + font-weight: 400; + opacity: 0.5; +} diff --git a/apps/shared-runtime/3008-share-remote/src/App.jsx b/apps/shared-runtime/3008-share-remote/src/App.jsx new file mode 100644 index 0000000000..dff1751231 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/src/App.jsx @@ -0,0 +1,12 @@ +import './App.css'; + +const App = () => { + return ( +
+

Rsbuild with React

+

Start building amazing things with Rsbuild.

+
+ ); +}; + +export default App; diff --git a/apps/shared-runtime/3008-share-remote/src/Button.tsx b/apps/shared-runtime/3008-share-remote/src/Button.tsx new file mode 100644 index 0000000000..4a56fd46c7 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/src/Button.tsx @@ -0,0 +1,9 @@ +const style = { + background: '#f00505', + color: '#fff', + padding: 12, +}; + +const Button = () => ; + +export default Button; diff --git a/apps/shared-runtime/3008-share-remote/src/bootstrap.jsx b/apps/shared-runtime/3008-share-remote/src/bootstrap.jsx new file mode 100644 index 0000000000..65a8dbf40a --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/src/bootstrap.jsx @@ -0,0 +1,10 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App'; + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render( + + + , +); diff --git a/apps/shared-runtime/3008-share-remote/src/index.jsx b/apps/shared-runtime/3008-share-remote/src/index.jsx new file mode 100644 index 0000000000..b93c7a0268 --- /dev/null +++ b/apps/shared-runtime/3008-share-remote/src/index.jsx @@ -0,0 +1 @@ +import('./bootstrap'); diff --git a/apps/shared-runtime/README.md b/apps/shared-runtime/README.md new file mode 100644 index 0000000000..2ea7bc2bd3 --- /dev/null +++ b/apps/shared-runtime/README.md @@ -0,0 +1,17 @@ +# shared-runtime + +This example demos automatic-vendor-sharing, each host/remote will share all vendors possible, with react listed as a singleton + +- `host` consumes remote. +- `remote1` exposes a blue button component. +- `remote2` exposes a red button component. + +host declare remote2 in webpack.config.js, and use `@module-federation/runtime` to load remote1 dynamic + +# Running Demo + +Run `npm run app:runtime:dev` to start host, remote1, remote2 + +- host: [localhost:3005](http://localhost:3005/) +- remote1: [localhost:3006](http://localhost:3006/) +- remote2: [localhost:3007](http://localhost:3007/) diff --git a/main.py b/main.py deleted file mode 100644 index ba13a14937..0000000000 --- a/main.py +++ /dev/null @@ -1,196 +0,0 @@ -# To run this script you need Python setup and installed chardet and beautifulsoup dependencies through pip install - - -import os -import chardet -from bs4 import BeautifulSoup - -# This is basic config - -INPUT_DIR = 'docs/index.html' # TypeDoc assinged docs dir, -OUTPUT_NAV_ADOC = 'apps/docs/src/en/modules/ROOT/nav.adoc' # Your desired nav file to put pages nav -OUTPUT_PAGES_DIR = 'apps/docs/src/en/modules/ROOT/pages' # Your desired location - -def process_code_tag(tag): - # Apply desired replacements to the HTML content - cleaned_html = ( - tag.decode_contents() - .replace(' ', '__') - .replace('
', '\n') - .replace('
', '\n') - .replace('', '') - ) - - # Convert the cleaned HTML to Beautiful Soup object - cleaned_soup = BeautifulSoup(cleaned_html, "html.parser") - - # Extract text content from the cleaned soup - code_text = cleaned_soup.get_text() - - return f"[source, javascript]\n----\n{code_text}\n----\n\n" - -def process_div_or_p_tag(tag): - # Apply desired replacements to the HTML content - cleaned_html = ( - tag.decode_contents() - .replace('', '`') - .replace('', '`') - .replace('', '*') - .replace('', '*') - ) - - for link in tag.find_all('a'): - xref = link.get("href") - link_text = link.get_text().strip() - cleaned_html = cleaned_html.replace('') + 3 - if len(cleaned_html) > end: - cleaned_html = cleaned_html[0: start:] + cleaned_html[end + 1::] - - # Convert the cleaned HTML to Beautiful Soup object - cleaned_soup = BeautifulSoup(cleaned_html, "html.parser") - - # Extract text content from the cleaned soup - content = cleaned_soup.get_text().strip() - - return f"{content}\n\n" - -def process_content_section(content_section, adoc_content): - for tag in content_section.find_all(): - if tag.name in {"h1", "h2", "h3", "h4"}: - heading_level = int(tag.name[1]) # Convert heading level to integer - heading_text = tag.get_text().strip() - adoc_content += f"{'=' * heading_level} {heading_text}\n\n" - - elif tag.name == "pre": - adoc_content += process_code_tag(tag).replace('__', ' ') - - elif tag.name == "ul": - for li in tag.find_all("li"): - li_text = li.get_text().strip() - adoc_content += f"* {li_text}\n" - adoc_content += "\n" - - elif tag.name == "div" or tag.name == "p": - adoc_content += process_div_or_p_tag(tag) - - return adoc_content - -def update_nav_adoc(antora_links): - # Find the position to replace '.Packages' section - # Append antora_output.adoc to nav.adoc and replace '.Packages' section - adoc_output_filename = OUTPUT_NAV_ADOC - with open(adoc_output_filename, "r", encoding="utf-8") as test_adoc_file: - nav_adoc_content = test_adoc_file.read() - - # Find the position to replace '.Packages' section - packages_start = nav_adoc_content.find(".Packages") - if packages_start != -1: - packages_end = nav_adoc_content.find("\n\n", packages_start) + 2 - if packages_end != -1: - new_nav_adoc_content = ( - nav_adoc_content[:packages_start] + - '.Packages\n' + - "\n".join(antora_links) + - "\n\n" + - nav_adoc_content[packages_end:] - ) - with open(adoc_output_filename, "w", encoding="utf-8") as new_nav_adoc_file: - new_nav_adoc_file.write(new_nav_adoc_content) - print(f"Updated {adoc_output_filename} with antora_output.adoc content.") - else: - print(".Packages end not found in nav.adoc.") - else: - print(".Packages section not found in nav.adoc.") - # Append content of antora_output.adoc to nav.adoc - with open(adoc_output_filename, "a", encoding="utf-8") as nav_adoc_file: - nav_adoc_file.write('.Packages\n' + "\n".join(antora_links) + "\n\n") - print(f"Appended content of antora_output.adoc to {adoc_output_filename}.") - -def update_pages_directory(): - # Move generated .adoc files to pages dir - output_directory = OUTPUT_PAGES_DIR - for generated_filename in os.listdir(): - if generated_filename.endswith(".adoc"): - generated_file_path = os.path.join(generated_filename) - destination_path = os.path.join(output_directory, generated_filename) - if os.path.exists(destination_path): - os.remove(destination_path) # Remove existing file - os.rename(generated_file_path, destination_path) - print(f"Moved {generated_filename} to {output_directory}.") - -def process_docs(ul_element): - antora_links = [] - - # Iterate through
  • elements inside
      - for li in ul_element.find_all("li"): - link = li.find("a") - if link: - href = link.get("href") - link_text = link.get_text().strip() - - # Remove '_' at position 0 and replace remaining underscores with hyphens - module_name = os.path.splitext(os.path.basename(href))[0] - module_name = module_name[1:].replace("_", "-") - - # Construct full path to the corresponding .html file - html_path = os.path.join("docs", href) - - # Check if the HTML file exists before reading and parsing - if os.path.exists(html_path): - # Read and parse the .html content - with open(html_path, "rb") as html_file: - html_content = html_file.read() - - # Parse the .html content using Beautiful Soup - html_soup = BeautifulSoup(html_content, "html.parser") - - # Find the content section - content_section = html_soup.find("section", class_="tsd-panel tsd-typography") - - if content_section: - # Convert tags to Antora code blocks while preserving other text - adoc_filename = f"{module_name}.adoc" - adoc_content = f"= {link_text}\n\n" - - adoc_content = process_content_section(content_section, adoc_content) - - # Create the .adoc file with UTF-8 encoding - with open(adoc_filename.replace("/", "-"), "w", encoding="utf-8") as adoc_file: - adoc_file.write(adoc_content) - - antora_link = f"* xref:{adoc_filename}[{link_text}]" - antora_links.append(antora_link) - else: - print(f"HTML file '{html_path}' does not exist.") - - return antora_links - - -if __name__ == '__main__': - # Read the HTML file in binary mode - with open(INPUT_DIR, "rb") as file: - html_content = file.read() - - # Detect the encoding of the HTML content - result = chardet.detect(html_content) - encoding = result["encoding"] - - # Parse the HTML content using Beautiful Soup - soup = BeautifulSoup(html_content.decode(encoding), "html.parser") - - # Find the
        element with the specified class - ul_element = soup.find("ul", class_="tsd-small-nested-navigation") - - if ul_element: - # Lists to store Antora links and individual HTML files - antora_links = process_docs(ul_element) - - update_nav_adoc(antora_links) - - update_pages_directory() - - print("All tasks completed.") - else: - print("UL element not found in the HTML.") diff --git a/package.json b/package.json index cded1ce589..1a7bf537ba 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "app:next:prod": "nx run-many --target=serve --configuration=production -p 3000-home,3001-shop,3002-checkout", "app:node:dev": "nx run-many --target=serve --parallel=10 --configuration=development -p node-host,node-local-remote,node-remote,node-dynamic-remote-new-version,node-dynamic-remote", "app:runtime:dev": "nx run-many --target=serve -p 3005-runtime-host,3006-runtime-remote,3007-runtime-remote", + "app:shareable:dev": "nx run-many --target=serve -p 3005-share-host,3006-share-remote,3007-share-remote", "app:router:dev": "nx run-many --target=serve --parallel=10 --projects='router-*'", "app:manifest:dev": "nx run-many --target=serve --configuration=development --parallel=100 -p modernjs,manifest-webpack-host,3009-webpack-provider,3010-rspack-provider,3011-rspack-manifest-provider,3012-rspack-js-entry-provider", "app:manifest:prod": "nx run-many --target=serve --configuration=production --parallel=100 -p modernjs,manifest-webpack-host,3009-webpack-provider,3010-rspack-provider,3011-rspack-manifest-provider,3012-rspack-js-entry-provider", @@ -47,6 +48,7 @@ "app:modern:dev": "nx run-many --target=serve --parallel=10 --configuration=development -p modernjs-ssr-dynamic-nested-remote,modernjs-ssr-dynamic-remote,modernjs-ssr-dynamic-remote-new-version,modernjs-ssr-host,modernjs-ssr-nested-remote,modernjs-ssr-remote,modernjs-ssr-remote-new-version", "commitlint": "commitlint --edit", "prepare": "husky install", + "clean": "git clean -fdX -e .idea", "changeset": "changeset", "build:packages": "npx nx affected -t build --parallel=10 --exclude='*,!tag:type:pkg'", "changegen": "./changeset-gen.js --path ./packages/enhanced --staged &&./changeset-gen.js --path ./packages/node --staged && ./changeset-gen.js --path ./packages/runtime --staged && ./changeset-gen.js --path ./packages/data-prefetch --staged && ./changeset-gen.js --path ./packages/nextjs-mf --staged", diff --git a/packages/enhanced/jest.hoisted.ts b/packages/enhanced/jest.hoisted.ts new file mode 100644 index 0000000000..66c1485eb3 --- /dev/null +++ b/packages/enhanced/jest.hoisted.ts @@ -0,0 +1,39 @@ +/* eslint-disable */ +import { readFileSync, rmdirSync, existsSync } from 'fs'; +import path from 'path'; +import os from 'os'; +const rimraf = require('rimraf'); + +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${__dirname}/.swcrc`, 'utf-8'), +); + +rimraf.sync(__dirname + '/test/js'); + +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} + +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; + +export default { + displayName: 'enhanced-experiments', + preset: '../../jest.preset.js', + cacheDirectory: path.join(os.tmpdir(), 'embed'), + transform: { + '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../coverage/packages/enhanced', + rootDir: __dirname, + testMatch: ['/test/*.hoistedRuntime.js'], + testEnvironment: path.resolve(__dirname, './test/patch-node-env.js'), + setupFilesAfterEnv: ['/test/setupTestFramework.js'], +}; diff --git a/packages/enhanced/jest.embed.ts b/packages/enhanced/jest.shared.ts similarity index 96% rename from packages/enhanced/jest.embed.ts rename to packages/enhanced/jest.shared.ts index 4e09a7c2e1..3a8d97d8aa 100644 --- a/packages/enhanced/jest.embed.ts +++ b/packages/enhanced/jest.shared.ts @@ -33,7 +33,7 @@ export default { moduleFileExtensions: ['ts', 'js', 'html'], coverageDirectory: '../../coverage/packages/enhanced', rootDir: __dirname, - testMatch: ['/test/*.embedruntime.js'], + testMatch: ['/test/*.sharedRuntime.js'], testEnvironment: path.resolve(__dirname, './test/patch-node-env.js'), setupFilesAfterEnv: ['/test/setupTestFramework.js'], }; diff --git a/packages/enhanced/project.json b/packages/enhanced/project.json index 32a6e46ca2..0f4c44361b 100644 --- a/packages/enhanced/project.json +++ b/packages/enhanced/project.json @@ -54,7 +54,11 @@ "parallel": false, "commands": [ { - "command": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation ./node_modules/jest-cli/bin/jest --logHeapUsage --config packages/enhanced/jest.embed.ts --silent", + "command": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation ./node_modules/jest-cli/bin/jest --logHeapUsage --config packages/enhanced/jest.hoisted.ts --silent", + "forwardAllArgs": false + }, + { + "command": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation ./node_modules/jest-cli/bin/jest --logHeapUsage --config packages/enhanced/jest.shared.ts --silent", "forwardAllArgs": false } ] diff --git a/packages/enhanced/src/lib/container/ContainerEntryDependency.ts b/packages/enhanced/src/lib/container/ContainerEntryDependency.ts index 6552f89e5e..613018bea4 100644 --- a/packages/enhanced/src/lib/container/ContainerEntryDependency.ts +++ b/packages/enhanced/src/lib/container/ContainerEntryDependency.ts @@ -20,7 +20,6 @@ class ContainerEntryDependency extends Dependency { public exposes: [string, ExposeOptions][]; public shareScope: string; public injectRuntimeEntry: string; - /** Additional experimental options for container plugin customization */ public experiments: containerPlugin.ContainerPluginOptions['experiments']; public dataPrefetch: containerPlugin.ContainerPluginOptions['dataPrefetch']; diff --git a/packages/enhanced/src/lib/container/ContainerPlugin.ts b/packages/enhanced/src/lib/container/ContainerPlugin.ts index 0a5c533944..81b32de507 100644 --- a/packages/enhanced/src/lib/container/ContainerPlugin.ts +++ b/packages/enhanced/src/lib/container/ContainerPlugin.ts @@ -188,12 +188,9 @@ class ContainerPlugin { compiler.options.output.enabledLibraryTypes.push(library.type); } - compiler.hooks.make.tapAsync( + compiler.hooks.make.tapPromise( PLUGIN_NAME, - async ( - compilation: Compilation, - callback: (error?: WebpackError | null | undefined) => void, - ) => { + async (compilation: Compilation) => { const hasSingleRuntimeChunk = compilation.options?.optimization?.runtimeChunk; const hooks = FederationModulesPlugin.getCompilationHooks(compilation); @@ -226,39 +223,49 @@ class ContainerPlugin { resolve(undefined); }, ); - }).catch(callback); - - await new Promise((resolve, reject) => { - compilation.addInclude( - compiler.context, - federationRuntimeDependency, - { name: undefined }, - (err, module) => { - if (err) { - return reject(err); - } - hooks.addFederationRuntimeModule.call( - federationRuntimeDependency, - ); - resolve(undefined); - }, - ); - }).catch(callback); - - callback(); + }); + + // Add dependency based on federationRuntime option + const addIncludes = async (dependency: FederationRuntimeDependency) => { + await new Promise((resolve, reject) => { + compilation.addInclude( + compiler.context, + dependency, + { + name, + library, + }, + (err, module) => { + if (err) return reject(err); + hooks.addFederationRuntimeModule.call(dependency); + resolve(); + }, + ); + }); + }; + + if (this._options?.experiments?.federationRuntime === 'use-host') { + const externalRuntimeDependency = + federationRuntimePluginInstance.getMinimalDependency(compiler); + await addIncludes(externalRuntimeDependency); + } else { + const federationRuntimeDependency = + federationRuntimePluginInstance.getDependency(compiler); + await addIncludes(federationRuntimeDependency); + } }, ); // this will still be copied into child compiler, so it needs a check to avoid running hook on child // we have to use finishMake in order to check the entries created and see if there are multiple runtime chunks - compiler.hooks.finishMake.tapAsync( + compiler.hooks.finishMake.tapPromise( PLUGIN_NAME, - (compilation: Compilation, callback) => { + async (compilation: Compilation) => { if ( compilation.compiler.parentCompilation && compilation.compiler.parentCompilation !== compilation ) { - return callback(); + return; } const hooks = FederationModulesPlugin.getCompilationHooks(compilation); @@ -275,7 +282,7 @@ class ContainerPlugin { createdRuntimes.size === 0 && !compilation.options?.optimization?.runtimeChunk ) { - return callback(); + return; } const dep = new ContainerEntryDependency( @@ -290,16 +297,45 @@ class ContainerPlugin { dep.loc = { name }; - compilation.addInclude( - compilation.options.context || '', - dep, - { name: undefined }, - (error: WebpackError | null | undefined) => { - if (error) return callback(error); - hooks.addContainerEntryModule.call(dep); - callback(); - }, - ); + await new Promise((resolve, reject) => { + compilation.addInclude( + compilation.options.context || '', + dep, + { name: undefined }, + (error: WebpackError | null | undefined) => { + if (error) return reject(error); + hooks.addContainerEntryModule.call(dep); + resolve(); + }, + ); + }); + + const addDependency = async ( + dependency: FederationRuntimeDependency, + ) => { + await new Promise((resolve, reject) => { + compilation.addInclude( + compiler.context, + dependency, + { name: name, runtime: runtime }, + (err, module) => { + if (err) return reject(err); + hooks.addFederationRuntimeModule.call(dependency); + resolve(); + }, + ); + }); + }; + + if (this._options?.experiments?.federationRuntime === 'use-host') { + const externalRuntimeDependency = + federationRuntimePluginInstance.getMinimalDependency(compiler); + await addDependency(externalRuntimeDependency); + } else { + const federationRuntimeDependency = + federationRuntimePluginInstance.getDependency(compiler); + await addDependency(federationRuntimeDependency); + } }, ); @@ -316,6 +352,15 @@ class ContainerPlugin { ContainerExposedDependency, normalModuleFactory, ); + + compilation.dependencyFactories.set( + FederationRuntimeDependency, + normalModuleFactory, + ); + compilation.dependencyTemplates.set( + FederationRuntimeDependency, + new ModuleDependency.Template(), + ); }, ); diff --git a/packages/enhanced/src/lib/container/HoistContainerReferencesPlugin.ts b/packages/enhanced/src/lib/container/HoistContainerReferencesPlugin.ts index 92c07a95f3..a63569842f 100644 --- a/packages/enhanced/src/lib/container/HoistContainerReferencesPlugin.ts +++ b/packages/enhanced/src/lib/container/HoistContainerReferencesPlugin.ts @@ -25,9 +25,10 @@ export class HoistContainerReferences implements WebpackPluginInstance { compiler.hooks.thisCompilation.tap( PLUGIN_NAME, (compilation: Compilation) => { - const logger = compilation.getLogger(PLUGIN_NAME); const hooks = FederationModulesPlugin.getCompilationHooks(compilation); - const containerEntryDependencies = new Set(); + const containerEntryDependencies = new Set< + ContainerEntryDependency | FederationRuntimeDependency + >(); hooks.addContainerEntryModule.tap( 'HoistContainerReferences', (dep: ContainerEntryDependency) => { @@ -50,13 +51,7 @@ export class HoistContainerReferences implements WebpackPluginInstance { }, (chunks: Iterable) => { const runtimeChunks = this.getRuntimeChunks(compilation); - this.hoistModulesInChunks( - compilation, - runtimeChunks, - chunks, - logger, - containerEntryDependencies, - ); + this.hoistModulesInChunks(compilation, containerEntryDependencies); }, ); }, @@ -66,14 +61,19 @@ export class HoistContainerReferences implements WebpackPluginInstance { // Method to hoist modules in chunks private hoistModulesInChunks( compilation: Compilation, - runtimeChunks: Set, - chunks: Iterable, - logger: ReturnType, containerEntryDependencies: Set, ): void { const { chunkGraph, moduleGraph } = compilation; - // when runtimeChunk: single is set - ContainerPlugin will create a "partial" chunk we can use to - // move modules into the runtime chunk + + // First, handle the minimal check and remove included modules from the chunk + this.handleMinimalCheck( + compilation, + containerEntryDependencies, + chunkGraph, + moduleGraph, + ); + + // Now, perform the global hoist over all chunks for (const dep of containerEntryDependencies) { const containerEntryModule = moduleGraph.getModule(dep); if (!containerEntryModule) continue; @@ -81,12 +81,14 @@ export class HoistContainerReferences implements WebpackPluginInstance { compilation, containerEntryModule, 'initial', + true, ); const allRemoteReferences = getAllReferencedModules( compilation, containerEntryModule, 'external', + true, ); for (const remote of allRemoteReferences) { @@ -122,6 +124,85 @@ export class HoistContainerReferences implements WebpackPluginInstance { } } + private handleMinimalCheck( + compilation: Compilation, + containerEntryDependencies: Set, + chunkGraph: Compilation['chunkGraph'], + moduleGraph: Compilation['moduleGraph'], + ): void { + let minimalModule: Module | null = null; + for (const dep of containerEntryDependencies as Set) { + if (dep.minimal) { + minimalModule = moduleGraph.getModule(dep); + break; + } + } + + if (minimalModule) { + // Collect all modules referenced by the minimal dependency + const minimalReferencedModules = getAllReferencedModules( + compilation, + minimalModule, + 'initial', + true, + ); + + for (const dep of containerEntryDependencies as Set< + FederationRuntimeDependency | ContainerEntryDependency + >) { + if (dep instanceof ContainerEntryDependency) continue; + if (dep.minimal) continue; + + const containerEntryModule = moduleGraph.getModule(dep); + if (!containerEntryModule) continue; + + // Collect all modules referenced by the current container entry module + const allReferencedModules = getAllReferencedModules( + compilation, + containerEntryModule, + 'initial', + true, + ); + + // Get runtimes for the container entry module + const containerRuntimes = + chunkGraph.getModuleRuntimes(containerEntryModule); + const runtimes = new Set(); + + // Collect all runtime keys + for (const runtimeSpec of containerRuntimes) { + compilation.compiler.webpack.util.runtime.forEachRuntime( + runtimeSpec, + (runtimeKey) => { + if (runtimeKey) { + runtimes.add(runtimeKey); + } + }, + ); + } + + for (const runtime of runtimes) { + const runtimeChunk = compilation.namedChunks.get(runtime); + if (!runtimeChunk) continue; + + // Check if the minimal module is in the runtime chunk + if (!chunkGraph.isModuleInChunk(minimalModule, runtimeChunk)) + continue; + + // Iterate over all referenced modules of the current container entry module + for (const module of allReferencedModules) { + if (chunkGraph.isModuleInChunk(module, runtimeChunk)) { + // Disconnect modules not referenced by the minimal dependency + if (!minimalReferencedModules.has(module)) { + chunkGraph.disconnectChunkAndModule(runtimeChunk, module); + } + } + } + } + } + } + } + // Method to clean up chunks by disconnecting unused modules private cleanUpChunks(compilation: Compilation, modules: Set): void { const { chunkGraph } = compilation; @@ -165,18 +246,20 @@ export function getAllReferencedModules( compilation: Compilation, module: Module, type?: 'all' | 'initial' | 'external', + withInitialModule?: boolean, ): Set { - const collectedModules = new Set([module]); - const visitedModules = new WeakSet([module]); + const collectedModules = new Set(withInitialModule ? [module] : []); + const visitedModules = new WeakSet(withInitialModule ? [module] : []); const stack = [module]; while (stack.length > 0) { const currentModule = stack.pop(); if (!currentModule) continue; - const mgm = compilation.moduleGraph._getModuleGraphModule(currentModule); - if (!mgm?.outgoingConnections) continue; - for (const connection of mgm.outgoingConnections) { + const outgoingConnections = + compilation.moduleGraph.getOutgoingConnections(currentModule); + if (!outgoingConnections) continue; + for (const connection of outgoingConnections) { const connectedModule = connection.module; // Skip if module has already been visited diff --git a/packages/enhanced/src/lib/container/ModuleFederationPlugin.ts b/packages/enhanced/src/lib/container/ModuleFederationPlugin.ts index e03f8bdbb1..897cb6309e 100644 --- a/packages/enhanced/src/lib/container/ModuleFederationPlugin.ts +++ b/packages/enhanced/src/lib/container/ModuleFederationPlugin.ts @@ -85,7 +85,7 @@ class ModuleFederationPlugin implements WebpackPluginInstance { new FederationRuntimePlugin(options).apply(compiler); const library = options.library || { type: 'var', name: options.name }; - const remoteType = + let remoteType = options.remoteType || (options.library && isValidExternalsType(options.library.type) ? (options.library.type as ExternalsType) @@ -142,6 +142,17 @@ class ModuleFederationPlugin implements WebpackPluginInstance { ? options.remotes.length > 0 : Object.keys(options.remotes).length > 0) ) { + //todo: support esm by changing use of external module to use dynamic import / promise base + //todo: replace ExternalModule use with federation runtime loadEntry + if ( + compiler.options.output.module && + this._options.experiments?.federationRuntime === 'use-host' + ) { + // external module is import from at top of runtime chunk, before runtime is instantiated, causing it to fail + // changing to import remote type works around eager dependency issue of containers + remoteType = 'import'; + } + new ContainerReferencePlugin({ remoteType, shareScope: options.shareScope, diff --git a/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts b/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts index 4d54d5f19f..34b06126bb 100644 --- a/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts +++ b/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts @@ -22,7 +22,7 @@ class EmbedFederationRuntimeModule extends RuntimeModule { ContainerEntryDependency | FederationRuntimeDependency >, ) { - super('embed federation', RuntimeModule.STAGE_ATTACH); + super('embed federation', RuntimeModule.STAGE_ATTACH - 1); this.containerEntrySet = containerEntrySet; } @@ -35,26 +35,49 @@ class EmbedFederationRuntimeModule extends RuntimeModule { if (!chunk || !chunkGraph || !compilation) { return null; } + let found; - if (chunk.name) { - for (const dep of this.containerEntrySet) { - const mod = compilation.moduleGraph.getModule(dep); - if (mod && compilation.chunkGraph.isModuleInChunk(mod, chunk)) { + let minimal; + for (const dep of this.containerEntrySet) { + const mod = compilation.moduleGraph.getModule(dep); + if (mod && compilation.chunkGraph.isModuleInChunk(mod, chunk)) { + //@ts-ignore + if (dep.minimal) { + minimal = mod as NormalModuleType; + } else { found = mod as NormalModuleType; - break; } } } - if (!found) { + + if (!found && !minimal) { return null; } - const initRuntimeModuleGetter = compilation.runtimeTemplate.moduleRaw({ - module: found, - chunkGraph, - request: found.request, - weak: false, - runtimeRequirements: new Set(), - }); + + let initRuntimeModuleGetter = ''; + + if (found) { + initRuntimeModuleGetter = Template.asString([ + compilation.runtimeTemplate.moduleRaw({ + module: found, + chunkGraph, + request: found.request, + weak: false, + runtimeRequirements: new Set(), + }), + ]); + } else if (minimal) { + initRuntimeModuleGetter = Template.asString([ + compilation.runtimeTemplate.moduleRaw({ + module: minimal, + chunkGraph, + request: minimal.request, + weak: false, + runtimeRequirements: new Set(), + }), + ]); + } + return Template.asString([`${initRuntimeModuleGetter}`]); } } diff --git a/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts b/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts index c5ce624e30..ec72bb565a 100644 --- a/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts +++ b/packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimePlugin.ts @@ -1,7 +1,9 @@ +import type { Compiler, Compilation, Chunk } from 'webpack'; +import type { moduleFederationPlugin } from '@module-federation/sdk'; + import { normalizeWebpackPath } from '@module-federation/sdk/normalize-webpack-path'; import EmbedFederationRuntimeModule from './EmbedFederationRuntimeModule'; import FederationModulesPlugin from './FederationModulesPlugin'; -import type { Compiler, Compilation, Chunk } from 'webpack'; import { getFederationGlobalScope } from './utils'; import ContainerEntryDependency from '../ContainerEntryDependency'; import FederationRuntimeDependency from './FederationRuntimeDependency'; @@ -13,6 +15,14 @@ const { RuntimeGlobals } = require( const federationGlobal = getFederationGlobalScope(RuntimeGlobals); class EmbedFederationRuntimePlugin { + experiments: moduleFederationPlugin.ModuleFederationPluginOptions['experiments']; + + constructor( + experiments: moduleFederationPlugin.ModuleFederationPluginOptions['experiments'], + ) { + this.experiments = experiments; + } + apply(compiler: Compiler): void { compiler.hooks.thisCompilation.tap( 'EmbedFederationRuntimePlugin', diff --git a/packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts b/packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts index febac13bb9..eae38dce1e 100644 --- a/packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts +++ b/packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts @@ -45,13 +45,14 @@ class FederationModulesPlugin { } constructor(options = {}) { + //@ts-ignore this.options = options; } apply(compiler: Compiler) { compiler.hooks.compilation.tap( PLUGIN_NAME, - (compilation: CompilationType, { normalModuleFactory }) => { + (compilation: CompilationType) => { //@ts-ignore const hooks = FederationModulesPlugin.getCompilationHooks(compilation); }, diff --git a/packages/enhanced/src/lib/container/runtime/FederationRuntimeDependency.ts b/packages/enhanced/src/lib/container/runtime/FederationRuntimeDependency.ts index 251f49622e..950edd35c7 100644 --- a/packages/enhanced/src/lib/container/runtime/FederationRuntimeDependency.ts +++ b/packages/enhanced/src/lib/container/runtime/FederationRuntimeDependency.ts @@ -5,11 +5,17 @@ const ModuleDependency = require( ) as typeof import('webpack/lib/dependencies/ModuleDependency'); class FederationRuntimeDependency extends ModuleDependency { - constructor(request: string) { + minimal: boolean; + + constructor(request: string, minimal = false) { super(request); + this.minimal = minimal; } override get type() { + if (this.minimal) { + return 'minimal federation runtime dependency'; + } return 'federation runtime dependency'; } } diff --git a/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts b/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts index fac5ff9e30..584c193994 100644 --- a/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts +++ b/packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts @@ -44,6 +44,13 @@ const BundlerRuntimePath = require.resolve( paths: [RuntimeToolsPath], }, ); + +const EmbeddedBundlerRuntimePath = require.resolve( + '@module-federation/webpack-bundler-runtime/embedded', + { + paths: [RuntimeToolsPath], + }, +); const RuntimePath = require.resolve('@module-federation/runtime', { paths: [RuntimeToolsPath], }); @@ -62,25 +69,34 @@ class FederationRuntimePlugin { options?: moduleFederationPlugin.ModuleFederationPluginOptions; entryFilePath: string; bundlerRuntimePath: string; - federationRuntimeDependency?: FederationRuntimeDependency; // Add this line + embeddedBundlerRuntimePath: string; + embeddedEntryFilePath: string; + federationRuntimeDependency?: FederationRuntimeDependency; + minimalFederationRuntimeDependency?: FederationRuntimeDependency; constructor(options?: moduleFederationPlugin.ModuleFederationPluginOptions) { this.options = options ? { ...options } : undefined; this.entryFilePath = ''; this.bundlerRuntimePath = BundlerRuntimePath; - this.federationRuntimeDependency = undefined; // Initialize as undefined + this.federationRuntimeDependency = undefined; + this.minimalFederationRuntimeDependency = undefined; + this.embeddedBundlerRuntimePath = EmbeddedBundlerRuntimePath; + this.embeddedEntryFilePath = ''; } static getTemplate( compiler: Compiler, options: moduleFederationPlugin.ModuleFederationPluginOptions, bundlerRuntimePath?: string, - experiments?: moduleFederationPlugin.ModuleFederationPluginOptions['experiments'], + embeddedBundlerRuntimePath?: string, + useMinimalRuntime = false, ) { // internal runtime plugin const runtimePlugins = options.runtimePlugins; const normalizedBundlerRuntimePath = normalizeToPosixPath( - bundlerRuntimePath || BundlerRuntimePath, + useMinimalRuntime + ? embeddedBundlerRuntimePath || EmbeddedBundlerRuntimePath + : bundlerRuntimePath || BundlerRuntimePath, ); let runtimePluginTemplates = ''; @@ -100,7 +116,6 @@ class FederationRuntimePlugin { }); } const embedRuntimeLines = Template.asString([ - `if(!${federationGlobal}.runtime){`, Template.indent([ `var prevFederation = ${federationGlobal};`, `${federationGlobal} = {}`, @@ -111,10 +126,46 @@ class FederationRuntimePlugin { Template.indent([`${federationGlobal}[key] = prevFederation[key];`]), '}', ]), - '}', ]); + if (useMinimalRuntime) { + return Template.asString([ + '// federation minimal runtime entry', + `import federation from '${normalizedBundlerRuntimePath}';`, + runtimePluginTemplates, + embedRuntimeLines, + `if(!${federationGlobal}.instance){`, + Template.indent([ + runtimePluginNames.length + ? Template.asString([ + `const pluginsToAdd = [`, + Template.indent( + runtimePluginNames.map( + (item) => + `${item} ? (${item}.default || ${item})() : false,`, + ), + ), + `].filter(Boolean);`, + `${federationGlobal}.initOptions.plugins = ${federationGlobal}.initOptions.plugins ? `, + `${federationGlobal}.initOptions.plugins.concat(pluginsToAdd) : pluginsToAdd;`, + ]) + : '', + ]), + `${federationGlobal}.instance = federation.runtime.init(${federationGlobal}.initOptions);`, + `if(${federationGlobal}.attachShareScopeMap){`, + Template.indent([ + `${federationGlobal}.attachShareScopeMap(${RuntimeGlobals.require})`, + ]), + '}', + `if(${federationGlobal}.installInitialConsumes){`, + Template.indent([`${federationGlobal}.installInitialConsumes()`]), + '}', + `}`, + ]); + } + return Template.asString([ + '// federation full runtime entry', `import federation from '${normalizedBundlerRuntimePath}';`, runtimePluginTemplates, embedRuntimeLines, @@ -154,7 +205,8 @@ class FederationRuntimePlugin { compiler: Compiler, options: moduleFederationPlugin.ModuleFederationPluginOptions, bundlerRuntimePath?: string, - experiments?: moduleFederationPlugin.ModuleFederationPluginOptions['experiments'], + embeddedBundlerRuntimePath?: string, + useMinimalRuntime = false, ) { const containerName = options.name; const hash = createHash( @@ -162,40 +214,51 @@ class FederationRuntimePlugin { compiler, options, bundlerRuntimePath, - experiments, + embeddedBundlerRuntimePath, + useMinimalRuntime, )}`, ); return path.join(TEMP_DIR, `entry.${hash}.js`); } - getFilePath(compiler: Compiler) { - if (this.entryFilePath) { - return this.entryFilePath; - } - + getFilePath(compiler: Compiler, useMinimalRuntime = false) { if (!this.options) { return ''; } - if (!this.options?.virtualRuntimeEntry) { - this.entryFilePath = FederationRuntimePlugin.getFilePath( - compiler, - this.options, - this.bundlerRuntimePath, - this.options.experiments, - ); - } else { - this.entryFilePath = `data:text/javascript;charset=utf-8;base64,${pBtoa( - FederationRuntimePlugin.getTemplate( + const cachedFilePath = useMinimalRuntime + ? this.embeddedEntryFilePath + : this.entryFilePath; + if (cachedFilePath) { + return cachedFilePath; + } + + const filePath = this.options.virtualRuntimeEntry + ? `data:text/javascript;charset=utf-8;base64,${pBtoa( + FederationRuntimePlugin.getTemplate( + compiler, + this.options, + this.bundlerRuntimePath, + this.embeddedBundlerRuntimePath, + useMinimalRuntime, + ), + )}` + : FederationRuntimePlugin.getFilePath( compiler, this.options, this.bundlerRuntimePath, - this.options.experiments, - ), - )}`; + this.embeddedBundlerRuntimePath, + useMinimalRuntime, + ); + + if (useMinimalRuntime) { + this.embeddedEntryFilePath = filePath; + } else { + this.entryFilePath = filePath; } - return this.entryFilePath; + + return filePath; } - ensureFile(compiler: Compiler) { + ensureFile(compiler: Compiler, useMinimalRuntime = false) { if (!this.options) { return; } @@ -203,7 +266,7 @@ class FederationRuntimePlugin { if (this.options?.virtualRuntimeEntry) { return; } - const filePath = this.getFilePath(compiler); + const filePath = this.getFilePath(compiler, useMinimalRuntime); try { fs.readFileSync(filePath); } catch (err) { @@ -214,7 +277,8 @@ class FederationRuntimePlugin { compiler, this.options, this.bundlerRuntimePath, - this.options.experiments, + this.embeddedBundlerRuntimePath, + useMinimalRuntime, ), ); } @@ -232,10 +296,25 @@ class FederationRuntimePlugin { return this.federationRuntimeDependency; } + getMinimalDependency(compiler: Compiler) { + if (this.minimalFederationRuntimeDependency) + return this.minimalFederationRuntimeDependency; + this.minimalFederationRuntimeDependency = new FederationRuntimeDependency( + this.getFilePath(compiler, true), + true, + ); + return this.minimalFederationRuntimeDependency; + } + prependEntry(compiler: Compiler) { if (!this.options?.virtualRuntimeEntry) { this.ensureFile(compiler); } + const useHost = this.options?.experiments?.federationRuntime === 'use-host'; + + if (useHost && !this.options?.virtualRuntimeEntry) { + this.ensureFile(compiler, true); + } //if using runtime experiment, use the new include method else patch entry if (this.options?.experiments?.federationRuntime) { @@ -360,17 +439,19 @@ class FederationRuntimePlugin { setRuntimeAlias(compiler: Compiler) { const { experiments, implementation } = this.options || {}; - const isHoisted = experiments?.federationRuntime === 'hoisted'; - let runtimePath = isHoisted ? EmbeddedRuntimePath : RuntimePath; + const useExperimentalRuntime = experiments?.federationRuntime; + let runtimePath = useExperimentalRuntime + ? EmbeddedRuntimePath + : RuntimePath; if (implementation) { runtimePath = require.resolve( - `@module-federation/runtime${isHoisted ? '/embedded' : ''}`, + `@module-federation/runtime${useExperimentalRuntime ? '/embedded' : ''}`, { paths: [implementation] }, ); } - if (isHoisted) { + if (useExperimentalRuntime) { runtimePath = runtimePath.replace('.cjs', '.esm'); } @@ -434,20 +515,34 @@ class FederationRuntimePlugin { paths: [this.options.implementation], }, ); + + this.embeddedBundlerRuntimePath = require.resolve( + '@module-federation/webpack-bundler-runtime/embedded', + { + paths: [this.options.implementation], + }, + ); } - if (this.options?.experiments?.federationRuntime === 'hoisted') { + if (this.options?.experiments?.federationRuntime) { this.bundlerRuntimePath = this.bundlerRuntimePath.replace( '.cjs.js', '.esm.js', ); - new EmbedFederationRuntimePlugin().apply(compiler); + this.embeddedBundlerRuntimePath = this.embeddedBundlerRuntimePath.replace( + '.cjs.js', + '.esm.js', + ); + + new EmbedFederationRuntimePlugin(this.options.experiments).apply( + compiler, + ); new HoistContainerReferences().apply(compiler); new compiler.webpack.NormalModuleReplacementPlugin( - /@module-federation\/runtime/, + /@module-federation\/runtime(?!\/embedded)/, (resolveData) => { if (/webpack-bundler-runtime/.test(resolveData.contextInfo.issuer)) { resolveData.request = RuntimePath.replace('cjs', 'esm'); diff --git a/packages/enhanced/src/schemas/container/ContainerPlugin.check.ts b/packages/enhanced/src/schemas/container/ContainerPlugin.check.ts index d7ccb04b3b..443758569d 100644 --- a/packages/enhanced/src/schemas/container/ContainerPlugin.check.ts +++ b/packages/enhanced/src/schemas/container/ContainerPlugin.check.ts @@ -297,7 +297,7 @@ const schema21 = { type: 'object', properties: { federationRuntime: { - anyOf: [{ type: 'boolean' }, { enum: ['hoisted'] }], + anyOf: [{ type: 'boolean' }, { enum: ['hoisted', 'use-host'] }], }, }, additionalProperties: false, diff --git a/packages/enhanced/src/schemas/container/ContainerPlugin.ts b/packages/enhanced/src/schemas/container/ContainerPlugin.ts index bd4fc7b791..2b25b677b5 100644 --- a/packages/enhanced/src/schemas/container/ContainerPlugin.ts +++ b/packages/enhanced/src/schemas/container/ContainerPlugin.ts @@ -341,7 +341,7 @@ export default { type: 'object', properties: { federationRuntime: { - anyOf: [{ type: 'boolean' }, { enum: ['hoisted'] }], + anyOf: [{ type: 'boolean' }, { enum: ['hoisted', 'use-host'] }], }, }, additionalProperties: false, diff --git a/packages/enhanced/test/ConfigTestCases.embedruntime.js b/packages/enhanced/test/ConfigTestCases.hoistedRuntime.js similarity index 83% rename from packages/enhanced/test/ConfigTestCases.embedruntime.js rename to packages/enhanced/test/ConfigTestCases.hoistedRuntime.js index 0b1dbda4a9..5ceca97b72 100644 --- a/packages/enhanced/test/ConfigTestCases.embedruntime.js +++ b/packages/enhanced/test/ConfigTestCases.hoistedRuntime.js @@ -8,11 +8,12 @@ if (globalThis.__FEDERATION__) { } }); globalThis.__FEDERATION__.__INSTANCES__ = []; + globalThis.__FEDERATION__.__SHAREABLE_RUNTIME__ = undefined; } const { describeCases } = require('./ConfigTestCases.template'); jest.resetModules(); describeCases({ - name: 'ConfigTestCases', + name: 'HoistedRuntime', federation: { federationRuntime: 'hoisted', }, diff --git a/packages/enhanced/test/ConfigTestCases.sharedRuntime.js b/packages/enhanced/test/ConfigTestCases.sharedRuntime.js new file mode 100644 index 0000000000..4f62a4b15b --- /dev/null +++ b/packages/enhanced/test/ConfigTestCases.sharedRuntime.js @@ -0,0 +1,20 @@ +if (globalThis.__FEDERATION__) { + globalThis.__GLOBAL_LOADING_REMOTE_ENTRY__ = {}; + //@ts-ignore + globalThis.__FEDERATION__.__INSTANCES__.map((i) => { + i.moduleCache.clear(); + if (globalThis[i.name]) { + delete globalThis[i.name]; + } + }); + globalThis.__FEDERATION__.__INSTANCES__ = []; + globalThis.__FEDERATION__.__SHAREABLE_RUNTIME__ = undefined; +} +const { describeCases } = require('./ConfigTestCases.template'); +jest.resetModules(); +describeCases({ + name: 'ShareableRuntime', + federation: { + federationRuntime: 'use-host', + }, +}); diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/App.js b/packages/enhanced/test/configCases/container/shareable-runtime/App.js new file mode 100644 index 0000000000..bd15cf6961 --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/App.js @@ -0,0 +1,5 @@ +import ComponentA from 'containerA/ComponentA'; + +export default () => { + return ComponentA; +}; diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/ComponentA.js b/packages/enhanced/test/configCases/container/shareable-runtime/ComponentA.js new file mode 100644 index 0000000000..574c6faf20 --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/ComponentA.js @@ -0,0 +1 @@ +export default __webpack_modules__; diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/index.js b/packages/enhanced/test/configCases/container/shareable-runtime/index.js new file mode 100644 index 0000000000..24276cb830 --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/index.js @@ -0,0 +1,17 @@ +it('should load the component from container', () => { + return import('./App').then(({ default: RemoteModules }) => { + const graph = RemoteModules(); + + // Verify that at least one key includes 'webpack-bundler-runtime/dist/embedded' + const hasEmbeddedRuntime = Object.keys(graph).some((key) => + key.includes('webpack-bundler-runtime/dist/embedded'), + ); + expect(hasEmbeddedRuntime).toBe(true); + + // Ensure no keys contain 'runtime/dist' + Object.keys(graph).forEach((key) => { + if (key.includes('/runtime/dist/embedded')) return; + expect(key.includes('/runtime/dist')).toBe(false); + }); + }); +}); diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/node_modules/react.js b/packages/enhanced/test/configCases/container/shareable-runtime/node_modules/react.js new file mode 100644 index 0000000000..bcf433f2af --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/node_modules/react.js @@ -0,0 +1,3 @@ +let version = "0.1.2"; +export default () => `This is react ${version}`; +export function setVersion(v) { version = v; } diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/test.config.js b/packages/enhanced/test/configCases/container/shareable-runtime/test.config.js new file mode 100644 index 0000000000..861157bc4e --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/test.config.js @@ -0,0 +1,5 @@ +module.exports = { + findBundle: function (i, options) { + return i === 0 ? './main.js' : './module/main.mjs'; + }, +}; diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/upgrade-react.js b/packages/enhanced/test/configCases/container/shareable-runtime/upgrade-react.js new file mode 100644 index 0000000000..5bf08a67d5 --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/upgrade-react.js @@ -0,0 +1,5 @@ +import { setVersion } from 'react'; + +export default function upgrade() { + setVersion('1.2.3'); +} diff --git a/packages/enhanced/test/configCases/container/shareable-runtime/webpack.config.js b/packages/enhanced/test/configCases/container/shareable-runtime/webpack.config.js new file mode 100644 index 0000000000..0ff2d07e75 --- /dev/null +++ b/packages/enhanced/test/configCases/container/shareable-runtime/webpack.config.js @@ -0,0 +1,70 @@ +const { ModuleFederationPlugin } = require('../../../../dist/src'); + +const common = { + name: 'sh', + experiments: { + federationRuntime: 'use-host', + }, + exposes: { + './ComponentA': { + import: './ComponentA', + }, + }, + shared: { + react: { + version: false, + requiredVersion: false, + }, + }, +}; + +module.exports = [ + { + output: { + filename: '[name].js', + uniqueName: '0-sh-full', + }, + optimization: { + moduleIds: 'named', + concatenateModules: false, + }, + plugins: [ + new ModuleFederationPlugin({ + library: { type: 'commonjs-module' }, + filename: 'container.js', + remotes: { + containerA: { + external: './container.js', + }, + }, + ...common, + }), + ], + }, + { + experiments: { + outputModule: true, + }, + optimization: { + moduleIds: 'named', + concatenateModules: false, + }, + output: { + filename: 'module/[name].mjs', + uniqueName: '0-sh-full-mjs', + }, + plugins: [ + new ModuleFederationPlugin({ + library: { type: 'module' }, + filename: 'module/container.mjs', + remotes: { + containerA: { + external: './container.mjs', + }, + }, + ...common, + }), + ], + target: 'node14', + }, +]; diff --git a/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts b/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts index 8aaa2e66f3..a80aa37672 100644 --- a/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts +++ b/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts @@ -213,7 +213,8 @@ export class NextFederationPlugin { dts: this._options.dts ?? false, shareStrategy: this._options.shareStrategy ?? 'loaded-first', experiments: { - federationRuntime: 'hoisted', + federationRuntime: + this._options.experiments?.federationRuntime || 'hoisted', }, }; } diff --git a/packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts b/packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts index b87d149bd5..5535c07ea0 100644 --- a/packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts +++ b/packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts @@ -15,7 +15,7 @@ class InvertedContainerRuntimeModule extends RuntimeModule { private options: InvertedContainerRuntimeModuleOptions; constructor(options: InvertedContainerRuntimeModuleOptions) { - super('inverted container startup', RuntimeModule.STAGE_TRIGGER); + super('inverted container startup', RuntimeModule.STAGE_ATTACH); this.options = options; } diff --git a/packages/runtime/__tests__/globa.spec.ts b/packages/runtime/__tests__/globa.spec.ts index e82036cae5..233d030f44 100644 --- a/packages/runtime/__tests__/globa.spec.ts +++ b/packages/runtime/__tests__/globa.spec.ts @@ -14,6 +14,7 @@ describe('global', () => { ); expect(globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__).toBeCalledWith( injectArgs, + '', ); }); }); diff --git a/packages/runtime/__tests__/global.spec.ts b/packages/runtime/__tests__/global.spec.ts index 7b9a07203d..9c0332c7fe 100644 --- a/packages/runtime/__tests__/global.spec.ts +++ b/packages/runtime/__tests__/global.spec.ts @@ -13,9 +13,9 @@ describe('global', () => { expect(GM.constructor).toBe( globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__, ); - expect(globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__).toBeCalledWith( - injectArgs, - ); + expect( + globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__, + ).toHaveBeenCalledWith(injectArgs, ''); }); it('getInfoWithoutType', () => { diff --git a/packages/runtime/__tests__/sync.spec.ts b/packages/runtime/__tests__/sync.spec.ts index 929c434350..231e5325e3 100644 --- a/packages/runtime/__tests__/sync.spec.ts +++ b/packages/runtime/__tests__/sync.spec.ts @@ -39,7 +39,9 @@ describe('Embed Module Proxy', async () => { it('should have the same exports in embedded.ts and index.ts', () => { // Compare the exports of embedded.ts and index.ts const embeddedExports = Object.keys(Embedded).sort(); - const indexExports = Object.keys(Index).sort(); + const indexExports = Object.keys(Index) + .sort() + .filter((n) => n !== 'FederationManager'); expect(embeddedExports).toEqual(indexExports); }); diff --git a/packages/runtime/src/core.ts b/packages/runtime/src/core.ts index 5967a74c12..ebd5fe1789 100644 --- a/packages/runtime/src/core.ts +++ b/packages/runtime/src/core.ts @@ -127,11 +127,11 @@ export class FederationHost { >(), }); - constructor(userOptions: UserOptions) { + constructor(userOptions: UserOptions, bundlerId?: string) { // TODO: Validate the details of the options // Initialize options with default values const defaultOptions: Options = { - id: getBuilderId(), + id: bundlerId || getBuilderId(), name: userOptions.name, plugins: [snapshotPlugin(), generatePreloadAssetsPlugin()], remotes: [], diff --git a/packages/runtime/src/global.ts b/packages/runtime/src/global.ts index 27c6b28238..f47188b469 100644 --- a/packages/runtime/src/global.ts +++ b/packages/runtime/src/global.ts @@ -15,6 +15,18 @@ import { getBuilderId } from './utils/env'; import { warn } from './utils/logger'; import { FederationRuntimePlugin } from './type/plugin'; +// Define a type for the shareable runtime +type ShareableRuntime = { + FederationManager: typeof import('./index').FederationManager; + FederationHost: typeof import('./index').FederationHost; + loadScript: typeof import('./index').loadScript; + loadScriptNode: typeof import('./index').loadScriptNode; + registerGlobalPlugins: typeof import('./index').registerGlobalPlugins; + getRemoteInfo: typeof import('./index').getRemoteInfo; + getRemoteEntry: typeof import('./index').getRemoteEntry; + Module: typeof import('./index').Module; +}; + export interface Federation { __GLOBAL_PLUGIN__: Array; __DEBUG_CONSTRUCTOR_VERSION__?: string; @@ -24,6 +36,7 @@ export interface Federation { __SHARE__: GlobalShareScopeMap; __MANIFEST_LOADING__: Record>; __PRELOADED_MAP__: Map; + __SHAREABLE_RUNTIME__: ShareableRuntime | undefined; } export const nativeGlobal: typeof global = (() => { @@ -88,6 +101,7 @@ function setGlobalDefaultVal(target: typeof globalThis) { __SHARE__: {}, __MANIFEST_LOADING__: {}, __PRELOADED_MAP__: new Map(), + __SHAREABLE_RUNTIME__: undefined, }); definePropertyGlobalVal(target, '__VMOK__', target.__FEDERATION__); @@ -99,6 +113,7 @@ function setGlobalDefaultVal(target: typeof globalThis) { target.__FEDERATION__.__SHARE__ ??= {}; target.__FEDERATION__.__MANIFEST_LOADING__ ??= {}; target.__FEDERATION__.__PRELOADED_MAP__ ??= new Map(); + target.__FEDERATION__.__SHAREABLE_RUNTIME__ ??= undefined; } setGlobalDefaultVal(globalThis); @@ -115,10 +130,11 @@ export function resetFederationGlobalInfo(): void { export function getGlobalFederationInstance( name: string, version: string | undefined, + builderId?: string | undefined, ): FederationHost | undefined { - const buildId = getBuilderId(); + const buildId = builderId || getBuilderId(); return globalThis.__FEDERATION__.__INSTANCES__.find((GMInstance) => { - if (buildId && GMInstance.options.id === getBuilderId()) { + if (buildId && GMInstance.options.id === (builderId || getBuilderId())) { return true; } @@ -309,7 +325,16 @@ export const getGlobalHostPlugins = (): Array => nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__; export const getPreloaded = (id: string) => - globalThis.__FEDERATION__.__PRELOADED_MAP__.get(id); + nativeGlobal.__FEDERATION__.__PRELOADED_MAP__.get(id); export const setPreloaded = (id: string) => - globalThis.__FEDERATION__.__PRELOADED_MAP__.set(id, true); + nativeGlobal.__FEDERATION__.__PRELOADED_MAP__.set(id, true); + +export function setGlobalShareableRuntime( + runtimeExports: ShareableRuntime, +): void { + if (nativeGlobal.__FEDERATION__.__SHAREABLE_RUNTIME__) { + return; + } + nativeGlobal.__FEDERATION__.__SHAREABLE_RUNTIME__ = runtimeExports; +} diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts index 2d0eec68af..64438ef74f 100644 --- a/packages/runtime/src/index.ts +++ b/packages/runtime/src/index.ts @@ -6,95 +6,163 @@ import { setGlobalFederationConstructor, } from './global'; import { UserOptions, FederationRuntimePlugin } from './type'; +import { getBuilderId, getRemoteEntry, getRemoteInfo } from './utils'; import { assert } from './utils/logger'; export { FederationHost } from './core'; export { registerGlobalPlugins } from './global'; +import { registerGlobalPlugins, setGlobalShareableRuntime } from './global'; export { getRemoteEntry, getRemoteInfo } from './utils'; export { loadScript, loadScriptNode } from '@module-federation/sdk'; +import { loadScript, loadScriptNode } from '@module-federation/sdk'; export { Module } from './module'; - +import { Module } from './module'; export type { Federation } from './global'; export type { FederationRuntimePlugin }; -let FederationInstance: FederationHost | null = null; -export function init(options: UserOptions): FederationHost { - // Retrieve the same instance with the same name - const instance = getGlobalFederationInstance(options.name, options.version); - if (!instance) { - // Retrieve debug constructor - const FederationConstructor = - getGlobalFederationConstructor() || FederationHost; - FederationInstance = new FederationConstructor(options); - setGlobalFederationInstance(FederationInstance); - return FederationInstance; - } else { - // Merge options - instance.initOptions(options); - if (!FederationInstance) { - FederationInstance = instance; +export class FederationManager { + private federationInstance: FederationHost | null = null; + private _bundlerId: string; // Add this line to declare the property + + constructor(bundlerId?: string) { + this._bundlerId = bundlerId || getBuilderId(); + setGlobalFederationConstructor(FederationHost); + } + init(options: UserOptions): FederationHost { + // Retrieve the same instance with the same name + const instance = getGlobalFederationInstance( + options.name, + options.version, + this._bundlerId, + ); + if (!instance) { + // Retrieve debug constructor + const FederationConstructor = + getGlobalFederationConstructor() || FederationHost; + this.federationInstance = new FederationConstructor( + options, + this._bundlerId, + ); + setGlobalFederationInstance(this.federationInstance); + return this.federationInstance; + } else { + // Merge options + instance.initOptions(options); + if (!this.federationInstance) { + this.federationInstance = instance; + } + return instance; } - return instance; + } + + loadRemote( + ...args: Parameters + ): Promise { + assert(this.federationInstance, 'Please call init first'); + const loadRemote: typeof this.federationInstance.loadRemote = + this.federationInstance.loadRemote; + return loadRemote.apply(this.federationInstance, args); + } + + loadShare( + ...args: Parameters + ): Promise T | undefined)> { + assert(this.federationInstance, 'Please call init first'); + const loadShare: typeof this.federationInstance.loadShare = + this.federationInstance.loadShare; + return loadShare.apply(this.federationInstance, args); + } + + loadShareSync( + ...args: Parameters + ): () => T | never { + assert(this.federationInstance, 'Please call init first'); + const loadShareSync: typeof this.federationInstance.loadShareSync = + this.federationInstance.loadShareSync; + return loadShareSync.apply(this.federationInstance, args); + } + + preloadRemote( + ...args: Parameters + ): ReturnType { + assert(this.federationInstance, 'Please call init first'); + return this.federationInstance.preloadRemote(...args); // Use spread operator + } + + registerRemotes( + ...args: Parameters + ): ReturnType { + assert(this.federationInstance, 'Please call init first'); + return this.federationInstance.registerRemotes(...args); // Use spread operator + } + + registerPlugins( + ...args: Parameters + ): ReturnType { + assert(this.federationInstance, 'Please call init first'); + return this.federationInstance.registerPlugins(...args); // Use spread operator + } + + getInstance() { + return this.federationInstance; } } +// Create a singleton instance of the Federation class +const federation = new FederationManager(); + +// Re-export the functions with the same names +export function init(options: UserOptions): FederationHost { + return federation.init(options); +} + export function loadRemote( ...args: Parameters ): Promise { - assert(FederationInstance, 'Please call init first'); - const loadRemote: typeof FederationInstance.loadRemote = - FederationInstance.loadRemote; - // eslint-disable-next-line prefer-spread - return loadRemote.apply(FederationInstance, args); + return federation.loadRemote(...args); } export function loadShare( ...args: Parameters ): Promise T | undefined)> { - assert(FederationInstance, 'Please call init first'); - // eslint-disable-next-line prefer-spread - const loadShare: typeof FederationInstance.loadShare = - FederationInstance.loadShare; - return loadShare.apply(FederationInstance, args); + return federation.loadShare(...args); } export function loadShareSync( ...args: Parameters ): () => T | never { - assert(FederationInstance, 'Please call init first'); - const loadShareSync: typeof FederationInstance.loadShareSync = - FederationInstance.loadShareSync; - // eslint-disable-next-line prefer-spread - return loadShareSync.apply(FederationInstance, args); + return federation.loadShareSync(...args); } export function preloadRemote( ...args: Parameters ): ReturnType { - assert(FederationInstance, 'Please call init first'); - // eslint-disable-next-line prefer-spread - return FederationInstance.preloadRemote.apply(FederationInstance, args); + return federation.preloadRemote(...args); } export function registerRemotes( ...args: Parameters ): ReturnType { - assert(FederationInstance, 'Please call init first'); - // eslint-disable-next-line prefer-spread - return FederationInstance.registerRemotes.apply(FederationInstance, args); + return federation.registerRemotes(...args); } export function registerPlugins( ...args: Parameters -): ReturnType { - assert(FederationInstance, 'Please call init first'); - // eslint-disable-next-line prefer-spread - return FederationInstance.registerPlugins.apply(FederationInstance, args); +): ReturnType { + return federation.registerPlugins(...args); } export function getInstance() { - return FederationInstance; + return federation.getInstance(); } -// Inject for debug -setGlobalFederationConstructor(FederationHost); +setGlobalShareableRuntime({ + FederationManager, + FederationHost, + loadScript, + loadScriptNode, + registerGlobalPlugins, + getRemoteInfo, + getRemoteEntry, + Module, +}); diff --git a/packages/runtime/src/remote/index.ts b/packages/runtime/src/remote/index.ts index 5753fdd044..4b2e30ea94 100644 --- a/packages/runtime/src/remote/index.ts +++ b/packages/runtime/src/remote/index.ts @@ -140,7 +140,7 @@ export class RemoteHandler { loadEntry: new AsyncHook< [ { - createScriptHook: FederationHost['loaderHook']['lifecycle']['createScript']; + loaderHook: FederationHost['loaderHook']; remoteInfo: RemoteInfo; remoteEntryExports?: RemoteEntryExports; }, diff --git a/packages/runtime/src/utils/load.ts b/packages/runtime/src/utils/load.ts index 2fac3c3632..418e49ec0e 100644 --- a/packages/runtime/src/utils/load.ts +++ b/packages/runtime/src/utils/load.ts @@ -63,12 +63,12 @@ async function loadEntryScript({ name, globalName, entry, - createScriptHook, + loaderHook, }: { name: string; globalName: string; entry: string; - createScriptHook: FederationHost['loaderHook']['lifecycle']['createScript']; + loaderHook: FederationHost['loaderHook']; }): Promise { const { entryExports: remoteEntryExports } = getRemoteEntryExports( name, @@ -82,7 +82,7 @@ async function loadEntryScript({ return loadScript(entry, { attrs: {}, createScriptHook: (url, attrs) => { - const res = createScriptHook.emit({ url, attrs }); + const res = loaderHook.lifecycle.createScript.emit({ url, attrs }); if (!res) return; @@ -123,11 +123,11 @@ async function loadEntryScript({ async function loadEntryDom({ remoteInfo, remoteEntryExports, - createScriptHook, + loaderHook, }: { remoteInfo: RemoteInfo; remoteEntryExports?: RemoteEntryExports; - createScriptHook: FederationHost['loaderHook']['lifecycle']['createScript']; + loaderHook: FederationHost['loaderHook']; }) { const { entry, entryGlobalName: globalName, name, type } = remoteInfo; switch (type) { @@ -137,16 +137,16 @@ async function loadEntryDom({ case 'system': return loadSystemJsEntry({ entry, remoteEntryExports }); default: - return loadEntryScript({ entry, globalName, name, createScriptHook }); + return loadEntryScript({ entry, globalName, name, loaderHook }); } } async function loadEntryNode({ remoteInfo, - createScriptHook, + loaderHook, }: { remoteInfo: RemoteInfo; - createScriptHook: FederationHost['loaderHook']['lifecycle']['createScript']; + loaderHook: FederationHost['loaderHook']; }) { const { entry, entryGlobalName: globalName, name, type } = remoteInfo; const { entryExports: remoteEntryExports } = getRemoteEntryExports( @@ -160,16 +160,18 @@ async function loadEntryNode({ return loadScriptNode(entry, { attrs: { name, globalName, type }, - createScriptHook: (url, attrs) => { - const res = createScriptHook.emit({ url, attrs }); + loaderHook: { + createScriptHook: (url, attrs) => { + const res = loaderHook.lifecycle.createScript.emit({ url, attrs }); - if (!res) return; + if (!res) return; - if ('url' in res) { - return res; - } + if ('url' in res) { + return res; + } - return; + return; + }, }, }) .then(() => { @@ -217,9 +219,11 @@ export async function getRemoteEntry({ if (!globalLoading[uniqueKey]) { const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry; const createScriptHook = origin.loaderHook.lifecycle.createScript; + const loaderHook = origin.loaderHook; + globalLoading[uniqueKey] = loadEntryHook .emit({ - createScriptHook, + loaderHook, remoteInfo, remoteEntryExports, }) @@ -228,8 +232,8 @@ export async function getRemoteEntry({ return res; } return isBrowserEnv() - ? loadEntryDom({ remoteInfo, remoteEntryExports, createScriptHook }) - : loadEntryNode({ remoteInfo, createScriptHook }); + ? loadEntryDom({ remoteInfo, remoteEntryExports, loaderHook }) + : loadEntryNode({ remoteInfo, loaderHook }); }); } diff --git a/packages/sdk/src/node.ts b/packages/sdk/src/node.ts index 0a4ae1433c..c774a6d257 100644 --- a/packages/sdk/src/node.ts +++ b/packages/sdk/src/node.ts @@ -1,4 +1,4 @@ -import { CreateScriptHookNode } from './types'; +import { CreateScriptHookNode, FetchHook } from './types'; function importNodeModule(name: string): Promise { if (!name) { @@ -22,12 +22,10 @@ const loadNodeFetch = async (): Promise => { const lazyLoaderHookFetch = async ( input: RequestInfo | URL, init?: RequestInit, + loaderHook?: any, ): Promise => { - // @ts-ignore - const loaderHooks = __webpack_require__.federation.instance.loaderHook; - const hook = (url: RequestInfo | URL, init: RequestInit) => { - return loaderHooks.lifecycle.fetch.emit(url, init); + return loaderHook.lifecycle.fetch.emit(url, init); }; const res = await hook(input, init || {}); @@ -44,10 +42,13 @@ export function createScriptNode( url: string, cb: (error?: Error, scriptContext?: any) => void, attrs?: Record, - createScriptHook?: CreateScriptHookNode, + loaderHook?: { + createScriptHook?: CreateScriptHookNode; + fetch?: FetchHook; + }, ) { - if (createScriptHook) { - const hookResult = createScriptHook(url); + if (loaderHook?.createScriptHook) { + const hookResult = loaderHook.createScriptHook(url); if (hookResult && typeof hookResult === 'object' && 'url' in hookResult) { url = hookResult.url; } @@ -63,20 +64,9 @@ export function createScriptNode( } const getFetch = async (): Promise => { - //@ts-ignore - if (typeof __webpack_require__ !== 'undefined') { - try { - //@ts-ignore - const loaderHooks = __webpack_require__.federation.instance.loaderHook; - if (loaderHooks.lifecycle.fetch) { - return lazyLoaderHookFetch; - } - } catch (e) { - console.warn( - 'federation.instance.loaderHook.lifecycle.fetch failed:', - e, - ); - } + if (loaderHook?.fetch) { + return (input: RequestInfo | URL, init?: RequestInit) => + lazyLoaderHookFetch(input, init, loaderHook); } return typeof fetch === 'undefined' ? loadNodeFetch() : fetch; @@ -162,7 +152,9 @@ export function loadScriptNode( url: string, info: { attrs?: Record; - createScriptHook?: CreateScriptHookNode; + loaderHook?: { + createScriptHook?: CreateScriptHookNode; + }; }, ) { return new Promise((resolve, reject) => { @@ -181,7 +173,7 @@ export function loadScriptNode( } }, info.attrs, - info.createScriptHook, + info.loaderHook, ); }); } diff --git a/packages/sdk/src/types/hooks.ts b/packages/sdk/src/types/hooks.ts index 1284d890e0..75d4326b82 100644 --- a/packages/sdk/src/types/hooks.ts +++ b/packages/sdk/src/types/hooks.ts @@ -23,3 +23,7 @@ export type CreateScriptHook = ( url: string, attrs?: Record | undefined, ) => CreateScriptHookReturn; + +export type FetchHook = ( + args: [string, RequestInit], +) => Promise | void | false; diff --git a/packages/sdk/src/types/plugins/ContainerPlugin.ts b/packages/sdk/src/types/plugins/ContainerPlugin.ts index da350d5170..a72121660b 100644 --- a/packages/sdk/src/types/plugins/ContainerPlugin.ts +++ b/packages/sdk/src/types/plugins/ContainerPlugin.ts @@ -100,7 +100,7 @@ export interface ContainerPluginOptions { runtimePlugins?: string[]; experiments?: { - federationRuntime?: false | 'hoisted'; + federationRuntime?: false | 'hoisted' | 'use-host'; }; dataPrefetch?: DataPrefetch; } diff --git a/packages/sdk/src/types/plugins/ModuleFederationPlugin.ts b/packages/sdk/src/types/plugins/ModuleFederationPlugin.ts index e31c6169ec..37117e495e 100644 --- a/packages/sdk/src/types/plugins/ModuleFederationPlugin.ts +++ b/packages/sdk/src/types/plugins/ModuleFederationPlugin.ts @@ -235,7 +235,7 @@ export interface ModuleFederationPluginOptions { dataPrefetch?: DataPrefetch; virtualRuntimeEntry?: boolean; experiments?: { - federationRuntime?: false | 'hoisted'; + federationRuntime?: false | 'hoisted' | 'use-host'; }; } /** diff --git a/packages/webpack-bundler-runtime/package.json b/packages/webpack-bundler-runtime/package.json index ecf6876e9d..82eec07290 100644 --- a/packages/webpack-bundler-runtime/package.json +++ b/packages/webpack-bundler-runtime/package.json @@ -36,6 +36,10 @@ "import": "./dist/container.esm.js", "require": "./dist/container.cjs.js" }, + "./embedded": { + "import": "./dist/embedded.esm.js", + "require": "./dist/embedded.cjs.js" + }, "./*": "./*" }, "typesVersions": { @@ -45,6 +49,9 @@ ], "constant": [ "./dist/constant.cjs.d.ts" + ], + "embedded": [ + "./dist/embedded.cjs.d.ts" ] } }, diff --git a/packages/webpack-bundler-runtime/project.json b/packages/webpack-bundler-runtime/project.json index 18606b0fd7..55b66502ec 100644 --- a/packages/webpack-bundler-runtime/project.json +++ b/packages/webpack-bundler-runtime/project.json @@ -19,7 +19,8 @@ "format": ["cjs", "esm"], "additionalEntryPoints": [ "packages/webpack-bundler-runtime/src/constant.ts", - "packages/webpack-bundler-runtime/src/container.ts" + "packages/webpack-bundler-runtime/src/container.ts", + "packages/webpack-bundler-runtime/src/embedded.ts" ], "rollupConfig": "packages/webpack-bundler-runtime/rollup.config.js" }, diff --git a/packages/webpack-bundler-runtime/src/embedded.ts b/packages/webpack-bundler-runtime/src/embedded.ts new file mode 100644 index 0000000000..499849a6a6 --- /dev/null +++ b/packages/webpack-bundler-runtime/src/embedded.ts @@ -0,0 +1,87 @@ +import { Federation } from './types'; +import { remotes } from './remotes'; +import { consumes } from './consumes'; +import { initializeSharing } from './initializeSharing'; +import { installInitialConsumes } from './installInitialConsumes'; +import { attachShareScopeMap } from './attachShareScopeMap'; +import { initContainerEntry } from './initContainerEntry'; +export * from './types'; + +// Ensure nativeGlobal is defined correctly +export const nativeGlobal: typeof global = (() => { + try { + return new Function('return this')(); + } catch { + return globalThis; + } +})() as typeof global; + +// Safely access the shared runtime +const sharedRuntime = nativeGlobal.__FEDERATION__?.__SHAREABLE_RUNTIME__; + +if (!sharedRuntime) { + throw new Error('Shared runtime is not available.'); +} + +// Create a new instance of FederationManager, handling the build identifier +const federationInstance = new sharedRuntime.FederationManager( + //@ts-ignore + typeof FEDERATION_BUILD_IDENTIFIER === 'undefined' + ? undefined + : //@ts-ignore + FEDERATION_BUILD_IDENTIFIER, +); + +// Bind methods of federationInstance to ensure correct `this` context +// Without using destructuring or arrow functions +const boundInit = federationInstance.init.bind(federationInstance); +const boundGetInstance = + federationInstance.getInstance.bind(federationInstance); +const boundLoadRemote = federationInstance.loadRemote.bind(federationInstance); +const boundLoadShare = federationInstance.loadShare.bind(federationInstance); +const boundLoadShareSync = + federationInstance.loadShareSync.bind(federationInstance); +const boundPreloadRemote = + federationInstance.preloadRemote.bind(federationInstance); +const boundRegisterRemotes = + federationInstance.registerRemotes.bind(federationInstance); +const boundRegisterPlugins = + federationInstance.registerPlugins.bind(federationInstance); + +// Assemble the federation object with bound methods +const federation: Federation = { + runtime: { + // General exports safe to share + FederationHost: sharedRuntime.FederationHost, + registerGlobalPlugins: sharedRuntime.registerGlobalPlugins, + getRemoteEntry: sharedRuntime.getRemoteEntry, + getRemoteInfo: sharedRuntime.getRemoteInfo, + loadScript: sharedRuntime.loadScript, + loadScriptNode: sharedRuntime.loadScriptNode, + FederationManager: sharedRuntime.FederationManager, + Module: sharedRuntime.Module, + // Runtime instance-specific methods with correct `this` binding + init: boundInit, + getInstance: boundGetInstance, + loadRemote: boundLoadRemote, + loadShare: boundLoadShare, + loadShareSync: boundLoadShareSync, + preloadRemote: boundPreloadRemote, + registerRemotes: boundRegisterRemotes, + registerPlugins: boundRegisterPlugins, + }, + instance: undefined, + initOptions: undefined, + bundlerRuntime: { + remotes: remotes, + consumes: consumes, + I: initializeSharing, + S: {}, + installInitialConsumes: installInitialConsumes, + initContainerEntry: initContainerEntry, + }, + attachShareScopeMap: attachShareScopeMap, + bundlerRuntimeOptions: {}, +}; + +export default federation; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b2ead03d97..9988b3c1e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1742,6 +1742,97 @@ importers: specifier: ^1.0.6 version: 1.0.6(@rsbuild/core@1.0.19) + apps/shared-runtime/3005-share-host: + dependencies: + antd: + specifier: 4.24.15 + version: 4.24.15(react-dom@18.3.1)(react@18.3.1) + devDependencies: + '@module-federation/core': + specifier: workspace:* + version: link:../../../packages/core + '@module-federation/dts-plugin': + specifier: workspace:* + version: link:../../../packages/dts-plugin + '@module-federation/enhanced': + specifier: workspace:* + version: link:../../../packages/enhanced + '@module-federation/runtime': + specifier: workspace:* + version: link:../../../packages/runtime + '@module-federation/typescript': + specifier: workspace:* + version: link:../../../packages/typescript + '@pmmmwh/react-refresh-webpack-plugin': + specifier: 0.5.15 + version: 0.5.15(react-refresh@0.14.0)(webpack@5.93.0) + react-refresh: + specifier: 0.14.0 + version: 0.14.0 + + apps/shared-runtime/3006-share-remote: + dependencies: + antd: + specifier: 4.24.15 + version: 4.24.15(react-dom@18.3.1)(react@18.3.1) + devDependencies: + '@module-federation/core': + specifier: workspace:* + version: link:../../../packages/core + '@module-federation/enhanced': + specifier: workspace:* + version: link:../../../packages/enhanced + '@module-federation/typescript': + specifier: workspace:* + version: link:../../../packages/typescript + '@pmmmwh/react-refresh-webpack-plugin': + specifier: 0.5.15 + version: 0.5.15(react-refresh@0.14.0)(webpack@5.93.0) + react-refresh: + specifier: 0.14.0 + version: 0.14.0 + + apps/shared-runtime/3007-share-remote: + dependencies: + antd: + specifier: 4.24.15 + version: 4.24.15(react-dom@18.3.1)(react@18.3.1) + devDependencies: + '@module-federation/core': + specifier: workspace:* + version: link:../../../packages/core + '@module-federation/enhanced': + specifier: workspace:* + version: link:../../../packages/enhanced + '@module-federation/typescript': + specifier: workspace:* + version: link:../../../packages/typescript + '@pmmmwh/react-refresh-webpack-plugin': + specifier: 0.5.15 + version: 0.5.15(react-refresh@0.14.0)(webpack@5.93.0) + react-refresh: + specifier: 0.14.0 + version: 0.14.0 + + apps/shared-runtime/3008-share-remote: + dependencies: + '@module-federation/enhanced': + specifier: workspace:* + version: link:../../../packages/enhanced + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + devDependencies: + '@rsbuild/core': + specifier: ^0.6.15 + version: 0.6.15 + '@rsbuild/plugin-react': + specifier: ^0.6.15 + version: 0.6.15(@rsbuild/core@0.6.15)(@swc/helpers@0.5.13) + apps/website: {} apps/website-new: @@ -3098,10 +3189,10 @@ packages: '@babel/helpers': 7.25.7 '@babel/parser': 7.25.8 '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 1.9.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) gensync: 1.0.0-beta.2 json5: 2.2.3 lodash: 4.17.21 @@ -3124,10 +3215,10 @@ packages: '@babel/helpers': 7.25.6 '@babel/parser': 7.25.7 '@babel/template': 7.25.0 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.7 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -3146,10 +3237,10 @@ packages: '@babel/helpers': 7.25.7 '@babel/parser': 7.25.8 '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -3169,10 +3260,10 @@ packages: '@babel/helpers': 7.25.7 '@babel/parser': 7.25.8 '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -3266,7 +3357,7 @@ packages: resolution: {integrity: sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3303,7 +3394,7 @@ packages: '@babel/helper-optimise-call-expression': 7.25.7 '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.2) '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -3321,7 +3412,7 @@ packages: '@babel/helper-optimise-call-expression': 7.25.7 '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -3339,7 +3430,7 @@ packages: '@babel/helper-optimise-call-expression': 7.25.7 '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -3375,7 +3466,7 @@ packages: '@babel/core': 7.25.7 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -3390,7 +3481,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -3400,7 +3491,7 @@ packages: resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3409,11 +3500,20 @@ packages: resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color + /@babel/helper-module-imports@7.25.7: + resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 + transitivePeerDependencies: + - supports-color + /@babel/helper-module-imports@7.25.7(supports-color@5.5.0): resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} engines: {node: '>=6.9.0'} @@ -3433,7 +3533,7 @@ packages: '@babel/helper-module-imports': 7.24.7 '@babel/helper-simple-access': 7.24.7 '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -3444,10 +3544,10 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.12.9 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3459,10 +3559,10 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3474,10 +3574,10 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -3509,7 +3609,7 @@ packages: '@babel/core': 7.25.7 '@babel/helper-annotate-as-pure': 7.25.7 '@babel/helper-wrap-function': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3523,7 +3623,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 '@babel/helper-wrap-function': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -3536,7 +3636,7 @@ packages: '@babel/core': 7.25.2 '@babel/helper-member-expression-to-functions': 7.25.7 '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3550,7 +3650,7 @@ packages: '@babel/core': 7.25.7 '@babel/helper-member-expression-to-functions': 7.25.7 '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3564,7 +3664,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-member-expression-to-functions': 7.25.7 '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -3572,7 +3672,7 @@ packages: resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3581,7 +3681,7 @@ packages: resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3590,7 +3690,7 @@ packages: resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3620,7 +3720,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -3679,7 +3779,7 @@ packages: dependencies: '@babel/core': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3692,7 +3792,7 @@ packages: dependencies: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -3769,7 +3869,7 @@ packages: dependencies: '@babel/core': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -3782,7 +3882,7 @@ packages: dependencies: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -4562,7 +4662,7 @@ packages: '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.7) - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -4576,7 +4676,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -4587,7 +4687,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: @@ -4601,7 +4701,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) transitivePeerDependencies: @@ -4707,7 +4807,7 @@ packages: '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -4724,7 +4824,7 @@ packages: '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -4940,7 +5040,7 @@ packages: '@babel/core': 7.25.7 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -4954,7 +5054,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -5098,7 +5198,7 @@ packages: '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -5113,7 +5213,7 @@ packages: '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -5532,7 +5632,7 @@ packages: dependencies: '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) '@babel/types': 7.25.7 @@ -5548,7 +5648,7 @@ packages: dependencies: '@babel/core': 7.25.7 '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.7) '@babel/types': 7.25.7 @@ -5564,7 +5664,7 @@ packages: dependencies: '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) '@babel/types': 7.25.7 @@ -5650,7 +5750,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.7) babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.7) @@ -5667,7 +5767,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.8) babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.8) @@ -6249,6 +6349,20 @@ packages: '@babel/parser': 7.25.8 '@babel/types': 7.25.8 + /@babel/traverse@7.25.7: + resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/parser': 7.25.8 + '@babel/template': 7.25.7 + '@babel/types': 7.25.8 + debug: 4.3.7(supports-color@9.3.1) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + /@babel/traverse@7.25.7(supports-color@5.5.0): resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} engines: {node: '>=6.9.0'} @@ -6945,7 +7059,7 @@ packages: /@emotion/babel-plugin@11.12.0: resolution: {integrity: sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw==} dependencies: - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/runtime': 7.25.7 '@emotion/hash': 0.9.2 '@emotion/memoize': 0.9.0 @@ -8491,7 +8605,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -8567,7 +8681,7 @@ packages: deprecated: Use @eslint/config-array instead dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -9507,7 +9621,7 @@ packages: optional: true dependencies: '@babel/parser': 7.25.8 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 '@modern-js/core': 2.60.3 '@modern-js/node-bundle-require': 2.60.3 @@ -9516,14 +9630,14 @@ packages: '@modern-js/plugin-i18n': 2.60.3 '@modern-js/prod-server': 2.60.3(react-dom@18.3.1)(react@18.3.1) '@modern-js/rsbuild-plugin-esbuild': 2.60.3(@swc/core@1.7.26) - '@modern-js/server': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.18)(react-dom@18.3.1)(react@18.3.1) + '@modern-js/server': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19)(react-dom@18.3.1)(react@18.3.1) '@modern-js/server-core': 2.60.3(react-dom@18.3.1)(react@18.3.1) - '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.18) + '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19) '@modern-js/types': 2.60.3 '@modern-js/uni-builder': 2.60.3(@rspack/core@1.0.8)(@swc/core@1.7.26)(esbuild@0.17.19)(styled-components@6.1.13)(typescript@5.0.4) '@modern-js/utils': 2.60.3 - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-node-polyfill': 1.0.4(@rsbuild/core@1.0.18) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-node-polyfill': 1.0.4(@rsbuild/core@1.0.19) '@swc/helpers': 0.5.13 '@vercel/nft': 0.26.5(encoding@0.1.13) es-module-lexer: 1.5.4 @@ -9575,7 +9689,7 @@ packages: optional: true dependencies: '@babel/parser': 7.25.8 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 '@modern-js/core': 2.60.3 '@modern-js/node-bundle-require': 2.60.3 @@ -9584,14 +9698,14 @@ packages: '@modern-js/plugin-i18n': 2.60.3 '@modern-js/prod-server': 2.60.3(react-dom@18.3.1)(react@18.3.1) '@modern-js/rsbuild-plugin-esbuild': 2.60.3(@swc/core@1.7.26) - '@modern-js/server': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.16)(react-dom@18.3.1)(react@18.3.1) + '@modern-js/server': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19)(react-dom@18.3.1)(react@18.3.1) '@modern-js/server-core': 2.60.3(react-dom@18.3.1)(react@18.3.1) - '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.16) + '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19) '@modern-js/types': 2.60.3 '@modern-js/uni-builder': 2.60.3(@rspack/core@1.0.8)(@swc/core@1.7.26)(esbuild@0.17.19)(styled-components@6.1.13)(typescript@5.5.2) '@modern-js/utils': 2.60.3 - '@rsbuild/core': 1.0.16 - '@rsbuild/plugin-node-polyfill': 1.0.4(@rsbuild/core@1.0.16) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-node-polyfill': 1.0.4(@rsbuild/core@1.0.19) '@swc/helpers': 0.5.13 '@vercel/nft': 0.26.5(encoding@0.1.13) es-module-lexer: 1.5.4 @@ -9692,30 +9806,7 @@ packages: - supports-color dev: true - /@modern-js/babel-preset@2.60.3(@rsbuild/core@1.0.16): - resolution: {integrity: sha512-k5FmCuyuHK70JZbsY2VBKdV+rZ0lLyosKbhYrQ6GkxNLEzDP2d9mZq/aMLUDPJungFqBar7/gcA6Gd6fC6cp1A==} - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-decorators': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-proposal-export-default-from': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-proposal-partial-application': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-proposal-pipeline-operator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-runtime': 7.25.7(@babel/core@7.25.8) - '@babel/preset-env': 7.25.8(@babel/core@7.25.8) - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@babel/runtime': 7.25.7 - '@babel/types': 7.25.8 - '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.16) - '@swc/helpers': 0.5.13 - '@types/babel__core': 7.20.5 - babel-plugin-dynamic-import-node: 2.3.3 - core-js: 3.37.1 - transitivePeerDependencies: - - '@rsbuild/core' - - supports-color - dev: true - - /@modern-js/babel-preset@2.60.3(@rsbuild/core@1.0.18): + /@modern-js/babel-preset@2.60.3(@rsbuild/core@1.0.19): resolution: {integrity: sha512-k5FmCuyuHK70JZbsY2VBKdV+rZ0lLyosKbhYrQ6GkxNLEzDP2d9mZq/aMLUDPJungFqBar7/gcA6Gd6fC6cp1A==} dependencies: '@babel/core': 7.25.8 @@ -9728,7 +9819,7 @@ packages: '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) '@babel/runtime': 7.25.7 '@babel/types': 7.25.8 - '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.18) + '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.19) '@swc/helpers': 0.5.13 '@types/babel__core': 7.20.5 babel-plugin-dynamic-import-node: 2.3.3 @@ -10241,27 +10332,7 @@ packages: - supports-color dev: true - /@modern-js/server-utils@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.16): - resolution: {integrity: sha512-e7i6miqx3YsshBRixbOIWi3I5jt8LnqAGHuiViQBI90RzlSbP0udoVjSAqe+7HF+nPvyMAynMsY/3ljSk0Yf9g==} - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-decorators': 7.25.7(@babel/core@7.25.8) - '@babel/preset-env': 7.25.8(@babel/core@7.25.8) - '@babel/preset-react': 7.25.7(@babel/core@7.25.8) - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@modern-js/babel-compiler': 2.60.3 - '@modern-js/babel-plugin-module-resolver': 2.60.3 - '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.16) - '@modern-js/utils': 2.60.3 - '@swc/helpers': 0.5.13 - babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.25.8)(@babel/traverse@7.25.7) - transitivePeerDependencies: - - '@babel/traverse' - - '@rsbuild/core' - - supports-color - dev: true - - /@modern-js/server-utils@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.18): + /@modern-js/server-utils@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19): resolution: {integrity: sha512-e7i6miqx3YsshBRixbOIWi3I5jt8LnqAGHuiViQBI90RzlSbP0udoVjSAqe+7HF+nPvyMAynMsY/3ljSk0Yf9g==} dependencies: '@babel/core': 7.25.8 @@ -10271,7 +10342,7 @@ packages: '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) '@modern-js/babel-compiler': 2.60.3 '@modern-js/babel-plugin-module-resolver': 2.60.3 - '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.18) + '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.19) '@modern-js/utils': 2.60.3 '@swc/helpers': 0.5.13 babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.25.8)(@babel/traverse@7.25.7) @@ -10321,7 +10392,7 @@ packages: - utf-8-validate dev: true - /@modern-js/server@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.16)(react-dom@18.3.1)(react@18.3.1): + /@modern-js/server@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-fTUOdHVEgmEKf6BozU3DBHYgRfXYAX68PPRtljHhLYSCLDqQ27LHGqzjL2WUYY9pLq7mpPAy5oy7U6nnzMT+vg==} peerDependencies: devcert: ^1.2.2 @@ -10339,46 +10410,7 @@ packages: '@babel/register': 7.25.7(@babel/core@7.25.8) '@modern-js/runtime-utils': 2.60.3(react-dom@18.3.1)(react@18.3.1) '@modern-js/server-core': 2.60.3(react-dom@18.3.1)(react@18.3.1) - '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.16) - '@modern-js/types': 2.60.3 - '@modern-js/utils': 2.60.3 - '@swc/helpers': 0.5.13 - axios: 1.7.7 - connect-history-api-fallback: 2.0.0 - http-compression: 1.0.6 - minimatch: 3.1.2 - path-to-regexp: 6.3.0 - ws: 8.18.0 - transitivePeerDependencies: - - '@babel/traverse' - - '@rsbuild/core' - - bufferutil - - debug - - react - - react-dom - - supports-color - - utf-8-validate - dev: true - - /@modern-js/server@2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.18)(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-fTUOdHVEgmEKf6BozU3DBHYgRfXYAX68PPRtljHhLYSCLDqQ27LHGqzjL2WUYY9pLq7mpPAy5oy7U6nnzMT+vg==} - peerDependencies: - devcert: ^1.2.2 - ts-node: ^10.1.0 - tsconfig-paths: '>= 3.0.0 || >= 4.0.0' - peerDependenciesMeta: - devcert: - optional: true - ts-node: - optional: true - tsconfig-paths: - optional: true - dependencies: - '@babel/core': 7.25.8 - '@babel/register': 7.25.7(@babel/core@7.25.8) - '@modern-js/runtime-utils': 2.60.3(react-dom@18.3.1)(react@18.3.1) - '@modern-js/server-core': 2.60.3(react-dom@18.3.1)(react@18.3.1) - '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.18) + '@modern-js/server-utils': 2.60.3(@babel/traverse@7.25.7)(@rsbuild/core@1.0.19) '@modern-js/types': 2.60.3 '@modern-js/utils': 2.60.3 '@swc/helpers': 0.5.13 @@ -10407,7 +10439,7 @@ packages: '@modern-js/runtime': 2.60.3(@types/react-dom@18.3.0)(@types/react@18.2.79)(react-dom@18.3.1)(react@18.3.1) '@modern-js/uni-builder': 2.60.3(@rspack/core@1.0.8)(@swc/core@1.7.26)(esbuild@0.18.20)(styled-components@6.1.13)(typescript@5.0.4) '@modern-js/utils': 2.60.3 - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 '@storybook/components': 7.6.20(@types/react-dom@18.3.0)(@types/react@18.2.79)(react-dom@18.3.1)(react@18.3.1) '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/csf-plugin': 7.6.20 @@ -10605,27 +10637,27 @@ packages: '@babel/core': 7.25.8 '@babel/preset-react': 7.25.7(@babel/core@7.25.8) '@babel/types': 7.25.8 - '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.18) + '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.19) '@modern-js/utils': 2.60.3 '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.95.0) - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.18)(esbuild@0.17.19)(webpack@5.95.0) - '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-react': 1.0.5(@rsbuild/core@1.0.18) - '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.18) - '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.18)(typescript@5.0.4) - '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.0.4) - '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.19)(esbuild@0.17.19)(webpack@5.95.0) + '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.0.19) + '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.19) + '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.19)(typescript@5.0.4) + '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.0.4) + '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19) '@swc/helpers': 0.5.13 autoprefixer: 10.4.20(postcss@8.4.47) babel-loader: 9.1.3(@babel/core@7.25.8)(webpack@5.95.0) @@ -10682,27 +10714,27 @@ packages: '@babel/core': 7.25.8 '@babel/preset-react': 7.25.7(@babel/core@7.25.8) '@babel/types': 7.25.8 - '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.18) + '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.19) '@modern-js/utils': 2.60.3 '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.95.0) - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.18)(esbuild@0.17.19)(webpack@5.95.0) - '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-react': 1.0.5(@rsbuild/core@1.0.18) - '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.18) - '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.18)(typescript@5.5.2) - '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.5.2) - '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.19)(esbuild@0.17.19)(webpack@5.95.0) + '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.0.19) + '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.19) + '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.19)(typescript@5.5.2) + '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.5.2) + '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19) '@swc/helpers': 0.5.13 autoprefixer: 10.4.20(postcss@8.4.47) babel-loader: 9.1.3(@babel/core@7.25.8)(webpack@5.95.0) @@ -10759,27 +10791,27 @@ packages: '@babel/core': 7.25.8 '@babel/preset-react': 7.25.7(@babel/core@7.25.8) '@babel/types': 7.25.8 - '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.18) + '@modern-js/babel-preset': 2.60.3(@rsbuild/core@1.0.19) '@modern-js/utils': 2.60.3 '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.95.0) - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.18)(esbuild@0.18.20)(webpack@5.95.0) - '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-react': 1.0.5(@rsbuild/core@1.0.18) - '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.18) - '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.18)(typescript@5.0.4) - '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.18) - '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.18.20)(typescript@5.0.4) - '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.18) - '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.18.20) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-assets-retry': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-babel': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-check-syntax': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-css-minimizer': 1.0.2(@rsbuild/core@1.0.19)(esbuild@0.18.20)(webpack@5.95.0) + '@rsbuild/plugin-less': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-pug': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-react': 1.0.6(@rsbuild/core@1.0.19) + '@rsbuild/plugin-rem': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-sass': 1.0.3(@rsbuild/core@1.0.19) + '@rsbuild/plugin-source-build': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-styled-components': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-svgr': 1.0.4(@rsbuild/core@1.0.19)(typescript@5.0.4) + '@rsbuild/plugin-toml': 1.0.1(@rsbuild/core@1.0.19) + '@rsbuild/plugin-type-check': 1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.18.20)(typescript@5.0.4) + '@rsbuild/plugin-typed-css-modules': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/plugin-yaml': 1.0.2(@rsbuild/core@1.0.19) + '@rsbuild/webpack': 1.0.11(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.18.20) '@swc/helpers': 0.5.13 autoprefixer: 10.4.20(postcss@8.4.47) babel-loader: 9.1.3(@babel/core@7.25.8)(webpack@5.95.0) @@ -11352,7 +11384,7 @@ packages: '@open-draft/until': 1.0.3 '@types/debug': 4.1.12 '@xmldom/xmldom': 0.8.10 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) headers-polyfill: 3.2.5 outvariant: 1.4.3 strict-event-emitter: 0.2.8 @@ -14635,7 +14667,7 @@ packages: optional: true dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@rollup/pluginutils': 5.1.2(rollup@4.24.0) rollup: 4.24.0 transitivePeerDependencies: @@ -15067,6 +15099,19 @@ packages: postcss: 8.4.47 dev: true + /@rsbuild/core@0.6.15: + resolution: {integrity: sha512-wT9gyfRHyXJamR6fvlWzOpWGmI+2w+LMNIvAItY6AjCIT1zgfK0OOkChR4KGTTOWj68b/t0BnuBy1b2PV3DLyw==} + engines: {node: '>=16.0.0'} + hasBin: true + dependencies: + '@rsbuild/shared': 0.6.15(@swc/helpers@0.5.3) + '@rspack/core': 0.6.5(@swc/helpers@0.5.3) + '@swc/helpers': 0.5.3 + core-js: 3.36.1 + html-webpack-plugin: /html-rspack-plugin@5.7.2(@rspack/core@0.6.5) + postcss: 8.4.47 + dev: true + /@rsbuild/core@0.7.0: resolution: {integrity: sha512-piH2PVysaUNyxkIYUQ4zpVN+MFzO2wJFizs8LCNz8v9R4Vsr9LVEvn7iuiARcF6yzKV86Wl0krk4l5VBXh5tVA==} engines: {node: '>=16.0.0'} @@ -15107,32 +15152,6 @@ packages: fsevents: 2.3.3 dev: true - /@rsbuild/core@1.0.16: - resolution: {integrity: sha512-ioQg9HfDh5eXPZi+An7yCRaSE9TH4W3IBqrxBrv4IjOg/ajpVpKidiKwyYpX3QPbxY1ybfvQTH7HwATND4crCA==} - engines: {node: '>=16.7.0'} - hasBin: true - dependencies: - '@rspack/core': 1.0.13(@swc/helpers@0.5.13) - '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.13 - core-js: 3.38.1 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /@rsbuild/core@1.0.18: - resolution: {integrity: sha512-NRdcGCAuBpzAIIdv+gVZxpgd9Cu9JSbaOC13nTbWRKXrHPpr+1iwYFBbM01KtX0Fe2TBLgmSaJfdDJAfEeZ3Dg==} - engines: {node: '>=16.7.0'} - hasBin: true - dependencies: - '@rspack/core': 1.0.14(@swc/helpers@0.5.13) - '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.13 - core-js: 3.38.1 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /@rsbuild/core@1.0.19: resolution: {integrity: sha512-63DAPvYfRBoUrb51BUPb4Xoqx48MHQ0yLcmnCiqZGpMeKYtTWzD+lyx5va4cr9qvdnIFTAX2BMuYC/j5iSrtTA==} engines: {node: '>=16.7.0'} @@ -15146,12 +15165,12 @@ packages: fsevents: 2.3.3 dev: true - /@rsbuild/plugin-assets-retry@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-assets-retry@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-vlQwCFibONxquQmQwDDv/crivmXAct8nsUtSovlgoMHE4UUQKFZbJ7jr54FVXvDlyL/Wp9yvOj4WhAEabBEVlA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 serialize-javascript: 6.0.2 dev: true @@ -15207,25 +15226,7 @@ packages: - supports-color dev: true - /@rsbuild/plugin-babel@1.0.2(@rsbuild/core@1.0.16): - resolution: {integrity: sha512-csTx5l6k3t8Qyd5MU3RVvq6aRg282Z+cc/0dpkDfs1NCF56ortTLyjV1LcHRmN6inXLwEp3tNt7P4EMDF0fV/w==} - peerDependencies: - '@rsbuild/core': 1.x || ^1.0.1-rc.0 - dependencies: - '@babel/core': 7.25.8 - '@babel/plugin-proposal-decorators': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@rsbuild/core': 1.0.16 - '@types/babel__core': 7.20.5 - deepmerge: 4.3.1 - reduce-configs: 1.0.0 - upath: 2.0.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@rsbuild/plugin-babel@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-babel@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-csTx5l6k3t8Qyd5MU3RVvq6aRg282Z+cc/0dpkDfs1NCF56ortTLyjV1LcHRmN6inXLwEp3tNt7P4EMDF0fV/w==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 @@ -15234,7 +15235,7 @@ packages: '@babel/plugin-proposal-decorators': 7.25.7(@babel/core@7.25.8) '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 '@types/babel__core': 7.20.5 deepmerge: 4.3.1 reduce-configs: 1.0.0 @@ -15243,7 +15244,7 @@ packages: - supports-color dev: true - /@rsbuild/plugin-check-syntax@1.0.1(@rsbuild/core@1.0.18): + /@rsbuild/plugin-check-syntax@1.0.1(@rsbuild/core@1.0.19): resolution: {integrity: sha512-LN6OVmLJahFwv3dp9Q6k1E4GIpF78cUf7aXxKBvtvYXD0/rRP/1PPs4OWeyOqIcqSikcIdmERj50OECzPdWmpA==} peerDependencies: '@rsbuild/core': 0.x || 1.x @@ -15251,7 +15252,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 acorn: 8.12.1 browserslist-to-es-version: 1.0.0 htmlparser2: 9.1.0 @@ -15259,7 +15260,7 @@ packages: source-map: 0.7.4 dev: true - /@rsbuild/plugin-css-minimizer@1.0.2(@rsbuild/core@1.0.18)(esbuild@0.17.19)(webpack@5.95.0): + /@rsbuild/plugin-css-minimizer@1.0.2(@rsbuild/core@1.0.19)(esbuild@0.17.19)(webpack@5.95.0): resolution: {integrity: sha512-x695i5PHWI9uV9VA1Dun66G0DeJMgxbt3wEk4eHZMz9pi6n8Dah6BHG2WcloYAEi7yVoUcPIGXDdag27s2B+4A==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15267,7 +15268,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 css-minimizer-webpack-plugin: 5.0.1(esbuild@0.17.19)(webpack@5.95.0) reduce-configs: 1.0.0 transitivePeerDependencies: @@ -15280,7 +15281,7 @@ packages: - webpack dev: true - /@rsbuild/plugin-css-minimizer@1.0.2(@rsbuild/core@1.0.18)(esbuild@0.18.20)(webpack@5.95.0): + /@rsbuild/plugin-css-minimizer@1.0.2(@rsbuild/core@1.0.19)(esbuild@0.18.20)(webpack@5.95.0): resolution: {integrity: sha512-x695i5PHWI9uV9VA1Dun66G0DeJMgxbt3wEk4eHZMz9pi6n8Dah6BHG2WcloYAEi7yVoUcPIGXDdag27s2B+4A==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15288,7 +15289,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 css-minimizer-webpack-plugin: 5.0.1(esbuild@0.18.20)(webpack@5.95.0) reduce-configs: 1.0.0 transitivePeerDependencies: @@ -15312,51 +15313,17 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-less@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-less@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-FtnJbonHfBrPP5tCiAHaOYyfqUYpvCUZVHfDv6wsky5copjDG0xnW7NL4JCNdT2QxTbssudL46UhYq67pLW5eA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 reduce-configs: 1.0.0 dev: true - /@rsbuild/plugin-node-polyfill@1.0.4(@rsbuild/core@1.0.16): - resolution: {integrity: sha512-WuYnMmbRpRPGsHn1maLLa4aHY4qSlEI5wbVhf4vcYlz4Zi+F+RgM/cerFZ0zSgNW/7zEHRORoSWFEyOUff8RvQ==} - peerDependencies: - '@rsbuild/core': 1.x || ^1.0.1-beta.0 - peerDependenciesMeta: - '@rsbuild/core': - optional: true - dependencies: - '@rsbuild/core': 1.0.16 - assert: 2.1.0 - browserify-zlib: 0.2.0 - buffer: 5.7.1 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - domain-browser: 5.7.0 - events: 3.3.0 - https-browserify: 1.0.0 - os-browserify: 0.3.0 - path-browserify: 1.0.1 - process: 0.11.10 - punycode: 2.3.1 - querystring-es3: 0.2.1 - readable-stream: 4.5.2 - stream-browserify: 3.0.0 - stream-http: 3.2.0 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.1 - url: 0.11.4 - util: 0.12.5 - vm-browserify: 1.1.2 - dev: true - - /@rsbuild/plugin-node-polyfill@1.0.4(@rsbuild/core@1.0.18): + /@rsbuild/plugin-node-polyfill@1.0.4(@rsbuild/core@1.0.19): resolution: {integrity: sha512-WuYnMmbRpRPGsHn1maLLa4aHY4qSlEI5wbVhf4vcYlz4Zi+F+RgM/cerFZ0zSgNW/7zEHRORoSWFEyOUff8RvQ==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15364,7 +15331,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 assert: 2.1.0 browserify-zlib: 0.2.0 buffer: 5.7.1 @@ -15390,7 +15357,7 @@ packages: vm-browserify: 1.1.2 dev: true - /@rsbuild/plugin-pug@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-pug@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-6WplxGg36PRMfNV4wFwbNRakqMM7Ms96E5PNFDTrjAhr/sX1BeyM9TDhFOcYXCeSwlO2PLjfw0L2JDf9RTwWBA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15398,12 +15365,25 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 '@types/pug': 2.0.10 pug: 3.0.3 reduce-configs: 1.0.0 dev: true + /@rsbuild/plugin-react@0.6.15(@rsbuild/core@0.6.15)(@swc/helpers@0.5.13): + resolution: {integrity: sha512-ZLFF5qYgQPKbJ5IL85XayadryxnHoaLUUjd2ewf/d/TRUh2NiWyZGaNzRytbmhaxI0WW8RUkZdy5aX3xyiZbTA==} + peerDependencies: + '@rsbuild/core': ^0.6.15 + dependencies: + '@rsbuild/core': 0.6.15 + '@rsbuild/shared': 0.6.15(@swc/helpers@0.5.13) + '@rspack/plugin-react-refresh': 0.6.5(react-refresh@0.14.2) + react-refresh: 0.14.2 + transitivePeerDependencies: + - '@swc/helpers' + dev: true + /@rsbuild/plugin-react@0.7.0(@rsbuild/core@0.7.0)(@swc/helpers@0.5.13): resolution: {integrity: sha512-8BIzFyhA4oEhyXIWT7zZZ1LxebbiU6dWZ3R0c1RqxTcm6LRr+I3HBF/moFECiS1jyQOBCiOPtaxVEREtoJnxCw==} peerDependencies: @@ -15417,22 +15397,12 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-react@1.0.4(@rsbuild/core@1.0.18): + /@rsbuild/plugin-react@1.0.4(@rsbuild/core@1.0.19): resolution: {integrity: sha512-lZQPl2Ocw3mxdR8dGZNTx70iLILt/p1B4oAStDNnDCVK9mzeCzpG67IYP82KaAJ5KowXTPLRqEkF9fKr5lWPPA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 - '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) - react-refresh: 0.14.2 - dev: true - - /@rsbuild/plugin-react@1.0.5(@rsbuild/core@1.0.18): - resolution: {integrity: sha512-9n3oaWH36y07C5vmQOHhPscKkM14cJZEapozopvSzNXyEHLRN4PFhPhJB6tFA5C/yXnxo8BQCKYw2ejNL0gdvA==} - peerDependencies: - '@rsbuild/core': 1.x || ^1.0.1-rc.0 - dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 '@rspack/plugin-react-refresh': 1.0.0(react-refresh@0.14.2) react-refresh: 0.14.2 dev: true @@ -15447,7 +15417,7 @@ packages: react-refresh: 0.14.2 dev: true - /@rsbuild/plugin-rem@1.0.1(@rsbuild/core@1.0.18): + /@rsbuild/plugin-rem@1.0.1(@rsbuild/core@1.0.19): resolution: {integrity: sha512-wsaEvFLVpWsvGi5Bh1j3Yxq1C5RgD+AyveNTbEHaoHHj7ChDx1lrTSRZhre3Jmgjse02gUZjbnAhcO+v5aJPVw==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15455,7 +15425,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 terser: 5.34.1 dev: true @@ -15473,12 +15443,12 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-sass@1.0.3(@rsbuild/core@1.0.18): + /@rsbuild/plugin-sass@1.0.3(@rsbuild/core@1.0.19): resolution: {integrity: sha512-Hy9MZtjXpoLfRvYeLP4F/1L5/mINRZ+IEFRQoaS7yAwzvydNMxI3QXoXDQvEaaUxnuNhCh2TCDrvsxd+cds22A==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 loader-utils: 2.0.4 postcss: 8.4.47 @@ -15486,7 +15456,7 @@ packages: sass-embedded: 1.79.5 dev: true - /@rsbuild/plugin-source-build@1.0.1(@rsbuild/core@1.0.18): + /@rsbuild/plugin-source-build@1.0.1(@rsbuild/core@1.0.19): resolution: {integrity: sha512-GA9Uapy4cTOOa0jkwf4/L4m6rPieWWOmeeEygVnJAHRdB5nW45conwlV9g1ZQC14ITHsZlai8FiZotWGPNJlwA==} peerDependencies: '@rsbuild/core': 0.x || 1.x || ^1.0.1-beta.0 @@ -15494,13 +15464,13 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 fast-glob: 3.3.2 json5: 2.2.3 yaml: 2.6.0 dev: true - /@rsbuild/plugin-styled-components@1.0.1(@rsbuild/core@1.0.18): + /@rsbuild/plugin-styled-components@1.0.1(@rsbuild/core@1.0.19): resolution: {integrity: sha512-1NL0yu5yr7S9wv4xTBYE++CaCved96yoAyd+r/xu4dGfi0w+BrshHNDrPwYBKPX+DC3NZrHGMIsfvpy3QmtloA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15508,18 +15478,18 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 '@swc/plugin-styled-components': 2.0.11 reduce-configs: 1.0.0 dev: true - /@rsbuild/plugin-svgr@1.0.4(@rsbuild/core@1.0.18)(typescript@5.0.4): + /@rsbuild/plugin-svgr@1.0.4(@rsbuild/core@1.0.19)(typescript@5.0.4): resolution: {integrity: sha512-j2BXjNxsIEwRghsw3hagljbCYhe5uuw9qOMuN9Lgrb9PzNt44IMgIgrIdsS+3TR05CioMU/LHhA+Xjl+bhTMxA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-react': 1.0.4(@rsbuild/core@1.0.18) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-react': 1.0.4(@rsbuild/core@1.0.19) '@svgr/core': 8.1.0(typescript@5.0.4) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.0.4) @@ -15530,13 +15500,13 @@ packages: - typescript dev: true - /@rsbuild/plugin-svgr@1.0.4(@rsbuild/core@1.0.18)(typescript@5.5.2): + /@rsbuild/plugin-svgr@1.0.4(@rsbuild/core@1.0.19)(typescript@5.5.2): resolution: {integrity: sha512-j2BXjNxsIEwRghsw3hagljbCYhe5uuw9qOMuN9Lgrb9PzNt44IMgIgrIdsS+3TR05CioMU/LHhA+Xjl+bhTMxA==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-rc.0 dependencies: - '@rsbuild/core': 1.0.18 - '@rsbuild/plugin-react': 1.0.4(@rsbuild/core@1.0.18) + '@rsbuild/core': 1.0.19 + '@rsbuild/plugin-react': 1.0.4(@rsbuild/core@1.0.19) '@svgr/core': 8.1.0(typescript@5.5.2) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.5.2) @@ -15547,7 +15517,7 @@ packages: - typescript dev: true - /@rsbuild/plugin-toml@1.0.1(@rsbuild/core@1.0.18): + /@rsbuild/plugin-toml@1.0.1(@rsbuild/core@1.0.19): resolution: {integrity: sha512-CsYlSKGYY2nm4nrubYGbbPsYE33p+5D1Y6i8FJKQtfAvsw6WdDO2l1Xmg9XuLL0s5mIGmAZFhj5tCMMW7yTX4A==} peerDependencies: '@rsbuild/core': 0.x || 1.x || ^1.0.1-beta.0 @@ -15555,11 +15525,11 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 toml: 3.0.0 dev: true - /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.0.4): + /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.0.4): resolution: {integrity: sha512-BahXAJNq4kWtL2dINUlrOL9UCN1t8c/qf5RW8JXx2HSSasfKPJGJ1BVfieMcIaFa/t8/QdafcwoxY1WKPTlSMg==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15567,7 +15537,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.0.4)(webpack@5.95.0) json5: 2.2.3 @@ -15581,7 +15551,7 @@ packages: - webpack-cli dev: true - /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.5.2): + /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19)(typescript@5.5.2): resolution: {integrity: sha512-BahXAJNq4kWtL2dINUlrOL9UCN1t8c/qf5RW8JXx2HSSasfKPJGJ1BVfieMcIaFa/t8/QdafcwoxY1WKPTlSMg==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15589,7 +15559,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.5.2)(webpack@5.95.0) json5: 2.2.3 @@ -15603,7 +15573,7 @@ packages: - webpack-cli dev: true - /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.18.20)(typescript@5.0.4): + /@rsbuild/plugin-type-check@1.0.1(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.18.20)(typescript@5.0.4): resolution: {integrity: sha512-BahXAJNq4kWtL2dINUlrOL9UCN1t8c/qf5RW8JXx2HSSasfKPJGJ1BVfieMcIaFa/t8/QdafcwoxY1WKPTlSMg==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15611,7 +15581,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 deepmerge: 4.3.1 fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.0.4)(webpack@5.95.0) json5: 2.2.3 @@ -15647,7 +15617,7 @@ packages: - webpack-cli dev: true - /@rsbuild/plugin-typed-css-modules@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-typed-css-modules@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-QX376pBXWeBrZBvYLP2HGGrHiWA5O0SDHwRoBNto5BqYDXhi6y+Eol2Hb/cY+h2ARKZVanMfUiJRABULOJ/FCQ==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15655,7 +15625,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 dev: true /@rsbuild/plugin-vue@1.0.3(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.24.0)(vue@3.5.10): @@ -15675,7 +15645,7 @@ packages: - webpack-cli dev: true - /@rsbuild/plugin-yaml@1.0.2(@rsbuild/core@1.0.18): + /@rsbuild/plugin-yaml@1.0.2(@rsbuild/core@1.0.19): resolution: {integrity: sha512-M7POrqJAYS8IoY4trdLe9DUhDC01MvA0ge4ZKHoVQzlNLWVj2QHHXdz55/bfpkNYhoNGdCntoDmE/dn1zIpcAw==} peerDependencies: '@rsbuild/core': 1.x || ^1.0.1-beta.0 @@ -15683,7 +15653,7 @@ packages: '@rsbuild/core': optional: true dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 dev: true /@rsbuild/shared@0.3.11(@swc/helpers@0.5.3): @@ -15708,6 +15678,30 @@ packages: - '@swc/helpers' dev: true + /@rsbuild/shared@0.6.15(@swc/helpers@0.5.13): + resolution: {integrity: sha512-siBYUQL3qVINLDkIBaxx4caNb+zZ+Jb8WtN2RgRT5buLW+PU5fXUs5vGwjFz6B6wCxO/vLr78X/FjaCmxMv8HA==} + dependencies: + '@rspack/core': 0.6.5(@swc/helpers@0.5.13) + caniuse-lite: 1.0.30001675 + postcss: 8.4.47 + optionalDependencies: + fsevents: 2.3.3 + transitivePeerDependencies: + - '@swc/helpers' + dev: true + + /@rsbuild/shared@0.6.15(@swc/helpers@0.5.3): + resolution: {integrity: sha512-siBYUQL3qVINLDkIBaxx4caNb+zZ+Jb8WtN2RgRT5buLW+PU5fXUs5vGwjFz6B6wCxO/vLr78X/FjaCmxMv8HA==} + dependencies: + '@rspack/core': 0.6.5(@swc/helpers@0.5.3) + caniuse-lite: 1.0.30001675 + postcss: 8.4.47 + optionalDependencies: + fsevents: 2.3.3 + transitivePeerDependencies: + - '@swc/helpers' + dev: true + /@rsbuild/shared@0.7.0(@swc/helpers@0.5.13): resolution: {integrity: sha512-juRe5zVdXEmdpTxIdstE58OlZ2z+WESlCgxE4waVpXwZrBEMX1fzM6Rl1ZKnInCOGzxYkSRpWVPSlBG1hAGERg==} dependencies: @@ -15760,12 +15754,12 @@ packages: - '@swc/helpers' dev: true - /@rsbuild/webpack@1.0.11(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.17.19): + /@rsbuild/webpack@1.0.11(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.17.19): resolution: {integrity: sha512-2x/QqNUEKEt7eao8FnYwlrwQUYSbuM9ihiI1RpSuKbi/ZZuHxrFA3fwnO7k1v/Xbs5mCQR+ni+da5dakypFktg==} peerDependencies: '@rsbuild/core': 1.x dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 copy-webpack-plugin: 11.0.0(webpack@5.95.0) mini-css-extract-plugin: 2.9.1(webpack@5.95.0) picocolors: 1.1.1 @@ -15779,12 +15773,12 @@ packages: - webpack-cli dev: true - /@rsbuild/webpack@1.0.11(@rsbuild/core@1.0.18)(@swc/core@1.7.26)(esbuild@0.18.20): + /@rsbuild/webpack@1.0.11(@rsbuild/core@1.0.19)(@swc/core@1.7.26)(esbuild@0.18.20): resolution: {integrity: sha512-2x/QqNUEKEt7eao8FnYwlrwQUYSbuM9ihiI1RpSuKbi/ZZuHxrFA3fwnO7k1v/Xbs5mCQR+ni+da5dakypFktg==} peerDependencies: '@rsbuild/core': 1.x dependencies: - '@rsbuild/core': 1.0.18 + '@rsbuild/core': 1.0.19 copy-webpack-plugin: 11.0.0(webpack@5.95.0) mini-css-extract-plugin: 2.9.1(webpack@5.95.0) picocolors: 1.1.1 @@ -15833,24 +15827,24 @@ packages: dev: true optional: true - /@rspack/binding-darwin-arm64@0.7.0: - resolution: {integrity: sha512-vh+7sICv2L4hrtRZcoxwdwHRqKPM88PAtq1CcTkACEohOfxnRSJSfSvVYNMbOpqBkSUOQ6v2V9uy2UThtNqvKg==} + /@rspack/binding-darwin-arm64@0.6.5: + resolution: {integrity: sha512-5Zbs3buzF80MZoWnnpm/ZqQ2ZLKWjmmy94gDMeJhG39lKcpK2J2NyDXVis2ZSg7uUvKyJ662BEgIE1AnTWjnYg==} cpu: [arm64] os: [darwin] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-darwin-arm64@0.7.5: - resolution: {integrity: sha512-mNBIm36s1BA7v4SL/r4f3IXIsjyH5CZX4eXMRPE52lBc3ClVuUB7d/8zk8dkyjJCMAj8PsZSnAJ3cfXnn7TN4g==} + /@rspack/binding-darwin-arm64@0.7.0: + resolution: {integrity: sha512-vh+7sICv2L4hrtRZcoxwdwHRqKPM88PAtq1CcTkACEohOfxnRSJSfSvVYNMbOpqBkSUOQ6v2V9uy2UThtNqvKg==} cpu: [arm64] os: [darwin] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-darwin-arm64@1.0.13: - resolution: {integrity: sha512-HepE4V5Rj53o+o8AMzlkdeBxZnsyXKrOJ2oumVtqRLXihVlMguYwNTSkjfmjAqq/4PJAhEeaeIFyomZg+zKC0A==} + /@rspack/binding-darwin-arm64@0.7.5: + resolution: {integrity: sha512-mNBIm36s1BA7v4SL/r4f3IXIsjyH5CZX4eXMRPE52lBc3ClVuUB7d/8zk8dkyjJCMAj8PsZSnAJ3cfXnn7TN4g==} cpu: [arm64] os: [darwin] requiresBuild: true @@ -15888,24 +15882,24 @@ packages: dev: true optional: true - /@rspack/binding-darwin-x64@0.7.0: - resolution: {integrity: sha512-E7cFk/1oMuAqvIsLCAEzI6p+/W3NoZyfSmjQ1s7MV9ylrPtwwzGnMcEbNzcRkemSw1dhxSzlgKT50cl8Pa+mVg==} + /@rspack/binding-darwin-x64@0.6.5: + resolution: {integrity: sha512-oA1R0OF8r7y8+oLynnZC9EgysLoOBuu1yYG90gHmrkdzRjjmYe4auNhuSLLqF+WOqXw/zGSujiUbnVMjLEWIBg==} cpu: [x64] os: [darwin] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-darwin-x64@0.7.5: - resolution: {integrity: sha512-teLK0TB1x0CsvaaiCopsFx4EvJe+/Hljwii6R7C9qOZs5zSOfbT/LQ202eA0sAGodCncARCGaXVrsekbrRYqeA==} + /@rspack/binding-darwin-x64@0.7.0: + resolution: {integrity: sha512-E7cFk/1oMuAqvIsLCAEzI6p+/W3NoZyfSmjQ1s7MV9ylrPtwwzGnMcEbNzcRkemSw1dhxSzlgKT50cl8Pa+mVg==} cpu: [x64] os: [darwin] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-darwin-x64@1.0.13: - resolution: {integrity: sha512-ucHf0q2V+K19z75BvjU6EbQggNFiz1/xJ5tSgOXUfRu5omZF1jpN/epeMGqh0MkExRwOMYKJR/pVHDw5ITcU8g==} + /@rspack/binding-darwin-x64@0.7.5: + resolution: {integrity: sha512-teLK0TB1x0CsvaaiCopsFx4EvJe+/Hljwii6R7C9qOZs5zSOfbT/LQ202eA0sAGodCncARCGaXVrsekbrRYqeA==} cpu: [x64] os: [darwin] requiresBuild: true @@ -15943,24 +15937,24 @@ packages: dev: true optional: true - /@rspack/binding-linux-arm64-gnu@0.7.0: - resolution: {integrity: sha512-jcengiNNBm/5u3gUzVduqMBJ2uzUgUE7e9D4WK/gHXSYkk0m25iLxLhDCSnWQKxAgv8Tu71zkOUsiliZqjqJdA==} + /@rspack/binding-linux-arm64-gnu@0.6.5: + resolution: {integrity: sha512-xK2Ji9yCJSZE5HSRBS7R67HPahYd0WR16NefycrkmIEDR28B2T5CnvbqyNivnu7Coy1haHWisgfTV/NbjLd5fA==} cpu: [arm64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-linux-arm64-gnu@0.7.5: - resolution: {integrity: sha512-/24UytJXrK+7CsucDb30GCKYIJ8nG6ceqbJyOtsJv9zeArNLHkxrYGSyjHJIpQfwVN17BPP4RNOi+yIZ3ZgDyA==} + /@rspack/binding-linux-arm64-gnu@0.7.0: + resolution: {integrity: sha512-jcengiNNBm/5u3gUzVduqMBJ2uzUgUE7e9D4WK/gHXSYkk0m25iLxLhDCSnWQKxAgv8Tu71zkOUsiliZqjqJdA==} cpu: [arm64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-linux-arm64-gnu@1.0.13: - resolution: {integrity: sha512-0fqLWDG9Z2VKxy3u6+jLVJgT2E24Xb2umP4Jtx2uNf2+aHLXifgqUdwgCElO+dj+PpOp/q8zmV5U2DXykvPU3w==} + /@rspack/binding-linux-arm64-gnu@0.7.5: + resolution: {integrity: sha512-/24UytJXrK+7CsucDb30GCKYIJ8nG6ceqbJyOtsJv9zeArNLHkxrYGSyjHJIpQfwVN17BPP4RNOi+yIZ3ZgDyA==} cpu: [arm64] os: [linux] requiresBuild: true @@ -15998,24 +15992,24 @@ packages: dev: true optional: true - /@rspack/binding-linux-arm64-musl@0.7.0: - resolution: {integrity: sha512-CHeuGNeztufbHChQ6TyBin4R0iDE0c10J4/7XoX6DiDlDLoFRdB5OF55UeD9g+W/dj1MeZfkW38kezjQdi/vSg==} + /@rspack/binding-linux-arm64-musl@0.6.5: + resolution: {integrity: sha512-nPDUf6TkzJWxqi6gQQz+Ypd2BPDiufh0gd0yFExIZyguE93amVbzJEfKeCQdvHZL5W/9XaYJoDKSOuCwMdLhiQ==} cpu: [arm64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-linux-arm64-musl@0.7.5: - resolution: {integrity: sha512-6RcxG42mLM01Pa6UYycACu/Nu9qusghAPUJumb8b8x5TRIDEtklYC5Ck6Rmagm+8E0ucMude2E/D4rMdIFcS3A==} + /@rspack/binding-linux-arm64-musl@0.7.0: + resolution: {integrity: sha512-CHeuGNeztufbHChQ6TyBin4R0iDE0c10J4/7XoX6DiDlDLoFRdB5OF55UeD9g+W/dj1MeZfkW38kezjQdi/vSg==} cpu: [arm64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-linux-arm64-musl@1.0.13: - resolution: {integrity: sha512-eK72/jAofJRcZ23FTteUh1MfTbErWYNwVLuxnliyf1f1PwH0a7exGE6ik0/y/LdAt5PWP1r8r981EEjrpsTfRQ==} + /@rspack/binding-linux-arm64-musl@0.7.5: + resolution: {integrity: sha512-6RcxG42mLM01Pa6UYycACu/Nu9qusghAPUJumb8b8x5TRIDEtklYC5Ck6Rmagm+8E0ucMude2E/D4rMdIFcS3A==} cpu: [arm64] os: [linux] requiresBuild: true @@ -16053,24 +16047,24 @@ packages: dev: true optional: true - /@rspack/binding-linux-x64-gnu@0.7.0: - resolution: {integrity: sha512-p0fQaiy9Sdyu3GTd8dfvOeAfyM9y08XuRAQdGDy5AcxZvbHZW/h7Jww5bXdbzIf49p8ojEvLG7qfg953a81n4A==} + /@rspack/binding-linux-x64-gnu@0.6.5: + resolution: {integrity: sha512-KT4GBPra7ge5oHSblfM74oRgW10MKdKhyJGEKFWqRezzul8i9SHElFzcE/w6qoOOLMgYPoVc/nybRqsJp9koZg==} cpu: [x64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-linux-x64-gnu@0.7.5: - resolution: {integrity: sha512-R0Lu4CJN2nWMW7WzPBuCIju80cQPpcaqwKJDj/quwQySpJJZ6c5qGwB8mntqjxIzZDrNH6u0OkpiUTbvWZj8ww==} + /@rspack/binding-linux-x64-gnu@0.7.0: + resolution: {integrity: sha512-p0fQaiy9Sdyu3GTd8dfvOeAfyM9y08XuRAQdGDy5AcxZvbHZW/h7Jww5bXdbzIf49p8ojEvLG7qfg953a81n4A==} cpu: [x64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-linux-x64-gnu@1.0.13: - resolution: {integrity: sha512-C9wGDim1Euc10qRk5ztPvgK4NAi6bi6Ck3+ugaRzYXPFIVegnFyXu2fv42j3Y0LRhBjnKMXZJzME5nQUPuT6Ug==} + /@rspack/binding-linux-x64-gnu@0.7.5: + resolution: {integrity: sha512-R0Lu4CJN2nWMW7WzPBuCIju80cQPpcaqwKJDj/quwQySpJJZ6c5qGwB8mntqjxIzZDrNH6u0OkpiUTbvWZj8ww==} cpu: [x64] os: [linux] requiresBuild: true @@ -16108,24 +16102,24 @@ packages: dev: true optional: true - /@rspack/binding-linux-x64-musl@0.7.0: - resolution: {integrity: sha512-+PwF/Kw40i9+zze/Ys2OhyN2fKcnYGo2V3cp9xTn+8R+CzQhZh9cAU/1DVDJpnTs0p9wKktAp8nIQTcVrWzK7A==} + /@rspack/binding-linux-x64-musl@0.6.5: + resolution: {integrity: sha512-VnIzpFjzT4vkfUKPqyH4BiHJ6AMqtoeu7tychga2HpSudqCG8no4eIH2qRs9anGeuRkwb9x3uBC/1AIIiWSMsQ==} cpu: [x64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-linux-x64-musl@0.7.5: - resolution: {integrity: sha512-dDgi/ThikMy1m4llxPeEXDCA2I8F8ezFS/eCPLZGU2/J1b4ALwDjuRsMmo+VXSlFCKgIt98V6h1woeg7nu96yg==} + /@rspack/binding-linux-x64-musl@0.7.0: + resolution: {integrity: sha512-+PwF/Kw40i9+zze/Ys2OhyN2fKcnYGo2V3cp9xTn+8R+CzQhZh9cAU/1DVDJpnTs0p9wKktAp8nIQTcVrWzK7A==} cpu: [x64] os: [linux] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-linux-x64-musl@1.0.13: - resolution: {integrity: sha512-7bQyGEoMCxXUS+RDo6qej8JjqS8kYd8CvlnfYZVUqWgCxgn19j29lKvWVibey0lnFpoJrqReOdSypbk91tSrzA==} + /@rspack/binding-linux-x64-musl@0.7.5: + resolution: {integrity: sha512-dDgi/ThikMy1m4llxPeEXDCA2I8F8ezFS/eCPLZGU2/J1b4ALwDjuRsMmo+VXSlFCKgIt98V6h1woeg7nu96yg==} cpu: [x64] os: [linux] requiresBuild: true @@ -16163,24 +16157,24 @@ packages: dev: true optional: true - /@rspack/binding-win32-arm64-msvc@0.7.0: - resolution: {integrity: sha512-OJj6JHAzdvPeKagLnFcHRTd7/ybERTj7hoAWsagdLsYAB8i/hBIah4U92RArYfQJLkvZbqsiimhGTwTZPh0Miw==} + /@rspack/binding-win32-arm64-msvc@0.6.5: + resolution: {integrity: sha512-V44hlcK7htG1pA/fHCc1XDGmItu7v8qQObssl/yGAn4+ZlvP6/pxPy8y5ZVwnR3NXTRzPezMvbnKGb4GxBphlw==} cpu: [arm64] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-win32-arm64-msvc@0.7.5: - resolution: {integrity: sha512-nEF4cUdLfgEK6FrgJSJhUlr2/7LY1tmqBNQCFsCjtDtUkQbJIEo1b8edT94G9tJcQoFE4cD+Re30yBYbQO2Thg==} + /@rspack/binding-win32-arm64-msvc@0.7.0: + resolution: {integrity: sha512-OJj6JHAzdvPeKagLnFcHRTd7/ybERTj7hoAWsagdLsYAB8i/hBIah4U92RArYfQJLkvZbqsiimhGTwTZPh0Miw==} cpu: [arm64] os: [win32] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-win32-arm64-msvc@1.0.13: - resolution: {integrity: sha512-6QOHiCwaQeCZApWRe1y8ZNZGOj00EFdX1ypOc3R1GrfSjn+UjoKhbBtgVl2w+sPTaCZ4SvknOk9usSgcWO4gOQ==} + /@rspack/binding-win32-arm64-msvc@0.7.5: + resolution: {integrity: sha512-nEF4cUdLfgEK6FrgJSJhUlr2/7LY1tmqBNQCFsCjtDtUkQbJIEo1b8edT94G9tJcQoFE4cD+Re30yBYbQO2Thg==} cpu: [arm64] os: [win32] requiresBuild: true @@ -16218,24 +16212,24 @@ packages: dev: true optional: true - /@rspack/binding-win32-ia32-msvc@0.7.0: - resolution: {integrity: sha512-5WBiRi2rvrBbM5HvIgg4iI2H3S9fz89plczKc676iqwcddUAbYYOhQ311q137KqMo3IZ3LQjVia1wxFaXY9oxw==} + /@rspack/binding-win32-ia32-msvc@0.6.5: + resolution: {integrity: sha512-M4xrJDx5EcAtZ02R9Y4yJB5KVCUdQIbAF/1gDGrXZ5PQUujaNzsIdISUvNfxpfkqe0Shj6SKOTqWm8yte3ecrQ==} cpu: [ia32] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-win32-ia32-msvc@0.7.5: - resolution: {integrity: sha512-hEcHRwJIzpZsePr+5x6V/7TGhrPXhSZYG4sIhsrem1za9W+qqCYYLZ7KzzbRODU07QaAH2RxjcA1bf8F2QDYAQ==} + /@rspack/binding-win32-ia32-msvc@0.7.0: + resolution: {integrity: sha512-5WBiRi2rvrBbM5HvIgg4iI2H3S9fz89plczKc676iqwcddUAbYYOhQ311q137KqMo3IZ3LQjVia1wxFaXY9oxw==} cpu: [ia32] os: [win32] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-win32-ia32-msvc@1.0.13: - resolution: {integrity: sha512-ucm7emxYDjTsOGNwgYGz30oKcnzXLjg/Fcs0mNMmQgMEFpwBXhczfKJimCyMIlAhQCFPP4WzrXFdf03EPuw6CA==} + /@rspack/binding-win32-ia32-msvc@0.7.5: + resolution: {integrity: sha512-hEcHRwJIzpZsePr+5x6V/7TGhrPXhSZYG4sIhsrem1za9W+qqCYYLZ7KzzbRODU07QaAH2RxjcA1bf8F2QDYAQ==} cpu: [ia32] os: [win32] requiresBuild: true @@ -16273,24 +16267,24 @@ packages: dev: true optional: true - /@rspack/binding-win32-x64-msvc@0.7.0: - resolution: {integrity: sha512-4j9DFdfEyptC9vNz4CM6IM4z1EInc2dnB3k+YDRtSZDDlOW7jequvhgv+8nSqabeM1sp/GXWkz/rap6jLJKMpA==} + /@rspack/binding-win32-x64-msvc@0.6.5: + resolution: {integrity: sha512-aFcBygJsClx0FozVo7zMp9OUte7MlgyBpQGnS2MZgd0kSnuZTyaUcdRiWKehP5lrPPij/ZWNJbiz5O6VNzpg3w==} cpu: [x64] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /@rspack/binding-win32-x64-msvc@0.7.5: - resolution: {integrity: sha512-PpVpP6J5/2b4T10hzSUwjLvmdpAOj3ozARl1Nrf/lsbYwhiXivoB8Gvoy/xe/Xpgr732Dk9VCeeW8rreWOOUVQ==} + /@rspack/binding-win32-x64-msvc@0.7.0: + resolution: {integrity: sha512-4j9DFdfEyptC9vNz4CM6IM4z1EInc2dnB3k+YDRtSZDDlOW7jequvhgv+8nSqabeM1sp/GXWkz/rap6jLJKMpA==} cpu: [x64] os: [win32] requiresBuild: true - dev: true + dev: false optional: true - /@rspack/binding-win32-x64-msvc@1.0.13: - resolution: {integrity: sha512-9G/hvr47ECjDEmBCyyQTZFilmEOIQJCQvpx6hUgDWsfUApwF9LZBW/PqBCSwhY+tIErr/AurJnBVAYub0MYpHA==} + /@rspack/binding-win32-x64-msvc@0.7.5: + resolution: {integrity: sha512-PpVpP6J5/2b4T10hzSUwjLvmdpAOj3ozARl1Nrf/lsbYwhiXivoB8Gvoy/xe/Xpgr732Dk9VCeeW8rreWOOUVQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -16340,6 +16334,20 @@ packages: '@rspack/binding-win32-x64-msvc': 0.5.3 dev: true + /@rspack/binding@0.6.5: + resolution: {integrity: sha512-uHg6BYS9Uvs5Nxm0StpRX1eqx3I1SEPFhkCfh+HSbFS8ty11mKHjUZn1lYFxLBFypJ3DHtlTM3RZ4g7tmwohAQ==} + optionalDependencies: + '@rspack/binding-darwin-arm64': 0.6.5 + '@rspack/binding-darwin-x64': 0.6.5 + '@rspack/binding-linux-arm64-gnu': 0.6.5 + '@rspack/binding-linux-arm64-musl': 0.6.5 + '@rspack/binding-linux-x64-gnu': 0.6.5 + '@rspack/binding-linux-x64-musl': 0.6.5 + '@rspack/binding-win32-arm64-msvc': 0.6.5 + '@rspack/binding-win32-ia32-msvc': 0.6.5 + '@rspack/binding-win32-x64-msvc': 0.6.5 + dev: true + /@rspack/binding@0.7.0: resolution: {integrity: sha512-L4bSeF951uJs3e7KakfJJgK0o2TfWsCbaqOQIEa5Aw20olO1I4P7gRK1RZUSlMLXWZ09iF+81Ei7gKQmh1ABLA==} optionalDependencies: @@ -16368,20 +16376,6 @@ packages: '@rspack/binding-win32-x64-msvc': 0.7.5 dev: true - /@rspack/binding@1.0.13: - resolution: {integrity: sha512-mnSCZ3Qb/I3LzsYoo24AG4LgmaSOIc1CS38A9L9nv4MJj8x+1D2BaLErpaaMmhqI3lQBIcBSQkN7+WbpsCP3Uw==} - optionalDependencies: - '@rspack/binding-darwin-arm64': 1.0.13 - '@rspack/binding-darwin-x64': 1.0.13 - '@rspack/binding-linux-arm64-gnu': 1.0.13 - '@rspack/binding-linux-arm64-musl': 1.0.13 - '@rspack/binding-linux-x64-gnu': 1.0.13 - '@rspack/binding-linux-x64-musl': 1.0.13 - '@rspack/binding-win32-arm64-msvc': 1.0.13 - '@rspack/binding-win32-ia32-msvc': 1.0.13 - '@rspack/binding-win32-x64-msvc': 1.0.13 - dev: true - /@rspack/binding@1.0.14: resolution: {integrity: sha512-0wWqFvr9hkF4LgNPgWfkTU0hhkZAMvOytoCs2p+wDX1Up1E/SgJ1U1JAsCxsl1XtUKm7mRvdWHzJmHbza3y89Q==} optionalDependencies: @@ -16460,6 +16454,42 @@ packages: zod-validation-error: 1.3.1(zod@3.23.8) dev: true + /@rspack/core@0.6.5(@swc/helpers@0.5.13): + resolution: {integrity: sha512-jm0YKUZQCetccdufBfpkfSHE7BOlirrn0UmXv9C+69g8ikl9Jf4Jfr31meDWX5Z3vwZlpdryA7fUH2cblUXoBw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.1.6 + '@rspack/binding': 0.6.5 + '@swc/helpers': 0.5.13 + caniuse-lite: 1.0.30001675 + enhanced-resolve: 5.12.0 + tapable: 2.2.1 + webpack-sources: 3.2.3 + dev: true + + /@rspack/core@0.6.5(@swc/helpers@0.5.3): + resolution: {integrity: sha512-jm0YKUZQCetccdufBfpkfSHE7BOlirrn0UmXv9C+69g8ikl9Jf4Jfr31meDWX5Z3vwZlpdryA7fUH2cblUXoBw==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.1.6 + '@rspack/binding': 0.6.5 + '@swc/helpers': 0.5.3 + caniuse-lite: 1.0.30001675 + enhanced-resolve: 5.12.0 + tapable: 2.2.1 + webpack-sources: 3.2.3 + dev: true + /@rspack/core@0.7.0(@swc/helpers@0.5.13): resolution: {integrity: sha512-1KsI17Ejx5jGrMO+iApvXLfH2l0KDwXhWsLlbvHQ2/RKAx6qjvw8qoE18etBQYEcgh1bzruuRiNBLkKnk5nf7A==} engines: {node: '>=16.0.0'} @@ -16528,22 +16558,6 @@ packages: webpack-sources: 3.2.3 dev: true - /@rspack/core@1.0.13(@swc/helpers@0.5.13): - resolution: {integrity: sha512-lh8toWSWcYjlOuriQ8/h0U8riaaRQfzwU0oUNykFj1xokJMSKIQFH5WQWj2DQ386uHNv52nMbc+Jiuml1vYboA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@swc/helpers': '>=0.5.1' - peerDependenciesMeta: - '@swc/helpers': - optional: true - dependencies: - '@module-federation/runtime-tools': 0.5.1 - '@rspack/binding': 1.0.13 - '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.13 - caniuse-lite: 1.0.30001669 - dev: true - /@rspack/core@1.0.14(@swc/helpers@0.5.13): resolution: {integrity: sha512-xHl23lxJZNjItGc5YuE9alz3yjb56y7EgJmAcBMPHMqgjtUt8rBu4xd/cSUjbr9/lLF9N4hdyoJiPJOFs9LEjw==} engines: {node: '>=16.0.0'} @@ -16629,6 +16643,17 @@ packages: resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} engines: {node: '>=16.0.0'} + /@rspack/plugin-react-refresh@0.6.5(react-refresh@0.14.2): + resolution: {integrity: sha512-H7V54qtdJvBQXSL209ep3cNoeDk8Ljid7+AGeJIXj5nu3ZIF4TYYDFeiyZtn7xCIgeyiYscuQZ0DKb/qXFYqog==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + dependencies: + react-refresh: 0.14.2 + dev: true + /@rspack/plugin-react-refresh@0.7.0(react-refresh@0.14.2): resolution: {integrity: sha512-IRk4W0v0Nc0thxbHz1kordb3Gk8liHPoDY+peDSLSel6847qaoiDM7LhuenZzgHxlPo7ZzmZufdi2o0fyjcN0Q==} peerDependencies: @@ -17020,7 +17045,7 @@ packages: conventional-changelog-writer: 8.0.0 conventional-commits-filter: 5.0.0 conventional-commits-parser: 6.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) import-from-esm: 1.3.4 lodash-es: 4.17.21 micromatch: 4.0.8 @@ -17047,7 +17072,7 @@ packages: dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) execa: 5.1.1 lodash: 4.17.21 parse-json: 5.2.0 @@ -17064,7 +17089,7 @@ packages: dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) dir-glob: 3.0.1 execa: 5.1.1 lodash: 4.17.21 @@ -17087,7 +17112,7 @@ packages: '@octokit/plugin-throttling': 9.3.1(@octokit/core@6.1.2) '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) dir-glob: 3.0.1 globby: 14.0.2 http-proxy-agent: 7.0.2 @@ -17156,7 +17181,7 @@ packages: conventional-changelog-writer: 8.0.0 conventional-commits-filter: 5.0.0 conventional-commits-parser: 6.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) get-stream: 7.0.1 import-from-esm: 1.3.4 into-stream: 7.0.0 @@ -18065,7 +18090,7 @@ packages: dependencies: '@babel/generator': 7.25.7 '@babel/parser': 7.25.8 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 '@storybook/csf': 0.1.11 '@storybook/types': 7.6.20 @@ -18081,7 +18106,7 @@ packages: dependencies: '@babel/generator': 7.25.6 '@babel/parser': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.7 '@storybook/csf': 0.1.11 '@storybook/types': 8.1.11 @@ -18360,7 +18385,7 @@ packages: typescript: '>= 3.x' webpack: '>= 4' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 @@ -18379,7 +18404,7 @@ packages: typescript: '>= 4.x' webpack: '>= 4' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 @@ -18398,7 +18423,7 @@ packages: typescript: '>= 4.x' webpack: '>= 4' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 @@ -18876,7 +18901,7 @@ packages: '@swc-node/sourcemap-support': 0.5.1 '@swc/core': 1.7.26(@swc/helpers@0.5.13) colorette: 2.0.20 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) oxc-resolver: 1.12.0 pirates: 4.0.6 tslib: 2.6.3 @@ -20109,7 +20134,7 @@ packages: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.0.4) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.0.4) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 @@ -20161,7 +20186,7 @@ packages: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 typescript: 5.0.4 transitivePeerDependencies: @@ -20182,7 +20207,7 @@ packages: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.5.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 typescript: 5.5.2 transitivePeerDependencies: @@ -20203,7 +20228,7 @@ packages: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.2) '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 typescript: 5.5.2 transitivePeerDependencies: @@ -20254,7 +20279,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.0.4) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 tsutils: 3.21.0(typescript@5.0.4) typescript: 5.0.4 @@ -20274,7 +20299,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.2) '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.5.2) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 ts-api-utils: 1.3.0(typescript@5.5.2) typescript: 5.5.2 @@ -20293,7 +20318,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.5.2) '@typescript-eslint/utils': 8.8.0(eslint@8.57.1)(typescript@5.5.2) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) ts-api-utils: 1.3.0(typescript@5.5.2) typescript: 5.5.2 transitivePeerDependencies: @@ -20332,7 +20357,7 @@ packages: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -20353,7 +20378,7 @@ packages: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -20375,7 +20400,7 @@ packages: dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 @@ -20397,7 +20422,7 @@ packages: dependencies: '@typescript-eslint/types': 8.8.0 '@typescript-eslint/visitor-keys': 8.8.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -20723,7 +20748,7 @@ packages: peerDependencies: vitest: 1.6.0 dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) istanbul-lib-coverage: 3.2.2 istanbul-lib-instrument: 6.0.3 istanbul-lib-report: 3.0.1 @@ -20744,7 +20769,7 @@ packages: dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -20935,11 +20960,11 @@ packages: optional: true dependencies: '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.2) '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 '@vue/babel-helper-vue-transform-on': 1.2.5 '@vue/babel-plugin-resolve-type': 1.2.5(@babel/core@7.25.2) @@ -20956,7 +20981,7 @@ packages: dependencies: '@babel/code-frame': 7.25.7 '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/parser': 7.25.8 '@vue/compiler-sfc': 3.5.10 @@ -21523,7 +21548,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color @@ -21531,7 +21556,7 @@ packages: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color dev: true @@ -21759,7 +21784,7 @@ packages: '@ant-design/colors': 6.0.0 '@ant-design/icons': 4.8.3(react-dom@18.3.1)(react@18.3.1) '@ant-design/react-slick': 1.0.2(react@18.3.1) - '@babel/runtime': 7.24.5 + '@babel/runtime': 7.25.7 '@ctrl/tinycolor': 3.6.1 classnames: 2.5.1 copy-to-clipboard: 3.3.3 @@ -22421,7 +22446,7 @@ packages: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color @@ -22440,7 +22465,7 @@ packages: /babel-plugin-import@1.13.5: resolution: {integrity: sha512-IkqnoV+ov1hdJVofly9pXRJmeDm9EtROfrc5i6eII0Hix2xMs5FEm8FG3ExMvazbnZBbgHIt6qdO8And6lCloQ==} dependencies: - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -22448,7 +22473,7 @@ packages: /babel-plugin-import@1.13.8: resolution: {integrity: sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q==} dependencies: - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 transitivePeerDependencies: - supports-color dev: true @@ -22567,7 +22592,7 @@ packages: styled-components: '>= 2' dependencies: '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-module-imports': 7.25.7(supports-color@5.5.0) + '@babel/helper-module-imports': 7.25.7 babel-plugin-syntax-jsx: 6.18.0 lodash: 4.17.21 styled-components: 6.1.13(react-dom@18.3.1)(react@18.3.1) @@ -22609,7 +22634,7 @@ packages: dependencies: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 /babel-preset-current-node-syntax@1.1.0(@babel/core@7.25.2): resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} @@ -24145,7 +24170,7 @@ packages: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.24.0) + webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.18.20) /copy-webpack-plugin@11.0.0(webpack@5.93.0): resolution: {integrity: sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==} @@ -24492,7 +24517,7 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.47) postcss-value-parser: 4.2.0 semver: 7.6.3 - webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.24.0) + webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.18.20) /css-minimizer-webpack-plugin@5.0.1(esbuild@0.17.19)(webpack@5.95.0): resolution: {integrity: sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==} @@ -25231,7 +25256,6 @@ packages: dependencies: ms: 2.1.3 supports-color: 9.3.1 - dev: true /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} @@ -25504,7 +25528,7 @@ packages: hasBin: true dependencies: address: 1.2.2 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color @@ -26222,7 +26246,7 @@ packages: peerDependencies: esbuild: '>=0.12 <1' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) esbuild: 0.17.19 transitivePeerDependencies: - supports-color @@ -26233,7 +26257,7 @@ packages: peerDependencies: esbuild: '>=0.12 <1' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) esbuild: 0.18.20 transitivePeerDependencies: - supports-color @@ -26244,7 +26268,7 @@ packages: peerDependencies: esbuild: '>=0.12 <1' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) esbuild: 0.23.1 transitivePeerDependencies: - supports-color @@ -26633,7 +26657,7 @@ packages: optional: true dependencies: '@nolyfill/is-core-module': 1.0.39 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) enhanced-resolve: 5.17.1 eslint: 8.57.1 eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) @@ -27032,7 +27056,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -27109,7 +27133,7 @@ packages: resolution: {integrity: sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==} engines: {node: '>=8.3.0'} dependencies: - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 c8: 7.14.0 transitivePeerDependencies: @@ -27954,7 +27978,7 @@ packages: debug: optional: true dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -29320,6 +29344,18 @@ packages: tapable: 2.2.1 dev: true + /html-rspack-plugin@5.7.2(@rspack/core@0.6.5): + resolution: {integrity: sha512-uVXGYq19bcsX7Q/53VqXQjCKXw0eUMHlFGDLTaqzgj/ckverfhZQvXyA6ecFBaF9XUH16jfCTCyALYi0lJcagg==} + engines: {node: '>=10.13.0'} + peerDependencies: + '@rspack/core': 0.x || 1.x + peerDependenciesMeta: + '@rspack/core': + optional: true + dependencies: + '@rspack/core': 0.6.5(@swc/helpers@0.5.3) + dev: true + /html-rspack-plugin@5.7.2(@rspack/core@0.7.0): resolution: {integrity: sha512-uVXGYq19bcsX7Q/53VqXQjCKXw0eUMHlFGDLTaqzgj/ckverfhZQvXyA6ecFBaF9XUH16jfCTCyALYi0lJcagg==} engines: {node: '>=10.13.0'} @@ -29513,7 +29549,7 @@ packages: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color dev: true @@ -29523,7 +29559,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color dev: true @@ -29551,7 +29587,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@types/http-proxy': 1.17.15 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) http-proxy: 1.18.1(debug@4.3.7) is-glob: 4.0.3 is-plain-object: 5.0.0 @@ -29632,7 +29668,7 @@ packages: engines: {node: '>= 6.0.0'} dependencies: agent-base: 5.1.1 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color dev: true @@ -29642,7 +29678,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color @@ -29651,7 +29687,7 @@ packages: engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) transitivePeerDependencies: - supports-color dev: true @@ -29786,7 +29822,7 @@ packages: resolution: {integrity: sha512-7EyUlPFC0HOlBDpUFGfYstsU7XHxZJKAAMzCT8wZ0hMW7b+hG51LIKTDcsgtz8Pu6YC0HqRVbX+rVUtsGMUKvg==} engines: {node: '>=16.20'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) import-meta-resolve: 4.1.0 transitivePeerDependencies: - supports-color @@ -30621,7 +30657,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -30633,7 +30669,7 @@ packages: engines: {node: '>=10'} dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -31655,7 +31691,7 @@ packages: content-disposition: 0.5.4 content-type: 1.0.5 cookies: 0.9.1 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) delegates: 1.0.0 depd: 2.0.0 destroy: 1.2.0 @@ -31809,7 +31845,7 @@ packages: webpack-sources: optional: true dependencies: - webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.24.0) + webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.18.20) webpack-sources: 3.2.3 /lilconfig@2.1.0: @@ -32126,7 +32162,7 @@ packages: engines: {node: '>=8.0'} dependencies: date-format: 4.0.14 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) flatted: 3.3.1 rfdc: 1.4.1 streamroller: 3.1.5 @@ -32987,7 +33023,7 @@ packages: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} dependencies: '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -36703,7 +36739,7 @@ packages: engines: {node: '>=8.16.0'} dependencies: '@types/mime-types': 2.1.4 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) extract-zip: 1.7.0 https-proxy-agent: 4.0.0 mime: 2.6.0 @@ -37878,7 +37914,7 @@ packages: engines: {node: '>=16.14.0'} dependencies: '@babel/core': 7.25.8 - '@babel/traverse': 7.25.7(supports-color@5.5.0) + '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 @@ -39831,7 +39867,7 @@ packages: '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.1.3) aggregate-error: 5.0.0 cosmiconfig: 9.0.0(typescript@5.5.2) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) env-ci: 11.1.0 execa: 9.4.1 figures: 6.1.0 @@ -39950,7 +39986,7 @@ packages: resolution: {integrity: sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==} engines: {node: '>= 18'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) destroy: 1.2.0 encodeurl: 2.0.0 escape-html: 1.0.3 @@ -40468,7 +40504,7 @@ packages: /spdy-transport@3.0.0: resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -40481,7 +40517,7 @@ packages: resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} engines: {node: '>=6.0.0'} dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -40735,7 +40771,7 @@ packages: engines: {node: '>=8.0'} dependencies: date-format: 4.0.14 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) fs-extra: 8.1.0 transitivePeerDependencies: - supports-color @@ -41005,7 +41041,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.24.0) + webpack: 5.93.0(@swc/core@1.7.26)(esbuild@0.18.20) /style-to-object@0.3.0: resolution: {integrity: sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==} @@ -41189,7 +41225,7 @@ packages: hasBin: true dependencies: '@adobe/css-tools': 4.4.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) glob: 7.2.3 sax: 1.2.4 source-map: 0.7.4 @@ -41202,7 +41238,7 @@ packages: hasBin: true dependencies: '@adobe/css-tools': 4.3.3 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) glob: 10.4.5 sax: 1.4.1 source-map: 0.7.4 @@ -41270,7 +41306,6 @@ packages: /supports-color@9.3.1: resolution: {integrity: sha512-knBY82pjmnIzK3NifMo3RxEIRD9E0kIzV4BKcyTZ9+9kWgLMxd4PrsTSMoFQUabgRBbF8KOLRDCyKgNV+iK44Q==} engines: {node: '>=12'} - dev: true /supports-hyperlinks@2.3.0: resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} @@ -42367,7 +42402,7 @@ packages: bundle-require: 4.2.1(esbuild@0.18.20) cac: 6.7.14 chokidar: 3.6.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) esbuild: 0.18.20 execa: 5.1.1 globby: 11.1.0 @@ -42409,7 +42444,7 @@ packages: cac: 6.7.14 chokidar: 3.6.0 consola: 3.2.3 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) esbuild: 0.23.0 execa: 5.1.1 joycon: 3.1.1 @@ -43234,7 +43269,7 @@ packages: compression: 1.7.4 cookies: 0.9.1 cors: 2.8.5 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) envinfo: 7.11.0 express: 4.18.2 express-rate-limit: 5.5.1 @@ -43339,7 +43374,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) pathe: 1.1.2 picocolors: 1.1.1 vite: 5.2.14(@types/node@20.12.14)(less@4.2.0)(stylus@0.64.0) @@ -43360,7 +43395,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) pathe: 1.1.2 picocolors: 1.1.1 vite: 5.2.14(@types/node@18.16.9)(less@4.2.0)(stylus@0.64.0) @@ -43388,7 +43423,7 @@ packages: '@microsoft/api-extractor': 7.43.0(@types/node@16.11.68) '@rollup/pluginutils': 5.1.2(rollup@4.24.0) '@vue/language-core': 1.8.27(typescript@5.5.2) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) kolorist: 1.8.0 magic-string: 0.30.11 typescript: 5.5.2 @@ -43413,7 +43448,7 @@ packages: '@microsoft/api-extractor': 7.43.0(@types/node@18.16.9) '@rollup/pluginutils': 5.1.2(rollup@4.24.0) '@vue/language-core': 1.8.27(typescript@5.5.2) - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) kolorist: 1.8.0 magic-string: 0.30.11 typescript: 5.5.2 @@ -43433,7 +43468,7 @@ packages: vite: optional: true dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) globrex: 0.1.2 tsconfck: 2.1.2(typescript@5.5.2) vite: 5.2.14(@types/node@18.16.9)(less@4.2.0)(stylus@0.64.0) @@ -43603,7 +43638,7 @@ packages: acorn-walk: 8.3.4 cac: 6.7.14 chai: 4.5.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) execa: 8.0.1 local-pkg: 0.5.0 magic-string: 0.30.11 @@ -43660,7 +43695,7 @@ packages: '@vitest/utils': 1.6.0 acorn-walk: 8.3.4 chai: 4.5.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) execa: 8.0.1 local-pkg: 0.5.0 magic-string: 0.30.11 @@ -43709,7 +43744,7 @@ packages: peerDependencies: eslint: '>=6.0.0' dependencies: - debug: 4.3.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@9.3.1) eslint: 8.57.1 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a1991f6538..e4371730ac 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,6 +4,7 @@ packages: - 'packages/bridge/*' - 'packages/enhance' - 'apps/runtime-demo/*' + - 'apps/shared-runtime/*' - 'apps/modernjs-ssr/*' - 'apps/router-demo/*' - 'apps/manifest-demo/*'