@modern-js/plugin-v2 0.0.0-nightly-20250327160302 → 0.0.0-nightly-20250330160301
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.
|
@@ -58,11 +58,12 @@ const createCli = () => {
|
|
|
58
58
|
var _context_hooks_onAfterPrepare, _context_hooks;
|
|
59
59
|
pluginManager.clear();
|
|
60
60
|
initOptions = options;
|
|
61
|
-
const { metaName = "
|
|
61
|
+
const { metaName = "modern-js", configFile, config, command, version, packageJsonConfig, internalPlugins, handleSetupResult } = options;
|
|
62
62
|
const appDirectory = await (0, import_initAppDir.initAppDir)(options === null || options === void 0 ? void 0 : options.cwd);
|
|
63
63
|
(0, import_commander2.initCommandsMap)();
|
|
64
64
|
(0, import_commander2.setProgramVersion)(version);
|
|
65
|
-
|
|
65
|
+
const envName = metaName === "modern-js" ? "MODERN" : metaName;
|
|
66
|
+
(0, import_loadEnv.loadEnv)(appDirectory, process.env[`${envName.toUpperCase()}_ENV`]);
|
|
66
67
|
const loaded = await (0, import_createLoadedConfig.createLoadedConfig)(appDirectory, configFile, packageJsonConfig, config);
|
|
67
68
|
const allPlugins = [
|
|
68
69
|
...internalPlugins || [],
|
|
@@ -62,13 +62,13 @@ var createCli = function() {
|
|
|
62
62
|
var existListenerMap = /* @__PURE__ */ new Map();
|
|
63
63
|
function _init() {
|
|
64
64
|
_init = _async_to_generator(function(options) {
|
|
65
|
-
var _context_hooks_onAfterPrepare, _context_hooks, _options_metaName, metaName, configFile, config, command, version, packageJsonConfig, internalPlugins, handleSetupResult, appDirectory, loaded, allPlugins, plugins, context, pluginAPI, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _plugin_setup, setupResult, err, extraConfigs, normalizedConfig, resolved;
|
|
65
|
+
var _context_hooks_onAfterPrepare, _context_hooks, _options_metaName, metaName, configFile, config, command, version, packageJsonConfig, internalPlugins, handleSetupResult, appDirectory, envName, loaded, allPlugins, plugins, context, pluginAPI, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, plugin, _plugin_setup, setupResult, err, extraConfigs, normalizedConfig, resolved;
|
|
66
66
|
return _ts_generator(this, function(_state) {
|
|
67
67
|
switch (_state.label) {
|
|
68
68
|
case 0:
|
|
69
69
|
pluginManager.clear();
|
|
70
70
|
initOptions = options;
|
|
71
|
-
_options_metaName = options.metaName, metaName = _options_metaName === void 0 ? "
|
|
71
|
+
_options_metaName = options.metaName, metaName = _options_metaName === void 0 ? "modern-js" : _options_metaName, configFile = options.configFile, config = options.config, command = options.command, version = options.version, packageJsonConfig = options.packageJsonConfig, internalPlugins = options.internalPlugins, handleSetupResult = options.handleSetupResult;
|
|
72
72
|
return [
|
|
73
73
|
4,
|
|
74
74
|
initAppDir(options === null || options === void 0 ? void 0 : options.cwd)
|
|
@@ -77,7 +77,8 @@ var createCli = function() {
|
|
|
77
77
|
appDirectory = _state.sent();
|
|
78
78
|
initCommandsMap();
|
|
79
79
|
setProgramVersion(version);
|
|
80
|
-
|
|
80
|
+
envName = metaName === "modern-js" ? "MODERN" : metaName;
|
|
81
|
+
loadEnv(appDirectory, process.env["".concat(envName.toUpperCase(), "_ENV")]);
|
|
81
82
|
return [
|
|
82
83
|
4,
|
|
83
84
|
createLoadedConfig(appDirectory, configFile, packageJsonConfig, config)
|
|
@@ -35,11 +35,12 @@ const createCli = () => {
|
|
|
35
35
|
var _context_hooks_onAfterPrepare, _context_hooks;
|
|
36
36
|
pluginManager.clear();
|
|
37
37
|
initOptions = options;
|
|
38
|
-
const { metaName = "
|
|
38
|
+
const { metaName = "modern-js", configFile, config, command, version, packageJsonConfig, internalPlugins, handleSetupResult } = options;
|
|
39
39
|
const appDirectory = await initAppDir(options === null || options === void 0 ? void 0 : options.cwd);
|
|
40
40
|
initCommandsMap();
|
|
41
41
|
setProgramVersion(version);
|
|
42
|
-
|
|
42
|
+
const envName = metaName === "modern-js" ? "MODERN" : metaName;
|
|
43
|
+
loadEnv(appDirectory, process.env[`${envName.toUpperCase()}_ENV`]);
|
|
43
44
|
const loaded = await createLoadedConfig(appDirectory, configFile, packageJsonConfig, config);
|
|
44
45
|
const allPlugins = [
|
|
45
46
|
...internalPlugins || [],
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-nightly-
|
|
18
|
+
"version": "0.0.0-nightly-20250330160301",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@swc/helpers": "0.5.13",
|
|
83
83
|
"jiti": "1.21.7",
|
|
84
|
-
"@modern-js/runtime-utils": "0.0.0-nightly-
|
|
85
|
-
"@modern-js/utils": "0.0.0-nightly-
|
|
84
|
+
"@modern-js/runtime-utils": "0.0.0-nightly-20250330160301",
|
|
85
|
+
"@modern-js/utils": "0.0.0-nightly-20250330160301"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@rsbuild/core": "1.2.19",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"@types/react": "^18.3.11",
|
|
92
92
|
"jest": "^29",
|
|
93
93
|
"typescript": "^5",
|
|
94
|
-
"@modern-js/types": "0.0.0-nightly-
|
|
95
|
-
"@modern-js/uni-builder": "0.0.0-nightly-
|
|
96
|
-
"@scripts/
|
|
97
|
-
"@scripts/
|
|
94
|
+
"@modern-js/types": "0.0.0-nightly-20250330160301",
|
|
95
|
+
"@modern-js/uni-builder": "0.0.0-nightly-20250330160301",
|
|
96
|
+
"@scripts/build": "0.0.0-nightly-20250330160301",
|
|
97
|
+
"@scripts/jest-config": "0.0.0-nightly-20250330160301"
|
|
98
98
|
},
|
|
99
99
|
"sideEffects": false,
|
|
100
100
|
"publishConfig": {
|