@modern-js/app-tools 2.50.0 → 2.51.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/dist/cjs/analyze/getServerRoutes.js +4 -3
  2. package/dist/cjs/commands/deploy.js +1 -0
  3. package/dist/cjs/hooks.js +1 -0
  4. package/dist/cjs/index.js +3 -1
  5. package/dist/cjs/plugins/deploy/dependencies/index.js +217 -0
  6. package/dist/cjs/plugins/deploy/dependencies/utils.js +165 -0
  7. package/dist/cjs/plugins/deploy/index.js +64 -0
  8. package/dist/cjs/plugins/deploy/platforms/netlify.js +136 -0
  9. package/dist/cjs/plugins/deploy/platforms/netlifyEntry.js +60 -0
  10. package/dist/cjs/plugins/deploy/platforms/node.js +90 -0
  11. package/dist/cjs/plugins/deploy/platforms/nodeEntry.js +44 -0
  12. package/dist/cjs/plugins/deploy/platforms/platform.js +16 -0
  13. package/dist/cjs/plugins/deploy/platforms/vercel.js +148 -0
  14. package/dist/cjs/plugins/deploy/platforms/vercelEntry.js +60 -0
  15. package/dist/cjs/plugins/deploy/utils.js +81 -0
  16. package/dist/cjs/utils/routes.js +7 -2
  17. package/dist/esm/analyze/getServerRoutes.js +5 -4
  18. package/dist/esm/commands/deploy.js +7 -1
  19. package/dist/esm/hooks.js +1 -0
  20. package/dist/esm/index.js +3 -1
  21. package/dist/esm/plugins/deploy/dependencies/index.js +580 -0
  22. package/dist/esm/plugins/deploy/dependencies/utils.js +407 -0
  23. package/dist/esm/plugins/deploy/index.js +135 -0
  24. package/dist/esm/plugins/deploy/platforms/netlify.js +291 -0
  25. package/dist/esm/plugins/deploy/platforms/netlifyEntry.js +202 -0
  26. package/dist/esm/plugins/deploy/platforms/node.js +124 -0
  27. package/dist/esm/plugins/deploy/platforms/nodeEntry.js +107 -0
  28. package/dist/esm/plugins/deploy/platforms/platform.js +0 -0
  29. package/dist/esm/plugins/deploy/platforms/vercel.js +225 -0
  30. package/dist/esm/plugins/deploy/platforms/vercelEntry.js +202 -0
  31. package/dist/esm/plugins/deploy/utils.js +47 -0
  32. package/dist/esm/utils/routes.js +6 -2
  33. package/dist/esm-node/analyze/getServerRoutes.js +5 -4
  34. package/dist/esm-node/commands/deploy.js +1 -0
  35. package/dist/esm-node/hooks.js +1 -0
  36. package/dist/esm-node/index.js +3 -1
  37. package/dist/esm-node/plugins/deploy/dependencies/index.js +183 -0
  38. package/dist/esm-node/plugins/deploy/dependencies/utils.js +124 -0
  39. package/dist/esm-node/plugins/deploy/index.js +44 -0
  40. package/dist/esm-node/plugins/deploy/platforms/netlify.js +102 -0
  41. package/dist/esm-node/plugins/deploy/platforms/netlifyEntry.js +68 -0
  42. package/dist/esm-node/plugins/deploy/platforms/node.js +56 -0
  43. package/dist/esm-node/plugins/deploy/platforms/nodeEntry.js +43 -0
  44. package/dist/esm-node/plugins/deploy/platforms/platform.js +0 -0
  45. package/dist/esm-node/plugins/deploy/platforms/vercel.js +114 -0
  46. package/dist/esm-node/plugins/deploy/platforms/vercelEntry.js +68 -0
  47. package/dist/esm-node/plugins/deploy/utils.js +44 -0
  48. package/dist/esm-node/utils/routes.js +6 -2
  49. package/dist/types/defineConfig.d.ts +1 -1
  50. package/dist/types/plugins/deploy/dependencies/index.d.ts +1 -0
  51. package/dist/types/plugins/deploy/dependencies/utils.d.ts +31 -0
  52. package/dist/types/plugins/deploy/index.d.ts +4 -0
  53. package/dist/types/plugins/deploy/platforms/netlify.d.ts +2 -0
  54. package/dist/types/plugins/deploy/platforms/netlifyEntry.d.ts +2 -0
  55. package/dist/types/plugins/deploy/platforms/node.d.ts +2 -0
  56. package/dist/types/plugins/deploy/platforms/nodeEntry.d.ts +1 -0
  57. package/dist/types/plugins/deploy/platforms/platform.d.ts +10 -0
  58. package/dist/types/plugins/deploy/platforms/vercel.d.ts +2 -0
  59. package/dist/types/plugins/deploy/platforms/vercelEntry.d.ts +2 -0
  60. package/dist/types/plugins/deploy/utils.d.ts +20 -0
  61. package/dist/types/types/hooks.d.ts +1 -0
  62. package/dist/types/utils/routes.d.ts +3 -3
  63. package/package.json +26 -22
