@modern-js/app-tools 2.67.0 → 2.67.1
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/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 = [
|
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 = [
|
@@ -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.1",
|
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.5",
|
84
84
|
"@rsbuild/plugin-node-polyfill": "1.3.0",
|
85
85
|
"@swc/helpers": "0.5.13",
|
86
86
|
"es-module-lexer": "^1.1.0",
|
@@ -91,24 +91,24 @@
|
|
91
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/
|
96
|
-
"@modern-js/
|
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.1",
|
95
|
+
"@modern-js/plugin": "2.67.1",
|
96
|
+
"@modern-js/node-bundle-require": "2.67.1",
|
97
|
+
"@modern-js/plugin-data-loader": "2.67.1",
|
98
|
+
"@modern-js/plugin-i18n": "2.67.1",
|
99
|
+
"@modern-js/plugin-v2": "2.67.1",
|
100
|
+
"@modern-js/prod-server": "2.67.1",
|
101
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.67.1",
|
102
|
+
"@modern-js/server": "2.67.1",
|
103
|
+
"@modern-js/server-core": "2.67.1",
|
104
|
+
"@modern-js/server-utils": "2.67.1",
|
105
|
+
"@modern-js/types": "2.67.1",
|
106
|
+
"@modern-js/uni-builder": "2.67.1",
|
107
|
+
"@modern-js/utils": "2.67.1"
|
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",
|