@modern-js/app-tools 2.67.0 → 2.67.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/plugins/deploy/platforms/netlify-entry.js +1 -1
- package/dist/cjs/plugins/deploy/platforms/netlify.js +2 -1
- package/dist/cjs/run/index.js +24 -0
- package/dist/esm/plugins/deploy/platforms/netlify-entry.js +1 -1
- package/dist/esm/plugins/deploy/platforms/netlify.js +2 -1
- package/dist/esm/run/index.js +6 -1
- package/dist/esm-node/plugins/deploy/platforms/netlify-entry.js +1 -1
- package/dist/esm-node/plugins/deploy/platforms/netlify.js +2 -1
- package/dist/esm-node/run/index.js +24 -0
- package/dist/types/plugins/deploy/platforms/netlify-entry.d.cts +1 -0
- package/dist/types/utils/createServer.d.ts +4 -3
- package/package.json +20 -20
@@ -140,7 +140,8 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
|
|
140
140
|
appDir: appDirectory,
|
141
141
|
sourceDir: funcsDirectory,
|
142
142
|
includeEntries: [
|
143
|
-
require.resolve("@modern-js/prod-server")
|
143
|
+
require.resolve("@modern-js/prod-server"),
|
144
|
+
require.resolve("@modern-js/prod-server/netlify")
|
144
145
|
],
|
145
146
|
copyWholePackage(pkgName) {
|
146
147
|
return pkgName === "@modern-js/utils";
|
package/dist/cjs/run/index.js
CHANGED
@@ -42,6 +42,30 @@ var import_getUserConfig = require("../utils/getUserConfig");
|
|
42
42
|
var import_loadPlugins = require("../utils/loadPlugins");
|
43
43
|
async function run({ cwd, initialLog, metaName = "modern-js", version, internalPlugins, packageJsonConfig = import_constants.PACKAGE_JSON_CONFIG_NAME, statePluginName = import_constants.STATE_PLUGIN_NAME, configFile }) {
|
44
44
|
var _userConfig_runtime, _userConfig_runtime1;
|
45
|
+
const nodeVersion = process.versions.node;
|
46
|
+
const versionArr = nodeVersion.split(".").map(Number);
|
47
|
+
if (versionArr[0] <= 16) {
|
48
|
+
console.warn(`
|
49
|
+
${import_utils.chalk.bgRed.white.bold(" ⚠️ CRITICAL NODE.JS VERSION ALERT ⚠️ ")}
|
50
|
+
|
51
|
+
${import_utils.chalk.red.bold("Node.js 16 End-of-Life Notice:")}
|
52
|
+
${import_utils.chalk.red.bold.underline("June 30, 2025")} ${import_utils.chalk.red("- Security updates and support will cease")}
|
53
|
+
|
54
|
+
${import_utils.chalk.yellow("▸ Detected Runtime:")} ${import_utils.chalk.yellow.bold(`Node.js v${nodeVersion}`)}
|
55
|
+
${import_utils.chalk.green("▸ Required Minimum:")} ${import_utils.chalk.green.bold("Node.js LTS (v18.x or higher)")}
|
56
|
+
${import_utils.chalk.green("▸ Recommended:")} ${import_utils.chalk.green.bold("Node.js LTS (v22.x or higher)")}
|
57
|
+
|
58
|
+
${import_utils.chalk.cyan("Immediate Action Required:")}
|
59
|
+
${import_utils.chalk.gray("├──")} ${import_utils.chalk.yellow("Recommended Upgrade")}
|
60
|
+
${import_utils.chalk.bold("nvm install 22 --lts && nvm use 22")}
|
61
|
+
${import_utils.chalk.gray("├──")} ${import_utils.chalk.yellow("Manual Installation")}
|
62
|
+
${import_utils.chalk.underline("https://nodejs.org/download/release/lts-hydrogen/")}
|
63
|
+
${import_utils.chalk.gray("└──")} ${import_utils.chalk.yellow("Environment Verification")}
|
64
|
+
${import_utils.chalk.bold("node -v && npm -v")}
|
65
|
+
|
66
|
+
${import_utils.chalk.hex("#AAAAAA").italic("[Security Advisory] Production environments must update before 2025-06-30")}
|
67
|
+
`);
|
68
|
+
}
|
45
69
|
const command = process.argv[2];
|
46
70
|
const cliParams = (0, import_utils.minimist)(process.argv.slice(2));
|
47
71
|
const SUPPORT_CONFIG_PARAM_COMMANDS = [
|
@@ -4,7 +4,7 @@ var __commonJS = (cb, mod) => function __require() {
|
|
4
4
|
};
|
5
5
|
var require_netlify_entry = __commonJS({
|
6
6
|
"src/plugins/deploy/platforms/netlify-entry.cjs"(exports, module) {
|
7
|
-
var handler = require("./netlify-handler").handler;
|
7
|
+
var handler = require("./netlify-handler.cjs").handler;
|
8
8
|
module.exports.default = handler;
|
9
9
|
}
|
10
10
|
});
|
@@ -308,7 +308,8 @@ var createNetlifyPreset = function(appContext, modernConfig, needModernServer) {
|
|
308
308
|
appDir: appDirectory,
|
309
309
|
sourceDir: funcsDirectory,
|
310
310
|
includeEntries: [
|
311
|
-
require.resolve("@modern-js/prod-server")
|
311
|
+
require.resolve("@modern-js/prod-server"),
|
312
|
+
require.resolve("@modern-js/prod-server/netlify")
|
312
313
|
],
|
313
314
|
copyWholePackage: function copyWholePackage(pkgName) {
|
314
315
|
return pkgName === "@modern-js/utils";
|
package/dist/esm/run/index.js
CHANGED
@@ -15,11 +15,16 @@ function run(_) {
|
|
15
15
|
}
|
16
16
|
function _run() {
|
17
17
|
_run = _async_to_generator(function(param) {
|
18
|
-
var cwd, initialLog, _param_metaName, metaName, version, internalPlugins, _param_packageJsonConfig, packageJsonConfig, _param_statePluginName, statePluginName, configFile, _userConfig_runtime, _userConfig_runtime1, command, cliParams, SUPPORT_CONFIG_PARAM_COMMANDS, customConfigFile, appDirectory, finalConfigFile, userConfig, plugins;
|
18
|
+
var cwd, initialLog, _param_metaName, metaName, version, internalPlugins, _param_packageJsonConfig, packageJsonConfig, _param_statePluginName, statePluginName, configFile, _userConfig_runtime, _userConfig_runtime1, nodeVersion, versionArr, command, cliParams, SUPPORT_CONFIG_PARAM_COMMANDS, customConfigFile, appDirectory, finalConfigFile, userConfig, plugins;
|
19
19
|
return _ts_generator(this, function(_state) {
|
20
20
|
switch (_state.label) {
|
21
21
|
case 0:
|
22
22
|
cwd = param.cwd, initialLog = param.initialLog, _param_metaName = param.metaName, metaName = _param_metaName === void 0 ? "modern-js" : _param_metaName, version = param.version, internalPlugins = param.internalPlugins, _param_packageJsonConfig = param.packageJsonConfig, packageJsonConfig = _param_packageJsonConfig === void 0 ? PACKAGE_JSON_CONFIG_NAME : _param_packageJsonConfig, _param_statePluginName = param.statePluginName, statePluginName = _param_statePluginName === void 0 ? STATE_PLUGIN_NAME : _param_statePluginName, configFile = param.configFile;
|
23
|
+
nodeVersion = process.versions.node;
|
24
|
+
versionArr = nodeVersion.split(".").map(Number);
|
25
|
+
if (versionArr[0] <= 16) {
|
26
|
+
console.warn("\n ".concat(chalk.bgRed.white.bold(" ⚠️ CRITICAL NODE.JS VERSION ALERT ⚠️ "), "\n\n ").concat(chalk.red.bold("Node.js 16 End-of-Life Notice:"), "\n ").concat(chalk.red.bold.underline("June 30, 2025"), " ").concat(chalk.red("- Security updates and support will cease"), "\n\n ").concat(chalk.yellow("▸ Detected Runtime:"), " ").concat(chalk.yellow.bold("Node.js v".concat(nodeVersion)), "\n ").concat(chalk.green("▸ Required Minimum:"), " ").concat(chalk.green.bold("Node.js LTS (v18.x or higher)"), "\n ").concat(chalk.green("▸ Recommended:"), " ").concat(chalk.green.bold("Node.js LTS (v22.x or higher)"), "\n\n ").concat(chalk.cyan("Immediate Action Required:"), "\n ").concat(chalk.gray("├──"), " ").concat(chalk.yellow("Recommended Upgrade"), "\n ").concat(chalk.bold("nvm install 22 --lts && nvm use 22"), "\n ").concat(chalk.gray("├──"), " ").concat(chalk.yellow("Manual Installation"), "\n ").concat(chalk.underline("https://nodejs.org/download/release/lts-hydrogen/"), "\n ").concat(chalk.gray("└──"), " ").concat(chalk.yellow("Environment Verification"), "\n ").concat(chalk.bold("node -v && npm -v"), "\n\n ").concat(chalk.hex("#AAAAAA").italic("[Security Advisory] Production environments must update before 2025-06-30"), "\n "));
|
27
|
+
}
|
23
28
|
command = process.argv[2];
|
24
29
|
cliParams = minimist(process.argv.slice(2));
|
25
30
|
SUPPORT_CONFIG_PARAM_COMMANDS = [
|
@@ -4,7 +4,7 @@ var __commonJS = (cb, mod) => function __require() {
|
|
4
4
|
};
|
5
5
|
var require_netlify_entry = __commonJS({
|
6
6
|
"src/plugins/deploy/platforms/netlify-entry.cjs"(exports, module) {
|
7
|
-
const { handler } = require("./netlify-handler");
|
7
|
+
const { handler } = require("./netlify-handler.cjs");
|
8
8
|
module.exports.default = handler;
|
9
9
|
}
|
10
10
|
});
|
@@ -107,7 +107,8 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
|
|
107
107
|
appDir: appDirectory,
|
108
108
|
sourceDir: funcsDirectory,
|
109
109
|
includeEntries: [
|
110
|
-
require.resolve("@modern-js/prod-server")
|
110
|
+
require.resolve("@modern-js/prod-server"),
|
111
|
+
require.resolve("@modern-js/prod-server/netlify")
|
111
112
|
],
|
112
113
|
copyWholePackage(pkgName) {
|
113
114
|
return pkgName === "@modern-js/utils";
|
@@ -9,6 +9,30 @@ import { getUserConfig } from "../utils/getUserConfig";
|
|
9
9
|
import { loadInternalPlugins } from "../utils/loadPlugins";
|
10
10
|
async function run({ cwd, initialLog, metaName = "modern-js", version, internalPlugins, packageJsonConfig = PACKAGE_JSON_CONFIG_NAME, statePluginName = STATE_PLUGIN_NAME, configFile }) {
|
11
11
|
var _userConfig_runtime, _userConfig_runtime1;
|
12
|
+
const nodeVersion = process.versions.node;
|
13
|
+
const versionArr = nodeVersion.split(".").map(Number);
|
14
|
+
if (versionArr[0] <= 16) {
|
15
|
+
console.warn(`
|
16
|
+
${chalk.bgRed.white.bold(" ⚠️ CRITICAL NODE.JS VERSION ALERT ⚠️ ")}
|
17
|
+
|
18
|
+
${chalk.red.bold("Node.js 16 End-of-Life Notice:")}
|
19
|
+
${chalk.red.bold.underline("June 30, 2025")} ${chalk.red("- Security updates and support will cease")}
|
20
|
+
|
21
|
+
${chalk.yellow("▸ Detected Runtime:")} ${chalk.yellow.bold(`Node.js v${nodeVersion}`)}
|
22
|
+
${chalk.green("▸ Required Minimum:")} ${chalk.green.bold("Node.js LTS (v18.x or higher)")}
|
23
|
+
${chalk.green("▸ Recommended:")} ${chalk.green.bold("Node.js LTS (v22.x or higher)")}
|
24
|
+
|
25
|
+
${chalk.cyan("Immediate Action Required:")}
|
26
|
+
${chalk.gray("├──")} ${chalk.yellow("Recommended Upgrade")}
|
27
|
+
${chalk.bold("nvm install 22 --lts && nvm use 22")}
|
28
|
+
${chalk.gray("├──")} ${chalk.yellow("Manual Installation")}
|
29
|
+
${chalk.underline("https://nodejs.org/download/release/lts-hydrogen/")}
|
30
|
+
${chalk.gray("└──")} ${chalk.yellow("Environment Verification")}
|
31
|
+
${chalk.bold("node -v && npm -v")}
|
32
|
+
|
33
|
+
${chalk.hex("#AAAAAA").italic("[Security Advisory] Production environments must update before 2025-06-30")}
|
34
|
+
`);
|
35
|
+
}
|
12
36
|
const command = process.argv[2];
|
13
37
|
const cliParams = minimist(process.argv.slice(2));
|
14
38
|
const SUPPORT_CONFIG_PARAM_COMMANDS = [
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Server } from 'node:http';
|
2
|
+
import type { Http2SecureServer } from 'node:http2';
|
2
3
|
import { type ModernDevServerOptions } from '@modern-js/server';
|
3
|
-
export declare const getServer: () => Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | null;
|
4
|
-
export declare const setServer: (newServer: Server) => void;
|
4
|
+
export declare const getServer: () => Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | Http2SecureServer | null;
|
5
|
+
export declare const setServer: (newServer: Server | Http2SecureServer) => void;
|
5
6
|
export declare const closeServer: () => Promise<void>;
|
6
|
-
export declare const createServer: (options: ModernDevServerOptions) => Promise<Server>;
|
7
|
+
export declare const createServer: (options: ModernDevServerOptions) => Promise<Server | Http2SecureServer>;
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.67.
|
18
|
+
"version": "2.67.2",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -80,7 +80,7 @@
|
|
80
80
|
"@babel/parser": "^7.22.15",
|
81
81
|
"@babel/traverse": "^7.23.2",
|
82
82
|
"@babel/types": "^7.26.0",
|
83
|
-
"@rsbuild/core": "1.3.
|
83
|
+
"@rsbuild/core": "1.3.7",
|
84
84
|
"@rsbuild/plugin-node-polyfill": "1.3.0",
|
85
85
|
"@swc/helpers": "0.5.13",
|
86
86
|
"es-module-lexer": "^1.1.0",
|
@@ -88,27 +88,27 @@
|
|
88
88
|
"esbuild-register": "^3.5.0",
|
89
89
|
"flatted": "^3.2.9",
|
90
90
|
"mlly": "^1.6.1",
|
91
|
-
"ndepe": "0.1.8",
|
91
|
+
"ndepe": "^0.1.8",
|
92
92
|
"pkg-types": "^1.1.0",
|
93
93
|
"std-env": "^3.7.0",
|
94
|
-
"@modern-js/core": "2.67.
|
95
|
-
"@modern-js/node-bundle-require": "2.67.
|
96
|
-
"@modern-js/plugin": "2.67.
|
97
|
-
"@modern-js/plugin-
|
98
|
-
"@modern-js/plugin-
|
99
|
-
"@modern-js/plugin-
|
100
|
-
"@modern-js/
|
101
|
-
"@modern-js/
|
102
|
-
"@modern-js/server": "2.67.
|
103
|
-
"@modern-js/server-core": "2.67.
|
104
|
-
"@modern-js/server-utils": "2.67.
|
105
|
-
"@modern-js/types": "2.67.
|
106
|
-
"@modern-js/uni-builder": "2.67.
|
107
|
-
"@modern-js/utils": "2.67.
|
94
|
+
"@modern-js/core": "2.67.2",
|
95
|
+
"@modern-js/node-bundle-require": "2.67.2",
|
96
|
+
"@modern-js/plugin": "2.67.2",
|
97
|
+
"@modern-js/plugin-data-loader": "2.67.2",
|
98
|
+
"@modern-js/plugin-i18n": "2.67.2",
|
99
|
+
"@modern-js/plugin-v2": "2.67.2",
|
100
|
+
"@modern-js/prod-server": "2.67.2",
|
101
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.67.2",
|
102
|
+
"@modern-js/server": "2.67.2",
|
103
|
+
"@modern-js/server-core": "2.67.2",
|
104
|
+
"@modern-js/server-utils": "2.67.2",
|
105
|
+
"@modern-js/types": "2.67.2",
|
106
|
+
"@modern-js/uni-builder": "2.67.2",
|
107
|
+
"@modern-js/utils": "2.67.2"
|
108
108
|
},
|
109
109
|
"devDependencies": {
|
110
110
|
"@rsbuild/plugin-webpack-swc": "1.1.0",
|
111
|
-
"@types/babel__traverse": "7.20.
|
111
|
+
"@types/babel__traverse": "7.20.7",
|
112
112
|
"@types/jest": "^29",
|
113
113
|
"@types/node": "^16",
|
114
114
|
"jest": "^29",
|
@@ -116,8 +116,8 @@
|
|
116
116
|
"tsconfig-paths": "^4.2.0",
|
117
117
|
"typescript": "^5",
|
118
118
|
"webpack": "^5.98.0",
|
119
|
-
"@scripts/
|
120
|
-
"@scripts/
|
119
|
+
"@scripts/build": "2.66.0",
|
120
|
+
"@scripts/jest-config": "2.66.0"
|
121
121
|
},
|
122
122
|
"peerDependencies": {
|
123
123
|
"ts-node": "^10.7.0",
|