@@ -0,0 +1,114 @@
1
+ import path from "node:path";
2
+ import { ROUTE_SPEC_FILE, DEFAULT_SERVER_CONFIG, fs as fse, getInternalPlugins } from "@modern-js/utils";
3
+ import { isMainEntry } from "../../../utils/routes";
4
+ import { genPluginImportsCode, serverAppContenxtTemplate } from "../utils";
5
+ import { handleDependencies } from "../dependencies";
6
+ const createVercelPreset = (appContext, modernConfig, needModernServer) => {
7
+ const { appDirectory, distDirectory, serverInternalPlugins, entrypoints } = appContext;
8
+ const plugins = getInternalPlugins(appDirectory, serverInternalPlugins);
9
+ const vercelOutput = path.join(appDirectory, ".vercel");
10
+ const outputDirectory = path.join(vercelOutput, "output");
11
+ const funcsDirectory = path.join(outputDirectory, "functions", "index.func");
12
+ const entryFilePath = path.join(funcsDirectory, "index.js");
13
+ return {
14
+ async prepare() {
15
+ await fse.remove(vercelOutput);
16
+ },
17
+ async writeOutput() {
18
+ const config = {
19
+ version: 3,
20
+ routes: [
21
+ {
22
+ src: "/static/(.*)",
23
+ headers: {
24
+ "cache-control": "s-maxage=31536000, immutable"
25
+ },
26
+ continue: true
27
+ },
28
+ {
29
+ handle: "filesystem"
30
+ }
31
+ ]
32
+ };
33
+ if (!needModernServer) {
34
+ const { source: { mainEntryName } } = modernConfig;
35
+ entrypoints.forEach((entry) => {
36
+ const isMain = isMainEntry(entry.entryName, mainEntryName);
37
+ config.routes.push({
38
+ src: `/${isMain ? "" : entry.entryName}(?:/.*)?`,
39
+ headers: {
40
+ "cache-control": "s-maxage=0"
41
+ },
42
+ dest: `/html/${entry.entryName}/index.html`
43
+ });
44
+ });
45
+ } else {
46
+ config.routes.push({
47
+ src: "/(.*)",
48
+ dest: `/index`
49
+ });
50
+ }
51
+ await fse.ensureDir(outputDirectory);
52
+ await fse.writeJSON(path.join(outputDirectory, "config.json"), config, {
53
+ spaces: 2
54
+ });
55
+ const staticDirectory = path.join(outputDirectory, "static/static");
56
+ await fse.copy(path.join(distDirectory, "static"), staticDirectory);
57
+ if (!needModernServer) {
58
+ const destHtmlDirectory = path.join(distDirectory, "html");
59
+ const outputHtmlDirectory = path.join(path.join(outputDirectory, "static"), "html");
60
+ await fse.copy(destHtmlDirectory, outputHtmlDirectory);
61
+ } else {
62
+ await fse.ensureDir(funcsDirectory);
63
+ await fse.copy(distDirectory, funcsDirectory, {
64
+ filter: (src) => {
65
+ const distStaticDirectory = path.join(distDirectory, "static");
66
+ return !src.includes(distStaticDirectory);
67
+ }
68
+ });
69
+ await fse.writeJSON(path.join(funcsDirectory, ".vc-config.json"), {
70
+ runtime: "nodejs16.x",
71
+ handler: "index.js",
72
+ launcherType: "Nodejs",
73
+ shouldAddHelpers: false,
74
+ supportsResponseStreaming: true
75
+ });
76
+ }
77
+ },
78
+ async genEntry() {
79
+ var _modernConfig_bff;
80
+ if (!needModernServer) {
81
+ return;
82
+ }
83
+ const serverConfig = {
84
+ bff: {
85
+ prefix: modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_bff = modernConfig.bff) === null || _modernConfig_bff === void 0 ? void 0 : _modernConfig_bff.prefix
86
+ },
87
+ output: {
88
+ path: "."
89
+ }
90
+ };
91
+ const pluginImportCode = genPluginImportsCode(plugins || []);
92
+ const dynamicProdOptions = {
93
+ config: serverConfig,
94
+ serverConfigFile: DEFAULT_SERVER_CONFIG,
95
+ plugins
96
+ };
97
+ const serverAppContext = serverAppContenxtTemplate(appContext);
98
+ let entryCode = (await fse.readFile(path.join(__dirname, "./vercelEntry.js"))).toString();
99
+ entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", serverAppContext.sharedDirectory).replace("p_apiDirectory", serverAppContext.apiDirectory).replace("p_lambdaDirectory", serverAppContext.lambdaDirectory);
100
+ await fse.writeFile(entryFilePath, entryCode);
101
+ },
102
+ async end() {
103
+ if (!needModernServer) {
104
+ return;
105
+ }
106
+ await handleDependencies(appDirectory, funcsDirectory, [
107
+ "@modern-js/prod-server"
108
+ ]);
109
+ }
110
+ };
111
+ };
112
+ export {
113
+ createVercelPreset
114
+ };
@@ -0,0 +1,68 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+ var require_vercelEntry = __commonJS({
6
+ "src/plugins/deploy/platforms/vercelEntry.js"(exports, module) {
7
+ const fs = require("node:fs/promises");
8
+ const path = require("node:path");
9
+ const { createProdServer } = require("@modern-js/prod-server");
10
+ p_genPluginImportsCode;
11
+ if (!process.env.NODE_ENV) {
12
+ process.env.NODE_ENV = "production";
13
+ }
14
+ let requestHandler = null;
15
+ let handlerCreationPromise = null;
16
+ async function loadRoutes(routeFilepath) {
17
+ try {
18
+ await fs.access(routeFilepath);
19
+ const content = await fs.readFile(routeFilepath, "utf-8");
20
+ const routeSpec = JSON.parse(content);
21
+ return routeSpec.routes || [];
22
+ } catch (error) {
23
+ console.warn("route.json not found or invalid, continuing with empty routes.");
24
+ return [];
25
+ }
26
+ }
27
+ async function initServer() {
28
+ const routeFilepath = path.join(__dirname, p_ROUTE_SPEC_FILE);
29
+ const routes = await loadRoutes(routeFilepath);
30
+ const dynamicProdOptions = p_dynamicProdOptions;
31
+ const prodServerOptions = {
32
+ pwd: __dirname,
33
+ routes,
34
+ disableCustomHook: true,
35
+ appContext: {
36
+ sharedDirectory: p_sharedDirectory,
37
+ apiDirectory: p_apiDirectory,
38
+ lambdaDirectory: p_lambdaDirectory
39
+ },
40
+ ...dynamicProdOptions
41
+ };
42
+ const app = await createProdServer(prodServerOptions);
43
+ return app.getRequestListener();
44
+ }
45
+ async function createHandler() {
46
+ if (!handlerCreationPromise) {
47
+ handlerCreationPromise = (async () => {
48
+ try {
49
+ requestHandler = await initServer();
50
+ } catch (error) {
51
+ console.error("Error creating server:", error);
52
+ process.exit(1);
53
+ }
54
+ })();
55
+ }
56
+ await handlerCreationPromise;
57
+ return requestHandler;
58
+ }
59
+ createHandler();
60
+ module.exports = async (req, res) => {
61
+ if (!requestHandler) {
62
+ await createHandler();
63
+ }
64
+ return requestHandler(req, res);
65
+ };
66
+ }
67
+ });
68
+ export default require_vercelEntry();
@@ -0,0 +1,44 @@
1
+ import path from "path";
2
+ import { ROUTE_SPEC_FILE, fs as fse, isDepExists } from "@modern-js/utils";
3
+ const serverAppContenxtTemplate = (appContext) => {
4
+ const { appDirectory, sharedDirectory, apiDirectory, lambdaDirectory, metaName } = appContext;
5
+ return {
6
+ sharedDirectory: `path.join(__dirname, "${path.relative(appDirectory, sharedDirectory)}")`,
7
+ apiDirectory: `path.join(__dirname, "${path.relative(appDirectory, apiDirectory)}")`,
8
+ lambdaDirectory: `path.join(__dirname, "${path.relative(appDirectory, lambdaDirectory)}")`,
9
+ metaName
10
+ };
11
+ };
12
+ const getPluginsCode = (plugins) => `[${plugins.map((_, index) => `plugin_${index}()`).join(",")}]`;
13
+ const genPluginImportsCode = (plugins) => {
14
+ return plugins.map((plugin, index) => `
15
+ let plugin_${index} = require('${plugin}')
16
+ plugin_${index} = plugin_${index}.default || plugin_${index}
17
+ `).join(";\n");
18
+ };
19
+ const getProjectUsage = (appDirectory, distDirectory) => {
20
+ const routeJSON = path.join(distDirectory, ROUTE_SPEC_FILE);
21
+ const { routes } = fse.readJSONSync(routeJSON);
22
+ let useSSR = false;
23
+ let useAPI = false;
24
+ routes.forEach((route) => {
25
+ if (route.isSSR) {
26
+ useSSR = true;
27
+ }
28
+ if (route.isApi) {
29
+ useAPI = true;
30
+ }
31
+ });
32
+ const useWebServer = isDepExists(appDirectory, "@modern-js/plugin-server");
33
+ return {
34
+ useSSR,
35
+ useAPI,
36
+ useWebServer
37
+ };
38
+ };
39
+ export {
40
+ genPluginImportsCode,
41
+ getPluginsCode,
42
+ getProjectUsage,
43
+ serverAppContenxtTemplate
44
+ };
@@ -1,5 +1,5 @@
1
1
  import path from "path";
