diff --git a/.changeset/brown-apricots-study.md b/.changeset/brown-apricots-study.md
new file mode 100644
index 00000000000..2e38795d1ff
--- /dev/null
+++ b/.changeset/brown-apricots-study.md
@@ -0,0 +1,5 @@
+---
+'@module-federation/esbuild': patch
+---
+
+Esbuild federation plugin
diff --git a/.changeset/sweet-mangos-do.md b/.changeset/sweet-mangos-do.md
new file mode 100644
index 00000000000..59ea9d6c471
--- /dev/null
+++ b/.changeset/sweet-mangos-do.md
@@ -0,0 +1,5 @@
+---
+'@module-federation/esbuild': patch
+---
+
+update skip share of internals
diff --git a/.cursorignore b/.cursorignore
index b3f3a57d881..df6eeb993ff 100644
--- a/.cursorignore
+++ b/.cursorignore
@@ -8,3 +8,6 @@
./packages/typescript
./packages/native-*
./apps
+**/configCases
+apps/**
+*.snap
diff --git a/apps/esbuild/build.js b/apps/esbuild/build.js
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/esbuild/build/build-common.js b/apps/esbuild/build/build-common.js
new file mode 100644
index 00000000000..dffd6cbd3b6
--- /dev/null
+++ b/apps/esbuild/build/build-common.js
@@ -0,0 +1,39 @@
+//@ts-nocheck
+
+const esbuild = require('esbuild');
+const path = require('path');
+const fs = require('fs');
+const { moduleFederationPlugin } = require('@module-federation/esbuild/plugin');
+
+async function buildProject(projectName, watch) {
+ const tsConfig = 'tsconfig.json';
+ const outputPath = path.join('dist', projectName);
+
+ fs.rmSync(outputPath, { force: true, recursive: true });
+
+ await esbuild.build({
+ entryPoints: [path.join(projectName, 'main.ts')],
+ outdir: outputPath,
+ bundle: true,
+ platform: 'browser',
+ format: 'esm',
+ mainFields: ['es2020', 'browser', 'module', 'main'],
+ conditions: ['es2022', 'es2015', 'module'],
+ resolveExtensions: ['.ts', '.tsx', '.mjs', '.js'],
+ loader: { '.ts': 'ts' },
+ tsconfig: tsConfig,
+ splitting: true,
+ plugins: [
+ moduleFederationPlugin(
+ require(path.join('../', projectName, 'federation.config.js')),
+ ),
+ ],
+ watch,
+ });
+
+ ['index.html', 'favicon.ico', 'styles.css'].forEach((file) => {
+ fs.copyFileSync(path.join(projectName, file), path.join(outputPath, file));
+ });
+}
+
+module.exports = { buildProject };
diff --git a/apps/esbuild/build/build-mfe1.js b/apps/esbuild/build/build-mfe1.js
new file mode 100644
index 00000000000..dbbb34ccc65
--- /dev/null
+++ b/apps/esbuild/build/build-mfe1.js
@@ -0,0 +1,4 @@
+const { buildProject } = require('./build-common');
+
+const watch = process.argv.includes('--watch');
+buildProject('mfe1', watch);
diff --git a/apps/esbuild/build/build-shell.js b/apps/esbuild/build/build-shell.js
new file mode 100644
index 00000000000..7d10b941411
--- /dev/null
+++ b/apps/esbuild/build/build-shell.js
@@ -0,0 +1,4 @@
+const { buildProject } = require('./build-common');
+
+const watch = process.argv.includes('--watch');
+buildProject('shell', watch);
diff --git a/apps/esbuild/libs/shared-lib/index.ts b/apps/esbuild/libs/shared-lib/index.ts
new file mode 100644
index 00000000000..06d457107eb
--- /dev/null
+++ b/apps/esbuild/libs/shared-lib/index.ts
@@ -0,0 +1,9 @@
+var _data = '';
+
+export function setData(data: string): void {
+ _data = data;
+}
+
+export function getData(): string {
+ return _data;
+}
diff --git a/apps/esbuild/libs/shared-lib/package.json b/apps/esbuild/libs/shared-lib/package.json
new file mode 100644
index 00000000000..58d066def2c
--- /dev/null
+++ b/apps/esbuild/libs/shared-lib/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "shared-lib",
+ "version": "0.0.1",
+ "main": "./index.ts"
+}
diff --git a/apps/esbuild/mfe1/app.tsx b/apps/esbuild/mfe1/app.tsx
new file mode 100644
index 00000000000..6eb23861f09
--- /dev/null
+++ b/apps/esbuild/mfe1/app.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+export function App() {
+ const [state, setState] = React.useState(null);
+ React.useEffect(() => {
+ setState('Hooks work');
+ });
+
+ return (
+
+
Flights
+
+
+
+
+
+
+
+
+
+
+
testing hooks: {state}
+
+ );
+}
diff --git a/apps/esbuild/mfe1/bootstrap.tsx b/apps/esbuild/mfe1/bootstrap.tsx
new file mode 100644
index 00000000000..6714ecb5596
--- /dev/null
+++ b/apps/esbuild/mfe1/bootstrap.tsx
@@ -0,0 +1,10 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { App } from './app';
+
+ReactDOM.render(
+
+
+ ,
+ document.getElementById('root'),
+);
diff --git a/apps/esbuild/mfe1/favicon.ico b/apps/esbuild/mfe1/favicon.ico
new file mode 100644
index 00000000000..63119f79abd
Binary files /dev/null and b/apps/esbuild/mfe1/favicon.ico differ
diff --git a/apps/esbuild/mfe1/federation.config.js b/apps/esbuild/mfe1/federation.config.js
new file mode 100644
index 00000000000..c23cc5c75fc
--- /dev/null
+++ b/apps/esbuild/mfe1/federation.config.js
@@ -0,0 +1,26 @@
+const {
+ withFederation,
+ shareAll,
+} = require('@module-federation/esbuild/build');
+
+module.exports = withFederation({
+ name: 'mfe1',
+ filename: './mfe1/remoteEntry.js',
+ exposes: {
+ './component': './mfe1/app',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ 'react-dom': {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ rxjs: {
+ singleton: true,
+ version: '^7.8.1',
+ },
+ },
+});
diff --git a/apps/esbuild/mfe1/federationInit.js b/apps/esbuild/mfe1/federationInit.js
new file mode 100644
index 00000000000..666ff75e79d
--- /dev/null
+++ b/apps/esbuild/mfe1/federationInit.js
@@ -0,0 +1 @@
+export default 'FEDERATIONINININININT';
diff --git a/apps/esbuild/mfe1/index.html b/apps/esbuild/mfe1/index.html
new file mode 100644
index 00000000000..6d1b429b32a
--- /dev/null
+++ b/apps/esbuild/mfe1/index.html
@@ -0,0 +1,19 @@
+
+
+ Microfrontend 1
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/esbuild/mfe1/main.ts b/apps/esbuild/mfe1/main.ts
new file mode 100644
index 00000000000..e5979bc0898
--- /dev/null
+++ b/apps/esbuild/mfe1/main.ts
@@ -0,0 +1,3 @@
+(async () => {
+ await import('./bootstrap');
+})();
diff --git a/apps/esbuild/mfe1/styles.css b/apps/esbuild/mfe1/styles.css
new file mode 100644
index 00000000000..12e5ce2429b
--- /dev/null
+++ b/apps/esbuild/mfe1/styles.css
@@ -0,0 +1,32 @@
+input[type='text'] {
+ width: 100%;
+ max-width: 400px;
+ box-sizing: border-box;
+ border: none;
+ border-bottom: 2px solid silver;
+ font-size: 20px;
+ margin-bottom: 20px;
+ margin-top: 20px;
+}
+
+button {
+ border: 2px solid silver;
+ background-color: white;
+ font-size: 16px;
+ padding: 10px;
+ padding-left: 40px;
+ padding-right: 40px;
+ border-radius: 10px;
+ margin-bottom: 20px;
+ margin-top: 20px;
+ cursor: pointer;
+}
+
+button:active {
+ border-color: black;
+}
+
+#container {
+ border: 2px green dashed;
+ padding: 20px;
+}
diff --git a/apps/esbuild/package.json b/apps/esbuild/package.json
new file mode 100644
index 00000000000..f1a9eaa9093
--- /dev/null
+++ b/apps/esbuild/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "federation-demo1",
+ "private": true,
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "build:remote": "node build/build-mfe1.js",
+ "build:host": "node build/build-shell.js",
+ "build": "rm -rf ./node_modules/.cache && npm run build:remote && npm run build:host",
+ "watch": "concurrently \"npm run build:remote -- --watch\" \"npm run build:host -- --watch\"",
+ "start:remote": "live-server dist/mfe1 --port=3001 --cors",
+ "start:host": "live-server dist/shell --port=3000",
+ "start": "pnpm run build && concurrently \"npm run start:remote\" \"npm run start:host\""
+ },
+ "author": "",
+ "license": "ISC",
+ "devDependencies": {
+ "@chialab/cjs-to-esm": "^0.18.0",
+ "@module-federation/webpack-bundler-runtime": "workspace:*",
+ "@module-federation/esbuild": "workspace:*",
+ "@module-federation/runtime": "workspace:*",
+ "@types/node": "^18.7.13",
+ "concurrently": "^5.3.0",
+ "esbuild": "^0.15.5",
+ "json5": "^2.2.1",
+ "live-server": "^1.1.0",
+ "typescript": "^4.8.2"
+ },
+ "dependencies": {
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rxjs": "^7.8.1"
+ }
+}
diff --git a/apps/esbuild/shell/app.tsx b/apps/esbuild/shell/app.tsx
new file mode 100644
index 00000000000..edfa3c65c97
--- /dev/null
+++ b/apps/esbuild/shell/app.tsx
@@ -0,0 +1,23 @@
+//@ts-nocheck
+
+import React from 'react';
+import { App as RemoteApp } from 'mfe1/component';
+
+export function App() {
+ return (
+
+ );
+}
diff --git a/apps/esbuild/shell/bootstrap.tsx b/apps/esbuild/shell/bootstrap.tsx
new file mode 100644
index 00000000000..d6e16e35feb
--- /dev/null
+++ b/apps/esbuild/shell/bootstrap.tsx
@@ -0,0 +1,16 @@
+//@ts-nocheck
+
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { App } from './app';
+
+import { of } from 'rxjs';
+
+console.log(of);
+
+ReactDOM.render(
+
+
+ ,
+ document.getElementById('root'),
+);
diff --git a/apps/esbuild/shell/decl.ts b/apps/esbuild/shell/decl.ts
new file mode 100644
index 00000000000..7af9d67b9a4
--- /dev/null
+++ b/apps/esbuild/shell/decl.ts
@@ -0,0 +1 @@
+declare module 'mfe1/*';
diff --git a/apps/esbuild/shell/favicon.ico b/apps/esbuild/shell/favicon.ico
new file mode 100644
index 00000000000..63119f79abd
Binary files /dev/null and b/apps/esbuild/shell/favicon.ico differ
diff --git a/apps/esbuild/shell/federation.config.js b/apps/esbuild/shell/federation.config.js
new file mode 100644
index 00000000000..9f43d56718f
--- /dev/null
+++ b/apps/esbuild/shell/federation.config.js
@@ -0,0 +1,28 @@
+// shell\federation.config.js
+
+const {
+ withFederation,
+ shareAll,
+} = require('@module-federation/esbuild/build');
+
+module.exports = withFederation({
+ name: 'host',
+ filename: './shell/remoteEntry.js',
+ remotes: {
+ mfe1: 'http://localhost:3001/remoteEntry.js',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ 'react-dom': {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ rxjs: {
+ singleton: true,
+ version: '^7.8.1',
+ },
+ },
+});
diff --git a/apps/esbuild/shell/index.html b/apps/esbuild/shell/index.html
new file mode 100644
index 00000000000..0573325095c
--- /dev/null
+++ b/apps/esbuild/shell/index.html
@@ -0,0 +1,23 @@
+
+
+ Shell
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/esbuild/shell/main.ts b/apps/esbuild/shell/main.ts
new file mode 100644
index 00000000000..aef4734ce95
--- /dev/null
+++ b/apps/esbuild/shell/main.ts
@@ -0,0 +1,5 @@
+//@ts-nocheck
+
+(async () => {
+ import('./bootstrap');
+})();
diff --git a/apps/esbuild/shell/styles.css b/apps/esbuild/shell/styles.css
new file mode 100644
index 00000000000..0be03cb4050
--- /dev/null
+++ b/apps/esbuild/shell/styles.css
@@ -0,0 +1,41 @@
+body {
+ font-family: 'Comfortaa', cursive;
+ padding-top: 80px;
+ padding-left: 10px;
+}
+
+ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+ background-color: #333;
+
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+}
+
+li {
+ float: left;
+}
+
+li a {
+ display: block;
+ color: white;
+ text-align: center;
+ padding: 14px 16px;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+/* Change the link color to #111 (black) on hover */
+li a:hover {
+ background-color: #111;
+}
+
+#container {
+ border: 2px green dashed;
+ padding: 20px;
+}
diff --git a/apps/esbuild/tsconfig.json b/apps/esbuild/tsconfig.json
new file mode 100644
index 00000000000..71bcf4b9317
--- /dev/null
+++ b/apps/esbuild/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "compilerOptions": {
+ "sourceMap": true,
+ "strict": false,
+ "module": "ES2022",
+ "target": "ES2022",
+ "moduleResolution": "Node",
+ "baseUrl": ".",
+ "jsx": "react",
+ "paths": {
+ "shared-lib": ["libs/shared-lib/index.ts"]
+ }
+ }
+}
diff --git a/packages/esbuild/.eslintrc.json b/packages/esbuild/.eslintrc.json
new file mode 100644
index 00000000000..2564a6e49bd
--- /dev/null
+++ b/packages/esbuild/.eslintrc.json
@@ -0,0 +1,23 @@
+{
+ "extends": ["../../.eslintrc.json"],
+ "ignorePatterns": ["!**/*"],
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.js", "*.jsx"],
+ "rules": {}
+ },
+ {
+ "files": ["*.json"],
+ "parser": "jsonc-eslint-parser",
+ "rules": {}
+ }
+ ]
+}
diff --git a/packages/esbuild/.swcrc b/packages/esbuild/.swcrc
new file mode 100644
index 00000000000..d9b5fd26230
--- /dev/null
+++ b/packages/esbuild/.swcrc
@@ -0,0 +1,29 @@
+{
+ "jsc": {
+ "target": "es2017",
+ "parser": {
+ "syntax": "typescript",
+ "decorators": true,
+ "dynamicImport": true
+ },
+ "transform": {
+ "decoratorMetadata": true,
+ "legacyDecorator": true
+ },
+ "keepClassNames": true,
+ "externalHelpers": false,
+ "loose": true
+ },
+ "module": {
+ "type": "es6"
+ },
+ "sourceMaps": true,
+ "exclude": [
+ "jest.config.ts",
+ ".*\\.spec.tsx?$",
+ ".*\\.test.tsx?$",
+ "./src/jest-setup.ts$",
+ "./**/jest-setup.ts$",
+// ".*.js$"
+ ]
+}
diff --git a/packages/esbuild/LICENSE b/packages/esbuild/LICENSE
new file mode 100644
index 00000000000..f3ef66ec65e
--- /dev/null
+++ b/packages/esbuild/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023-present zhouxiao(zhoushaw)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/esbuild/README.md b/packages/esbuild/README.md
new file mode 100644
index 00000000000..a29d29f6446
--- /dev/null
+++ b/packages/esbuild/README.md
@@ -0,0 +1,116 @@
+# @module-federation/esbuild
+
+This package provides an esbuild plugin for Module Federation, enabling you to easily share code between independently built and deployed applications.
+
+## Installation
+
+Install the package using npm:
+
+```bash
+npm install @module-federation/esbuild
+```
+
+## Usage
+
+To use the Module Federation plugin with esbuild, add it to your esbuild configuration:
+
+```js
+const esbuild = require('esbuild');
+const path = require('path');
+const { moduleFederationPlugin } = require('@module-federation/esbuild/plugin');
+const federationConfig = require('./federation.config.js');
+
+async function buildApp() {
+ const tsConfig = 'tsconfig.json';
+ const outputPath = path.join('dist', 'host');
+
+ try {
+ await esbuild.build({
+ entryPoints: [path.join('host', 'main.ts')],
+ outdir: outputPath,
+ bundle: true,
+ platform: 'browser',
+ format: 'esm',
+ mainFields: ['es2020', 'browser', 'module', 'main'],
+ conditions: ['es2020', 'es2015', 'module'],
+ resolveExtensions: ['.ts', '.tsx', '.mjs', '.js'],
+ tsconfig: tsConfig,
+ splitting: true,
+ plugins: [moduleFederationPlugin(federationConfig)],
+ });
+ } catch (err) {
+ console.error(err);
+ process.exit(1);
+ }
+}
+
+buildApp();
+
+// Example of federation.config.js
+
+const { withFederation, shareAll } = require('@module-federation/esbuild/build');
+
+module.exports = withFederation({
+ name: 'host',
+ filename: 'remoteEntry.js',
+ exposes: {
+ './Component': './src/Component',
+ },
+ shared: {
+ react: {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ 'react-dom': {
+ singleton: true,
+ version: '^18.2.0',
+ },
+ rxjs: {
+ singleton: true,
+ version: '^7.8.1',
+ },
+ ...shareAll({
+ singleton: true,
+ strictVersion: true,
+ requiredVersion: 'auto',
+ includeSecondaries: false,
+ }),
+ },
+});
+
+```
+
+The `moduleFederationPlugin` accepts a configuration object with the following properties:
+
+- `name` (string): The name of the host application.
+- `filename` (string, optional): The name of the remote entry file. Defaults to `'remoteEntry.js'`.
+- `remotes` (object, optional): An object specifying the remote applications and their entry points.
+- `exposes` (object, optional): An object specifying the modules to be exposed by the host application.
+- `shared` (array, optional): An array of package names to be shared between the host and remote applications.
+
+## Plugin Features
+
+The `moduleFederationPlugin` includes the following features:
+
+- **Virtual Share Module**: Creates a virtual module for sharing dependencies between the host and remote applications.
+- **Virtual Remote Module**: Creates a virtual module for importing exposed modules from remote applications.
+- **CommonJS to ESM Transformation**: Transforms CommonJS modules to ESM format for compatibility with Module Federation.
+- **Shared Dependencies Linking**: Links shared dependencies between the host and remote applications.
+- **Manifest Generation**: Generates a manifest file containing information about the exposed modules and their exports.
+
+## API
+
+### `moduleFederationPlugin(config)`
+
+Creates an esbuild plugin for Module Federation.
+
+- `config` (object): The Module Federation configuration.
+ - `name` (string): The name of the host application.
+ - `filename` (string, optional): The name of the remote entry file. Defaults to `'remoteEntry.js'`.
+ - `remotes` (object, optional): An object specifying the remote applications and their entry points.
+ - `exposes` (object, optional): An object specifying the modules to be exposed by the host application.
+ - `shared` (array, optional): An array of package names to be shared between the host and remote applications.
+
+Returns an esbuild plugin instance.
+
+
diff --git a/packages/esbuild/global.d.ts b/packages/esbuild/global.d.ts
new file mode 100644
index 00000000000..7eff77bc2bc
--- /dev/null
+++ b/packages/esbuild/global.d.ts
@@ -0,0 +1,4 @@
+declare const __VERSION__: string;
+declare const FEDERATION_DEBUG: string;
+declare const FEDERATION_BUILD_IDENTIFIER: string | undefined;
+declare const __RELEASE_NUMBER__: number;
diff --git a/packages/esbuild/jest.config.ts b/packages/esbuild/jest.config.ts
new file mode 100644
index 00000000000..68edd54f0a7
--- /dev/null
+++ b/packages/esbuild/jest.config.ts
@@ -0,0 +1,30 @@
+/* eslint-disable */
+import { readFileSync } from 'fs';
+
+// 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'),
+);
+
+// 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: 'runtime',
+ preset: '../../jest.preset.js',
+ transform: {
+ '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
+ },
+ moduleFileExtensions: ['ts', 'js', 'html'],
+ testEnvironment: 'node',
+ coverageDirectory: '../../coverage/packages/runtime',
+};
diff --git a/packages/esbuild/package.json b/packages/esbuild/package.json
new file mode 100644
index 00000000000..2fe612e48ed
--- /dev/null
+++ b/packages/esbuild/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "@module-federation/esbuild",
+ "version": "0.0.1",
+ "author": "Zack Jackson (@ScriptedAlchemy)",
+ "main": "./dist/index.cjs.js",
+ "module": "./dist/index.esm.js",
+ "types": "./dist/index.cjs.d.ts",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "files": [
+ "dist/",
+ "README.md"
+ ],
+ "exports": {
+ ".": {
+ "types": "./dist/index.cjs.d.ts",
+ "import": "./dist/index.esm.js",
+ "require": "./dist/index.cjs.js"
+ },
+ "./plugin": {
+ "types": "./dist/esbuild.cjs.d.ts",
+ "import": "./dist/plugin.esm.js",
+ "require": "./dist/plugin.cjs.js"
+ },
+ "./build": {
+ "types": "./dist/build.cjs.d.ts",
+ "import": "./dist/build.esm.js",
+ "require": "./dist/build.cjs.js"
+ },
+ "./types": {
+ "types": "./dist/types.cjs.d.ts",
+ "import": "./dist/types.esm.js",
+ "require": "./dist/types.cjs.js"
+ },
+ "./*": "./*"
+ },
+ "typesVersions": {
+ "*": {
+ ".": [
+ "./dist/index.cjs.d.ts"
+ ],
+ "helpers": [
+ "./dist/helpers.cjs.d.ts"
+ ],
+ "types": [
+ "./dist/types.cjs.d.ts"
+ ]
+ }
+ },
+ "dependencies": {
+ "enhanced-resolve": "^5.16.1",
+ "cjs-module-lexer": "^1.3.1",
+ "es-module-lexer": "^1.5.3",
+ "@module-federation/sdk": "workspace:*",
+ "json5": "^2.2.3",
+ "@rollup/plugin-commonjs": "^22.0.2",
+ "@rollup/plugin-node-resolve": "^13.3.0",
+ "@rollup/plugin-replace": "^4.0.0",
+ "rollup": "^2.79.0",
+ "@chialab/esbuild-plugin-commonjs": "^0.18.0",
+ "@hyrious/esbuild-plugin-commonjs": "^0.2.4",
+ "rollup-plugin-node-externals": "^4.1.1",
+ "esbuild": "^0.18.12",
+ "npmlog": "^6.0.2"
+ }
+}
diff --git a/packages/esbuild/project.json b/packages/esbuild/project.json
new file mode 100644
index 00000000000..62aef96fb67
--- /dev/null
+++ b/packages/esbuild/project.json
@@ -0,0 +1,99 @@
+{
+ "name": "esbuild",
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
+ "sourceRoot": "packages/esbuild/src",
+ "projectType": "library",
+ "targets": {
+ "build": {
+ "executor": "@nx/rollup:rollup",
+ "outputs": ["{workspaceRoot}/packages/esbuild/dist"],
+ "options": {
+ "parallel": false,
+ "outputPath": "packages/esbuild/dist",
+ "main": "packages/esbuild/src/index.ts",
+ "additionalEntryPoints": [
+ "packages/esbuild/src/adapters/lib/plugin.ts",
+ "packages/esbuild/src/build.ts"
+ ],
+ "tsConfig": "packages/esbuild/tsconfig.lib.json",
+ "assets": ["packages/esbuild/src/resolve"],
+ "project": "packages/esbuild/package.json",
+ "compiler": "swc",
+ "rollupConfig": "packages/esbuild/rollup.config.js",
+ "format": ["cjs", "esm"],
+ "external": [
+ "@chialab/cjs-to-esm",
+ "enhanced-resolve",
+ "cjs-module-lexer",
+ "es-module-lexer",
+ "@module-federation/*",
+ "pnpapi",
+ "esbuild",
+ "@rollup/*",
+ "rollup-plugin-node-externals",
+ "@chialab/esbuild-plugin-commonjs",
+ "@hyrious/esbuild-plugin-commonjs",
+ "rollup",
+ "../../resolve/esm-resolver.mjs"
+ ]
+ },
+ "dependsOn": [
+ {
+ "target": "build",
+ "dependencies": true
+ }
+ ]
+ },
+ "lint": {
+ "executor": "@nx/linter:eslint",
+ "outputs": ["{options.outputFile}"],
+ "options": {
+ "lintFilePatterns": [
+ "packages/esbuild/**/*.ts",
+ "packages/esbuild/package.json"
+ ]
+ }
+ },
+ "build-debug": {
+ "executor": "nx:run-commands",
+ "options": {
+ "parallel": false,
+ "commands": [
+ {
+ "command": "FEDERATION_DEBUG=true nx run esbuild:build",
+ "forwardAllArgs": false
+ }
+ ]
+ }
+ },
+ "pre-release": {
+ "executor": "nx:run-commands",
+ "options": {
+ "parallel": false,
+ "commands": [
+ {
+ "command": "nx run esbuild:test",
+ "forwardAllArgs": false
+ },
+ {
+ "command": "nx run esbuild:build",
+ "forwardAllArgs": false
+ }
+ ]
+ }
+ },
+ "tesxt": {
+ "executor": "nx:run-commands",
+ "options": {
+ "parallel": false,
+ "commands": [
+ {
+ "command": "vitest run -c packages/esbuild/vitest.config.ts",
+ "forwardAllArgs": false
+ }
+ ]
+ }
+ }
+ },
+ "tags": ["type:pkg"]
+}
diff --git a/packages/esbuild/rollup.config.js b/packages/esbuild/rollup.config.js
new file mode 100644
index 00000000000..0c071775b5c
--- /dev/null
+++ b/packages/esbuild/rollup.config.js
@@ -0,0 +1,38 @@
+const replace = require('@rollup/plugin-replace');
+const copy = require('rollup-plugin-copy');
+
+const FEDERATION_DEBUG = process.env.FEDERATION_DEBUG || '';
+
+module.exports = (rollupConfig, projectOptions) => {
+ // rollupConfig.input = {
+ // index: 'packages/runtime/src/index.ts',
+ // types: 'packages/runtime/src/types.ts',
+ // helpers: 'packages/runtime/src/helpers.ts',
+ // };
+
+ const project = projectOptions.project;
+ const pkg = require(project);
+
+ if (rollupConfig.output.format === 'esm' && FEDERATION_DEBUG) {
+ rollupConfig.output.format = 'iife';
+ rollupConfig.output.inlineDynamicImports = true;
+ delete rollupConfig.external;
+ delete rollupConfig.input.type;
+ delete rollupConfig.input.helpers;
+ }
+
+ rollupConfig.plugins.push(
+ replace({
+ preventAssignment: true,
+ __VERSION__: JSON.stringify(pkg.version),
+ FEDERATION_DEBUG: JSON.stringify(FEDERATION_DEBUG),
+ }),
+ copy({
+ targets: [
+ { src: 'packages/runtime/LICENSE', dest: 'packages/runtime/dist' },
+ ],
+ }),
+ );
+
+ return rollupConfig;
+};
diff --git a/packages/esbuild/src/adapters/lib/collect-exports.ts b/packages/esbuild/src/adapters/lib/collect-exports.ts
new file mode 100644
index 00000000000..e3af28890bf
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/collect-exports.ts
@@ -0,0 +1,78 @@
+import {
+ init as initEsLexer,
+ parse as parseEsModule,
+ ExportSpecifier,
+} from 'es-module-lexer';
+import {
+ init as initCjsLexer,
+ parse as parseCjsModule,
+} from 'cjs-module-lexer';
+import { promisify } from 'util';
+import enhancedResolve from 'enhanced-resolve';
+import fs from 'fs';
+import path from 'path';
+
+export const resolve = promisify(
+ enhancedResolve.create({
+ mainFields: ['browser', 'module', 'main'],
+ }),
+);
+
+export const resolvePackageJson = async (
+ packageName: string,
+ callback: (err: Error | null, result?: string) => void,
+): Promise => {
+ try {
+ const filepath = await resolve(__dirname, packageName);
+ if (typeof filepath !== 'string') {
+ return callback(new Error('Failed to resolve package path'));
+ }
+
+ // Resolve the path to the package.json file
+ const packageJsonPath = path.join(filepath, 'package.json');
+ if (fs.existsSync(packageJsonPath)) {
+ callback(null, packageJsonPath);
+ } else {
+ callback(new Error(`package.json not found for package: ${packageName}`));
+ }
+ } catch (err) {
+ callback(err as Error);
+ }
+};
+export async function getExports(modulePath: string): Promise {
+ await initEsLexer;
+ await initCjsLexer;
+
+ try {
+ const exports: string[] = [];
+ const paths: string[] = [];
+ const resolvedPath = await resolve(process.cwd(), modulePath);
+ if (typeof resolvedPath === 'string') {
+ paths.push(resolvedPath);
+ }
+ while (paths.length > 0) {
+ const currentPath = paths.pop();
+ if (currentPath) {
+ const content = await fs.promises.readFile(currentPath, 'utf8');
+
+ try {
+ const { exports: cjsExports } = parseCjsModule(content);
+ exports.push(...cjsExports);
+ } catch {
+ const [, esExports] = parseEsModule(content);
+ exports.push(...esExports.map((exp: ExportSpecifier) => exp.n));
+ }
+
+ // TODO: Handle re-exports
+ }
+ }
+
+ if (!exports.includes('default')) {
+ exports.push('default');
+ }
+ return exports;
+ } catch (e) {
+ console.log(e);
+ return ['default'];
+ }
+}
diff --git a/packages/esbuild/src/adapters/lib/commonjs.ts b/packages/esbuild/src/adapters/lib/commonjs.ts
new file mode 100644
index 00000000000..098c1e8e7b5
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/commonjs.ts
@@ -0,0 +1,349 @@
+import type { Message, Plugin } from 'esbuild';
+import { promises } from 'fs';
+import { Lexer } from './lexer';
+import { cachedReduce, makeLegalIdentifier, orderedUniq } from './utils';
+import { resolve } from './collect-exports';
+
+export interface CommonJSOptions {
+ /**
+ * The regexp passed to onLoad() to match commonjs files.
+ *
+ * @default /\.c?js$/
+ */
+ filter?: RegExp;
+
+ /**
+ * _Experimental_: Transform commonjs to es modules. You have to install
+ * `cjs-module-lexer` to let it work.
+ *
+ * When `true`, the plugin tries to wrap the commonjs module into:
+ *
+ * ```js
+ * var exports = {}, module = { exports };
+ * {
+ * // ... original content ...
+ * }
+ * exports = module.exports;
+ * // the exported names are extracted by cjs-module-lexer
+ * export default exports;
+ * var { something, "a-b" as a_b } = exports;
+ * export { something, a_b as "a-b" };
+ * ```
+ *
+ * @default false
+ */
+ transform?:
+ | boolean
+ | ((path: string) => boolean | TransformConfig | null | void);
+
+ /**
+ * _Experimental_: This options acts as a fallback of the `transform` option above.
+ */
+ transformConfig?: Pick;
+
+ /**
+ * Controls which style of import should be used. By default, it transforms:
+ *
+ * ```js
+ * // input
+ * const foo = require("foo")
+ * // output
+ * import foo from "foo"
+ * ```
+ *
+ * The above case is often correct when 'foo' is also a commonjs module.
+ * But if 'foo' has es module exports, it is better to use:
+ *
+ * ```js
+ * // output
+ * import * as foo from "foo"
+ * ```
+ *
+ * In which case you can set `requireReturnsDefault` to `false` to get the above output.
+ * Or use the callback style to control the behavior for each module.
+ *
+ * @default true
+ */
+ requireReturnsDefault?: boolean | ((path: string) => boolean);
+
+ /**
+ * Don't replace require("ignored-modules"). Note that this will cause
+ * esbuild generates the __require() wrapper which throw error at runtime.
+ */
+ ignore?: string[] | ((path: string) => boolean);
+}
+
+export interface TransformConfig {
+ /**
+ * If `"babel"`, it will check if there be `exports.__esModule`,
+ * then export `exports.default`. i.e. The wrapper code becomes:
+ *
+ * ```js
+ * export default exports.__esModule ? exports.default : exports;
+ * ```
+ *
+ * @default "node"
+ */
+ behavior?: 'babel' | 'node';
+
+ /**
+ * Also include these named exports if they aren't recognized automatically.
+ *
+ * @example ["something"]
+ */
+ exports?: string[];
+
+ /**
+ * If `false`, slightly change the result to make it side-effect free.
+ * But it doesn't actually remove many code. So you maybe not need this.
+ *
+ * ```js
+ * var mod;
+ * var exports = /\*#__PURE__*\/ ((exports, module) => {
+ * // ... original content ...
+ * return module.exports;
+ * })((mod = { exports: {} }).exports, mod);
+ * export default exports;
+ * var a_b = /\*#__PURE__*\/ (() => exports['a-b'])();
+ * var something = /\*#__PURE__*\/ (() => exports.something)();
+ * export { a_b as "a-b", something };
+ * ```
+ */
+ sideEffects?: boolean;
+}
+
+export function commonjs({
+ filter = /\.c?js$/,
+ transform = true,
+ transformConfig,
+ requireReturnsDefault = true,
+ ignore,
+}: CommonJSOptions = {}): Plugin {
+ const init_cjs_module_lexer = transform
+ ? import('cjs-module-lexer')
+ : undefined;
+
+ const use_default_export =
+ typeof requireReturnsDefault === 'function'
+ ? requireReturnsDefault
+ : (_path: string) => requireReturnsDefault;
+
+ const is_ignored =
+ typeof ignore === 'function'
+ ? ignore
+ : Array.isArray(ignore)
+ ? (path: string) => ignore.includes(path)
+ : () => false;
+
+ return {
+ name: 'commonjs',
+ setup({ onLoad, esbuild, initialOptions }) {
+ let esbuild_shim: typeof import('esbuild') | undefined;
+ const require_esbuild = () =>
+ esbuild || (esbuild_shim ||= require('esbuild'));
+ const read = promises.readFile;
+ const lexer = new Lexer();
+
+ //@ts-ignore
+ onLoad({ filter: filter }, async (args) => {
+ let parseCJS: typeof import('cjs-module-lexer').parse | undefined;
+ if (init_cjs_module_lexer) {
+ const { init, parse } = await init_cjs_module_lexer;
+ await init();
+ parseCJS = parse;
+ }
+ let contents: string;
+ try {
+ //@ts-ignore
+ contents = await read(args.path, 'utf8');
+ } catch {
+ return null;
+ }
+ const willTransform =
+ transform === true ||
+ (typeof transform === 'function' && transform(args.path));
+ let cjsExports: ReturnType> | undefined;
+ try {
+ if (parseCJS && willTransform) {
+ // move sourcemap to the end of the transformed file
+ const sourcemapIndex = contents.lastIndexOf(
+ '//# sourceMappingURL=',
+ );
+ let sourcemap: string | undefined;
+ if (sourcemapIndex !== -1) {
+ sourcemap = contents.slice(sourcemapIndex);
+ const sourcemapEnd = sourcemap.indexOf('\n');
+ if (
+ sourcemapEnd !== -1 &&
+ sourcemap.slice(sourcemapEnd + 1).trimStart().length > 0
+ ) {
+ // if there's code after sourcemap, it is invalid, don't do this.
+ sourcemap = undefined;
+ } else {
+ contents = contents.slice(0, sourcemapIndex);
+ }
+ }
+ // transform commonjs to es modules, easy mode
+ cjsExports = parseCJS(contents);
+ let { behavior, exports, sideEffects } =
+ typeof willTransform === 'object'
+ ? willTransform
+ : ({} as TransformConfig);
+ behavior ??= transformConfig?.behavior ?? 'node';
+ exports = orderedUniq(cjsExports.exports.concat(exports ?? []));
+ sideEffects ??= transformConfig?.sideEffects ?? true;
+ let exportDefault =
+ behavior === 'node'
+ ? 'export default exports;'
+ : 'export default exports.__esModule ? exports.default : exports;';
+ let exportsMap = exports.map((e) => [e, makeLegalIdentifier(e)]);
+ if (exportsMap.some(([e]) => e === 'default')) {
+ if (behavior === 'node') {
+ exportsMap = exportsMap.filter(([e]) => e !== 'default');
+ } else {
+ exportDefault = '';
+ }
+ }
+ const reexports = cjsExports.reexports
+ .map((e) => `export * from ${JSON.stringify(e)};`)
+ .join('');
+ let transformed: string[];
+ if (sideEffects === false) {
+ transformed = [
+ // make sure we don't manipulate the first line so that sourcemap is fine
+ reexports +
+ 'var mod, exports = /* @__PURE__ */ ((exports, module) => {' +
+ contents,
+ 'return module.exports})((mod = { exports: {} }).exports, mod); ' +
+ exportDefault,
+ ];
+ if (exportsMap.length > 0) {
+ for (const [e, name] of exportsMap) {
+ transformed.push(
+ `var ${name} = /* @__PURE__ */ (() => exports[${JSON.stringify(
+ e,
+ )}])();`,
+ );
+ }
+ transformed.push(
+ `export { ${exportsMap
+ .map(([e, name]) =>
+ e === name ? e : `${name} as ${JSON.stringify(e)}`,
+ )
+ .join(', ')} };`,
+ );
+ }
+ } else {
+ transformed = [
+ reexports +
+ 'var exports = {}, module = { exports }; {' +
+ contents,
+ '}; exports = module.exports; ' + exportDefault,
+ ];
+ if (exportsMap.length > 0) {
+ transformed.push(
+ `var { ${exportsMap
+ .map(([e, name]) =>
+ e === name ? e : `${JSON.stringify(e)}: ${name}`,
+ )
+ .join(', ')} } = exports;`,
+ `export { ${exportsMap
+ .map(([e, name]) =>
+ e === name ? e : `${name} as ${JSON.stringify(e)}`,
+ )
+ .join(', ')} };`,
+ );
+ }
+ }
+ contents =
+ transformed.join('\n') + (sourcemap ? '\n' + sourcemap : '');
+ }
+ } catch (e) {
+ return null;
+ }
+
+ function makeName(path: string) {
+ let name = `__import_${makeLegalIdentifier(path)}`;
+
+ if (contents.includes(name)) {
+ let suffix = 2;
+ while (contents.includes(`${name}${suffix}`)) suffix++;
+ name = `${name}${suffix}`;
+ }
+
+ return name;
+ }
+
+ let warnings: Message[];
+ try {
+ ({ warnings } = await require_esbuild().transform(contents, {
+ format: 'esm',
+ logLevel: 'silent',
+ }));
+ } catch (err) {
+ ({ warnings } = err as any);
+ }
+
+ const lines = contents.split('\n');
+ const getOffset = cachedReduce(lines, (a, b) => a + 1 + b.length, 0);
+
+ if (
+ warnings &&
+ (warnings = warnings.filter((e) =>
+ e.text.includes('"require" to "esm"'),
+ )).length
+ ) {
+ const edits: [start: number, end: number, replace: string][] = [];
+ let imports: string[] = [];
+
+ for (const { location } of warnings) {
+ if (location === null) continue;
+
+ const { line, lineText, column, length } = location;
+
+ const leftBrace = column + length + 1;
+ const path = lexer.readString(lineText, leftBrace);
+ if (path === null || is_ignored(path)) continue;
+ const rightBrace =
+ lineText.indexOf(')', leftBrace + 2 + path.length) + 1;
+
+ const name = makeName(path);
+ let import_statement: string;
+ if (use_default_export(path)) {
+ import_statement = `import ${name} from ${JSON.stringify(path)};`;
+ } else {
+ import_statement = `import * as ${name} from ${JSON.stringify(
+ path,
+ )};`;
+ }
+
+ const offset = getOffset(line - 1);
+ edits.push([offset + column, offset + rightBrace, name]);
+ imports.push(import_statement);
+ }
+
+ if (imports.length === 0) return null;
+
+ imports = orderedUniq(imports);
+
+ let offset = 0;
+ for (const [start, end, name] of edits) {
+ contents =
+ contents.slice(0, start + offset) +
+ name +
+ contents.slice(end + offset);
+ offset += name.length - (end - start);
+ }
+
+ // if we have transformed this module (i.e. having `cjsExports`), don't make the file commonjs
+ contents = [...imports, cjsExports ? 'exports;' : '', contents].join(
+ '',
+ );
+ return { contents };
+ }
+ });
+ },
+ };
+}
+
+export default commonjs;
diff --git a/packages/esbuild/src/adapters/lib/containerPlugin.ts b/packages/esbuild/src/adapters/lib/containerPlugin.ts
new file mode 100644
index 00000000000..1307fbedfd3
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/containerPlugin.ts
@@ -0,0 +1,183 @@
+import { OnResolveArgs, OnLoadArgs, PluginBuild } from 'esbuild';
+import { createContainerCode } from '../../lib/core/createContainerTemplate.js';
+import { NormalizedFederationConfig } from '../../lib/config/federation-config.js';
+
+const buildContainerHost = (config: NormalizedFederationConfig) => {
+ const { name, remotes = {}, shared = {}, exposes = {} } = config;
+
+ const remoteConfigs = Object.entries(remotes).map(
+ ([remoteAlias, remote]) => ({
+ type: 'esm',
+ name: remoteAlias,
+ entry: (remote as any).entry,
+ alias: remoteAlias,
+ }),
+ );
+
+ const sharedConfig =
+ Object.entries(shared).reduce((acc, [pkg, config]) => {
+ const version =
+ (config as any).requiredVersion?.replace(/^[^0-9]/, '') || '';
+ acc += `${JSON.stringify(pkg)}: {
+ "package": "${pkg}",
+ "version": "${version}",
+ "scope": "default",
+ "get": async () => import('federationShare/${pkg}'),
+ "shareConfig": {
+ "singleton": ${(config as any).singleton},
+ "requiredVersion": "${(config as any).requiredVersion}",
+ "eager": ${(config as any).eager},
+ "strictVersion": ${(config as any).strictVersion}
+ }
+ },\n`;
+ return acc;
+ }, '{') + '}';
+
+ let exposesConfig = Object.entries(exposes)
+ .map(
+ ([exposeName, exposePath]) =>
+ `${JSON.stringify(
+ exposeName,
+ )}: async () => await import('${exposePath}')`,
+ )
+ .join(',\n');
+ exposesConfig = `{${exposesConfig}}`;
+
+ const injectedContent = `
+ export const moduleMap = '__MODULE_MAP__';
+
+ function appendImportMap(importMap) {
+ const script = document.createElement('script');
+ script.type = 'importmap-shim';
+ script.innerHTML = JSON.stringify(importMap);
+ document.head.appendChild(script);
+ }
+
+ export const createVirtualRemoteModule = (name, ref, exports) => {
+ const genExports = exports.map(e =>
+ e === 'default' ? 'export default mfLsZJ92.default' : \`export const \${e} = mfLsZJ92[\${JSON.stringify(e)}];\`
+ ).join('');
+
+ const loadRef = \`const mfLsZJ92 = await container.loadRemote(\${JSON.stringify(ref)});\`;
+
+ return \`
+ const container = __FEDERATION__.__INSTANCES__.find(container => container.name === name) || __FEDERATION__.__INSTANCES__[0];
+ \${loadRef}
+ \${genExports}
+ \`;
+ };
+
+ function encodeInlineESM(code) {
+ const encodedCode = encodeURIComponent(code);
+ return \`data:text/javascript;charset=utf-8,\${encodedCode}\`;
+ }
+
+ const runtimePlugin = () => ({
+ name: 'import-maps-plugin',
+ async init(args) {
+
+ const remotePrefetch = args.options.remotes.map(async (remote) => {
+ if (remote.type === 'esm') {
+ await import(remote.entry);
+ }
+ });
+
+
+ await Promise.all(remotePrefetch);
+
+ const map = Object.keys(moduleMap).reduce((acc, expose) => {
+ const importMap = importShim.getImportMap().imports;
+ const key = args.origin.name + expose.replace('.', '');
+ if (!importMap[key]) {
+ const encodedModule = encodeInlineESM(
+ createVirtualRemoteModule(args.origin.name, key, moduleMap[expose].exports)
+ );
+ acc[key] = encodedModule;
+ }
+ return acc;
+ }, {});
+ await importShim.addImportMap({ imports: map });
+
+ return args;
+ }
+ });
+
+ const createdContainer = await createContainer({
+ name: ${JSON.stringify(name)},
+ exposes: ${exposesConfig},
+ remotes: ${JSON.stringify(remoteConfigs)},
+ shared: ${sharedConfig},
+ plugins: [runtimePlugin()],
+ });
+
+ export const get = createdContainer.get;
+ export const init = createdContainer.init;
+ `;
+ //replace with createContainer from bundler runtime - import it in the string as a dep etc
+
+ return [createContainerCode, injectedContent].join('\n');
+};
+
+export const createContainerPlugin = (config: NormalizedFederationConfig) => ({
+ name: 'createContainer',
+ setup(build: PluginBuild) {
+ const { filename } = config;
+
+ const filter = new RegExp([filename].map((name) => `${name}$`).join('|'));
+ const hasShared = Object.keys(config.shared || {}).length;
+
+ const shared = Object.keys(config.shared || {})
+ .map((name: string) => `${name}$`)
+ .join('|');
+ const sharedExternals = new RegExp(shared);
+
+ build.onResolve({ filter }, async (args: OnResolveArgs) => ({
+ path: args.path,
+ namespace: 'container',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ }));
+
+ build.onResolve(
+ { filter: /^federationShare/ },
+ async (args: OnResolveArgs) => ({
+ path: args.path.replace('federationShare/', ''),
+ namespace: 'esm-shares',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ }),
+ );
+ if (hasShared) {
+ build.onResolve({ filter: sharedExternals }, (args: OnResolveArgs) => {
+ if (args.namespace === 'esm-shares') return null;
+ return {
+ path: args.path,
+ namespace: 'virtual-share-module',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ };
+ });
+
+ build.onResolve(
+ { filter: /.*/, namespace: 'esm-shares' },
+ async (args: OnResolveArgs) => {
+ if (sharedExternals.test(args.path)) {
+ return {
+ path: args.path,
+ namespace: 'virtual-share-module',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ };
+ }
+
+ return undefined;
+ },
+ );
+ }
+
+ build.onLoad(
+ { filter, namespace: 'container' },
+ async (args: OnLoadArgs) => ({
+ contents: buildContainerHost(config),
+ loader: 'js',
+ resolveDir: args.pluginData.resolveDir,
+ }),
+ );
+ },
+});
diff --git a/packages/esbuild/src/adapters/lib/containerReference.ts b/packages/esbuild/src/adapters/lib/containerReference.ts
new file mode 100644
index 00000000000..653f91575d4
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/containerReference.ts
@@ -0,0 +1,162 @@
+import fs from 'fs';
+import { NormalizedFederationConfig } from '../../lib/config/federation-config';
+
+// Builds the federation host code
+export const buildFederationHost = (config: NormalizedFederationConfig) => {
+ const { name, remotes, shared } = config;
+
+ const remoteConfigs = remotes
+ ? JSON.stringify(
+ Object.entries(remotes).map(([remoteAlias, remote]) => ({
+ name: remoteAlias,
+ entry: remote,
+ alias: remoteAlias,
+ type: 'esm',
+ })),
+ )
+ : '[]';
+
+ const sharedConfig =
+ Object.entries(shared ?? {}).reduce((acc, [pkg, config]) => {
+ const version = config.requiredVersion?.replace(/^[^0-9]/, '') || '';
+ acc += `${JSON.stringify(pkg)}: {
+ "package": "${pkg}",
+ "version": "${version}",
+ "scope": "default",
+ "get": async () => await import('federationShare/${pkg}'),
+ "shareConfig": {
+ "singleton": ${config.singleton},
+ "requiredVersion": "${config.requiredVersion}",
+ "eager": ${config.eager},
+ "strictVersion": ${config.strictVersion}
+ }
+ },\n`;
+ return acc;
+ }, '{') + '}';
+ return `
+ import { init as initFederationHost } from "@module-federation/runtime";
+
+ const createVirtualRemoteModule = (name, ref, exports) => {
+ const genExports = exports.map(e =>
+ e === 'default'
+ ? 'export default mfLsZJ92.default;'
+ : \`export const \${e} = mfLsZJ92[\${JSON.stringify(e)}];\`
+ ).join('');
+
+ const loadRef = \`const mfLsZJ92 = await container.loadRemote(\${JSON.stringify(ref)});\`;
+
+ return \`
+ const container = __FEDERATION__.__INSTANCES__.find(container => container.name === name) || __FEDERATION__.__INSTANCES__[0];
+ \${loadRef}
+ \${genExports}
+ \`;
+ };
+
+ function encodeInlineESM(code) {
+ return 'data:text/javascript;charset=utf-8,' + encodeURIComponent(code);
+ }
+
+ const runtimePlugin = () => ({
+ name: 'import-maps-plugin',
+ async init(args) {
+ const remotePrefetch = args.options.remotes.map(async (remote) => {
+ console.log('remote', remote);
+ if (remote.type === 'esm') {
+ await import(remote.entry);
+ }
+ });
+
+ await Promise.all(remotePrefetch);
+ if (typeof moduleMap !== 'undefined') {
+ const map = Object.keys(moduleMap).reduce((acc, expose) => {
+ const importMap = importShim.getImportMap().imports;
+ const key = args.origin.name + expose.replace('.', '');
+ if (!importMap[key]) {
+ const encodedModule = encodeInlineESM(
+ createVirtualRemoteModule(args.origin.name, key, moduleMap[expose].exports)
+ );
+ acc[key] = encodedModule;
+ }
+ return acc;
+ }, {});
+
+ await importShim.addImportMap({ imports: map });
+ }
+
+ return args;
+ }
+ });
+
+ const mfHoZJ92 = initFederationHost({
+ name: ${JSON.stringify(name)},
+ remotes: ${remoteConfigs},
+ shared: ${sharedConfig},
+ plugins: [runtimePlugin()],
+ });
+
+ await Promise.all(mfHoZJ92.initializeSharing('default', 'version-first'));
+
+
+ `;
+};
+
+export const initializeHostPlugin = (config: NormalizedFederationConfig) => ({
+ name: 'host-initialization',
+ setup(build: any) {
+ build.onResolve({ filter: /federation-host/ }, (args: any) => ({
+ path: args.path,
+ namespace: 'federation-host',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ }));
+
+ build.onLoad(
+ { filter: /.*/, namespace: 'federation-host' },
+ async (args: any) => ({
+ contents: buildFederationHost(config),
+ resolveDir: args.pluginData.resolveDir,
+ }),
+ );
+
+ // Add custom loaders
+ const loaders = build.initialOptions.loader || {};
+
+ // Apply custom loaders
+ for (const [ext, loader] of Object.entries(loaders)) {
+ build.onLoad(
+ { filter: new RegExp(`\\${ext}$`), namespace: 'file' },
+ async (args: any) => {
+ const contents = await fs.promises.readFile(args.path, 'utf8');
+ return {
+ contents: buildFederationHost(config) + contents,
+ loader,
+ };
+ },
+ );
+ }
+
+ // Fallback loader for files not matched by custom loaders
+ const fallbackFilter = new RegExp(
+ Object.keys(loaders)
+ .map((ext) => `\\${ext}$`)
+ .join('|'),
+ );
+
+ build.onLoad(
+ { filter: /.*\.(ts|js|mjs)$/, namespace: 'file' },
+ //@ts-ignore
+ async (args: any) => {
+ if (!fallbackFilter.test(args.path)) {
+ if (
+ !build.initialOptions.entryPoints.some((e: string) =>
+ args.path.includes(e),
+ )
+ ) {
+ return;
+ }
+ const contents = await fs.promises.readFile(args.path, 'utf8');
+ return { contents: 'import "federation-host"; \n ' + contents };
+ }
+ },
+ );
+ },
+});
diff --git a/packages/esbuild/src/adapters/lib/lexer.ts b/packages/esbuild/src/adapters/lib/lexer.ts
new file mode 100644
index 00000000000..377e1b7a841
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/lexer.ts
@@ -0,0 +1,146 @@
+// simplified from acorn (MIT license)
+
+function isNewLine(code: number): boolean {
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
+}
+
+function codePointToString(ch: number): string {
+ if (ch <= 0xffff) return String.fromCharCode(ch);
+ ch -= 0x10000;
+ return String.fromCharCode((ch >> 10) + 0xd800, (ch & 0x03ff) + 0xdc00);
+}
+
+export class Lexer {
+ input = '';
+ pos = 0;
+
+ readString(input: string, pos: number): string | null {
+ if (pos >= input.length) return null;
+ this.input = input;
+ this.pos = pos;
+
+ const quote = this.input.charCodeAt(pos);
+ if (!(quote === 34 || quote === 39)) return null;
+
+ let out = '';
+ let chunkStart = ++this.pos;
+ //eslint-disable-next-line no-constant-condition
+ while (true) {
+ if (this.pos >= this.input.length) return null;
+ const ch = this.input.charCodeAt(this.pos);
+ if (ch === quote) break;
+ if (ch === 92) {
+ out += this.input.slice(chunkStart, this.pos);
+ const escaped = this.readEscapedChar();
+ if (escaped === null) return null;
+ out += escaped;
+ chunkStart = this.pos;
+ } else {
+ if (isNewLine(ch)) return null;
+ ++this.pos;
+ }
+ }
+ out += this.input.slice(chunkStart, this.pos++);
+
+ return out;
+ }
+
+ readEscapedChar(): string | null {
+ const ch = this.input.charCodeAt(++this.pos);
+ let code: number | null;
+ ++this.pos;
+ switch (ch) {
+ case 110:
+ return '\n';
+ case 114:
+ return '\r';
+ case 120:
+ code = this.readHexChar(2);
+ if (code === null) return null;
+ return String.fromCharCode(code);
+ case 117:
+ code = this.readCodePoint();
+ if (code === null) return null;
+ return codePointToString(code);
+ case 116:
+ return '\t';
+ case 98:
+ return '\b';
+ case 118:
+ return '\u000b';
+ case 102:
+ return '\f';
+ //@ts-ignore
+ case 13:
+ if (this.input.charCodeAt(this.pos) === 10) {
+ ++this.pos;
+ }
+ // fall through
+ case 10:
+ return '';
+ case 56:
+ case 57:
+ return null;
+ default:
+ if (ch >= 48 && ch <= 55) {
+ const match = this.input
+ .slice(this.pos - 1, this.pos + 2)
+ .match(/^[0-7]+/);
+ if (match === null) return null;
+ let octalStr = match[0];
+ let octal = parseInt(octalStr, 8);
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1);
+ octal = parseInt(octalStr, 8);
+ }
+ this.pos += octalStr.length - 1;
+ const nextCh = this.input.charCodeAt(this.pos);
+ if (octalStr !== '0' || nextCh === 56 || nextCh === 57) return null;
+ return String.fromCharCode(octal);
+ }
+ if (isNewLine(ch)) return '';
+ return String.fromCharCode(ch);
+ }
+ }
+
+ readInt(radix: number, len: number): number | null {
+ const start = this.pos;
+ let total = 0;
+ for (let i = 0; i < len; ++i, ++this.pos) {
+ const code = this.input.charCodeAt(this.pos);
+ let val: number;
+ if (code >= 97) {
+ val = code - 97 + 10;
+ } else if (code >= 65) {
+ val = code - 65 + 10;
+ } else if (code >= 48 && code <= 57) {
+ val = code - 48;
+ } else {
+ val = Infinity;
+ }
+ if (val >= radix) break;
+ total = total * radix + val;
+ }
+ if (this.pos === start || (len != null && this.pos - start !== len))
+ return null;
+ return total;
+ }
+
+ readHexChar(len: number): number | null {
+ return this.readInt(16, len);
+ }
+
+ readCodePoint(): number | null {
+ const ch = this.input.charCodeAt(this.pos);
+ let code: number | null;
+ if (ch === 123) {
+ ++this.pos;
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos);
+ ++this.pos;
+ if (code && code > 0x10ffff) return null;
+ } else {
+ code = this.readHexChar(4);
+ }
+ return code;
+ }
+}
diff --git a/packages/esbuild/src/adapters/lib/linkRemotesPlugin.ts b/packages/esbuild/src/adapters/lib/linkRemotesPlugin.ts
new file mode 100644
index 00000000000..a1ceab9790d
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/linkRemotesPlugin.ts
@@ -0,0 +1,43 @@
+import path from 'path';
+import { NormalizedFederationConfig } from '../../lib/config/federation-config';
+
+// relys on import map since i dont know the named exports of a remote to return.
+export const createVirtualRemoteModule = (name: string, ref: string) => `
+export * from ${JSON.stringify('federationRemote/' + ref)}
+`;
+
+export const linkRemotesPlugin = (config: NormalizedFederationConfig) => ({
+ name: 'linkRemotes',
+ setup(build: any) {
+ const remotes = config.remotes || {};
+ const filter = new RegExp(
+ Object.keys(remotes)
+ .reduce((acc, key) => {
+ if (!key) return acc;
+ acc.push(`^${key}`);
+ return acc;
+ }, [] as string[])
+ .join('|'),
+ );
+
+ build.onResolve({ filter: filter }, async (args: any) => {
+ return { path: args.path, namespace: 'remote-module' };
+ });
+
+ build.onResolve({ filter: /^federationRemote/ }, async (args: any) => {
+ return {
+ path: args.path.replace('federationRemote/', ''),
+ external: true,
+ namespace: 'externals',
+ };
+ });
+
+ build.onLoad({ filter, namespace: 'remote-module' }, async (args: any) => {
+ return {
+ contents: createVirtualRemoteModule(config.name, args.path),
+ loader: 'js',
+ resolveDir: path.dirname(args.path),
+ };
+ });
+ },
+});
diff --git a/packages/esbuild/src/adapters/lib/manifest.ts b/packages/esbuild/src/adapters/lib/manifest.ts
new file mode 100644
index 00000000000..6aaaa3280a0
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/manifest.ts
@@ -0,0 +1,277 @@
+import fs from 'fs';
+import path from 'path';
+import { resolve } from './collect-exports.js';
+import {
+ BuildOptions,
+ PluginBuild,
+ Plugin,
+ OnResolveArgs,
+ OnLoadArgs,
+ BuildResult,
+ BuildContext,
+} from 'esbuild';
+//@ts-expect-error
+import { version as pluginVersion } from '@module-federation/esbuild/package.json';
+
+interface OutputFile {
+ entryPoint?: string;
+ imports?: { path: string }[];
+ exports?: string[];
+ kind?: string;
+ chunk: string;
+}
+
+interface Assets {
+ js: { async: string[]; sync: string[] };
+ css: { async: string[]; sync: string[] };
+}
+
+interface SharedConfig {
+ id: string;
+ name: string;
+ version: string;
+ singleton: boolean;
+ requiredVersion: string;
+ assets: Assets;
+}
+
+interface RemoteConfig {
+ federationContainerName: string;
+ moduleName: string;
+ alias: string;
+ entry: string;
+}
+
+interface ExposeConfig {
+ id: string;
+ name: string;
+ assets: Assets;
+ path: string;
+}
+
+interface TypesConfig {
+ path: string;
+ name: string;
+ zip: string;
+ api: string;
+}
+
+interface Manifest {
+ id: string;
+ name: string;
+ metaData: {
+ name: string;
+ type: string;
+ buildInfo: {
+ buildVersion: string;
+ buildName: string;
+ };
+ remoteEntry: {
+ name: string;
+ path: string;
+ type: string;
+ };
+ types: TypesConfig;
+ globalName: string;
+ pluginVersion: string;
+ publicPath: string;
+ };
+ shared: SharedConfig[];
+ remotes: RemoteConfig[];
+ exposes: ExposeConfig[];
+}
+
+export const writeRemoteManifest = async (config: any, result: BuildResult) => {
+ if (result.errors && result.errors.length > 0) {
+ console.warn('Build errors detected, skipping writeRemoteManifest.');
+ return;
+ }
+
+ let packageJson: { name: string };
+ try {
+ const packageJsonPath =
+ (await resolve(process.cwd(), '/package.json')) || '';
+ packageJson = require(packageJsonPath);
+ } catch (e) {
+ packageJson = { name: config.name };
+ }
+ const envType =
+ process.env['NODE_ENV'] === 'development'
+ ? 'local'
+ : process.env['NODE_ENV'] ?? '';
+ const publicPath = config.publicPath || 'auto';
+ let containerName: string = '';
+
+ const outputMap: Record = Object.entries(
+ result.metafile?.outputs || {},
+ ).reduce(
+ (acc, [chunkKey, chunkValue]) => {
+ const { entryPoint } = chunkValue;
+ const key = entryPoint || chunkKey;
+ if (key.startsWith('container:') && key.endsWith(config.filename)) {
+ containerName = key;
+ }
+ acc[key] = { ...chunkValue, chunk: chunkKey };
+ return acc;
+ },
+ {} as Record,
+ );
+
+ if (!outputMap[containerName]) return;
+
+ const outputMapWithoutExt: Record = Object.entries(
+ result.metafile?.outputs || {},
+ ).reduce(
+ (acc, [chunkKey, chunkValue]) => {
+ const { entryPoint } = chunkValue;
+ const key = entryPoint || chunkKey;
+ const trimKey = key.substring(0, key.lastIndexOf('.')) || key;
+ acc[trimKey] = { ...chunkValue, chunk: chunkKey };
+ return acc;
+ },
+ {} as Record,
+ );
+
+ const getChunks = (
+ meta: OutputFile | undefined,
+ outputMap: Record,
+ ): Assets => {
+ const assets: Assets = {
+ js: { async: [], sync: [] },
+ css: { async: [], sync: [] },
+ };
+
+ if (meta?.imports) {
+ meta.imports.forEach((imp) => {
+ const importMeta = outputMap[imp.path];
+ if (importMeta && importMeta.kind !== 'dynamic-import') {
+ const childAssets = getChunks(importMeta, outputMap);
+ assets.js.async.push(...childAssets.js.async);
+ assets.js.sync.push(...childAssets.js.sync);
+ assets.css.async.push(...childAssets.css.async);
+ assets.css.sync.push(...childAssets.css.sync);
+ }
+ });
+
+ const assetType = meta.chunk.endsWith('.js') ? 'js' : 'css';
+ const syncOrAsync = meta.kind === 'dynamic-import' ? 'async' : 'sync';
+ assets[assetType][syncOrAsync].push(meta.chunk);
+ }
+ return assets;
+ };
+
+ const shared: SharedConfig[] = config.shared
+ ? await Promise.all(
+ Object.entries(config.shared).map(
+ async ([pkg, config]: [string, any]) => {
+ const meta = outputMap['esm-shares:' + pkg];
+ const chunks = getChunks(meta, outputMap);
+ let { version } = config;
+
+ if (!version) {
+ try {
+ const packageJsonPath = await resolve(
+ process.cwd(),
+ `${pkg}/package.json`,
+ );
+ if (packageJsonPath) {
+ version = JSON.parse(
+ fs.readFileSync(packageJsonPath, 'utf-8'),
+ ).version;
+ }
+ } catch (e) {
+ console.warn(
+ `Can't resolve ${pkg} version automatically, consider setting "version" manually`,
+ );
+ }
+ }
+
+ return {
+ id: `${config.name}:${pkg}`,
+ name: pkg,
+ version: version || config.version,
+ singleton: config.singleton || false,
+ requiredVersion: config.requiredVersion || '*',
+ assets: chunks,
+ };
+ },
+ ),
+ )
+ : [];
+
+ const remotes: RemoteConfig[] = config.remotes
+ ? Object.entries(config.remotes).map(([alias, remote]: [string, any]) => {
+ const [federationContainerName, entry] = remote.includes('@')
+ ? remote.split('@')
+ : [alias, remote];
+
+ return {
+ federationContainerName,
+ moduleName: '',
+ alias,
+ entry,
+ };
+ })
+ : [];
+
+ const exposes: ExposeConfig[] = config.exposes
+ ? await Promise.all(
+ Object.entries(config.exposes).map(
+ async ([expose, value]: [string, any]) => {
+ const exposedFound = outputMapWithoutExt[value.replace('./', '')];
+ const chunks = getChunks(exposedFound, outputMap);
+
+ return {
+ id: `${config.name}:${expose.replace(/^\.\//, '')}`,
+ name: expose.replace(/^\.\//, ''),
+ assets: chunks,
+ path: expose,
+ };
+ },
+ ),
+ )
+ : [];
+
+ const types: TypesConfig = {
+ path: '',
+ name: '',
+ zip: '@mf-types.zip',
+ api: '@mf-types.d.ts',
+ };
+
+ const manifest: Manifest = {
+ id: config.name,
+ name: config.name,
+ metaData: {
+ name: config.name,
+ type: 'app',
+ buildInfo: {
+ buildVersion: envType,
+ buildName: (packageJson.name ?? 'default').replace(
+ /[^a-zA-Z0-9]/g,
+ '_',
+ ),
+ },
+ remoteEntry: {
+ name: config.filename,
+ path: outputMap[containerName]
+ ? path.dirname(outputMap[containerName].chunk)
+ : '',
+ type: 'esm',
+ },
+ types,
+ globalName: config.name,
+ pluginVersion,
+ publicPath,
+ },
+ shared,
+ remotes,
+ exposes,
+ };
+
+ const manifestPath = path.join(
+ path.dirname(outputMap[containerName].chunk),
+ 'mf-manifest.json',
+ );
+ fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf-8');
+};
diff --git a/packages/esbuild/src/adapters/lib/plugin.ts b/packages/esbuild/src/adapters/lib/plugin.ts
new file mode 100644
index 00000000000..b7b7b8fc382
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/plugin.ts
@@ -0,0 +1,248 @@
+import fs from 'fs';
+import { resolve, getExports } from './collect-exports.js';
+import path from 'path';
+import { writeRemoteManifest } from './manifest.js';
+import { createContainerPlugin } from './containerPlugin';
+import { initializeHostPlugin } from './containerReference';
+import { linkRemotesPlugin } from './linkRemotesPlugin';
+import { commonjs } from './commonjs';
+import {
+ BuildOptions,
+ PluginBuild,
+ Plugin,
+ OnResolveArgs,
+ OnLoadArgs,
+} from 'esbuild';
+import { getExternals } from '../../lib/core/get-externals';
+import { NormalizedFederationConfig } from '../../lib/config/federation-config.js';
+
+// Creates a virtual module for sharing dependencies
+export const createVirtualShareModule = (
+ name: string,
+ ref: string,
+ exports: string[],
+): string => `
+ const container = __FEDERATION__.__INSTANCES__.find(container => container.name === ${JSON.stringify(
+ name,
+ )}) || __FEDERATION__.__INSTANCES__[0]
+
+ const mfLsZJ92 = await container.loadShare(${JSON.stringify(ref)})
+
+ ${exports
+ .map((e) =>
+ e === 'default'
+ ? `export default mfLsZJ92.default`
+ : `export const ${e} = mfLsZJ92[${JSON.stringify(e)}];`,
+ )
+ .join('\n')}
+`;
+
+export const createVirtualRemoteModule = (
+ name: string,
+ ref: string,
+): string => `
+export * from ${JSON.stringify('federationRemote/' + ref)}
+`;
+
+// Plugin to transform CommonJS modules to ESM
+const cjsToEsmPlugin: Plugin = {
+ name: 'cjs-to-esm',
+ setup(build: PluginBuild) {
+ build.onLoad(
+ { filter: /.*/, namespace: 'esm-shares' },
+ async (args: OnLoadArgs) => {
+ let esbuild_shim: typeof import('esbuild') | undefined;
+ const require_esbuild = () =>
+ build.esbuild || (esbuild_shim ||= require('esbuild'));
+
+ const packageBuilder = await require_esbuild().build({
+ ...build.initialOptions,
+ external: build.initialOptions.external?.filter((e) => {
+ if (e.includes('*')) {
+ const prefix = e.split('*')[0];
+ return !args.path.startsWith(prefix);
+ }
+ return e !== args.path;
+ }),
+ entryPoints: [args.path],
+ plugins: [commonjs({ filter: /.*/ })],
+ write: false,
+ });
+ return {
+ contents: packageBuilder.outputFiles[0].text,
+ loader: 'js',
+ resolveDir: args.pluginData.resolveDir,
+ };
+ },
+ );
+ },
+};
+// Plugin to link shared dependencies
+const linkSharedPlugin = (config: NormalizedFederationConfig): Plugin => ({
+ name: 'linkShared',
+ setup(build: PluginBuild) {
+ const filter = new RegExp(
+ Object.keys(config.shared || {})
+ .map((name: string) => `${name}$`)
+ .join('|'),
+ );
+
+ build.onResolve({ filter }, (args: OnResolveArgs) => {
+ if (args.namespace === 'esm-shares') return null;
+ return {
+ path: args.path,
+ namespace: 'virtual-share-module',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ };
+ });
+
+ build.onResolve(
+ { filter: /.*/, namespace: 'esm-shares' },
+ (args: OnResolveArgs) => {
+ if (filter.test(args.path)) {
+ return {
+ path: args.path,
+ namespace: 'virtual-share-module',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ };
+ }
+
+ if (filter.test(args.importer)) {
+ return {
+ path: args.path,
+ namespace: 'esm-shares',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ };
+ }
+ return undefined;
+ },
+ );
+
+ build.onResolve(
+ { filter: /^federationShare/ },
+ async (args: OnResolveArgs) => ({
+ path: args.path.replace('federationShare/', ''),
+ namespace: 'esm-shares',
+ pluginData: { kind: args.kind, resolveDir: args.resolveDir },
+ }),
+ );
+
+ build.onLoad(
+ { filter, namespace: 'virtual-share-module' },
+ async (args: OnLoadArgs) => {
+ const exp = await getExports(args.path);
+ return {
+ contents: createVirtualShareModule(config.name, args.path, exp),
+ loader: 'js',
+ resolveDir: path.dirname(args.path),
+ };
+ },
+ );
+ },
+});
+
+// Main module federation plugin
+export const moduleFederationPlugin = (config: NormalizedFederationConfig) => ({
+ name: 'module-federation',
+ setup(build: PluginBuild) {
+ build.initialOptions.metafile = true;
+ const externals = getExternals(config);
+ if (build.initialOptions.external) {
+ build.initialOptions.external = [
+ ...new Set([...build.initialOptions.external, ...externals]),
+ ];
+ } else {
+ build.initialOptions.external = externals;
+ }
+ const pluginStack: Plugin[] = [];
+ const remotes = Object.keys(config.remotes || {}).length;
+ const shared = Object.keys(config.shared || {}).length;
+ const exposes = Object.keys(config.exposes || {}).length;
+ const entryPoints = build.initialOptions.entryPoints;
+ const filename = config.filename || 'remoteEntry.js';
+
+ if (remotes) {
+ pluginStack.push(linkRemotesPlugin(config));
+ }
+
+ if (shared) {
+ pluginStack.push(linkSharedPlugin(config));
+ }
+
+ if (!entryPoints) {
+ build.initialOptions.entryPoints = [];
+ }
+
+ if (exposes) {
+ if (Array.isArray(entryPoints)) {
+ (entryPoints as string[]).push(filename);
+ } else if (entryPoints && typeof entryPoints === 'object') {
+ (entryPoints as Record)[filename] = filename;
+ } else {
+ build.initialOptions.entryPoints = [filename];
+ }
+ }
+
+ [
+ initializeHostPlugin(config),
+ createContainerPlugin(config),
+ cjsToEsmPlugin,
+ ...pluginStack,
+ ].forEach((plugin) => plugin.setup(build));
+
+ build.onEnd(async (result: any) => {
+ if (!result.metafile) return;
+ if (exposes) {
+ const exposedConfig = config.exposes || {};
+ const remoteFile = config.filename;
+ const exposedEntries: Record = {};
+ const outputMapWithoutExt = Object.entries(
+ result.metafile.outputs,
+ ).reduce((acc, [chunkKey, chunkValue]) => {
+ //@ts-ignore
+ const { entryPoint } = chunkValue;
+ const key = entryPoint || chunkKey;
+ const trimKey = key.substring(0, key.lastIndexOf('.')) || key;
+ //@ts-ignore
+ acc[trimKey] = { ...chunkValue, chunk: chunkKey };
+ return acc;
+ }, {});
+
+ for (const [expose, value] of Object.entries(exposedConfig)) {
+ const exposedFound =
+ //@ts-ignore
+ outputMapWithoutExt[value.replace('./', '')] ||
+ //@ts-ignore
+ outputMapWithoutExt[expose.replace('./', '')];
+
+ if (exposedFound) {
+ exposedEntries[expose] = {
+ entryPoint: exposedFound.entryPoint,
+ exports: exposedFound.exports,
+ };
+ }
+ }
+
+ for (const [outputPath, value] of Object.entries(
+ result.metafile.outputs,
+ )) {
+ if (!(value as any).entryPoint) continue;
+
+ if (!(value as any).entryPoint.startsWith('container:')) continue;
+
+ if (!(value as any).entryPoint.endsWith(remoteFile)) continue;
+
+ const container = fs.readFileSync(outputPath, 'utf-8');
+
+ const withExports = container
+ .replace('"__MODULE_MAP__"', `${JSON.stringify(exposedEntries)}`)
+ .replace("'__MODULE_MAP__'", `${JSON.stringify(exposedEntries)}`);
+
+ fs.writeFileSync(outputPath, withExports, 'utf-8');
+ }
+ }
+ await writeRemoteManifest(config, result);
+ console.log(`build ended with ${result.errors.length} errors`);
+ });
+ },
+});
diff --git a/packages/esbuild/src/adapters/lib/react-replacements.ts b/packages/esbuild/src/adapters/lib/react-replacements.ts
new file mode 100644
index 00000000000..82ed97d7430
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/react-replacements.ts
@@ -0,0 +1,41 @@
+'use strict';
+
+interface Replacement {
+ file: string;
+}
+
+interface ReactReplacements {
+ dev: Record;
+ prod: Record;
+}
+
+export const reactReplacements: ReactReplacements = {
+ dev: {
+ 'node_modules/react/index.js': {
+ file: 'node_modules/react/cjs/react.development.js',
+ },
+ 'node_modules/react/jsx-dev-runtime.js': {
+ file: 'node_modules/react/cjs/react-jsx-dev-runtime.development.js',
+ },
+ 'node_modules/react/jsx-runtime.js': {
+ file: 'node_modules/react/cjs/react-jsx-runtime.development.js',
+ },
+ 'node_modules/react-dom/index.js': {
+ file: 'node_modules/react-dom/cjs/react-dom.development.js',
+ },
+ },
+ prod: {
+ 'node_modules/react/index.js': {
+ file: 'node_modules/react/cjs/react.production.min.js',
+ },
+ 'node_modules/react/jsx-dev-runtime.js': {
+ file: 'node_modules/react/cjs/react-jsx-dev-runtime.production.min.js',
+ },
+ 'node_modules/react/jsx-runtime.js': {
+ file: 'node_modules/react/cjs/react-jsx-runtime.production.min.js',
+ },
+ 'node_modules/react-dom/index.js': {
+ file: 'node_modules/react-dom/cjs/react-dom.production.min.js',
+ },
+ },
+};
diff --git a/packages/esbuild/src/adapters/lib/transform.ts b/packages/esbuild/src/adapters/lib/transform.ts
new file mode 100644
index 00000000000..f9a483a3366
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/transform.ts
@@ -0,0 +1,122 @@
+import * as esbuild from 'esbuild';
+import * as path from 'path';
+
+interface TransformInput {
+ code: string;
+ importMap?: string;
+ filename: string;
+ target?: string;
+}
+
+const targets: Record = {
+ esnext: 'esnext',
+ es2015: 'es2015',
+ es2016: 'es2016',
+ es2017: 'es2017',
+ es2018: 'es2018',
+ es2019: 'es2019',
+ es2020: 'es2020',
+ es2021: 'es2021',
+ es2022: 'es2022',
+};
+
+export async function transform(input: TransformInput): Promise {
+ let target: esbuild.BuildOptions['target'] = 'esnext';
+ if (input.target && targets[input.target]) {
+ target = targets[input.target];
+ } else if (input.target) {
+ throw new Error('<400> invalid target');
+ }
+
+ let loader: esbuild.Loader = 'js';
+ const extname = path.extname(input.filename);
+ switch (extname) {
+ case '.jsx':
+ loader = 'jsx';
+ break;
+ case '.ts':
+ loader = 'ts';
+ break;
+ case '.tsx':
+ loader = 'tsx';
+ break;
+ }
+
+ const imports: Record = {};
+ const trailingSlashImports: Record = {};
+ let jsxImportSource = '';
+
+ if (input.importMap) {
+ const im = JSON.parse(input.importMap);
+ if (im.imports) {
+ for (const [key, value] of Object.entries(im.imports)) {
+ if (typeof value === 'string' && value !== '') {
+ if (key.endsWith('/')) {
+ trailingSlashImports[key] = value;
+ } else {
+ if (key === '@jsxImportSource') {
+ jsxImportSource = value;
+ }
+ imports[key] = value;
+ }
+ }
+ }
+ }
+ }
+
+ const onResolver = (args: esbuild.OnResolveArgs): esbuild.OnResolveResult => {
+ let resolvedPath = args.path;
+ if (imports[resolvedPath]) {
+ resolvedPath = imports[resolvedPath];
+ } else {
+ for (const [key, value] of Object.entries(trailingSlashImports)) {
+ if (resolvedPath.startsWith(key)) {
+ resolvedPath = value + resolvedPath.slice(key.length);
+ break;
+ }
+ }
+ }
+ return { path: resolvedPath, external: true };
+ };
+
+ const stdin: esbuild.StdinOptions = {
+ contents: input.code,
+ resolveDir: '/',
+ sourcefile: input.filename,
+ loader: loader,
+ };
+
+ const jsx = jsxImportSource ? 'automatic' : 'transform';
+
+ const opts: esbuild.BuildOptions = {
+ outdir: '/esbuild',
+ stdin: stdin,
+ platform: 'browser',
+ format: 'esm',
+ target: target,
+ jsx: jsx,
+ jsxImportSource: jsxImportSource,
+ bundle: true,
+ treeShaking: false,
+ minifyWhitespace: false,
+ minifySyntax: false,
+ write: false,
+ plugins: [
+ {
+ name: 'resolver',
+ setup(build) {
+ build.onResolve({ filter: /.*/ }, onResolver);
+ },
+ },
+ ],
+ };
+
+ const ret = await esbuild.build(opts);
+ if (ret.errors.length > 0) {
+ throw new Error('<400> failed to validate code: ' + ret.errors[0].text);
+ }
+ if (!ret.outputFiles || ret.outputFiles.length === 0) {
+ throw new Error('<400> failed to validate code: no output files');
+ }
+ return ret.outputFiles[0].text;
+}
diff --git a/packages/esbuild/src/adapters/lib/utils.ts b/packages/esbuild/src/adapters/lib/utils.ts
new file mode 100644
index 00000000000..d90891a0732
--- /dev/null
+++ b/packages/esbuild/src/adapters/lib/utils.ts
@@ -0,0 +1,42 @@
+export function orderedUniq(array: T[]): T[] {
+ // prettier-ignore
+ const ret: T[] = [], visited = new Set();
+ for (const val of array)
+ if (!visited.has(val)) visited.add(val), ret.push(val);
+ return ret;
+}
+
+export function cachedReduce(
+ array: T[],
+ reducer: (s: S, a: T) => S,
+ s: S,
+): (len: number) => S {
+ // prettier-ignore
+ const cache = [s];
+ let cacheLen = 1,
+ last = s;
+ return (len: number): S => {
+ while (cacheLen <= len)
+ cacheLen = cache.push((last = reducer(last, array[cacheLen - 1])));
+ return cache[len];
+ };
+}
+
+// from @rollup/pluginutils
+const reservedWords =
+ 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
+const builtin =
+ 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
+const forbiddenIdentifiers = new Set(`${reservedWords} ${builtin}`.split(' '));
+forbiddenIdentifiers.add('');
+export const makeLegalIdentifier = function makeLegalIdentifier(
+ str: string,
+): string {
+ let identifier = str
+ .replace(/-(\w)/g, (_, letter) => letter.toUpperCase())
+ .replace(/[^$_a-zA-Z0-9]/g, '_');
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
+ identifier = `_${identifier}`;
+ }
+ return identifier || '_';
+};
diff --git a/packages/esbuild/src/build.ts b/packages/esbuild/src/build.ts
new file mode 100644
index 00000000000..b42e617e772
--- /dev/null
+++ b/packages/esbuild/src/build.ts
@@ -0,0 +1,5 @@
+export * from './lib/core/get-externals';
+export * from './lib/core/load-federation-config';
+export * from './lib/config/with-native-federation';
+export * from './lib/config/share-utils';
+export * from './lib/utils/logger';
diff --git a/packages/esbuild/src/index.ts b/packages/esbuild/src/index.ts
new file mode 100644
index 00000000000..ff8b4c56321
--- /dev/null
+++ b/packages/esbuild/src/index.ts
@@ -0,0 +1 @@
+export default {};
diff --git a/packages/esbuild/src/lib/config/configuration-context.ts b/packages/esbuild/src/lib/config/configuration-context.ts
new file mode 100644
index 00000000000..7e18fe37012
--- /dev/null
+++ b/packages/esbuild/src/lib/config/configuration-context.ts
@@ -0,0 +1,18 @@
+export interface ConfigurationContext {
+ workspaceRoot?: string;
+ packageJson?: string;
+}
+
+let _context: ConfigurationContext = {};
+
+export function useWorkspace(workspaceRoot: string): void {
+ _context = { ..._context, workspaceRoot };
+}
+
+export function usePackageJson(packageJson: string): void {
+ _context = { ..._context, packageJson };
+}
+
+export function getConfigContext(): ConfigurationContext {
+ return _context;
+}
diff --git a/packages/esbuild/src/lib/config/federation-config.ts b/packages/esbuild/src/lib/config/federation-config.ts
new file mode 100644
index 00000000000..3f2555c03d8
--- /dev/null
+++ b/packages/esbuild/src/lib/config/federation-config.ts
@@ -0,0 +1,35 @@
+import { SkipList } from '../core/default-skip-list';
+import { MappedPath } from '../utils/mapped-paths';
+
+export interface SharedConfig {
+ singleton?: boolean;
+ strictVersion?: boolean;
+ requiredVersion?: string;
+ version?: string;
+ includeSecondaries?: boolean;
+}
+
+export interface FederationConfig {
+ name?: string;
+ exposes?: Record;
+ shared?: Record;
+ sharedMappings?: Array;
+ skip?: SkipList;
+}
+
+export interface NormalizedSharedConfig {
+ singleton: boolean;
+ strictVersion: boolean;
+ requiredVersion: string;
+ version?: string;
+ eager?: boolean;
+ includeSecondaries?: boolean;
+}
+
+export interface NormalizedFederationConfig {
+ name: string;
+ filename?: string;
+ exposes?: Record;
+ shared?: Record;
+ remotes?: Record;
+}
diff --git a/packages/esbuild/src/lib/config/share-utils.ts b/packages/esbuild/src/lib/config/share-utils.ts
new file mode 100644
index 00000000000..91400b9b197
--- /dev/null
+++ b/packages/esbuild/src/lib/config/share-utils.ts
@@ -0,0 +1,319 @@
+import fs from 'fs';
+import path from 'path';
+import process from 'process';
+import { getConfigContext } from './configuration-context';
+import { SharedConfig } from './federation-config';
+import { getVersionMaps, findDepPackageJson } from '../utils/package-info';
+import { logger } from '../utils/logger';
+import {
+ isInSkipList,
+ prepareSkipList,
+ DEFAULT_SKIP_LIST,
+ PREPARED_DEFAULT_SKIP_LIST,
+ SkipListEntry,
+} from '../core/default-skip-list';
+
+type IncludeSecondariesOptions =
+ | {
+ skip: string | string[];
+ }
+ | boolean;
+
+type CustomSharedConfig = SharedConfig & {
+ includeSecondaries?: IncludeSecondariesOptions;
+};
+
+type ConfigObject = Record;
+type Config = (string | ConfigObject)[] | ConfigObject;
+
+let inferVersion = false;
+
+export const DEFAULT_SECONARIES_SKIP_LIST: string[] = [
+ '@angular/router/upgrade',
+ '@angular/common/upgrade',
+];
+
+export function findRootTsConfigJson(): string {
+ const packageJson = findPackageJson(process.cwd());
+ const projectRoot = path.dirname(packageJson);
+ const tsConfigBaseJson = path.join(projectRoot, 'tsconfig.base.json');
+ const tsConfigJson = path.join(projectRoot, 'tsconfig.json');
+ if (fs.existsSync(tsConfigBaseJson)) {
+ return tsConfigBaseJson;
+ } else if (fs.existsSync(tsConfigJson)) {
+ return tsConfigJson;
+ }
+ throw new Error('Neither a tsconfig.json nor a tsconfig.base.json was found');
+}
+
+export function findPackageJson(folder: string): string {
+ while (
+ !fs.existsSync(path.join(folder, 'package.json')) &&
+ path.dirname(folder) !== folder
+ ) {
+ folder = path.dirname(folder);
+ }
+ const filePath = path.join(folder, 'package.json');
+ if (fs.existsSync(filePath)) {
+ return filePath;
+ }
+ throw new Error(
+ `No package.json found. Searched the following folder and all parents: ${folder}`,
+ );
+}
+
+export function lookupVersion(key: string, workspaceRoot: string): string {
+ const versionMaps = getVersionMaps(workspaceRoot, workspaceRoot);
+ for (const versionMap of versionMaps) {
+ const version = lookupVersionInMap(key, versionMap);
+ if (version) {
+ return version;
+ }
+ }
+ throw new Error(
+ `Shared Dependency ${key} has requiredVersion:'auto'. However, this dependency is not found in your package.json`,
+ );
+}
+
+export function lookupVersionInMap(
+ key: string,
+ versions: Record,
+): string | null {
+ const parts = key.split('/');
+ if (parts.length >= 2 && parts[0].startsWith('@')) {
+ key = `${parts[0]}/${parts[1]}`;
+ } else {
+ key = parts[0];
+ }
+ if (key.toLowerCase() === '@angular-architects/module-federation-runtime') {
+ key = '@angular-architects/module-federation';
+ }
+ return versions[key] || null;
+}
+
+export function _findSecondaries(
+ libPath: string,
+ excludes: string[],
+ shareObject: Record,
+ acc: Record,
+): void {
+ const files = fs.readdirSync(libPath);
+ const dirs = files
+ .map((f) => path.join(libPath, f))
+ .filter((f) => fs.lstatSync(f).isDirectory() && f !== 'node_modules');
+ const secondaries = dirs.filter((d) =>
+ fs.existsSync(path.join(d, 'package.json')),
+ );
+ for (const s of secondaries) {
+ const secondaryLibName = s
+ .replace(/\\/g, '/')
+ .replace(/^.*node_modules[/]/, '');
+ if (excludes.includes(secondaryLibName)) {
+ continue;
+ }
+ if (isInSkipList(secondaryLibName, PREPARED_DEFAULT_SKIP_LIST)) {
+ continue;
+ }
+ acc[secondaryLibName] = { ...shareObject };
+ _findSecondaries(s, excludes, shareObject, acc);
+ }
+}
+
+export function findSecondaries(
+ libPath: string,
+ excludes: string[],
+ shareObject: Record,
+): Record {
+ const acc: Record = {};
+ _findSecondaries(libPath, excludes, shareObject, acc);
+ return acc;
+}
+
+export function getSecondaries(
+ includeSecondaries: boolean | { skip?: string | string[] },
+ libPath: string,
+ key: string,
+ shareObject: Record,
+): Record {
+ let exclude = [...DEFAULT_SECONARIES_SKIP_LIST];
+ if (typeof includeSecondaries === 'object') {
+ if (Array.isArray(includeSecondaries.skip)) {
+ exclude = includeSecondaries.skip;
+ } else if (typeof includeSecondaries.skip === 'string') {
+ exclude = [includeSecondaries.skip];
+ }
+ }
+ if (!fs.existsSync(libPath)) {
+ return {};
+ }
+ const configured = readConfiguredSecondaries(
+ key,
+ libPath,
+ exclude,
+ shareObject,
+ );
+ if (configured) {
+ return configured;
+ }
+ // Fallback: Search folders
+ return findSecondaries(libPath, exclude, shareObject);
+}
+
+export function readConfiguredSecondaries(
+ parent: string,
+ libPath: string,
+ exclude: string[],
+ shareObject: Record,
+): Record | null {
+ const libPackageJson = path.join(libPath, 'package.json');
+ if (!fs.existsSync(libPackageJson)) {
+ return null;
+ }
+ const packageJson = JSON.parse(fs.readFileSync(libPackageJson, 'utf-8'));
+ const exports = packageJson['exports'];
+ if (!exports) {
+ return null;
+ }
+ const keys = Object.keys(exports).filter(
+ (key) =>
+ key !== '.' &&
+ key !== './package.json' &&
+ !key.endsWith('*') &&
+ (exports[key]['default'] || typeof exports[key] === 'string'),
+ );
+ const result: Record = {};
+ for (const key of keys) {
+ const secondaryName = path.join(parent, key).replace(/\\/g, '/');
+ if (exclude.includes(secondaryName)) {
+ continue;
+ }
+ if (isInSkipList(secondaryName, PREPARED_DEFAULT_SKIP_LIST)) {
+ continue;
+ }
+ const entry = getDefaultEntry(exports, key);
+ if (typeof entry !== 'string') {
+ console.log(`No entry point found for ${secondaryName}`);
+ continue;
+ }
+ if (['.css', '.scss', '.less'].some((ext) => entry.endsWith(ext))) {
+ continue;
+ }
+ result[secondaryName] = { ...shareObject };
+ }
+ return result;
+}
+
+export function getDefaultEntry(
+ exports: { [key: string]: any },
+ key: string,
+): string {
+ let entry;
+ if (typeof exports[key] === 'string') {
+ entry = exports[key];
+ } else {
+ entry = exports[key]?.['default'];
+ if (typeof entry === 'object') {
+ entry = entry['default'];
+ }
+ }
+ return entry;
+}
+
+export function shareAll(
+ config: CustomSharedConfig,
+ skip: SkipListEntry[] = DEFAULT_SKIP_LIST,
+ projectPath: string = '',
+): Config {
+ projectPath = inferProjectPath(projectPath);
+ const versionMaps = getVersionMaps(projectPath, projectPath);
+ const shareConfig: ConfigObject = {};
+ for (const versions of versionMaps) {
+ const preparedSkipList = prepareSkipList(skip);
+ for (const key in versions) {
+ if (isInSkipList(key, preparedSkipList)) {
+ continue;
+ }
+ const inferVersion =
+ !config.requiredVersion || config.requiredVersion === 'auto';
+ const requiredVersion = inferVersion
+ ? versions[key]
+ : config.requiredVersion;
+ if (!shareConfig[key]) {
+ shareConfig[key] = { ...config, requiredVersion };
+ }
+ }
+ }
+ return share(share, projectPath);
+}
+
+function inferProjectPath(projectPath: string): string {
+ if (!projectPath) {
+ projectPath = path.dirname(getConfigContext().packageJson || '');
+ }
+ if (!projectPath && getConfigContext().workspaceRoot) {
+ projectPath = getConfigContext().workspaceRoot || '';
+ }
+ if (!projectPath) {
+ projectPath = process.cwd();
+ }
+ return projectPath;
+}
+
+export function setInferVersion(infer: boolean): void {
+ inferVersion = infer;
+}
+
+export function share(
+ shareObjects: Record,
+ projectPath: string = '',
+): Record {
+ projectPath = inferProjectPath(projectPath);
+ const packagePath = findPackageJson(projectPath);
+ const result: Record = {};
+ let includeSecondaries: boolean | { skip?: string | string[] };
+ for (const key in shareObjects) {
+ includeSecondaries = false;
+ const shareObject = shareObjects[key];
+ if (
+ shareObject.requiredVersion === 'auto' ||
+ (inferVersion && typeof shareObject.requiredVersion === 'undefined')
+ ) {
+ const version = lookupVersion(key, projectPath);
+ shareObject.requiredVersion = version;
+ shareObject.version = version.replace(/^\D*/, '');
+ }
+ if (typeof shareObject.includeSecondaries === 'undefined') {
+ shareObject.includeSecondaries = true;
+ }
+ if (shareObject.includeSecondaries) {
+ includeSecondaries = shareObject.includeSecondaries;
+ delete shareObject.includeSecondaries;
+ }
+ result[key] = shareObject;
+ if (includeSecondaries) {
+ const libPackageJson = findDepPackageJson(key, path.dirname(packagePath));
+ if (!libPackageJson) {
+ logger.error(`Could not find folder containing dep ${key}`);
+ continue;
+ }
+ const libPath = path.dirname(libPackageJson);
+ const secondaries = getSecondaries(
+ includeSecondaries,
+ libPath,
+ key,
+ shareObject,
+ );
+ if (secondaries) {
+ addSecondaries(secondaries, result);
+ }
+ }
+ }
+ return result;
+}
+
+export function addSecondaries(
+ secondaries: Record,
+ result: Record,
+): void {
+ Object.assign(result, secondaries);
+}
diff --git a/packages/esbuild/src/lib/config/with-native-federation.ts b/packages/esbuild/src/lib/config/with-native-federation.ts
new file mode 100644
index 00000000000..ac9c6126985
--- /dev/null
+++ b/packages/esbuild/src/lib/config/with-native-federation.ts
@@ -0,0 +1,93 @@
+import {
+ prepareSkipList,
+ isInSkipList,
+ PreparedSkipList,
+} from '../core/default-skip-list';
+import { shareAll } from './share-utils';
+import { getMappedPaths, MappedPath } from '../utils/mapped-paths';
+import { findRootTsConfigJson } from './share-utils';
+import { logger } from '../utils/logger';
+
+interface FederationConfig {
+ name?: string;
+ filename?: string;
+ exposes?: Record;
+ remotes?: Record;
+ shared?: Record;
+ skip?: string[];
+}
+
+interface SharedConfig {
+ requiredVersion?: string;
+ singleton?: boolean;
+ strictVersion?: boolean;
+ version?: string;
+ includeSecondaries?: boolean;
+}
+
+export function withFederation(config: FederationConfig) {
+ const skip: PreparedSkipList = prepareSkipList(config.skip ?? []);
+ return {
+ name: config.name ?? '',
+ filename: config.filename ?? 'remoteEntry',
+ exposes: config.exposes ?? {},
+ remotes: config.remotes ?? {},
+ shared: normalizeShared(config, skip),
+ };
+}
+
+function normalizeShared(
+ config: FederationConfig,
+ skip: PreparedSkipList,
+): Record {
+ let result: Record = {};
+ const shared = config.shared;
+ if (!shared) {
+ result = shareAll({
+ singleton: true,
+ strictVersion: true,
+ requiredVersion: 'auto',
+ }) as Record;
+ } else {
+ result = Object.keys(shared).reduce((acc, cur) => {
+ return {
+ ...acc,
+ [cur]: {
+ requiredVersion: shared[cur].requiredVersion ?? 'auto',
+ singleton: shared[cur].singleton ?? false,
+ strictVersion: shared[cur].strictVersion ?? false,
+ version: shared[cur].version,
+ includeSecondaries: shared[cur].includeSecondaries,
+ },
+ };
+ }, {});
+ }
+ result = Object.keys(result)
+ .filter((key) => !isInSkipList(key, skip))
+ .reduce(
+ (acc, cur) => ({
+ ...acc,
+ [cur]: result[cur],
+ }),
+ {},
+ );
+
+ return result;
+}
+
+function normalizeSharedMappings(
+ config: FederationConfig,
+ skip: PreparedSkipList,
+): MappedPath[] {
+ const rootTsConfigPath = findRootTsConfigJson();
+ const paths = getMappedPaths({
+ rootTsConfigPath,
+ });
+ const result = paths.filter(
+ (p) => !isInSkipList(p.key, skip) && !p.key.includes('*'),
+ );
+ if (paths.find((p) => p.key.includes('*'))) {
+ logger.warn('Sharing mapped paths with wildcards (*) not supported');
+ }
+ return result;
+}
diff --git a/packages/esbuild/src/lib/core/build-adapter.ts b/packages/esbuild/src/lib/core/build-adapter.ts
new file mode 100644
index 00000000000..c172f180f1a
--- /dev/null
+++ b/packages/esbuild/src/lib/core/build-adapter.ts
@@ -0,0 +1,16 @@
+import { logger } from '../utils/logger';
+
+type BuildAdapter = () => Promise;
+
+let _buildAdapter: BuildAdapter = async () => {
+ logger.error('Please set a BuildAdapter!');
+ return [];
+};
+
+export function setBuildAdapter(buildAdapter: BuildAdapter): void {
+ _buildAdapter = buildAdapter;
+}
+
+export function getBuildAdapter(): BuildAdapter {
+ return _buildAdapter;
+}
diff --git a/packages/esbuild/src/lib/core/createContainerTemplate.ts b/packages/esbuild/src/lib/core/createContainerTemplate.ts
new file mode 100644
index 00000000000..11933b7bc4d
--- /dev/null
+++ b/packages/esbuild/src/lib/core/createContainerTemplate.ts
@@ -0,0 +1,181 @@
+export const createContainerCode = `
+import bundler_runtime_base from '@module-federation/webpack-bundler-runtime';
+// import instantiatePatch from "./federation.js";
+
+const createContainer = (federationOptions) => {
+ // await instantiatePatch(federationOptions, true);
+ const {exposes, name, remotes = [], shared, plugins} = federationOptions;
+
+ const __webpack_modules__ = {
+ "./node_modules/.federation/entry.1f2288102e035e2ed66b2efaf60ad043.js": (module, __webpack_exports__, __webpack_require__) => {
+ __webpack_require__.r(__webpack_exports__);
+ const bundler_runtime = __webpack_require__.n(bundler_runtime_base);
+ const prevFederation = __webpack_require__.federation;
+ __webpack_require__.federation = {};
+ for (const key in bundler_runtime()) {
+ __webpack_require__.federation[key] = bundler_runtime()[key];
+ }
+ for (const key in prevFederation) {
+ __webpack_require__.federation[key] = prevFederation[key];
+ }
+ if (!__webpack_require__.federation.instance) {
+ const pluginsToAdd = plugins || [];
+ __webpack_require__.federation.initOptions.plugins = __webpack_require__.federation.initOptions.plugins ?
+ __webpack_require__.federation.initOptions.plugins.concat(pluginsToAdd) : pluginsToAdd;
+ __webpack_require__.federation.instance = __webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);
+ if (__webpack_require__.federation.attachShareScopeMap) {
+ __webpack_require__.federation.attachShareScopeMap(__webpack_require__);
+ }
+ if (__webpack_require__.federation.installInitialConsumes) {
+ __webpack_require__.federation.installInitialConsumes();
+ }
+ }
+ },
+
+ "webpack/container/entry/createContainer": (module, exports, __webpack_require__) => {
+ const moduleMap = {};
+ for (const key in exposes) {
+ if (Object.prototype.hasOwnProperty.call(exposes, key)) {
+ moduleMap[key] = () => Promise.resolve(exposes[key]()).then(m => () => m);
+ }
+ }
+
+ const get = (module, getScope) => {
+ __webpack_require__.R = getScope;
+ getScope = (
+ __webpack_require__.o(moduleMap, module)
+ ? moduleMap[module]()
+ : Promise.resolve().then(() => {
+ throw new Error("Module '" + module + "' does not exist in container.");
+ })
+ );
+ __webpack_require__.R = undefined;
+ return getScope;
+ };
+ const init = (shareScope, initScope, remoteEntryInitOptions) => {
+ return __webpack_require__.federation.bundlerRuntime.initContainerEntry({
+ webpackRequire: __webpack_require__,
+ shareScope: shareScope,
+ initScope: initScope,
+ remoteEntryInitOptions: remoteEntryInitOptions,
+ shareScopeKey: "default"
+ });
+ };
+ __webpack_require__("./node_modules/.federation/entry.1f2288102e035e2ed66b2efaf60ad043.js");
+
+ // This exports getters to disallow modifications
+ __webpack_require__.d(exports, {
+ get: () => get,
+ init: () => init,
+ moduleMap: () => moduleMap,
+ });
+ }
+ };
+
+ const __webpack_module_cache__ = {};
+
+ const __webpack_require__ = (moduleId) => {
+ let cachedModule = __webpack_module_cache__[moduleId];
+ if (cachedModule !== undefined) {
+ return cachedModule.exports;
+ }
+ let module = __webpack_module_cache__[moduleId] = {
+ id: moduleId,
+ loaded: false,
+ exports: {}
+ };
+
+ const execOptions = {
+ id: moduleId,
+ module: module,
+ factory: __webpack_modules__[moduleId],
+ require: __webpack_require__
+ };
+ __webpack_require__.i.forEach(handler => {
+ handler(execOptions);
+ });
+ module = execOptions.module;
+ execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
+
+ module.loaded = true;
+
+ return module.exports;
+ };
+
+ __webpack_require__.m = __webpack_modules__;
+ __webpack_require__.c = __webpack_module_cache__;
+ __webpack_require__.i = [];
+
+ if (!__webpack_require__.federation) {
+ __webpack_require__.federation = {
+ initOptions: {
+ "name": name,
+ "remotes": remotes.map(remote => ({
+ "type": remote.type,
+ "alias": remote.alias,
+ "name": remote.name,
+ "entry": remote.entry,
+ "shareScope": remote.shareScope || "default"
+ }))
+ },
+ chunkMatcher: () => true,
+ rootOutputDir: "",
+ initialConsumes: undefined,
+ bundlerRuntimeOptions: {}
+ };
+ }
+
+ __webpack_require__.n = (module) => {
+ const getter = module && module.__esModule ? () => module['default'] : () => module;
+ __webpack_require__.d(getter, {a: getter});
+ return getter;
+ };
+
+ __webpack_require__.d = (exports, definition) => {
+ for (const key in definition) {
+ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+ Object.defineProperty(exports, key, {enumerable: true, get: definition[key]});
+ }
+ }
+ };
+
+ __webpack_require__.f = {};
+
+ __webpack_require__.g = (() => {
+ if (typeof globalThis === 'object') return globalThis;
+ try {
+ return this || new Function('return this')();
+ } catch (e) {
+ if (typeof window === 'object') return window;
+ }
+ })();
+
+ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
+
+ __webpack_require__.r = (exports) => {
+ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+ Object.defineProperty(exports, Symbol.toStringTag, {value: 'Module'});
+ }
+ Object.defineProperty(exports, '__esModule', {value: true});
+ };
+
+ __webpack_require__.federation.initOptions.shared = shared;
+ __webpack_require__.S = {};
+ const initPromises = {};
+ const initTokens = {};
+ __webpack_require__.I = (name, initScope) => {
+ return __webpack_require__.federation.bundlerRuntime.I({
+ shareScopeName: name,
+ webpackRequire: __webpack_require__,
+ initPromises: initPromises,
+ initTokens: initTokens,
+ initScope: initScope,
+ });
+ };
+
+ const __webpack_exports__ = __webpack_require__("webpack/container/entry/createContainer");
+ const __webpack_exports__get = __webpack_exports__.get;
+ const __webpack_exports__init = __webpack_exports__.init;
+ const __webpack_exports__moduleMap = __webpack_exports__.moduleMap;
+ return __webpack_exports__;
+}`;
diff --git a/packages/esbuild/src/lib/core/default-skip-list.ts b/packages/esbuild/src/lib/core/default-skip-list.ts
new file mode 100644
index 00000000000..67a21c94ef1
--- /dev/null
+++ b/packages/esbuild/src/lib/core/default-skip-list.ts
@@ -0,0 +1,62 @@
+export type SkipFn = (name: string) => boolean;
+export type SkipListEntry = string | RegExp | SkipFn;
+export type SkipList = SkipListEntry[];
+export type PreparedSkipList = {
+ strings: Set;
+ functions: SkipFn[];
+ regexps: RegExp[];
+};
+
+export const DEFAULT_SKIP_LIST: SkipListEntry[] = [
+ '@module-federation/native-federation-runtime',
+ '@module-federation/native-federation',
+ '@module-federation/native-federation-core',
+ '@module-federation/native-federation-esbuild',
+ '@angular-architects/native-federation',
+ '@angular-architects/native-federation-runtime',
+ 'es-module-shims',
+ 'zone.js',
+ 'tslib/',
+ '@angular/localize',
+ '@angular/localize/init',
+ '@angular/localize/tools',
+ '@angular/platform-server',
+ '@angular/platform-server/init',
+ '@angular/ssr',
+ 'express',
+ /\/schematics(\/|$)/,
+ /^@nx\/angular/,
+ (pkg: string) =>
+ pkg.startsWith('@angular/') && !!pkg.match(/\/testing(\/|$)/),
+ (pkg: string) => pkg.startsWith('@types/'),
+ (pkg: string) => pkg.startsWith('@module-federation/'),
+];
+
+export const PREPARED_DEFAULT_SKIP_LIST: PreparedSkipList =
+ prepareSkipList(DEFAULT_SKIP_LIST);
+
+export function prepareSkipList(skipList: SkipListEntry[]): PreparedSkipList {
+ return {
+ strings: new Set(
+ skipList.filter((e): e is string => typeof e === 'string'),
+ ),
+ functions: skipList.filter((e): e is SkipFn => typeof e === 'function'),
+ regexps: skipList.filter((e): e is RegExp => e instanceof RegExp),
+ };
+}
+
+export function isInSkipList(
+ entry: string,
+ skipList: PreparedSkipList,
+): boolean {
+ if (skipList.strings.has(entry)) {
+ return true;
+ }
+ if (skipList.functions.some((f) => f(entry))) {
+ return true;
+ }
+ if (skipList.regexps.some((r) => r.test(entry))) {
+ return true;
+ }
+ return false;
+}
diff --git a/packages/esbuild/src/lib/core/federation-options.ts b/packages/esbuild/src/lib/core/federation-options.ts
new file mode 100644
index 00000000000..7c5cb51bd47
--- /dev/null
+++ b/packages/esbuild/src/lib/core/federation-options.ts
@@ -0,0 +1,10 @@
+export interface FederationOptions {
+ workspaceRoot: string;
+ outputPath: string;
+ federationConfig: string;
+ tsConfig?: string;
+ verbose?: boolean;
+ dev?: boolean;
+ watch?: boolean;
+ packageJson?: string;
+}
diff --git a/packages/esbuild/src/lib/core/get-externals.ts b/packages/esbuild/src/lib/core/get-externals.ts
new file mode 100644
index 00000000000..bb743d966e7
--- /dev/null
+++ b/packages/esbuild/src/lib/core/get-externals.ts
@@ -0,0 +1,14 @@
+import { NormalizedFederationConfig } from '../config/federation-config';
+
+export function getExternals(config: NormalizedFederationConfig): string[] {
+ const shared = Object.keys(config.shared ?? {});
+ const remotes = config.remotes ?? {};
+ const remoteKeys = Object.keys(remotes).reduce((acc, key) => {
+ if (!key) return acc;
+ acc.push(key);
+ acc.push(key + '/*');
+ return acc;
+ }, []);
+ const externals = [...shared, ...remoteKeys];
+ return externals;
+}
diff --git a/packages/esbuild/src/lib/core/load-federation-config.ts b/packages/esbuild/src/lib/core/load-federation-config.ts
new file mode 100644
index 00000000000..c0c74298263
--- /dev/null
+++ b/packages/esbuild/src/lib/core/load-federation-config.ts
@@ -0,0 +1,23 @@
+import * as _path from 'path';
+import * as fs from 'fs';
+
+interface FederationOptions {
+ workspaceRoot: string;
+ federationConfig: string;
+}
+
+export async function loadFederationConfig(
+ fedOptions: FederationOptions,
+): Promise {
+ const fullConfigPath = _path.join(
+ fedOptions.workspaceRoot,
+ fedOptions.federationConfig,
+ );
+
+ if (!fs.existsSync(fullConfigPath)) {
+ throw new Error('Expected ' + fullConfigPath);
+ }
+
+ const config = await import(`${fullConfigPath}`);
+ return config;
+}
diff --git a/packages/esbuild/src/lib/core/write-federation-info.ts b/packages/esbuild/src/lib/core/write-federation-info.ts
new file mode 100644
index 00000000000..41f7bc9c14f
--- /dev/null
+++ b/packages/esbuild/src/lib/core/write-federation-info.ts
@@ -0,0 +1,24 @@
+import * as _path from 'path';
+import * as fs from 'fs';
+
+interface FederationInfo {
+ // Define the structure of federationInfo here
+ [key: string]: any;
+}
+
+interface FedOptions {
+ workspaceRoot: string;
+ outputPath: string;
+}
+
+export function writeFederationInfo(
+ federationInfo: FederationInfo,
+ fedOptions: FedOptions,
+): void {
+ const metaDataPath = _path.join(
+ fedOptions.workspaceRoot,
+ fedOptions.outputPath,
+ 'remoteEntry.json',
+ );
+ fs.writeFileSync(metaDataPath, JSON.stringify(federationInfo, null, 2));
+}
diff --git a/packages/esbuild/src/lib/utils/logger.ts b/packages/esbuild/src/lib/utils/logger.ts
new file mode 100644
index 00000000000..77af8614b2f
--- /dev/null
+++ b/packages/esbuild/src/lib/utils/logger.ts
@@ -0,0 +1,61 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+//@ts-ignore
+import npmlog from 'npmlog';
+
+const levels = npmlog.levels;
+
+npmlog.addLevel(
+ 'error',
+ levels.error,
+ { fg: 'brightWhite', bg: 'red' },
+ ' ERR! ',
+);
+npmlog.addLevel(
+ 'warn',
+ levels.info,
+ { fg: 'brightWhite', bg: 'yellow' },
+ ' WARN ',
+);
+npmlog.addLevel(
+ 'info',
+ levels.warn,
+ { fg: 'brightWhite', bg: 'green' },
+ ' INFO ',
+);
+npmlog.addLevel(
+ 'notice',
+ levels.notice,
+ { fg: 'black', bg: 'brightYellow' },
+ ' NOTE ',
+);
+npmlog.addLevel(
+ 'verbose',
+ levels.verbose,
+ { fg: 'brightWhite', bg: 'brightBlue' },
+ ' VRB! ',
+);
+npmlog.addLevel('silly', levels.silly, { fg: 'black', bg: 'white' }, ' DBG! ');
+
+interface Logger {
+ error: (msg: string) => void;
+ warn: (msg: string) => void;
+ notice: (msg: string) => void;
+ info: (msg: string) => void;
+ verbose: (msg: string) => void;
+ debug: (msg: string) => void;
+}
+
+export const logger: Logger = {
+ error: (msg: string) => npmlog.error('', msg),
+ warn: (msg: string) => npmlog.warn('', msg),
+ notice: (msg: string) => npmlog.notice('', msg),
+ info: (msg: string) => npmlog.info('', msg),
+ verbose: (msg: string) => npmlog.verbose('', msg),
+ debug: (msg: string) => npmlog.silly('', msg),
+};
+
+export const setLogLevel = (level: string): void => {
+ npmlog.level = level === 'debug' ? 'silly' : level;
+};
+
+setLogLevel('info');
diff --git a/packages/esbuild/src/lib/utils/mapped-paths.ts b/packages/esbuild/src/lib/utils/mapped-paths.ts
new file mode 100644
index 00000000000..84f1ec4489f
--- /dev/null
+++ b/packages/esbuild/src/lib/utils/mapped-paths.ts
@@ -0,0 +1,50 @@
+import * as path from 'path';
+import * as fs from 'fs';
+import * as JSON5 from 'json5';
+
+export interface MappedPath {
+ key: string;
+ path: string;
+}
+
+export interface GetMappedPathsParams {
+ rootTsConfigPath: string;
+ sharedMappings?: string[];
+ rootPath?: string;
+}
+
+export function getMappedPaths({
+ rootTsConfigPath,
+ sharedMappings = [],
+ rootPath,
+}: GetMappedPathsParams): MappedPath[] {
+ const result: MappedPath[] = [];
+ if (!path.isAbsolute(rootTsConfigPath)) {
+ throw new Error(
+ 'SharedMappings.register: tsConfigPath needs to be an absolute path!',
+ );
+ }
+ if (!rootPath) {
+ rootPath = path.normalize(path.dirname(rootTsConfigPath));
+ }
+ const shareAll = sharedMappings.length === 0;
+ const tsConfig = JSON5.parse(
+ fs.readFileSync(rootTsConfigPath, { encoding: 'utf-8' }),
+ );
+ const mappings = tsConfig?.compilerOptions?.paths;
+ if (!mappings) {
+ return result;
+ }
+ for (const key in mappings) {
+ if (Object.prototype.hasOwnProperty.call(mappings, key)) {
+ const libPath = path.normalize(path.join(rootPath, mappings[key][0]));
+ if (sharedMappings.includes(key) || shareAll) {
+ result.push({
+ key,
+ path: libPath,
+ });
+ }
+ }
+ }
+ return result;
+}
diff --git a/packages/esbuild/src/lib/utils/normalize.ts b/packages/esbuild/src/lib/utils/normalize.ts
new file mode 100644
index 00000000000..248859b7257
--- /dev/null
+++ b/packages/esbuild/src/lib/utils/normalize.ts
@@ -0,0 +1,13 @@
+export function normalize(path: string, trailingSlash?: boolean): string {
+ let cand = path.replace(/\\/g, '/');
+ if (typeof trailingSlash === 'undefined') {
+ return cand;
+ }
+ while (cand.endsWith('/')) {
+ cand = cand.substring(0, cand.length - 1);
+ }
+ if (trailingSlash) {
+ return cand + '/';
+ }
+ return cand;
+}
diff --git a/packages/esbuild/src/lib/utils/package-info.ts b/packages/esbuild/src/lib/utils/package-info.ts
new file mode 100644
index 00000000000..0f634547236
--- /dev/null
+++ b/packages/esbuild/src/lib/utils/package-info.ts
@@ -0,0 +1,297 @@
+import * as fs from 'fs';
+import * as path from 'path';
+import { logger } from './logger';
+import { normalize } from './normalize';
+
+interface PackageJsonInfo {
+ content: any;
+ directory: string;
+}
+
+interface PackageInfo {
+ entryPoint: string;
+ packageName: string;
+ version: string;
+ esm: boolean;
+}
+
+const packageCache: Record = {};
+
+export function findPackageJsonFiles(
+ project: string,
+ workspace: string,
+): string[] {
+ return expandFolders(project, workspace)
+ .map((f) => path.join(f, 'package.json'))
+ .filter((f) => fs.existsSync(f));
+}
+
+export function expandFolders(child: string, parent: string): string[] {
+ const result: string[] = [];
+ parent = normalize(parent, true);
+ child = normalize(child, true);
+ if (!child.startsWith(parent)) {
+ throw new Error(
+ `Workspace folder ${parent} needs to be a parent of the project folder ${child}`,
+ );
+ }
+ let current = child;
+ while (current !== parent) {
+ result.push(current);
+ const cand = normalize(path.dirname(current), true);
+ if (cand === current) {
+ break;
+ }
+ current = cand;
+ }
+ result.push(parent);
+ return result;
+}
+
+export function getPackageInfo(
+ packageName: string,
+ workspaceRoot: string,
+): PackageInfo | null {
+ workspaceRoot = normalize(workspaceRoot, true);
+ const packageJsonInfos = getPackageJsonFiles(workspaceRoot, workspaceRoot);
+ for (const info of packageJsonInfos) {
+ const cand = _getPackageInfo(packageName, info.directory);
+ if (cand) {
+ return cand;
+ }
+ }
+ logger.warn('No meta data found for shared lib ' + packageName);
+ return null;
+}
+
+function getVersionMapCacheKey(project: string, workspace: string): string {
+ return `${project}**${workspace}`;
+}
+
+export function getVersionMaps(
+ project: string,
+ workspace: string,
+): Record[] {
+ return getPackageJsonFiles(project, workspace).map((json) => ({
+ ...json.content['dependencies'],
+ }));
+}
+
+export function getPackageJsonFiles(
+ project: string,
+ workspace: string,
+): PackageJsonInfo[] {
+ const cacheKey = getVersionMapCacheKey(project, workspace);
+ let maps = packageCache[cacheKey];
+ if (maps) {
+ return maps;
+ }
+ maps = findPackageJsonFiles(project, workspace).map((f) => {
+ const content = JSON.parse(fs.readFileSync(f, 'utf-8'));
+ const directory = normalize(path.dirname(f), true);
+ const result: PackageJsonInfo = {
+ content,
+ directory,
+ };
+ return result;
+ });
+ packageCache[cacheKey] = maps;
+ return maps;
+}
+
+export function findDepPackageJson(
+ packageName: string,
+ projectRoot: string,
+): string | null {
+ const mainPkgName = getPkgFolder(packageName);
+ let mainPkgPath = path.join(projectRoot, 'node_modules', mainPkgName);
+ let mainPkgJsonPath = path.join(mainPkgPath, 'package.json');
+ let directory = projectRoot;
+ while (path.dirname(directory) !== directory) {
+ if (fs.existsSync(mainPkgJsonPath)) {
+ break;
+ }
+ directory = normalize(path.dirname(directory), true);
+ mainPkgPath = path.join(directory, 'node_modules', mainPkgName);
+ mainPkgJsonPath = path.join(mainPkgPath, 'package.json');
+ }
+ if (!fs.existsSync(mainPkgJsonPath)) {
+ logger.verbose(
+ 'No package.json found for ' + packageName + ' in ' + mainPkgPath,
+ );
+ return null;
+ }
+ return mainPkgJsonPath;
+}
+
+export function _getPackageInfo(
+ packageName: string,
+ directory: string,
+): PackageInfo | null {
+ const mainPkgName = getPkgFolder(packageName);
+ const mainPkgJsonPath = findDepPackageJson(packageName, directory);
+ if (!mainPkgJsonPath) {
+ return null;
+ }
+ const mainPkgPath = path.dirname(mainPkgJsonPath);
+ const mainPkgJson = readJson(mainPkgJsonPath);
+ const version = mainPkgJson['version'];
+ const esm = mainPkgJson['type'] === 'module';
+ if (!version) {
+ logger.warn('No version found for ' + packageName);
+ return null;
+ }
+ let relSecondaryPath = path.relative(mainPkgName, packageName);
+ if (!relSecondaryPath) {
+ relSecondaryPath = '.';
+ } else {
+ relSecondaryPath = './' + relSecondaryPath.replace(/\\/g, '/');
+ }
+ let cand = mainPkgJson?.exports?.[relSecondaryPath];
+ if (typeof cand === 'string') {
+ return {
+ entryPoint: path.join(mainPkgPath, cand),
+ packageName,
+ version,
+ esm,
+ };
+ }
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.import;
+ if (typeof cand === 'object') {
+ if (cand.module) {
+ cand = cand.module;
+ } else if (cand.import) {
+ cand = cand.import;
+ } else if (cand.default) {
+ cand = cand.default;
+ } else {
+ cand = null;
+ }
+ }
+ if (cand) {
+ if (typeof cand === 'object') {
+ if (cand.module) {
+ cand = cand.module;
+ } else if (cand.import) {
+ cand = cand.import;
+ } else if (cand.default) {
+ cand = cand.default;
+ } else {
+ cand = null;
+ }
+ }
+ return {
+ entryPoint: path.join(mainPkgPath, cand),
+ packageName,
+ version,
+ esm,
+ };
+ }
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.module;
+ if (typeof cand === 'object') {
+ if (cand.module) {
+ cand = cand.module;
+ } else if (cand.import) {
+ cand = cand.import;
+ } else if (cand.default) {
+ cand = cand.default;
+ } else {
+ cand = null;
+ }
+ }
+ if (cand) {
+ return {
+ entryPoint: path.join(mainPkgPath, cand),
+ packageName,
+ version,
+ esm,
+ };
+ }
+ cand = mainPkgJson?.exports?.[relSecondaryPath]?.default;
+ if (cand) {
+ if (typeof cand === 'object') {
+ if (cand.module) {
+ cand = cand.module;
+ } else if (cand.import) {
+ cand = cand.import;
+ } else if (cand.default) {
+ cand = cand.default;
+ } else {
+ cand = null;
+ }
+ }
+ return {
+ entryPoint: path.join(mainPkgPath, cand),
+ packageName,
+ version,
+ esm,
+ };
+ }
+ cand = mainPkgJson['module'];
+ if (cand && relSecondaryPath === '.') {
+ return {
+ entryPoint: path.join(mainPkgPath, cand),
+ packageName,
+ version,
+ esm: true,
+ };
+ }
+ const secondaryPgkPath = path.join(mainPkgPath, relSecondaryPath);
+ const secondaryPgkJsonPath = path.join(secondaryPgkPath, 'package.json');
+ let secondaryPgkJson: any = null;
+ if (fs.existsSync(secondaryPgkJsonPath)) {
+ secondaryPgkJson = readJson(secondaryPgkJsonPath);
+ }
+ if (secondaryPgkJson && secondaryPgkJson.module) {
+ return {
+ entryPoint: path.join(secondaryPgkPath, secondaryPgkJson.module),
+ packageName,
+ version,
+ esm: true,
+ };
+ }
+ cand = path.join(secondaryPgkPath, 'index.mjs');
+ if (fs.existsSync(cand)) {
+ return {
+ entryPoint: cand,
+ packageName,
+ version,
+ esm: true,
+ };
+ }
+ if (secondaryPgkJson && secondaryPgkJson.main) {
+ return {
+ entryPoint: path.join(secondaryPgkPath, secondaryPgkJson.main),
+ packageName,
+ version,
+ esm,
+ };
+ }
+ cand = path.join(secondaryPgkPath, 'index.js');
+ if (fs.existsSync(cand)) {
+ return {
+ entryPoint: cand,
+ packageName,
+ version,
+ esm,
+ };
+ }
+ logger.warn('No entry point found for ' + packageName);
+ logger.warn(
+ "If you don't need this package, skip it in your federation.config.js or consider moving it into depDependencies in your package.json",
+ );
+ return null;
+}
+
+function readJson(mainPkgJsonPath: string): any {
+ return JSON.parse(fs.readFileSync(mainPkgJsonPath, 'utf-8'));
+}
+
+function getPkgFolder(packageName: string): string {
+ const parts = packageName.split('/');
+ let folder = parts[0];
+ if (folder.startsWith('@')) {
+ folder += '/' + parts[1];
+ }
+ return folder;
+}
diff --git a/packages/esbuild/src/resolve/esm-resolver.mjs b/packages/esbuild/src/resolve/esm-resolver.mjs
new file mode 100644
index 00000000000..4a44e535cc6
--- /dev/null
+++ b/packages/esbuild/src/resolve/esm-resolver.mjs
@@ -0,0 +1,19 @@
+import { createRequire } from 'module';
+import nodePath from 'path';
+export default (path, options = {}) => {
+ const p = options.path || undefined;
+ const mode = options.mode || 'esm';
+ if (mode === 'cjs') {
+ const require = createRequire(import.meta.url);
+ if (!p) return require.resolve(path);
+ return require.resolve(path, { paths: [p] });
+ } else {
+ try {
+ return import.meta.resolve(path.join(p, path)).replace(/^file:\/\//, '');
+ } catch (e) {
+ const require = createRequire(import.meta.url);
+ if (!p) return require.resolve(path);
+ return require.resolve(path, { paths: [p] });
+ }
+ }
+};
diff --git a/packages/esbuild/src/resolve/package.json b/packages/esbuild/src/resolve/package.json
new file mode 100644
index 00000000000..3dbc1ca591c
--- /dev/null
+++ b/packages/esbuild/src/resolve/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "module"
+}
diff --git a/packages/esbuild/tsconfig.json b/packages/esbuild/tsconfig.json
new file mode 100644
index 00000000000..c54b3147e85
--- /dev/null
+++ b/packages/esbuild/tsconfig.json
@@ -0,0 +1,24 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "forceConsistentCasingInFileNames": true,
+ "strict": true,
+ "noImplicitOverride": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "resolveJsonModule": true
+ },
+ "files": [],
+ "include": [],
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
+ "references": [
+ {
+ "path": "./tsconfig.lib.json"
+ },
+ {
+ "path": "./tsconfig.spec.json"
+ }
+ ]
+}
diff --git a/packages/esbuild/tsconfig.lib.json b/packages/esbuild/tsconfig.lib.json
new file mode 100644
index 00000000000..a51e17924d1
--- /dev/null
+++ b/packages/esbuild/tsconfig.lib.json
@@ -0,0 +1,10 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../dist/out-tsc",
+ "declaration": true,
+ "types": ["node"]
+ },
+ "include": ["src/**/*.ts", "global.d.ts"],
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
+}
diff --git a/packages/esbuild/tsconfig.spec.json b/packages/esbuild/tsconfig.spec.json
new file mode 100644
index 00000000000..9b2a121d114
--- /dev/null
+++ b/packages/esbuild/tsconfig.spec.json
@@ -0,0 +1,14 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../dist/out-tsc",
+ "module": "commonjs",
+ "types": ["jest", "node"]
+ },
+ "include": [
+ "jest.config.ts",
+ "src/**/*.test.ts",
+ "src/**/*.spec.ts",
+ "src/**/*.d.ts"
+ ]
+}
diff --git a/packages/esbuild/vitest.config.ts b/packages/esbuild/vitest.config.ts
new file mode 100644
index 00000000000..924d4384337
--- /dev/null
+++ b/packages/esbuild/vitest.config.ts
@@ -0,0 +1,19 @@
+import { defineConfig } from 'vitest/config';
+import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
+import path from 'path';
+export default defineConfig({
+ define: {
+ __DEV__: true,
+ __TEST__: true,
+ __BROWSER__: false,
+ __VERSION__: '"unknow"',
+ },
+ plugins: [nxViteTsPaths()],
+ test: {
+ environment: 'jsdom',
+ include: [path.resolve(__dirname, '__tests__/*.spec.ts')],
+ globals: true,
+ setupFiles: [path.resolve(__dirname, './__tests__/setup.ts')],
+ testTimeout: 10000,
+ },
+});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index abf6c2e48da..0135f534a3f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -763,6 +763,49 @@ importers:
specifier: workspace:*
version: link:../../packages/utilities
+ apps/esbuild:
+ dependencies:
+ react:
+ specifier: ^18.2.0
+ version: 18.2.0
+ react-dom:
+ specifier: ^18.2.0
+ version: 18.2.0(react@18.2.0)
+ rxjs:
+ specifier: ^7.8.1
+ version: 7.8.1
+ devDependencies:
+ '@chialab/cjs-to-esm':
+ specifier: ^0.18.0
+ version: 0.18.0
+ '@module-federation/esbuild':
+ specifier: workspace:*
+ version: link:../../packages/esbuild
+ '@module-federation/runtime':
+ specifier: workspace:*
+ version: link:../../packages/runtime
+ '@module-federation/webpack-bundler-runtime':
+ specifier: workspace:*
+ version: link:../../packages/webpack-bundler-runtime
+ '@types/node':
+ specifier: ^18.7.13
+ version: 18.19.39
+ concurrently:
+ specifier: ^5.3.0
+ version: 5.3.0
+ esbuild:
+ specifier: ^0.15.5
+ version: 0.15.18
+ json5:
+ specifier: ^2.2.1
+ version: 2.2.3
+ live-server:
+ specifier: ^1.1.0
+ version: 1.2.2
+ typescript:
+ specifier: ^4.8.2
+ version: 4.9.5
+
apps/manifest-demo/3008-webpack-host:
dependencies:
antd:
@@ -1525,7 +1568,7 @@ importers:
version: 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(postcss@8.4.38)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4)
'@modern-js/builder-webpack-provider':
specifier: 2.46.1
- version: 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4)
+ version: 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4)
'@modern-js/eslint-config':
specifier: 2.54.2
version: 2.54.2(@swc/helpers@0.5.3)(typescript@5.0.4)
@@ -1534,7 +1577,7 @@ importers:
version: 2.46.1(typescript@5.0.4)
'@modern-js/storybook':
specifier: 2.46.1
- version: 2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.20.2)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1)
+ version: 2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1)
'@modern-js/tsconfig':
specifier: 2.46.1
version: 2.46.1
@@ -1700,6 +1743,51 @@ importers:
specifier: ^1.2.5
version: 1.2.5
+ packages/esbuild:
+ dependencies:
+ '@chialab/esbuild-plugin-commonjs':
+ specifier: ^0.18.0
+ version: 0.18.0
+ '@hyrious/esbuild-plugin-commonjs':
+ specifier: ^0.2.4
+ version: 0.2.4(cjs-module-lexer@1.3.1)(esbuild@0.18.20)
+ '@module-federation/sdk':
+ specifier: workspace:*
+ version: link:../sdk
+ '@rollup/plugin-commonjs':
+ specifier: ^22.0.2
+ version: 22.0.2(rollup@2.79.1)
+ '@rollup/plugin-node-resolve':
+ specifier: ^13.3.0
+ version: 13.3.0(rollup@2.79.1)
+ '@rollup/plugin-replace':
+ specifier: ^4.0.0
+ version: 4.0.0(rollup@2.79.1)
+ cjs-module-lexer:
+ specifier: ^1.3.1
+ version: 1.3.1
+ enhanced-resolve:
+ specifier: ^5.16.1
+ version: 5.17.0
+ es-module-lexer:
+ specifier: ^1.5.3
+ version: 1.5.4
+ esbuild:
+ specifier: ^0.18.12
+ version: 0.18.20
+ json5:
+ specifier: ^2.2.3
+ version: 2.2.3
+ npmlog:
+ specifier: ^6.0.2
+ version: 6.0.2
+ rollup:
+ specifier: ^2.79.0
+ version: 2.79.1
+ rollup-plugin-node-externals:
+ specifier: ^4.1.1
+ version: 4.1.1(rollup@2.79.1)
+
packages/managers:
dependencies:
'@module-federation/sdk':
@@ -4548,6 +4636,39 @@ packages:
prettier: 2.8.8
dev: true
+ /@chialab/cjs-to-esm@0.18.0:
+ resolution: {integrity: sha512-fm8X9NhPO5pyUB7gxOZgwxb8lVq1UD4syDJCpqh6x4zGME6RTck7BguWZ4Zgv3GML4fQ4KZtyRwP5eoDgNGrmA==}
+ engines: {node: '>=18'}
+ dependencies:
+ '@chialab/estransform': 0.18.1
+
+ /@chialab/esbuild-plugin-commonjs@0.18.0:
+ resolution: {integrity: sha512-qZjIsNr1dVEJk6NLyza3pJLHeY7Fz0xjmYteKXElCnlFSKR7vVg6d18AsxVpRnP5qNbvx3XlOvs9U8j97ZQ6bw==}
+ engines: {node: '>=18'}
+ dependencies:
+ '@chialab/cjs-to-esm': 0.18.0
+ '@chialab/esbuild-rna': 0.18.2
+ dev: false
+
+ /@chialab/esbuild-rna@0.18.2:
+ resolution: {integrity: sha512-ckzskez7bxstVQ4c5cxbx0DRP2teldzrcSGQl2KPh1VJGdO2ZmRrb6vNkBBD5K3dx9tgTyvskWp4dV+Fbg07Ag==}
+ engines: {node: '>=18'}
+ dependencies:
+ '@chialab/estransform': 0.18.1
+ '@chialab/node-resolve': 0.18.0
+ dev: false
+
+ /@chialab/estransform@0.18.1:
+ resolution: {integrity: sha512-W/WmjpQL2hndD0/XfR0FcPBAUj+aLNeoAVehOjV/Q9bSnioz0GVSAXXhzp59S33ZynxJBBfn8DNiMTVNJmk4Aw==}
+ engines: {node: '>=18'}
+ dependencies:
+ '@parcel/source-map': 2.1.1
+
+ /@chialab/node-resolve@0.18.0:
+ resolution: {integrity: sha512-eV1m70Qn9pLY9xwFmZ2FlcOzwiaUywsJ7NB/ud8VB7DouvCQtIHkQ3Om7uPX0ojXGEG1LCyO96kZkvbNTxNu0Q==}
+ engines: {node: '>=18'}
+ dev: false
+
/@colors/colors@1.5.0:
resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
engines: {node: '>=0.1.90'}
@@ -5132,6 +5253,15 @@ packages:
requiresBuild: true
optional: true
+ /@esbuild/android-arm@0.15.18:
+ resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/android-arm@0.17.19:
resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==}
engines: {node: '>=12'}
@@ -5510,6 +5640,15 @@ packages:
requiresBuild: true
optional: true
+ /@esbuild/linux-loong64@0.15.18:
+ resolution: {integrity: sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==}
+ engines: {node: '>=12'}
+ cpu: [loong64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/@esbuild/linux-loong64@0.17.19:
resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==}
engines: {node: '>=12'}
@@ -6185,6 +6324,20 @@ packages:
deprecated: Use @eslint/object-schema instead
dev: true
+ /@hyrious/esbuild-plugin-commonjs@0.2.4(cjs-module-lexer@1.3.1)(esbuild@0.18.20):
+ resolution: {integrity: sha512-NKR8bsDbNP7EpM//cjoo8Bpihmc97gPpnwrggG+18iSGow6oaJpfmy3Bv+oBgPkPlxcGzC9SXh+6szoCoKFvCw==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ cjs-module-lexer: '*'
+ esbuild: '*'
+ peerDependenciesMeta:
+ cjs-module-lexer:
+ optional: true
+ dependencies:
+ cjs-module-lexer: 1.3.1
+ esbuild: 0.18.20
+ dev: false
+
/@iarna/toml@2.2.5:
resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==}
dev: true
@@ -7130,7 +7283,7 @@ packages:
resolve: 1.22.8
dev: true
- /@modern-js/builder-shared@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4):
+ /@modern-js/builder-shared@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4):
resolution: {integrity: sha512-nlniPnfeP+rofd1LX2BBX7Vy2pZkxnBnxK7u8rfT/9XUJzHAbjvPxVPyB8IbBIoL9RnLWWQtvTDpAAbz/jRo+Q==}
engines: {node: '>=14.0.0'}
dependencies:
@@ -7144,14 +7297,14 @@ packages:
'@swc/helpers': 0.5.3
acorn: 8.12.0
caniuse-lite: 1.0.30001636
- css-minimizer-webpack-plugin: 5.0.1(esbuild@0.20.2)(webpack@5.92.1)
+ css-minimizer-webpack-plugin: 5.0.1(esbuild@0.18.20)(webpack@5.92.1)
cssnano: 6.0.1(postcss@8.4.31)
fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.0.4)(webpack@5.92.1)
htmlparser2: 9.0.0
line-diff: 2.1.1
postcss: 8.4.31
source-map: 0.7.4
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
webpack-sources: 3.2.3
zod: 3.23.8
zod-validation-error: 1.2.0(zod@3.23.8)
@@ -7180,13 +7333,13 @@ packages:
- webpack-cli
dev: true
- /@modern-js/builder-webpack-provider@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4):
+ /@modern-js/builder-webpack-provider@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4):
resolution: {integrity: sha512-a891A2kBN/m7YBrddqanjhD2Im9y/58QrGg9zxDzoAZ8DnKf6AM716FR9K8ZS5kWMndiY7247AG2X1sTQtzQ3w==}
engines: {node: '>=14.0.0'}
dependencies:
'@babel/core': 7.24.7
'@babel/preset-react': 7.24.7(@babel/core@7.24.7)
- '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
+ '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
'@modern-js/inspector-webpack-plugin': 1.0.6
'@modern-js/server': 2.46.1(@babel/traverse@7.24.7)(@rsbuild/core@0.3.11)(@types/express@4.17.21)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)
'@modern-js/types': 2.46.1
@@ -7203,10 +7356,10 @@ packages:
postcss: 8.4.31
react-refresh: 0.14.0
style-loader: 3.3.3(webpack@5.92.1)
- terser-webpack-plugin: 5.3.9(@swc/core@1.5.28)(esbuild@0.20.2)(webpack@5.92.1)
+ terser-webpack-plugin: 5.3.9(@swc/core@1.5.28)(esbuild@0.18.20)(webpack@5.92.1)
ts-loader: 9.4.4(typescript@5.0.4)(webpack@5.92.1)
tsconfig-paths-webpack-plugin: 4.1.0
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.5.3)(webpack@5.92.1)
transitivePeerDependencies:
- '@babel/traverse'
@@ -7240,11 +7393,11 @@ packages:
- webpack-plugin-serve
dev: true
- /@modern-js/builder@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4):
+ /@modern-js/builder@2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4):
resolution: {integrity: sha512-zyeGPFk0P+hk8Py24ykofqJVkabVKUMpX4Gidk8oIpdH+lG+2AbAP3OBCeU3jK7PLSUpB5y4UzIkgfb3JjuqWQ==}
engines: {node: '>=14.0.0'}
dependencies:
- '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
+ '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
'@modern-js/utils': 2.46.1
'@rsbuild/monorepo-utils': 0.3.4(@swc/helpers@0.5.3)
'@svgr/webpack': 8.1.0(typescript@5.0.4)
@@ -7696,7 +7849,7 @@ packages:
- utf-8-validate
dev: true
- /@modern-js/storybook-builder@2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.20.2)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1):
+ /@modern-js/storybook-builder@2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1):
resolution: {integrity: sha512-SEc7CX3Tjuua09HUO1ZR6hG2CS3BGMFJFXJFr7hLBy2Nmb9nNlSbjdB6f+ic9VnXGapiceN9TCHt3sxrmc+SIw==}
engines: {node: '>=16.0.0'}
peerDependencies:
@@ -7708,9 +7861,9 @@ packages:
'@modern-js/builder-webpack-provider':
optional: true
dependencies:
- '@modern-js/builder': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
- '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
- '@modern-js/builder-webpack-provider': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.20.2)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4)
+ '@modern-js/builder': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
+ '@modern-js/builder-shared': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)
+ '@modern-js/builder-webpack-provider': 2.46.1(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(esbuild@0.18.20)(react-dom@18.2.0)(react@18.2.0)(styled-components@6.1.11)(ts-node@10.9.2)(typescript@5.0.4)
'@modern-js/core': 2.46.1
'@modern-js/runtime': 2.46.1(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0)(webpack@5.92.1)
'@modern-js/utils': 2.46.1
@@ -7764,12 +7917,12 @@ packages:
- webpack-cli
dev: true
- /@modern-js/storybook@2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.20.2)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1):
+ /@modern-js/storybook@2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1):
resolution: {integrity: sha512-PsXd8yXnkh+NLuPiqV5PEkR3WPKVcrzBEXW6ZgS/IT5AeFvQGzEBIM+Rx2UJORM+lgrKnuDjARUIc9ZQX1C82g==}
engines: {node: '>=16.0.0'}
hasBin: true
dependencies:
- '@modern-js/storybook-builder': 2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.20.2)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1)
+ '@modern-js/storybook-builder': 2.46.1(@modern-js/builder-webpack-provider@2.46.1)(@rsbuild/core@0.3.11)(@swc/core@1.5.28)(@types/express@4.17.21)(@types/react-dom@18.2.25)(@types/react@18.2.79)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@18.2.0)(react-refresh@0.14.0)(react@18.2.0)(ts-node@10.9.2)(typescript@5.0.4)(webpack@5.92.1)
'@modern-js/utils': 2.46.1
'@storybook/react': 7.6.17(encoding@0.1.13)(react-dom@18.2.0)(react@18.2.0)(typescript@5.0.4)
storybook: 7.6.19(encoding@0.1.13)
@@ -10692,6 +10845,12 @@ packages:
resolution: {integrity: sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==}
dev: true
+ /@parcel/source-map@2.1.1:
+ resolution: {integrity: sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==}
+ engines: {node: ^12.18.3 || >=14}
+ dependencies:
+ detect-libc: 1.0.3
+
/@phenomnomnominal/tsquery@5.0.1(typescript@5.2.2):
resolution: {integrity: sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==}
peerDependencies:
@@ -10778,7 +10937,7 @@ packages:
react-refresh: 0.14.0
schema-utils: 3.3.0
source-map: 0.7.4
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/@pmmmwh/react-refresh-webpack-plugin@0.5.11(react-refresh@0.14.0)(webpack@5.92.1):
@@ -12381,6 +12540,22 @@ packages:
rollup: 2.79.1
dev: true
+ /@rollup/plugin-commonjs@22.0.2(rollup@2.79.1):
+ resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==}
+ engines: {node: '>= 12.0.0'}
+ peerDependencies:
+ rollup: ^2.68.0
+ dependencies:
+ '@rollup/pluginutils': 3.1.0(rollup@2.79.1)
+ commondir: 1.0.1
+ estree-walker: 2.0.2
+ glob: 7.2.3
+ is-reference: 1.2.1
+ magic-string: 0.25.9
+ resolve: 1.22.8
+ rollup: 2.79.1
+ dev: false
+
/@rollup/plugin-image@2.1.1(rollup@2.79.1):
resolution: {integrity: sha512-AgP4U85zuQJdUopLUCM+hTf45RepgXeTb8EJsleExVy99dIoYpt3ZlDYJdKmAc2KLkNntCDg6BPJvgJU3uGF+g==}
engines: {node: '>= 8.0.0'}
@@ -12414,7 +12589,16 @@ packages:
is-module: 1.0.0
resolve: 1.22.8
rollup: 2.79.1
- dev: true
+
+ /@rollup/plugin-replace@4.0.0(rollup@2.79.1):
+ resolution: {integrity: sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==}
+ peerDependencies:
+ rollup: ^1.20.0 || ^2.0.0
+ dependencies:
+ '@rollup/pluginutils': 3.1.0(rollup@2.79.1)
+ magic-string: 0.25.9
+ rollup: 2.79.1
+ dev: false
/@rollup/plugin-replace@5.0.5(rollup@2.79.1):
resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==}
@@ -12440,7 +12624,6 @@ packages:
estree-walker: 1.0.1
picomatch: 2.3.1
rollup: 2.79.1
- dev: true
/@rollup/pluginutils@4.1.1:
resolution: {integrity: sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==}
@@ -14751,10 +14934,10 @@ packages:
'@storybook/manager': 8.1.1
'@storybook/node-logger': 8.1.1
'@types/ejs': 3.1.5
- '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.20.2)
+ '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.18.20)
browser-assert: 1.2.1
ejs: 3.1.10
- esbuild: 0.20.2
+ esbuild: 0.18.20
esbuild-plugin-alias: 0.2.1
express: 4.19.2
fs-extra: 11.2.0
@@ -15305,8 +15488,8 @@ packages:
'@yarnpkg/libzip': 2.3.0
chalk: 4.1.2
cross-spawn: 7.0.3
- esbuild: 0.20.2
- esbuild-register: 3.5.0(esbuild@0.20.2)
+ esbuild: 0.18.20
+ esbuild-register: 3.5.0(esbuild@0.18.20)
execa: 5.1.1
file-system-cache: 2.3.0
find-cache-dir: 3.3.2
@@ -15348,8 +15531,8 @@ packages:
'@yarnpkg/libzip': 2.3.0
chalk: 4.1.2
cross-spawn: 7.0.3
- esbuild: 0.20.2
- esbuild-register: 3.5.0(esbuild@0.20.2)
+ esbuild: 0.18.20
+ esbuild-register: 3.5.0(esbuild@0.18.20)
execa: 5.1.1
file-system-cache: 2.3.0
find-cache-dir: 3.3.2
@@ -15940,7 +16123,7 @@ packages:
react-docgen-typescript: 2.2.2(typescript@5.0.4)
tslib: 2.6.2
typescript: 5.0.4
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
transitivePeerDependencies:
- supports-color
dev: true
@@ -17146,7 +17329,6 @@ packages:
/@types/estree@0.0.39:
resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
- dev: true
/@types/estree@0.0.51:
resolution: {integrity: sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==}
@@ -17527,7 +17709,6 @@ packages:
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
dependencies:
'@types/node': 20.12.12
- dev: true
/@types/responselike@1.0.3:
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
@@ -18785,16 +18966,6 @@ packages:
tslib: 2.6.2
dev: true
- /@yarnpkg/esbuild-plugin-pnp@3.0.0-rc.15(esbuild@0.20.2):
- resolution: {integrity: sha512-kYzDJO5CA9sy+on/s2aIW0411AklfCi8Ck/4QDivOqsMKpStZA2SsR+X27VTggGwpStWaLrjJcDcdDMowtG8MA==}
- engines: {node: '>=14.15.0'}
- peerDependencies:
- esbuild: '>=0.10.0'
- dependencies:
- esbuild: 0.20.2
- tslib: 2.6.2
- dev: true
-
/@yarnpkg/fslib@2.10.3:
resolution: {integrity: sha512-41H+Ga78xT9sHvWLlFOZLIhtU6mTGZ20pZ29EiZa97vnxdohJD2AF42rCoAoWfqUz486xY6fhjMH+DYEM9r14A==}
engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'}
@@ -19116,6 +19287,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /ansi-regex@4.1.1:
+ resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==}
+ engines: {node: '>=6'}
+ dev: true
+
/ansi-regex@5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
@@ -19404,7 +19580,6 @@ packages:
transitivePeerDependencies:
- supports-color
dev: true
- optional: true
/anymatch@3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
@@ -19413,6 +19588,13 @@ packages:
normalize-path: 3.0.0
picomatch: 2.3.1
+ /apache-crypt@1.2.6:
+ resolution: {integrity: sha512-072WetlM4blL8PREJVeY+WHiUh1R5VNt2HfceGS8aKqttPHcmqE5pkKuXPz/ULmJOFkc8Hw3kfKl6vy7Qka6DA==}
+ engines: {node: '>=8'}
+ dependencies:
+ unix-crypt-td-js: 1.1.4
+ dev: true
+
/apache-md5@1.1.8:
resolution: {integrity: sha512-FCAJojipPn0bXjuEpjOOOMN8FZDkxfWWp4JGN9mifU2IhxvKyXZYqpzPHdnTSUpmPDy+tsslB6Z1g+Vg6nVbYA==}
engines: {node: '>=8'}
@@ -19435,7 +19617,6 @@ packages:
/aproba@2.0.0:
resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==}
- dev: true
/arch@2.2.0:
resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==}
@@ -19450,6 +19631,15 @@ packages:
readable-stream: 3.6.2
dev: true
+ /are-we-there-yet@3.0.1:
+ resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==}
+ engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
+ deprecated: This package is no longer supported.
+ dependencies:
+ delegates: 1.0.0
+ readable-stream: 3.6.2
+ dev: false
+
/arg@4.1.3:
resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}
@@ -19731,7 +19921,6 @@ packages:
resolution: {integrity: sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==}
requiresBuild: true
dev: true
- optional: true
/async-limiter@1.0.1:
resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==}
@@ -20265,7 +20454,6 @@ packages:
engines: {node: '>=0.10.0'}
requiresBuild: true
dev: true
- optional: true
/binary-extensions@2.3.0:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
@@ -20401,7 +20589,6 @@ packages:
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
- dev: true
/brace-expansion@2.0.1:
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
@@ -20586,7 +20773,6 @@ packages:
/builtin-modules@3.3.0:
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
engines: {node: '>=6'}
- dev: true
/builtin-status-codes@3.0.0:
resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==}
@@ -20957,7 +21143,6 @@ packages:
transitivePeerDependencies:
- supports-color
dev: true
- optional: true
/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
@@ -21021,7 +21206,6 @@ packages:
/cjs-module-lexer@1.3.1:
resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==}
- dev: true
/class-utils@0.3.6:
resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==}
@@ -21138,6 +21322,14 @@ packages:
typanion: 3.14.0
dev: true
+ /cliui@5.0.0:
+ resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==}
+ dependencies:
+ string-width: 3.1.0
+ strip-ansi: 5.2.0
+ wrap-ansi: 5.1.0
+ dev: true
+
/cliui@6.0.0:
resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
dependencies:
@@ -21262,7 +21454,6 @@ packages:
/color-support@1.1.3:
resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==}
hasBin: true
- dev: true
/color@3.2.1:
resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==}
@@ -21290,6 +21481,11 @@ packages:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
dev: true
+ /colors@1.4.0:
+ resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==}
+ engines: {node: '>=0.1.90'}
+ dev: true
+
/columnify@1.6.0:
resolution: {integrity: sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==}
engines: {node: '>=8.0.0'}
@@ -21411,7 +21607,6 @@ packages:
/commondir@1.0.1:
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
- dev: true
/compare-func@2.0.0:
resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==}
@@ -21463,7 +21658,6 @@ packages:
/concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
- dev: true
/concat-stream@1.6.2:
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
@@ -21481,6 +21675,22 @@ packages:
source-map: 0.6.1
dev: true
+ /concurrently@5.3.0:
+ resolution: {integrity: sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+ dependencies:
+ chalk: 2.4.2
+ date-fns: 2.30.0
+ lodash: 4.17.21
+ read-pkg: 4.0.1
+ rxjs: 6.6.7
+ spawn-command: 0.0.2
+ supports-color: 6.1.0
+ tree-kill: 1.2.2
+ yargs: 13.3.2
+ dev: true
+
/concurrently@8.2.2:
resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==}
engines: {node: ^14.13.0 || >=16.0.0}
@@ -21517,6 +21727,18 @@ packages:
engines: {node: '>=0.8'}
dev: true
+ /connect@3.7.0:
+ resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==}
+ engines: {node: '>= 0.10.0'}
+ dependencies:
+ debug: 2.6.9
+ finalhandler: 1.1.2
+ parseurl: 1.3.3
+ utils-merge: 1.0.1
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/consola@3.2.3:
resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==}
engines: {node: ^14.18.0 || >=16.10.0}
@@ -21528,7 +21750,6 @@ packages:
/console-control-strings@1.1.0:
resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}
- dev: true
/constantinople@4.0.1:
resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==}
@@ -22138,41 +22359,6 @@ packages:
webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
- /css-minimizer-webpack-plugin@5.0.1(esbuild@0.20.2)(webpack@5.92.1):
- resolution: {integrity: sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==}
- engines: {node: '>= 14.15.0'}
- peerDependencies:
- '@parcel/css': '*'
- '@swc/css': '*'
- clean-css: '*'
- csso: '*'
- esbuild: '*'
- lightningcss: '*'
- webpack: ^5.0.0
- peerDependenciesMeta:
- '@parcel/css':
- optional: true
- '@swc/css':
- optional: true
- clean-css:
- optional: true
- csso:
- optional: true
- esbuild:
- optional: true
- lightningcss:
- optional: true
- dependencies:
- '@jridgewell/trace-mapping': 0.3.25
- cssnano: 6.1.2(postcss@8.4.38)
- esbuild: 0.20.2
- jest-worker: 29.7.0
- postcss: 8.4.38
- schema-utils: 4.2.0
- serialize-javascript: 6.0.2
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
- dev: true
-
/css-minimizer-webpack-plugin@5.0.1(esbuild@0.21.4)(webpack@5.92.1):
resolution: {integrity: sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==}
engines: {node: '>= 14.15.0'}
@@ -23096,6 +23282,11 @@ packages:
engines: {node: '>=8'}
dev: true
+ /detect-libc@1.0.3:
+ resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
+ engines: {node: '>=0.10'}
+ hasBin: true
+
/detect-libc@2.0.3:
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
engines: {node: '>=8'}
@@ -23404,6 +23595,10 @@ packages:
engines: {node: '>=12'}
dev: true
+ /emoji-regex@7.0.3:
+ resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==}
+ dev: true
+
/emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -23464,6 +23659,7 @@ packages:
dependencies:
graceful-fs: 4.2.11
tapable: 2.2.1
+ dev: false
/enhanced-resolve@5.17.0:
resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==}
@@ -23720,6 +23916,150 @@ packages:
ext: 1.7.0
dev: false
+ /esbuild-android-64@0.15.18:
+ resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-android-arm64@0.15.18:
+ resolution: {integrity: sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [android]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-darwin-64@0.15.18:
+ resolution: {integrity: sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [darwin]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-darwin-arm64@0.15.18:
+ resolution: {integrity: sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [darwin]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-freebsd-64@0.15.18:
+ resolution: {integrity: sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [freebsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-freebsd-arm64@0.15.18:
+ resolution: {integrity: sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [freebsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-32@0.15.18:
+ resolution: {integrity: sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-64@0.15.18:
+ resolution: {integrity: sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-arm64@0.15.18:
+ resolution: {integrity: sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-arm@0.15.18:
+ resolution: {integrity: sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-mips64le@0.15.18:
+ resolution: {integrity: sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==}
+ engines: {node: '>=12'}
+ cpu: [mips64el]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-ppc64le@0.15.18:
+ resolution: {integrity: sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==}
+ engines: {node: '>=12'}
+ cpu: [ppc64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-riscv64@0.15.18:
+ resolution: {integrity: sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==}
+ engines: {node: '>=12'}
+ cpu: [riscv64]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-linux-s390x@0.15.18:
+ resolution: {integrity: sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==}
+ engines: {node: '>=12'}
+ cpu: [s390x]
+ os: [linux]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-netbsd-64@0.15.18:
+ resolution: {integrity: sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [netbsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-openbsd-64@0.15.18:
+ resolution: {integrity: sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [openbsd]
+ requiresBuild: true
+ dev: true
+ optional: true
+
/esbuild-plugin-alias@0.2.1:
resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==}
dev: true
@@ -23735,15 +24075,70 @@ packages:
- supports-color
dev: true
- /esbuild-register@3.5.0(esbuild@0.20.2):
- resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==}
- peerDependencies:
- esbuild: '>=0.12 <1'
- dependencies:
- debug: 4.3.5(supports-color@5.5.0)
- esbuild: 0.20.2
- transitivePeerDependencies:
- - supports-color
+ /esbuild-sunos-64@0.15.18:
+ resolution: {integrity: sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [sunos]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-windows-32@0.15.18:
+ resolution: {integrity: sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-windows-64@0.15.18:
+ resolution: {integrity: sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild-windows-arm64@0.15.18:
+ resolution: {integrity: sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [win32]
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /esbuild@0.15.18:
+ resolution: {integrity: sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==}
+ engines: {node: '>=12'}
+ hasBin: true
+ requiresBuild: true
+ optionalDependencies:
+ '@esbuild/android-arm': 0.15.18
+ '@esbuild/linux-loong64': 0.15.18
+ esbuild-android-64: 0.15.18
+ esbuild-android-arm64: 0.15.18
+ esbuild-darwin-64: 0.15.18
+ esbuild-darwin-arm64: 0.15.18
+ esbuild-freebsd-64: 0.15.18
+ esbuild-freebsd-arm64: 0.15.18
+ esbuild-linux-32: 0.15.18
+ esbuild-linux-64: 0.15.18
+ esbuild-linux-arm: 0.15.18
+ esbuild-linux-arm64: 0.15.18
+ esbuild-linux-mips64le: 0.15.18
+ esbuild-linux-ppc64le: 0.15.18
+ esbuild-linux-riscv64: 0.15.18
+ esbuild-linux-s390x: 0.15.18
+ esbuild-netbsd-64: 0.15.18
+ esbuild-openbsd-64: 0.15.18
+ esbuild-sunos-64: 0.15.18
+ esbuild-windows-32: 0.15.18
+ esbuild-windows-64: 0.15.18
+ esbuild-windows-arm64: 0.15.18
dev: true
/esbuild@0.17.19:
@@ -23992,7 +24387,7 @@ packages:
eslint-plugin-import: '*'
dependencies:
debug: 4.3.5(supports-color@5.5.0)
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
eslint: 8.56.0
eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
@@ -24505,7 +24900,6 @@ packages:
/estree-walker@1.0.1:
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
- dev: true
/estree-walker@2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
@@ -24531,6 +24925,18 @@ packages:
es5-ext: 0.10.64
dev: false
+ /event-stream@3.3.4:
+ resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==}
+ dependencies:
+ duplexer: 0.1.2
+ from: 0.1.7
+ map-stream: 0.1.0
+ pause-stream: 0.0.11
+ split: 0.3.3
+ stream-combiner: 0.0.4
+ through: 2.3.8
+ dev: true
+
/event-target-shim@5.0.1:
resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
engines: {node: '>=6'}
@@ -25130,6 +25536,21 @@ packages:
dependencies:
to-regex-range: 5.0.1
+ /finalhandler@1.1.2:
+ resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==}
+ engines: {node: '>= 0.8'}
+ dependencies:
+ debug: 2.6.9
+ encodeurl: 1.0.2
+ escape-html: 1.0.3
+ on-finished: 2.3.0
+ parseurl: 1.3.3
+ statuses: 1.5.0
+ unpipe: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/finalhandler@1.2.0:
resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==}
engines: {node: '>= 0.8'}
@@ -25234,7 +25655,6 @@ packages:
dependencies:
locate-path: 6.0.0
path-exists: 4.0.0
- dev: true
/find-up@6.3.0:
resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==}
@@ -25454,7 +25874,7 @@ packages:
semver: 7.6.2
tapable: 2.2.1
typescript: 5.0.4
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/fork-ts-checker-webpack-plugin@8.0.0(typescript@5.5.2)(webpack@5.92.1):
@@ -25584,6 +26004,10 @@ packages:
readable-stream: 2.3.8
dev: true
+ /from@0.1.7:
+ resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==}
+ dev: true
+
/front-matter@4.0.2:
resolution: {integrity: sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==}
dependencies:
@@ -25685,7 +26109,6 @@ packages:
/fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
- dev: true
/fsevents@1.2.13:
resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==}
@@ -25752,6 +26175,21 @@ packages:
wide-align: 1.1.5
dev: true
+ /gauge@4.0.4:
+ resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==}
+ engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
+ deprecated: This package is no longer supported.
+ dependencies:
+ aproba: 2.0.0
+ color-support: 1.1.3
+ console-control-strings: 1.1.0
+ has-unicode: 2.0.1
+ signal-exit: 3.0.7
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ wide-align: 1.1.5
+ dev: false
+
/generic-names@4.0.0:
resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==}
dependencies:
@@ -26062,7 +26500,6 @@ packages:
minimatch: 3.1.2
once: 1.4.0
path-is-absolute: 1.0.1
- dev: true
/glob@8.1.0:
resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
@@ -26351,7 +26788,6 @@ packages:
/has-unicode@2.0.1:
resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}
- dev: true
/has-value@0.3.1:
resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==}
@@ -26813,7 +27249,7 @@ packages:
lodash: 4.17.21
pretty-error: 4.0.0
tapable: 2.2.1
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/html-webpack-plugin@5.6.0(@rspack/core@0.5.9)(webpack@5.92.1):
@@ -26881,6 +27317,16 @@ packages:
http-errors: 1.8.1
dev: false
+ /http-auth@3.1.3:
+ resolution: {integrity: sha512-Jbx0+ejo2IOx+cRUYAGS1z6RGc6JfYUNkysZM4u4Sfk1uLlGv814F7/PIjQQAuThLdAWxb74JMGd5J8zex1VQg==}
+ engines: {node: '>=4.6.1'}
+ dependencies:
+ apache-crypt: 1.2.6
+ apache-md5: 1.1.8
+ bcryptjs: 2.4.3
+ uuid: 3.4.0
+ dev: true
+
/http-cache-semantics@4.1.1:
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
dev: true
@@ -27256,7 +27702,6 @@ packages:
dependencies:
once: 1.4.0
wrappy: 1.0.2
- dev: true
/inherits@2.0.3:
resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==}
@@ -27445,7 +27890,6 @@ packages:
dependencies:
binary-extensions: 1.13.1
dev: true
- optional: true
/is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
@@ -27474,7 +27918,6 @@ packages:
engines: {node: '>=6'}
dependencies:
builtin-modules: 3.3.0
- dev: true
/is-callable@1.2.7:
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
@@ -27580,6 +28023,11 @@ packages:
call-bind: 1.0.7
dev: true
+ /is-fullwidth-code-point@2.0.0:
+ resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==}
+ engines: {node: '>=4'}
+ dev: true
+
/is-fullwidth-code-point@3.0.0:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
@@ -27663,7 +28111,6 @@ packages:
/is-module@1.0.0:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
- dev: true
/is-nan@1.3.2:
resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
@@ -27768,7 +28215,6 @@ packages:
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
dependencies:
'@types/estree': 1.0.5
- dev: true
/is-reference@3.0.2:
resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==}
@@ -29264,6 +29710,28 @@ packages:
wrap-ansi: 7.0.0
dev: true
+ /live-server@1.2.2:
+ resolution: {integrity: sha512-t28HXLjITRGoMSrCOv4eZ88viHaBVIjKjdI5PO92Vxlu+twbk6aE0t7dVIaz6ZWkjPilYFV6OSdMYl9ybN2B4w==}
+ engines: {node: '>=0.10.0'}
+ hasBin: true
+ dependencies:
+ chokidar: 2.1.8
+ colors: 1.4.0
+ connect: 3.7.0
+ cors: 2.8.5
+ event-stream: 3.3.4
+ faye-websocket: 0.11.4
+ http-auth: 3.1.3
+ morgan: 1.10.0
+ object-assign: 4.1.1
+ opn: 6.0.0
+ proxy-middleware: 0.15.0
+ send: 0.18.0
+ serve-index: 1.9.1
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/load-json-file@4.0.0:
resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==}
engines: {node: '>=4'}
@@ -29356,7 +29824,6 @@ packages:
engines: {node: '>=10'}
dependencies:
p-locate: 5.0.0
- dev: true
/locate-path@7.2.0:
resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==}
@@ -29628,7 +30095,6 @@ packages:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
dependencies:
sourcemap-codec: 1.4.8
- dev: true
/magic-string@0.30.10:
resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
@@ -29706,6 +30172,10 @@ packages:
resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==}
dev: true
+ /map-stream@0.1.0:
+ resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==}
+ dev: true
+
/map-visit@1.0.0:
resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==}
engines: {node: '>=0.10.0'}
@@ -30517,7 +30987,7 @@ packages:
webpack: ^5.0.0
dependencies:
schema-utils: 4.2.0
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/mini-css-extract-plugin@2.7.7(webpack@5.92.1):
@@ -30559,7 +31029,6 @@ packages:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
dependencies:
brace-expansion: 1.1.11
- dev: true
/minimatch@5.1.6:
resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
@@ -30714,6 +31183,19 @@ packages:
resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==}
dev: false
+ /morgan@1.10.0:
+ resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==}
+ engines: {node: '>= 0.8.0'}
+ dependencies:
+ basic-auth: 2.0.1
+ debug: 2.6.9
+ depd: 2.0.0
+ on-finished: 2.3.0
+ on-headers: 1.0.2
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/move-concurrently@1.0.1:
resolution: {integrity: sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==}
deprecated: This package is no longer supported.
@@ -31251,6 +31733,17 @@ packages:
set-blocking: 2.0.0
dev: true
+ /npmlog@6.0.2:
+ resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==}
+ engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
+ deprecated: This package is no longer supported.
+ dependencies:
+ are-we-there-yet: 3.0.1
+ console-control-strings: 1.1.0
+ gauge: 4.0.4
+ set-blocking: 2.0.0
+ dev: false
+
/nprogress@0.2.0:
resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==}
dev: false
@@ -31693,6 +32186,13 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
+ /on-finished@2.3.0:
+ resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==}
+ engines: {node: '>= 0.8'}
+ dependencies:
+ ee-first: 1.1.1
+ dev: true
+
/on-finished@2.4.1:
resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
engines: {node: '>= 0.8'}
@@ -31708,7 +32208,6 @@ packages:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies:
wrappy: 1.0.2
- dev: true
/onetime@5.1.2:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
@@ -31751,6 +32250,14 @@ packages:
hasBin: true
dev: true
+ /opn@6.0.0:
+ resolution: {integrity: sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==}
+ engines: {node: '>=8'}
+ deprecated: The package has been renamed to `open`
+ dependencies:
+ is-wsl: 1.1.0
+ dev: true
+
/optionator@0.9.4:
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
@@ -31884,7 +32391,6 @@ packages:
engines: {node: '>=10'}
dependencies:
yocto-queue: 0.1.0
- dev: true
/p-limit@4.0.0:
resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==}
@@ -31926,7 +32432,6 @@ packages:
engines: {node: '>=10'}
dependencies:
p-limit: 3.1.0
- dev: true
/p-locate@6.0.0:
resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==}
@@ -32165,7 +32670,6 @@ packages:
/path-exists@4.0.0:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
- dev: true
/path-exists@5.0.0:
resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}
@@ -32175,7 +32679,6 @@ packages:
/path-is-absolute@1.0.1:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
- dev: true
/path-key@2.0.1:
resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==}
@@ -32231,6 +32734,12 @@ packages:
resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
dev: true
+ /pause-stream@0.0.11:
+ resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==}
+ dependencies:
+ through: 2.3.8
+ dev: true
+
/pbkdf2@3.1.2:
resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==}
engines: {node: '>=0.12'}
@@ -33865,6 +34374,11 @@ packages:
/proxy-from-env@1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
+ /proxy-middleware@0.15.0:
+ resolution: {integrity: sha512-EGCG8SeoIRVMhsqHQUdDigB2i7qU7fCsWASwn54+nPutYO8n4q6EiwMzyfWlC+dzRFExP+kvcnDFdBDHoZBU7Q==}
+ engines: {node: '>=0.8.0'}
+ dev: true
+
/prr@1.0.1:
resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
requiresBuild: true
@@ -36238,6 +36752,15 @@ packages:
type-fest: 0.8.1
dev: true
+ /read-pkg@4.0.1:
+ resolution: {integrity: sha512-+UBirHHDm5J+3WDmLBZYSklRYg82nMlz+enn+GMZ22nSR2f4bzxmhso6rzQW/3mT2PVzpzDTiYIZahk8UmZ44w==}
+ engines: {node: '>=6'}
+ dependencies:
+ normalize-package-data: 2.5.0
+ parse-json: 4.0.0
+ pify: 3.0.0
+ dev: true
+
/read-pkg@5.2.0:
resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==}
engines: {node: '>=8'}
@@ -36288,7 +36811,6 @@ packages:
inherits: 2.0.4
string_decoder: 1.3.0
util-deprecate: 1.0.2
- dev: true
/readable-stream@4.5.2:
resolution: {integrity: sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==}
@@ -36319,7 +36841,6 @@ packages:
transitivePeerDependencies:
- supports-color
dev: true
- optional: true
/readdirp@3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
@@ -36910,6 +37431,16 @@ packages:
is-plain-object: 3.0.1
dev: true
+ /rollup-plugin-node-externals@4.1.1(rollup@2.79.1):
+ resolution: {integrity: sha512-hiGCMTKHVoueaTmtcUv1KR0/dlNBuI9GYzHUlSHQbMd7T7yomYdXCFnBisoBqdZYy61EGAIfz8AvJaWWBho3Pg==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^2.60.0
+ dependencies:
+ find-up: 5.0.0
+ rollup: 2.79.1
+ dev: false
+
/rollup-plugin-peer-deps-external@2.2.4(rollup@2.79.1):
resolution: {integrity: sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==}
peerDependencies:
@@ -36969,7 +37500,6 @@ packages:
hasBin: true
optionalDependencies:
fsevents: 2.3.3
- dev: true
/rollup@3.29.4:
resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==}
@@ -37070,6 +37600,13 @@ packages:
aproba: 1.2.0
dev: true
+ /rxjs@6.6.7:
+ resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==}
+ engines: {npm: '>=2.0.0'}
+ dependencies:
+ tslib: 1.14.1
+ dev: true
+
/rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
dependencies:
@@ -37667,7 +38204,6 @@ packages:
/set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
- dev: true
/set-cookie-parser@2.6.0:
resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==}
@@ -38088,7 +38624,6 @@ packages:
/sourcemap-codec@1.4.8:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
deprecated: Please use @jridgewell/sourcemap-codec instead
- dev: true
/space-separated-tokens@1.1.5:
resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==}
@@ -38177,6 +38712,12 @@ packages:
engines: {node: '>= 10.x'}
dev: true
+ /split@0.3.3:
+ resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==}
+ dependencies:
+ through: 2.3.8
+ dev: true
+
/sprintf-js@1.0.3:
resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==}
@@ -38289,6 +38830,12 @@ packages:
readable-stream: 2.3.8
dev: true
+ /stream-combiner@0.0.4:
+ resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==}
+ dependencies:
+ duplexer: 0.1.2
+ dev: true
+
/stream-composer@1.0.2:
resolution: {integrity: sha512-bnBselmwfX5K10AH6L4c8+S5lgZMWI7ZYrz2rvYjCPB2DIMC4Ig8OpxGpNJSxRZ58oti7y1IcNvjBAz9vW5m4w==}
dependencies:
@@ -38381,6 +38928,15 @@ packages:
strip-ansi: 6.0.1
dev: true
+ /string-width@3.1.0:
+ resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==}
+ engines: {node: '>=6'}
+ dependencies:
+ emoji-regex: 7.0.3
+ is-fullwidth-code-point: 2.0.0
+ strip-ansi: 5.2.0
+ dev: true
+
/string-width@4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
@@ -38472,7 +39028,6 @@ packages:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
dependencies:
safe-buffer: 5.2.1
- dev: true
/stringify-entities@4.0.4:
resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==}
@@ -38487,6 +39042,13 @@ packages:
ansi-regex: 2.1.1
dev: true
+ /strip-ansi@5.2.0:
+ resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==}
+ engines: {node: '>=6'}
+ dependencies:
+ ansi-regex: 4.1.1
+ dev: true
+
/strip-ansi@6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
@@ -38600,7 +39162,7 @@ packages:
peerDependencies:
webpack: ^5.0.0
dependencies:
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/style-loader@3.3.4(webpack@5.92.1):
@@ -38839,6 +39401,13 @@ packages:
dependencies:
has-flag: 3.0.0
+ /supports-color@6.1.0:
+ resolution: {integrity: sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==}
+ engines: {node: '>=6'}
+ dependencies:
+ has-flag: 3.0.0
+ dev: true
+
/supports-color@7.2.0:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
@@ -39245,32 +39814,6 @@ packages:
webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
- /terser-webpack-plugin@5.3.10(@swc/core@1.5.28)(esbuild@0.20.2)(webpack@5.92.1):
- resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==}
- engines: {node: '>= 10.13.0'}
- peerDependencies:
- '@swc/core': '*'
- esbuild: '*'
- uglify-js: '*'
- webpack: ^5.1.0
- peerDependenciesMeta:
- '@swc/core':
- optional: true
- esbuild:
- optional: true
- uglify-js:
- optional: true
- dependencies:
- '@jridgewell/trace-mapping': 0.3.25
- '@swc/core': 1.5.28(@swc/helpers@0.5.3)
- esbuild: 0.20.2
- jest-worker: 27.5.1
- schema-utils: 3.3.0
- serialize-javascript: 6.0.2
- terser: 5.31.1
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
- dev: true
-
/terser-webpack-plugin@5.3.10(@swc/core@1.5.28)(esbuild@0.21.4)(webpack@5.76.0):
resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==}
engines: {node: '>= 10.13.0'}
@@ -39348,7 +39891,7 @@ packages:
webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.17.19)
dev: true
- /terser-webpack-plugin@5.3.9(@swc/core@1.5.28)(esbuild@0.20.2)(webpack@5.92.1):
+ /terser-webpack-plugin@5.3.9(@swc/core@1.5.28)(esbuild@0.18.20)(webpack@5.92.1):
resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -39366,12 +39909,12 @@ packages:
dependencies:
'@jridgewell/trace-mapping': 0.3.25
'@swc/core': 1.5.28(@swc/helpers@0.5.3)
- esbuild: 0.20.2
+ esbuild: 0.18.20
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.31.1
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/terser@4.8.1:
@@ -39767,11 +40310,11 @@ packages:
webpack: ^5.0.0
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
micromatch: 4.0.7
semver: 7.6.2
typescript: 5.0.4
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/ts-loader@9.5.1(typescript@5.5.2)(webpack@5.92.1):
@@ -39782,7 +40325,7 @@ packages:
webpack: ^5.0.0
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
micromatch: 4.0.7
semver: 7.6.2
source-map: 0.7.4
@@ -39967,7 +40510,7 @@ packages:
engines: {node: '>=10.13.0'}
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
tsconfig-paths: 4.2.0
dev: true
@@ -39976,7 +40519,7 @@ packages:
engines: {node: '>=10.13.0'}
dependencies:
chalk: 4.1.2
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
tsconfig-paths: 4.2.0
dev: true
@@ -40276,6 +40819,12 @@ packages:
typescript: 5.5.2
dev: false
+ /typescript@4.9.5:
+ resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
+ engines: {node: '>=4.2.0'}
+ hasBin: true
+ dev: true
+
/typescript@5.0.4:
resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==}
engines: {node: '>=12.20'}
@@ -40672,7 +41221,6 @@ packages:
engines: {node: '>=4'}
requiresBuild: true
dev: true
- optional: true
/upath@2.0.1:
resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==}
@@ -40858,6 +41406,12 @@ packages:
resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}
engines: {node: '>= 0.4.0'}
+ /uuid@3.4.0:
+ resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
+ deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
+ hasBin: true
+ dev: true
+
/uuid@8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
@@ -41881,7 +42435,7 @@ packages:
dependencies:
html-webpack-plugin: 5.5.3(webpack@5.92.1)
typed-assert: 1.0.9
- webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.20.2)
+ webpack: 5.92.1(@swc/core@1.5.28)(esbuild@0.18.20)
dev: true
/webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.0)(webpack@5.92.1):
@@ -41969,7 +42523,7 @@ packages:
acorn-import-assertions: 1.9.0(acorn@8.12.0)
browserslist: 4.23.1
chrome-trace-event: 1.0.3
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
es-module-lexer: 0.9.3
eslint-scope: 5.1.1
events: 3.3.0
@@ -42009,7 +42563,7 @@ packages:
acorn-import-assertions: 1.9.0(acorn@8.12.0)
browserslist: 4.23.1
chrome-trace-event: 1.0.3
- enhanced-resolve: 5.15.0
+ enhanced-resolve: 5.17.0
es-module-lexer: 1.5.4
eslint-scope: 5.1.1
events: 3.3.0
@@ -42110,46 +42664,6 @@ packages:
- uglify-js
dev: true
- /webpack@5.92.1(@swc/core@1.5.28)(esbuild@0.20.2):
- resolution: {integrity: sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==}
- engines: {node: '>=10.13.0'}
- hasBin: true
- peerDependencies:
- webpack-cli: '*'
- peerDependenciesMeta:
- webpack-cli:
- optional: true
- dependencies:
- '@types/eslint-scope': 3.7.7
- '@types/estree': 1.0.5
- '@webassemblyjs/ast': 1.12.1
- '@webassemblyjs/wasm-edit': 1.12.1
- '@webassemblyjs/wasm-parser': 1.12.1
- acorn: 8.12.0
- acorn-import-attributes: 1.9.5(acorn@8.12.0)
- browserslist: 4.23.1
- chrome-trace-event: 1.0.3
- enhanced-resolve: 5.17.0
- es-module-lexer: 1.5.4
- eslint-scope: 5.1.1
- events: 3.3.0
- glob-to-regexp: 0.4.1
- graceful-fs: 4.2.11
- json-parse-even-better-errors: 2.3.1
- loader-runner: 4.3.0
- mime-types: 2.1.35
- neo-async: 2.6.2
- schema-utils: 3.3.0
- tapable: 2.2.1
- terser-webpack-plugin: 5.3.10(@swc/core@1.5.28)(esbuild@0.20.2)(webpack@5.92.1)
- watchpack: 2.4.1
- webpack-sources: 3.2.3
- transitivePeerDependencies:
- - '@swc/core'
- - esbuild
- - uglify-js
- dev: true
-
/webpack@5.92.1(@swc/core@1.5.28)(esbuild@0.21.4):
resolution: {integrity: sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==}
engines: {node: '>=10.13.0'}
@@ -42347,7 +42861,6 @@ packages:
resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
dependencies:
string-width: 4.2.3
- dev: true
/wildcard@2.0.1:
resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==}
@@ -42386,6 +42899,15 @@ packages:
errno: 0.1.8
dev: true
+ /wrap-ansi@5.1.0:
+ resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==}
+ engines: {node: '>=6'}
+ dependencies:
+ ansi-styles: 3.2.1
+ string-width: 3.1.0
+ strip-ansi: 5.2.0
+ dev: true
+
/wrap-ansi@6.2.0:
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
engines: {node: '>=8'}
@@ -42413,7 +42935,6 @@ packages:
/wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
- dev: true
/write-file-atomic@2.4.3:
resolution: {integrity: sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==}
@@ -42557,6 +43078,13 @@ packages:
engines: {node: '>= 14'}
hasBin: true
+ /yargs-parser@13.1.2:
+ resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==}
+ dependencies:
+ camelcase: 5.3.1
+ decamelize: 1.2.0
+ dev: true
+
/yargs-parser@18.1.3:
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
engines: {node: '>=6'}
@@ -42575,6 +43103,21 @@ packages:
engines: {node: '>=12'}
dev: true
+ /yargs@13.3.2:
+ resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==}
+ dependencies:
+ cliui: 5.0.0
+ find-up: 3.0.0
+ get-caller-file: 2.0.5
+ require-directory: 2.1.1
+ require-main-filename: 2.0.0
+ set-blocking: 2.0.0
+ string-width: 3.1.0
+ which-module: 2.0.1
+ y18n: 4.0.3
+ yargs-parser: 13.1.2
+ dev: true
+
/yargs@15.4.1:
resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==}
engines: {node: '>=8'}
@@ -42643,7 +43186,6 @@ packages:
/yocto-queue@0.1.0:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
- dev: true
/yocto-queue@1.0.0:
resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 42b284c328d..8d95241523e 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -6,5 +6,6 @@ packages:
- 'apps/runtime-demo/*'
- 'apps/router-demo/*'
- 'apps/manifest-demo/*'
+ - 'apps/esbuild'
- 'apps/*'
- 'webpack'