From 0124c7ff14dab004d95e3406e948f4057a0283f2 Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Mon, 13 Oct 2025 10:43:07 +0800 Subject: [PATCH 1/5] fix: remove plugin-express --- .../src/router/runtime/plugin.tsx | 1 + .../bff-corss-project/bff-api-app/api/_app.ts | 19 ------------------- .../bff-api-app/api/lambda/context/index.ts | 10 ++++++++++ .../bff-api-app/api/{ => lambda}/index.ts | 6 +++--- .../bff-api-app/api/{ => lambda}/upload.ts | 2 +- .../bff-api-app/api/{ => lambda}/user/[id].ts | 0 .../api/{ => lambda}/user/index.ts | 2 +- .../bff-api-app/modern.config.ts | 2 +- .../bff-api-app/tsconfig.json | 2 +- .../bff-client-app/api/_app.ts | 12 ------------ .../api/{ => lambda}/context/index.ts | 4 ++-- .../bff-client-app/api/{ => lambda}/index.ts | 6 +++--- .../bff-client-app/api/{ => lambda}/upload.ts | 2 +- .../bff-client-app/modern.config.ts | 2 +- .../bff-client-app/tsconfig.json | 2 +- .../bff-indep-client-app/api/_app.ts | 12 ------------ .../bff-indep-client-app/api/context/index.ts | 10 ---------- .../api/lambda}/context/index.ts | 4 ++-- .../api/{ => lambda}/index.ts | 6 +++--- .../api/{ => lambda}/upload.ts | 2 +- .../bff-indep-client-app/modern.config.ts | 2 +- .../bff-indep-client-app/tsconfig.json | 2 +- 22 files changed, 34 insertions(+), 76 deletions(-) delete mode 100644 tests/integration/bff-corss-project/bff-api-app/api/_app.ts create mode 100644 tests/integration/bff-corss-project/bff-api-app/api/lambda/context/index.ts rename tests/integration/bff-corss-project/bff-api-app/api/{ => lambda}/index.ts (90%) rename tests/integration/bff-corss-project/bff-api-app/api/{ => lambda}/upload.ts (86%) rename tests/integration/bff-corss-project/bff-api-app/api/{ => lambda}/user/[id].ts (100%) rename tests/integration/bff-corss-project/bff-api-app/api/{ => lambda}/user/index.ts (87%) delete mode 100644 tests/integration/bff-corss-project/bff-client-app/api/_app.ts rename tests/integration/bff-corss-project/bff-client-app/api/{ => lambda}/context/index.ts (57%) rename tests/integration/bff-corss-project/bff-client-app/api/{ => lambda}/index.ts (89%) rename tests/integration/bff-corss-project/bff-client-app/api/{ => lambda}/upload.ts (84%) delete mode 100644 tests/integration/bff-corss-project/bff-indep-client-app/api/_app.ts delete mode 100644 tests/integration/bff-corss-project/bff-indep-client-app/api/context/index.ts rename tests/integration/bff-corss-project/{bff-api-app/api => bff-indep-client-app/api/lambda}/context/index.ts (57%) rename tests/integration/bff-corss-project/bff-indep-client-app/api/{ => lambda}/index.ts (89%) rename tests/integration/bff-corss-project/bff-indep-client-app/api/{ => lambda}/upload.ts (84%) diff --git a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx index 39f0f249f00d..75443908c6b6 100644 --- a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx +++ b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx @@ -114,6 +114,7 @@ export const routerPlugin = ( }); }); api.wrapRoot(App => { + console.log('rrrrrrrr', api.getRuntimeConfig(), userConfig); const mergedConfig = merge( api.getRuntimeConfig().router || {}, userConfig, diff --git a/tests/integration/bff-corss-project/bff-api-app/api/_app.ts b/tests/integration/bff-corss-project/bff-api-app/api/_app.ts deleted file mode 100644 index 685452061397..000000000000 --- a/tests/integration/bff-corss-project/bff-api-app/api/_app.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { hook } from '@modern-js/runtime/server'; -import type { NextFunction, Request, Response } from 'express'; - -export default hook(({ addMiddleware }) => { - addMiddleware(async (req: Request, res: Response, next: NextFunction) => { - res.setHeader('Access-Control-Allow-Origin', '*'); - res.setHeader( - 'Access-Control-Allow-Headers', - 'Content-Type, x-header, Authorization, X-Requested-With, x-env', - ); - - if (req.path === '/api-app/foo') { - res.end('foo'); - } else { - res.setHeader('x-env', 'test'); - next(); - } - }); -}); diff --git a/tests/integration/bff-corss-project/bff-api-app/api/lambda/context/index.ts b/tests/integration/bff-corss-project/bff-api-app/api/lambda/context/index.ts new file mode 100644 index 000000000000..e3c471c9e888 --- /dev/null +++ b/tests/integration/bff-corss-project/bff-api-app/api/lambda/context/index.ts @@ -0,0 +1,10 @@ +import { useHonoContext } from '@modern-js/plugin-bff/server'; + +export default async () => { + const ctx = useHonoContext(); + const { res } = ctx; + res.headers.set('x-id', '1'); + return { + message: 'Hello Modern.js', + }; +}; diff --git a/tests/integration/bff-corss-project/bff-api-app/api/index.ts b/tests/integration/bff-corss-project/bff-api-app/api/lambda/index.ts similarity index 90% rename from tests/integration/bff-corss-project/bff-api-app/api/index.ts rename to tests/integration/bff-corss-project/bff-api-app/api/lambda/index.ts index 72a96b77f4fb..6b88cf5f1115 100644 --- a/tests/integration/bff-corss-project/bff-api-app/api/index.ts +++ b/tests/integration/bff-corss-project/bff-api-app/api/lambda/index.ts @@ -5,8 +5,8 @@ import { Params, Post, Query, - useContext, -} from '@modern-js/runtime/server'; + useHonoContext, +} from '@modern-js/plugin-bff/server'; import { z } from 'zod'; export default async () => { @@ -44,7 +44,7 @@ export const postHello = Api( Data(DataSchema), Headers(HeadersSchema), async ({ query, data, params, headers }) => { - const ctx = useContext(); + const ctx = useHonoContext(); return { params, query, diff --git a/tests/integration/bff-corss-project/bff-api-app/api/upload.ts b/tests/integration/bff-corss-project/bff-api-app/api/lambda/upload.ts similarity index 86% rename from tests/integration/bff-corss-project/bff-api-app/api/upload.ts rename to tests/integration/bff-corss-project/bff-api-app/api/lambda/upload.ts index fbe415c648b2..8d4544dda606 100644 --- a/tests/integration/bff-corss-project/bff-api-app/api/upload.ts +++ b/tests/integration/bff-corss-project/bff-api-app/api/lambda/upload.ts @@ -1,4 +1,4 @@ -import { Api, Upload } from '@modern-js/runtime/server'; +import { Api, Upload } from '@modern-js/plugin-bff/server'; import { z } from 'zod'; const FileSchema = z.object({ diff --git a/tests/integration/bff-corss-project/bff-api-app/api/user/[id].ts b/tests/integration/bff-corss-project/bff-api-app/api/lambda/user/[id].ts similarity index 100% rename from tests/integration/bff-corss-project/bff-api-app/api/user/[id].ts rename to tests/integration/bff-corss-project/bff-api-app/api/lambda/user/[id].ts diff --git a/tests/integration/bff-corss-project/bff-api-app/api/user/index.ts b/tests/integration/bff-corss-project/bff-api-app/api/lambda/user/index.ts similarity index 87% rename from tests/integration/bff-corss-project/bff-api-app/api/user/index.ts rename to tests/integration/bff-corss-project/bff-api-app/api/lambda/user/index.ts index a4c1817c4bbf..dfbd2f0516f3 100644 --- a/tests/integration/bff-corss-project/bff-api-app/api/user/index.ts +++ b/tests/integration/bff-corss-project/bff-api-app/api/lambda/user/index.ts @@ -1,4 +1,4 @@ -import { Api, Post, Query } from '@modern-js/runtime/server'; +import { Api, Post, Query } from '@modern-js/plugin-bff/server'; import { z } from 'zod'; const UserSchema = z.object({ diff --git a/tests/integration/bff-corss-project/bff-api-app/modern.config.ts b/tests/integration/bff-corss-project/bff-api-app/modern.config.ts index e4d13dbeb7cb..18745924d677 100644 --- a/tests/integration/bff-corss-project/bff-api-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-api-app/modern.config.ts @@ -7,7 +7,7 @@ export default applyBaseConfig({ prefix: '/api-app', crossProject: true, }, - plugins: [expressPlugin() as any, bffPlugin()], + plugins: [bffPlugin()], server: { port: 3399, }, diff --git a/tests/integration/bff-corss-project/bff-api-app/tsconfig.json b/tests/integration/bff-corss-project/bff-api-app/tsconfig.json index 8a766dd4019d..4f81a9b2802b 100644 --- a/tests/integration/bff-corss-project/bff-api-app/tsconfig.json +++ b/tests/integration/bff-corss-project/bff-api-app/tsconfig.json @@ -6,7 +6,7 @@ "baseUrl": "./", "paths": { "@shared/*": ["./shared/*"], - "@api/*": ["./api/*"] + "@api/*": ["./api/lambda/*"] }, "types": ["jest"] }, diff --git a/tests/integration/bff-corss-project/bff-client-app/api/_app.ts b/tests/integration/bff-corss-project/bff-client-app/api/_app.ts deleted file mode 100644 index 53396293b9ff..000000000000 --- a/tests/integration/bff-corss-project/bff-client-app/api/_app.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { hook } from '@modern-js/runtime/server'; -import type { NextFunction, Request, Response } from 'express'; - -export default hook(({ addMiddleware }) => { - addMiddleware(async (req: Request, res: Response, next: NextFunction) => { - if (req.path === '/api-app/foo') { - res.end('foo'); - } else { - next(); - } - }); -}); diff --git a/tests/integration/bff-corss-project/bff-client-app/api/context/index.ts b/tests/integration/bff-corss-project/bff-client-app/api/lambda/context/index.ts similarity index 57% rename from tests/integration/bff-corss-project/bff-client-app/api/context/index.ts rename to tests/integration/bff-corss-project/bff-client-app/api/lambda/context/index.ts index dda927523ce1..741fb436fa55 100644 --- a/tests/integration/bff-corss-project/bff-client-app/api/context/index.ts +++ b/tests/integration/bff-corss-project/bff-client-app/api/lambda/context/index.ts @@ -1,7 +1,7 @@ -import { useContext } from '@modern-js/runtime/server'; +import { useHonoContext } from '@modern-js/plugin-bff/server'; export default async () => { - const ctx = useContext(); + const ctx = useHonoContext(); const { res } = ctx; res.append('x-id', '1'); return { diff --git a/tests/integration/bff-corss-project/bff-client-app/api/index.ts b/tests/integration/bff-corss-project/bff-client-app/api/lambda/index.ts similarity index 89% rename from tests/integration/bff-corss-project/bff-client-app/api/index.ts rename to tests/integration/bff-corss-project/bff-client-app/api/lambda/index.ts index 1fb15fa0baa9..e0e1db49bb08 100644 --- a/tests/integration/bff-corss-project/bff-client-app/api/index.ts +++ b/tests/integration/bff-corss-project/bff-client-app/api/lambda/index.ts @@ -5,8 +5,8 @@ import { Params, Post, Query, - useContext, -} from '@modern-js/runtime/server'; + useHonoContext, +} from '@modern-js/plugin-bff/server'; import { z } from 'zod'; export default async () => ({ @@ -40,7 +40,7 @@ export const postHello = Api( Data(DataSchema), Headers(HeadersSchema), async ({ query, data, params, headers }) => { - const ctx = useContext(); + const ctx = useHonoContext(); return { params, query, diff --git a/tests/integration/bff-corss-project/bff-client-app/api/upload.ts b/tests/integration/bff-corss-project/bff-client-app/api/lambda/upload.ts similarity index 84% rename from tests/integration/bff-corss-project/bff-client-app/api/upload.ts rename to tests/integration/bff-corss-project/bff-client-app/api/lambda/upload.ts index 4e052da86ec6..09d79057af5f 100644 --- a/tests/integration/bff-corss-project/bff-client-app/api/upload.ts +++ b/tests/integration/bff-corss-project/bff-client-app/api/lambda/upload.ts @@ -1,4 +1,4 @@ -import { Api, Upload } from '@modern-js/runtime/server'; +import { Api, Upload } from '@modern-js/plugin-bff/server'; import { z } from 'zod'; const FileSchema = z.object({ diff --git a/tests/integration/bff-corss-project/bff-client-app/modern.config.ts b/tests/integration/bff-corss-project/bff-client-app/modern.config.ts index d8884de087fa..5ab39d2cedc4 100644 --- a/tests/integration/bff-corss-project/bff-client-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-client-app/modern.config.ts @@ -8,5 +8,5 @@ export default applyBaseConfig({ ssr: false, port: 3401, }, - plugins: [bffPlugin(), expressPlugin() as any, crossProjectApiPlugin()], + plugins: [bffPlugin(), crossProjectApiPlugin()], }); diff --git a/tests/integration/bff-corss-project/bff-client-app/tsconfig.json b/tests/integration/bff-corss-project/bff-client-app/tsconfig.json index 1141e5c1bb00..76da0b4c5e95 100644 --- a/tests/integration/bff-corss-project/bff-client-app/tsconfig.json +++ b/tests/integration/bff-corss-project/bff-client-app/tsconfig.json @@ -9,7 +9,7 @@ "paths": { "@/*": ["./src/*"], "@shared/*": ["./shared/*"], - "@api/*": ["./api/*"] + "@api/*": ["./api/lambda/*"] }, "types": ["jest"] }, diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/api/_app.ts b/tests/integration/bff-corss-project/bff-indep-client-app/api/_app.ts deleted file mode 100644 index 53396293b9ff..000000000000 --- a/tests/integration/bff-corss-project/bff-indep-client-app/api/_app.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { hook } from '@modern-js/runtime/server'; -import type { NextFunction, Request, Response } from 'express'; - -export default hook(({ addMiddleware }) => { - addMiddleware(async (req: Request, res: Response, next: NextFunction) => { - if (req.path === '/api-app/foo') { - res.end('foo'); - } else { - next(); - } - }); -}); diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/api/context/index.ts b/tests/integration/bff-corss-project/bff-indep-client-app/api/context/index.ts deleted file mode 100644 index dda927523ce1..000000000000 --- a/tests/integration/bff-corss-project/bff-indep-client-app/api/context/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { useContext } from '@modern-js/runtime/server'; - -export default async () => { - const ctx = useContext(); - const { res } = ctx; - res.append('x-id', '1'); - return { - message: 'Hello Modern.js', - }; -}; diff --git a/tests/integration/bff-corss-project/bff-api-app/api/context/index.ts b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/context/index.ts similarity index 57% rename from tests/integration/bff-corss-project/bff-api-app/api/context/index.ts rename to tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/context/index.ts index dda927523ce1..741fb436fa55 100644 --- a/tests/integration/bff-corss-project/bff-api-app/api/context/index.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/context/index.ts @@ -1,7 +1,7 @@ -import { useContext } from '@modern-js/runtime/server'; +import { useHonoContext } from '@modern-js/plugin-bff/server'; export default async () => { - const ctx = useContext(); + const ctx = useHonoContext(); const { res } = ctx; res.append('x-id', '1'); return { diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/api/index.ts b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/index.ts similarity index 89% rename from tests/integration/bff-corss-project/bff-indep-client-app/api/index.ts rename to tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/index.ts index 1fb15fa0baa9..e0e1db49bb08 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/api/index.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/index.ts @@ -5,8 +5,8 @@ import { Params, Post, Query, - useContext, -} from '@modern-js/runtime/server'; + useHonoContext, +} from '@modern-js/plugin-bff/server'; import { z } from 'zod'; export default async () => ({ @@ -40,7 +40,7 @@ export const postHello = Api( Data(DataSchema), Headers(HeadersSchema), async ({ query, data, params, headers }) => { - const ctx = useContext(); + const ctx = useHonoContext(); return { params, query, diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/api/upload.ts b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/upload.ts similarity index 84% rename from tests/integration/bff-corss-project/bff-indep-client-app/api/upload.ts rename to tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/upload.ts index 4e052da86ec6..09d79057af5f 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/api/upload.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/api/lambda/upload.ts @@ -1,4 +1,4 @@ -import { Api, Upload } from '@modern-js/runtime/server'; +import { Api, Upload } from '@modern-js/plugin-bff/server'; import { z } from 'zod'; const FileSchema = z.object({ diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts b/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts index 9bcd73892507..e12e1389ba77 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts @@ -6,5 +6,5 @@ export default applyBaseConfig({ server: { ssr: false, }, - plugins: [bffPlugin(), expressPlugin() as any], + plugins: [bffPlugin()], }); diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/tsconfig.json b/tests/integration/bff-corss-project/bff-indep-client-app/tsconfig.json index 13ca46fb04d2..fdcb564ead19 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/tsconfig.json +++ b/tests/integration/bff-corss-project/bff-indep-client-app/tsconfig.json @@ -7,7 +7,7 @@ "paths": { "@/*": ["./src/*"], "@shared/*": ["./shared/*"], - "@api/*": ["./api/*"] + "@api/*": ["./api/lambda/*"] }, "types": ["jest"] }, From 42b904161aa3b21a39598afbeafbcf53a38c4510 Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Mon, 13 Oct 2025 10:44:52 +0800 Subject: [PATCH 2/5] fix: remove plugin-express --- packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx index 75443908c6b6..39f0f249f00d 100644 --- a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx +++ b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx @@ -114,7 +114,6 @@ export const routerPlugin = ( }); }); api.wrapRoot(App => { - console.log('rrrrrrrr', api.getRuntimeConfig(), userConfig); const mergedConfig = merge( api.getRuntimeConfig().router || {}, userConfig, From 3bba48f17899dcaeacb41591f06b9527c976bf35 Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Mon, 13 Oct 2025 10:46:21 +0800 Subject: [PATCH 3/5] fix: remove plugin-express --- tests/integration/pure-esm-project/api/{ => lambda}/index.js | 0 tests/integration/pure-esm-project/api/{ => lambda}/info.js | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/integration/pure-esm-project/api/{ => lambda}/index.js (100%) rename tests/integration/pure-esm-project/api/{ => lambda}/info.js (100%) diff --git a/tests/integration/pure-esm-project/api/index.js b/tests/integration/pure-esm-project/api/lambda/index.js similarity index 100% rename from tests/integration/pure-esm-project/api/index.js rename to tests/integration/pure-esm-project/api/lambda/index.js diff --git a/tests/integration/pure-esm-project/api/info.js b/tests/integration/pure-esm-project/api/lambda/info.js similarity index 100% rename from tests/integration/pure-esm-project/api/info.js rename to tests/integration/pure-esm-project/api/lambda/info.js From 11c023779bb774ba5f8d383fd634198332d7e5ac Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Mon, 13 Oct 2025 10:49:30 +0800 Subject: [PATCH 4/5] fix: remove plugin-express --- .../bff-corss-project/bff-api-app/modern-app-env.d.ts | 2 -- .../integration/bff-corss-project/bff-api-app/modern.config.ts | 1 - tests/integration/bff-corss-project/bff-api-app/package.json | 3 +-- .../bff-corss-project/bff-client-app/modern.config.ts | 1 - .../integration/bff-corss-project/bff-client-app/package.json | 1 - .../bff-corss-project/bff-client-app/src/modern-app-env.d.ts | 2 -- .../bff-corss-project/bff-indep-client-app/modern.config.ts | 1 - .../bff-corss-project/bff-indep-client-app/package.json | 1 - .../bff-indep-client-app/src/modern-app-env.d.ts | 2 -- 9 files changed, 1 insertion(+), 13 deletions(-) diff --git a/tests/integration/bff-corss-project/bff-api-app/modern-app-env.d.ts b/tests/integration/bff-corss-project/bff-api-app/modern-app-env.d.ts index eaf4337e191b..78deb4bdf35f 100644 --- a/tests/integration/bff-corss-project/bff-api-app/modern-app-env.d.ts +++ b/tests/integration/bff-corss-project/bff-api-app/modern-app-env.d.ts @@ -1,4 +1,2 @@ /// /// -/// -/// diff --git a/tests/integration/bff-corss-project/bff-api-app/modern.config.ts b/tests/integration/bff-corss-project/bff-api-app/modern.config.ts index 18745924d677..1945d7fd6e88 100644 --- a/tests/integration/bff-corss-project/bff-api-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-api-app/modern.config.ts @@ -1,5 +1,4 @@ import { bffPlugin } from '@modern-js/plugin-bff'; -import { expressPlugin } from '@modern-js/plugin-express'; import { applyBaseConfig } from '../../../utils/applyBaseConfig'; export default applyBaseConfig({ diff --git a/tests/integration/bff-corss-project/bff-api-app/package.json b/tests/integration/bff-corss-project/bff-api-app/package.json index a3a84c30220a..f9aa6e43e8d1 100644 --- a/tests/integration/bff-corss-project/bff-api-app/package.json +++ b/tests/integration/bff-corss-project/bff-api-app/package.json @@ -15,7 +15,6 @@ }, "dependencies": { "@modern-js/plugin-bff": "workspace:*", - "@modern-js/plugin-express": "2.68.17", "@modern-js/runtime": "workspace:*", "express": "^4.21.2", "react": "^19.1.1", @@ -102,4 +101,4 @@ "dist-1/runtime/**/*", "dist-1/plugin/**/*" ] -} \ No newline at end of file +} diff --git a/tests/integration/bff-corss-project/bff-client-app/modern.config.ts b/tests/integration/bff-corss-project/bff-client-app/modern.config.ts index 5ab39d2cedc4..e915bea370f5 100644 --- a/tests/integration/bff-corss-project/bff-client-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-client-app/modern.config.ts @@ -1,5 +1,4 @@ import { bffPlugin } from '@modern-js/plugin-bff'; -import { expressPlugin } from '@modern-js/plugin-express'; import { crossProjectApiPlugin } from 'bff-api-app/plugin'; import { applyBaseConfig } from '../../../utils/applyBaseConfig'; diff --git a/tests/integration/bff-corss-project/bff-client-app/package.json b/tests/integration/bff-corss-project/bff-client-app/package.json index b5fc43c08660..f3f10d745ade 100644 --- a/tests/integration/bff-corss-project/bff-client-app/package.json +++ b/tests/integration/bff-corss-project/bff-client-app/package.json @@ -16,7 +16,6 @@ }, "dependencies": { "@modern-js/plugin-bff": "workspace:*", - "@modern-js/plugin-express": "2.68.17", "@modern-js/runtime": "workspace:*", "bff-api-app": "workspace:*", "express": "^4.21.2", diff --git a/tests/integration/bff-corss-project/bff-client-app/src/modern-app-env.d.ts b/tests/integration/bff-corss-project/bff-client-app/src/modern-app-env.d.ts index eaf4337e191b..78deb4bdf35f 100644 --- a/tests/integration/bff-corss-project/bff-client-app/src/modern-app-env.d.ts +++ b/tests/integration/bff-corss-project/bff-client-app/src/modern-app-env.d.ts @@ -1,4 +1,2 @@ /// /// -/// -/// diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts b/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts index e12e1389ba77..41afd1033d73 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/modern.config.ts @@ -1,5 +1,4 @@ import { bffPlugin } from '@modern-js/plugin-bff'; -import { expressPlugin } from '@modern-js/plugin-express'; import { applyBaseConfig } from '../../../utils/applyBaseConfig'; export default applyBaseConfig({ diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/package.json b/tests/integration/bff-corss-project/bff-indep-client-app/package.json index befa3e464597..48219eb990a3 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/package.json +++ b/tests/integration/bff-corss-project/bff-indep-client-app/package.json @@ -16,7 +16,6 @@ }, "dependencies": { "@modern-js/plugin-bff": "workspace:*", - "@modern-js/plugin-express": "2.68.17", "@modern-js/runtime": "workspace:*", "axios": "^1.12.2", "bff-api-app": "workspace:*", diff --git a/tests/integration/bff-corss-project/bff-indep-client-app/src/modern-app-env.d.ts b/tests/integration/bff-corss-project/bff-indep-client-app/src/modern-app-env.d.ts index eaf4337e191b..78deb4bdf35f 100644 --- a/tests/integration/bff-corss-project/bff-indep-client-app/src/modern-app-env.d.ts +++ b/tests/integration/bff-corss-project/bff-indep-client-app/src/modern-app-env.d.ts @@ -1,4 +1,2 @@ /// /// -/// -/// From 293714c0b6759e9445fc16514f9e85c75c40a36c Mon Sep 17 00:00:00 2001 From: Ming <527990618@163.com> Date: Mon, 13 Oct 2025 10:54:20 +0800 Subject: [PATCH 5/5] chore: fix lock --- pnpm-lock.yaml | 194 ------------------------------------------------- 1 file changed, 194 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 068901c55d87..68fa929ba756 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3131,9 +3131,6 @@ importers: '@modern-js/plugin-bff': specifier: workspace:* version: link:../../../../packages/cli/plugin-bff - '@modern-js/plugin-express': - specifier: 2.68.17 - version: 2.68.17(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3) '@modern-js/runtime': specifier: workspace:* version: link:../../../../packages/runtime/plugin-runtime @@ -3183,9 +3180,6 @@ importers: '@modern-js/plugin-bff': specifier: workspace:* version: link:../../../../packages/cli/plugin-bff - '@modern-js/plugin-express': - specifier: 2.68.17 - version: 2.68.17(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3) '@modern-js/runtime': specifier: workspace:* version: link:../../../../packages/runtime/plugin-runtime @@ -3238,9 +3232,6 @@ importers: '@modern-js/plugin-bff': specifier: workspace:* version: link:../../../../packages/cli/plugin-bff - '@modern-js/plugin-express': - specifier: 2.68.17 - version: 2.68.17(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3) '@modern-js/runtime': specifier: workspace:* version: link:../../../../packages/runtime/plugin-runtime @@ -7542,19 +7533,6 @@ packages: '@mermaid-js/parser@0.6.2': resolution: {integrity: sha512-+PO02uGF6L6Cs0Bw8RpGhikVvMWEysfAyl27qTlroUB8jSWr1lL0Sf6zi78ZxlSnmgSY2AMMKVgghnN9jTtwkQ==} - '@modern-js/bff-core@2.68.17': - resolution: {integrity: sha512-NjZ56iJsGAlFYgGMkWaui7JZ7YDkUcCdBYNf4zjVM41Zp2KJUdMqkbkssXrZ+AyKkPQdldz0pVtZO5vfKcGF4w==} - peerDependencies: - ts-node: ^10.9.1 - tsconfig-paths: ^4.1.2 - zod: ^3.22.3 - peerDependenciesMeta: - zod: - optional: true - - '@modern-js/bff-runtime@2.68.17': - resolution: {integrity: sha512-wlzRiiCCqPXBrZjANoSOaF2oXbDomdHQSYnHq3dAE5SzHjj5J0zfbA8cfJGMc6oDB6G8PntnFOR9PACTn3zJSg==} - '@modern-js/codesmith-api-app@2.6.8': resolution: {integrity: sha512-+5Ztl3hIcJlJclyBo2A/Ikf6DknP3q1/2iuWmT0kHVQ9zljZTxZ3pWErt1JGhtkZz+5jxnIF3JLb1TMhhO+nHw==} peerDependencies: @@ -7618,20 +7596,12 @@ packages: '@modern-js/plugin-changeset@2.68.17': resolution: {integrity: sha512-Y7Bd/vOe02OZQqHTZK91OKUkTHkE8n1YNvJpDE8ZIGJge+ddQT89YPVXD9Cy8g0nDDZ8VEsG2caeAeboGOb1bA==} - '@modern-js/plugin-express@2.68.17': - resolution: {integrity: sha512-lkB9GSsihsUnLtqfOnyXqK5bpMaqN7i78+XE83FbWwI7lx8VZ0v7CowNC8xn8SV0aEaQRaJomIssRQ/DUgJ52A==} - peerDependencies: - express: ^4.21.2 - '@modern-js/plugin-i18n@2.60.3': resolution: {integrity: sha512-cWWg8DXFznwUovmXQLwP6SoRy/yMfKIJZbQ7ARb8HXpsLglvpzLi8Iw8wzE7IsUazzaJmwo7frmG1AXbMWLDxg==} '@modern-js/plugin-i18n@2.68.17': resolution: {integrity: sha512-ieaEE28HaQlFwEdiMsqMBvMUqdzwF9luUrz02576vjxHPc06o+QI9B9PrqUC9jOcMtD7NiIu+RwzRDZJI9LvHQ==} - '@modern-js/plugin-v2@2.68.17': - resolution: {integrity: sha512-M/EFx1S140sxU5RWRgcKSkErUDnAeWw64gn+ywVjtD46QzapOFWUmLnzBsr9fCLO6HM6jM0eCnIjd1A6an7esw==} - '@modern-js/plugin@2.68.17': resolution: {integrity: sha512-IejyUJBfnfNauWb09aRtEYBq0JvVqillY/dmAAJ61Ca5z38YOrbxDd5553rAj+W2rHmpthtGth1c2XixYWvtxg==} @@ -7639,21 +7609,6 @@ packages: resolution: {integrity: sha512-UdBEpS0kwBYm43n60FEZFvZ3dUhqlzzvZkIMwiQGYHvlpXuAN/30GrWnp2WUdd5+eM5ObRCJ1bSJ7+UYouxPAQ==} engines: {node: '>=8'} - '@modern-js/runtime-utils@2.68.17': - resolution: {integrity: sha512-Psj3Vw8Ce8igaFGPSxgO6UKskVdhSIZxJ1CvTaYJgntxzDFW6WJZ5nE3PSXAB9pZhp31Q2rvbM2QXnQFhGcxzg==} - peerDependencies: - react: '>=17.0.0' - react-dom: '>=17.0.0' - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - - '@modern-js/server-core@2.68.17': - resolution: {integrity: sha512-I+Vd279hOcUDRld3Zc/iq0M2dtrbBE55P2AjAyLZjntZI55jUlabZueqeTlpmHIDO78ALlV6AsSbACJVyt2nfA==} - engines: {node: '>=16.2.0'} - '@modern-js/swc-plugins-darwin-arm64@0.6.11': resolution: {integrity: sha512-UMH0bo20vcD10//F7KaINLfuHawQBVcWCCyJvkYOiBt7e1tUjeybKu+y6eNq1USyFVElEMul8ytnYdwAS9sY+w==} engines: {node: '>=14.12'} @@ -8015,10 +7970,6 @@ packages: peerDependencies: react: '>=16.8' - '@remix-run/router@1.20.0': - resolution: {integrity: sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==} - engines: {node: '>=14.0.0'} - '@remix-run/router@1.22.0': resolution: {integrity: sha512-MBOl8MeOzpK0HQQQshKB7pABXbmyHizdTpqnrIseTbsv0nAepwC2ENZa1aaBExNQcpLoXmWthhak8SABLzvGPw==} engines: {node: '>=14.0.0'} @@ -8188,11 +8139,6 @@ packages: engines: {node: '>=16.10.0'} hasBin: true - '@rsbuild/core@1.5.15': - resolution: {integrity: sha512-iNzMyDLGevBNN2uGYRmoBi8OfQMXN2hmvh7lo+rbwU1qZUC6TDiJi12KiTLz+u3//vIYCTd2yOuwsKxpuhIL8A==} - engines: {node: '>=18.12.0'} - hasBin: true - '@rsbuild/core@1.5.16': resolution: {integrity: sha512-AMvyPmpyAF5RfSY70oWiByP/h0mbi3KOgHUsuYapWXtfPTYM/fpvfuEgqc4DZI5YCzZsY5JcEAfG1EmR7I0AXw==} engines: {node: '>=18.12.0'} @@ -10329,10 +10275,6 @@ packages: cookie-es@1.2.2: resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} - cookie-parser@1.4.7: - resolution: {integrity: sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==} - engines: {node: '>= 0.8.0'} - cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} @@ -11697,10 +11639,6 @@ packages: resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} engines: {node: '>= 6'} - formidable@1.2.6: - resolution: {integrity: sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==} - deprecated: 'Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau' - formidable@2.1.5: resolution: {integrity: sha512-Oz5Hwvwak/DCaXVVUtPn4oLMLLy1CdclLKO1LFgU7XzDpVMUU5UjlSLpGMocyQNNk8F6IJW9M/YdooSn2MRI+Q==} @@ -14621,13 +14559,6 @@ packages: resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} - react-router-dom@6.27.0: - resolution: {integrity: sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==} - engines: {node: '>=14.0.0'} - peerDependencies: - react: '>=16.8' - react-dom: '>=16.8' - react-router-dom@6.29.0: resolution: {integrity: sha512-pkEbJPATRJ2iotK+wUwHfy0xs2T59YPEN8BQxVCPeBZvK7kfPESRc/nyxzdcxR17hXgUPYx2whMwl+eo9cUdnQ==} engines: {node: '>=14.0.0'} @@ -14649,12 +14580,6 @@ packages: react: '>=18' react-dom: '>=18' - react-router@6.27.0: - resolution: {integrity: sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==} - engines: {node: '>=14.0.0'} - peerDependencies: - react: '>=16.8' - react-router@6.29.0: resolution: {integrity: sha512-DXZJoE0q+KyeVw75Ck6GkPxFak63C4fGqZGNijnWgzB/HzSP1ZfTlBj5COaGWwhrMQ/R8bXiq5Ooy4KG+ReyjQ==} engines: {node: '>=14.0.0'} @@ -15824,10 +15749,6 @@ packages: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} - ts-deepmerge@7.0.2: - resolution: {integrity: sha512-akcpDTPuez4xzULo5NwuoKwYRtjQJ9eoNfBACiBMaXwNAx7B1PKfe5wqUFJuW5uKzQ68YjDFwPaWHDG1KnFGsA==} - engines: {node: '>=14.13.1'} - ts-deepmerge@7.0.3: resolution: {integrity: sha512-Du/ZW2RfwV/D4cmA5rXafYjBQVuvu4qGiEEla4EmEHVHgRdx68Gftx7i66jn2bzHPwSVZY36Ae6OuDn9el4ZKA==} engines: {node: '>=14.13.1'} @@ -19151,25 +19072,6 @@ snapshots: dependencies: langium: 3.3.1 - '@modern-js/bff-core@2.68.17(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3)': - dependencies: - '@modern-js/utils': 2.68.17 - '@swc/helpers': 0.5.17 - koa-compose: 4.1.0 - reflect-metadata: 0.1.13 - ts-node: 10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3) - tsconfig-paths: 3.15.0 - type-fest: 2.15.0 - optionalDependencies: - zod: 3.22.3 - - '@modern-js/bff-runtime@2.68.17': - dependencies: - '@swc/helpers': 0.5.17 - farrow-api: 1.12.1 - farrow-pipeline: 1.12.0 - farrow-schema: 1.12.1 - '@modern-js/codesmith-api-app@2.6.8(@modern-js/codesmith@2.6.8)(typescript@5.6.3)': dependencies: '@modern-js/codesmith': 2.6.8 @@ -19326,28 +19228,6 @@ snapshots: - '@types/node' - debug - '@modern-js/plugin-express@2.68.17(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3)': - dependencies: - '@modern-js/bff-core': 2.68.17(ts-node@10.9.2(@swc/core@1.11.31(@swc/helpers@0.5.17))(@types/node@20.8.8)(typescript@5.6.3))(tsconfig-paths@3.15.0)(zod@3.22.3) - '@modern-js/bff-runtime': 2.68.17 - '@modern-js/server-core': 2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@modern-js/types': 2.68.17 - '@modern-js/utils': 2.68.17 - '@swc/helpers': 0.5.17 - cookie-parser: 1.4.7 - express: 4.21.2 - finalhandler: 1.3.1 - formidable: 1.2.6 - reflect-metadata: 0.1.13 - type-is: 1.6.18 - transitivePeerDependencies: - - react - - react-dom - - supports-color - - ts-node - - tsconfig-paths - - zod - '@modern-js/plugin-i18n@2.60.3': dependencies: '@modern-js/utils': 2.60.3 @@ -19358,18 +19238,6 @@ snapshots: '@modern-js/utils': 2.68.17 '@swc/helpers': 0.5.17 - '@modern-js/plugin-v2@2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@modern-js/runtime-utils': 2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@modern-js/types': 2.68.17 - '@modern-js/utils': 2.68.17 - '@rsbuild/core': 1.5.15 - '@swc/helpers': 0.5.17 - jiti: 1.21.7 - transitivePeerDependencies: - - react - - react-dom - '@modern-js/plugin@2.68.17': dependencies: '@modern-js/utils': 2.68.17 @@ -19423,37 +19291,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@modern-js/runtime-utils@2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@modern-js/types': 2.68.17 - '@modern-js/utils': 2.68.17 - '@remix-run/router': 1.20.0 - '@swc/helpers': 0.5.17 - lru-cache: 10.4.3 - react-router-dom: 6.27.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - serialize-javascript: 6.0.2 - optionalDependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - - '@modern-js/server-core@2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@modern-js/plugin': 2.68.17 - '@modern-js/plugin-v2': 2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@modern-js/runtime-utils': 2.68.17(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@modern-js/utils': 2.68.17 - '@swc/helpers': 0.5.17 - '@web-std/fetch': 4.2.1 - '@web-std/file': 3.0.3 - '@web-std/stream': 1.0.3 - cloneable-readable: 3.0.0 - flatted: 3.3.3 - hono: 3.12.12 - ts-deepmerge: 7.0.2 - transitivePeerDependencies: - - react - - react-dom - '@modern-js/swc-plugins-darwin-arm64@0.6.11': optional: true @@ -19788,8 +19625,6 @@ snapshots: dependencies: react: 19.1.1 - '@remix-run/router@1.20.0': {} - '@remix-run/router@1.22.0': {} '@remix-run/web-blob@3.1.0': @@ -19929,14 +19764,6 @@ snapshots: core-js: 3.42.0 jiti: 2.6.1 - '@rsbuild/core@1.5.15': - dependencies: - '@rspack/core': 1.5.8(@swc/helpers@0.5.17) - '@rspack/lite-tapable': 1.0.1 - '@swc/helpers': 0.5.17 - core-js: 3.45.1 - jiti: 2.6.1 - '@rsbuild/core@1.5.16': dependencies: '@rspack/core': 1.5.8(@swc/helpers@0.5.17) @@ -22469,11 +22296,6 @@ snapshots: cookie-es@1.2.2: {} - cookie-parser@1.4.7: - dependencies: - cookie: 0.7.2 - cookie-signature: 1.0.6 - cookie-signature@1.0.6: {} cookie@0.7.1: {} @@ -24007,8 +23829,6 @@ snapshots: hasown: 2.0.2 mime-types: 2.1.35 - formidable@1.2.6: {} - formidable@2.1.5: dependencies: '@paralleldrive/cuid2': 2.2.2 @@ -27907,13 +27727,6 @@ snapshots: react-refresh@0.17.0: {} - react-router-dom@6.27.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - '@remix-run/router': 1.20.0 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-router: 6.27.0(react@19.1.1) - react-router-dom@6.29.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: '@remix-run/router': 1.22.0 @@ -27933,11 +27746,6 @@ snapshots: react-dom: 19.1.1(react@19.1.1) react-router: 7.8.2(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react-router@6.27.0(react@19.1.1): - dependencies: - '@remix-run/router': 1.20.0 - react: 19.1.1 - react-router@6.29.0(react@19.1.1): dependencies: '@remix-run/router': 1.22.0 @@ -29356,8 +29164,6 @@ snapshots: ts-dedent@2.2.0: {} - ts-deepmerge@7.0.2: {} - ts-deepmerge@7.0.3: {} ts-interface-checker@0.1.13: {}