2
- import { fs, ROUTE_SPEC_FILE } from "@modern-js/utils";
2
+ import { fs, MAIN_ENTRY_NAME, ROUTE_SPEC_FILE } from "@modern-js/utils";
3
3
  const generateRoutes = async (appContext) => {
4
4
  const { serverRoutes, distDirectory } = appContext;
5
5
  const output = JSON.stringify({
@@ -11,7 +11,11 @@ const getPathWithoutExt = (filename) => {
11
11
  const extname = path.extname(filename);
12
12
  return filename.slice(0, -extname.length);
13
13
  };
14
+ const isMainEntry = (entryName, mainEntryName) => {
15
+ return entryName === (mainEntryName || MAIN_ENTRY_NAME);
16
+ };
14
17
  export {
15
18
  generateRoutes,
16
- getPathWithoutExt
19
+ getPathWithoutExt,
20
+ isMainEntry
17
21
  };
@@ -4,7 +4,7 @@ import type { AppLegacyUserConfig, AppUserConfig } from './types';
4
4
  * This function helps you to autocomplete configuration types.
5
5
  * It accepts a direct config object, or a function that returns a config.
6
6
  */
7
- export declare const defineConfig: <B extends "rspack" | "webpack" = "webpack">(config: UserConfigExport<AppUserConfig<B>>) => UserConfigExport<AppUserConfig<B>>;
7
+ export declare const defineConfig: <B extends "webpack" | "rspack" = "webpack">(config: UserConfigExport<AppUserConfig<B>>) => UserConfigExport<AppUserConfig<B>>;
8
8
  /**
9
9
  * @deprecated Please use `defineConfig` instead.
10
10
  * `defineLegacyConfig` will be removed in the future major version.
@@ -0,0 +1 @@
1
+ export declare const handleDependencies: (appDir: string, serverRootDir: string, include: string[], entryFilter?: ((filePath: string) => boolean) | undefined) => Promise<void>;
@@ -0,0 +1,31 @@
1
+ import type { PackageJson } from 'pkg-types';
2
+ export type TracedPackage = {
3
+ name: string;
4
+ versions: Record<string, {
5
+ pkgJSON: PackageJson;
6
+ path: string;
7
+ isDirectDep: boolean;
8
+ files: string[];
9
+ }>;
10
+ };
11
+ export type TracedFile = {
12
+ path: string;
13
+ subpath: string;
14
+ parents: string[];
15
+ isDirectDep: boolean;
16
+ pkgPath: string;
17
+ pkgName: string;
18
+ pkgVersion?: string;
19
+ };
20
+ export declare const writePackage: (pkg: TracedPackage, version: string, projectDir: string, _pkgPath?: string) => Promise<void>;
21
+ export declare const linkPackage: (from: string, to: string, projectRootDir: string) => Promise<void>;
22
+ interface ReadDirOptions {
23
+ filter?: (filePath: string) => boolean;
24
+ }
25
+ export declare const readDirRecursive: (dir: string, options?: ReadDirOptions) => Promise<string[]>;
26
+ export declare const isFile: (file: string) => Promise<boolean>;
27
+ export declare const findEntryFiles: (rootDir: string, entryFilter?: ((filePath: string) => boolean) | undefined) => Promise<string[]>;
28
+ export declare const findPackageParents: (pkg: TracedPackage, version: string, tracedFiles: Record<string, TracedFile>) => string[];
29
+ export declare const traceFiles: (entryFiles: string[], serverRootDir: string, base?: string) => Promise<import("@vercel/nft").NodeFileTraceResult>;
30
+ export declare const resolveTracedPath: (base: string, p: string) => Promise<string>;
31
+ export {};
@@ -0,0 +1,4 @@
1
+ import { CliPlugin } from '@modern-js/core';
2
+ import { AppTools } from '../../types';
3
+ declare const _default: () => CliPlugin<AppTools>;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { CreatePreset } from './platform';
2
+ export declare const createNetlifyPreset: CreatePreset;
@@ -0,0 +1,2 @@
1
+ declare function _default(request: any, context: any): Promise<any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { CreatePreset } from './platform';
2
+ export declare const createNodePreset: CreatePreset;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { IAppContext, NormalizedConfig } from '@modern-js/core';
2
+ import { AppTools } from '../../../types';
3
+ export type CreatePreset = (appContext: IAppContext, config: NormalizedConfig<AppTools>, needModernServer?: boolean) => DeployPreset;
4
+ type DeployPreset = {
5
+ prepare?: () => Promise<void>;
6
+ writeOutput?: () => Promise<void>;
7
+ genEntry?: () => Promise<void>;
8
+ end?: () => Promise<void>;
9
+ };
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CreatePreset } from './platform';
2
+ export declare const createVercelPreset: CreatePreset;
@@ -0,0 +1,2 @@
1
+ declare function _exports(req: any, res: any): Promise<any>;
2
+ export = _exports;
@@ -0,0 +1,20 @@
1
+ import { IAppContext } from '@modern-js/core';
2
+ export type ServerAppContext = {
3
+ sharedDirectory: string;
4
+ apiDirectory: string;
5
+ lambdaDirectory: string;
6
+ metaName: string;
7
+ };
8
+ export declare const serverAppContenxtTemplate: (appContext: IAppContext) => {
9
+ sharedDirectory: string;
10
+ apiDirectory: string;
11
+ lambdaDirectory: string;
12
+ metaName: string;
13
+ };
14
+ export declare const getPluginsCode: (plugins: string[]) => string;
15
+ export declare const genPluginImportsCode: (plugins: string[]) => string;
16
+ export declare const getProjectUsage: (appDirectory: string, distDirectory: string) => {
17
+ useSSR: boolean;
18
+ useAPI: boolean;
19
+ useWebServer: boolean;
20
+ };
@@ -79,6 +79,7 @@ export type AppToolsHooks<B extends Bundler = 'webpack'> = {
79
79
  stats?: Stats | MultiStats;
80
80
  }, unknown>;
81
81
  beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
82
+ deploy: AsyncWorkflow<Record<string, any>, unknown>;
82
83
  afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
83
84
  beforeRestart: AsyncWorkflow<void, void>;
84
85
  registerDev: ParallelWorkflow<void, DevToolData>;
@@ -1,4 +1,4 @@
1
1
  import type { IAppContext } from '@modern-js/core';
2
- declare const generateRoutes: (appContext: IAppContext) => Promise<void>;
3
- declare const getPathWithoutExt: (filename: string) => string;
4
- export { generateRoutes, getPathWithoutExt };
2
+ export declare const generateRoutes: (appContext: IAppContext) => Promise<void>;
3
+ export declare const getPathWithoutExt: (filename: string) => string;
4
+ export declare const isMainEntry: (entryName: string, mainEntryName?: string) => boolean;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.50.0",
18
+ "version": "2.51.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -69,30 +69,34 @@
69
69
  "@babel/parser": "^7.22.15",
70
70
  "@babel/traverse": "^7.23.2",
71
71
  "@babel/types": "^7.23.0",
72
- "@rsbuild/plugin-node-polyfill": "0.6.15",
73
- "@rsbuild/shared": "0.6.15",
74
- "@rsbuild/core": "0.6.15",
72
+ "@rsbuild/plugin-node-polyfill": "0.7.1",
73
+ "@rsbuild/shared": "0.7.1",
74
+ "@rsbuild/core": "0.7.1",
75
+ "@swc/helpers": "0.5.3",
76
+ "@vercel/nft": "^0.26.4",
75
77
  "es-module-lexer": "^1.1.0",
76
78
  "esbuild": "0.17.19",
77
- "@swc/helpers": "0.5.3",
78
79
  "esbuild-register": "^3.5.0",
79
- "@modern-js/core": "2.50.0",
80
- "@modern-js/node-bundle-require": "2.50.0",
81
- "@modern-js/plugin": "2.50.0",
82
- "@modern-js/plugin-i18n": "2.50.0",
83
- "@modern-js/plugin-data-loader": "2.50.0",
84
- "@modern-js/plugin-lint": "2.50.0",
85
- "@modern-js/prod-server": "2.50.0",
86
- "@modern-js/server": "2.50.0",
87
- "@modern-js/server-utils": "2.50.0",
88
- "@modern-js/server-core": "2.50.0",
89
- "@modern-js/types": "2.50.0",
90
- "@modern-js/uni-builder": "2.50.0",
91
- "@modern-js/utils": "2.50.0",
92
- "@modern-js/rsbuild-plugin-esbuild": "2.50.0"
80
+ "mlly": "^1.6.1",
81
+ "pkg-types": "^1.1.0",
82
+ "std-env": "^3.7.0",
83
+ "@modern-js/node-bundle-require": "2.51.0",
84
+ "@modern-js/plugin-i18n": "2.51.0",
85
+ "@modern-js/plugin-data-loader": "2.51.0",
86
+ "@modern-js/plugin": "2.51.0",
87
+ "@modern-js/plugin-lint": "2.51.0",
88
+ "@modern-js/core": "2.51.0",
89
+ "@modern-js/prod-server": "2.51.0",
90
+ "@modern-js/rsbuild-plugin-esbuild": "2.51.0",
91
+ "@modern-js/server": "2.51.0",
92
+ "@modern-js/server-core": "2.51.0",
93
+ "@modern-js/server-utils": "2.51.0",
94
+ "@modern-js/types": "2.51.0",
95
+ "@modern-js/uni-builder": "2.51.0",
96
+ "@modern-js/utils": "2.51.0"
93
97
  },
94
98
  "devDependencies": {
95
- "@rsbuild/plugin-swc": "0.6.15",
99
+ "@rsbuild/plugin-swc": "0.7.1",
96
100
  "@types/babel__traverse": "7.18.5",
97
101
  "@types/jest": "^29",
98
102
  "@types/node": "^14",
@@ -101,8 +105,8 @@
101
105
  "tsconfig-paths": "^4.2.0",
102
106
  "typescript": "^5",
103
107
  "webpack": "^5.91.0",
104
- "@scripts/build": "2.50.0",
105
- "@scripts/jest-config": "2.50.0"
108
+ "@scripts/build": "2.51.0",
109
+ "@scripts/jest-config": "2.51.0"
106
110
  },
107
111
  "sideEffects": false,
108
112
  "publishConfig": {