@modern-js/plugin 3.11.3 → 3.12.0
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/cli/api.js +1 -1
- package/dist/cjs/cli/context.js +1 -1
- package/dist/cjs/cli/run/config/loadConfig.js +1 -1
- package/dist/cjs/runtime/api.js +1 -1
- package/dist/cjs/server/api.js +1 -1
- package/dist/esm/cli/api.mjs +1 -1
- package/dist/esm/cli/context.mjs +1 -1
- package/dist/esm/cli/run/config/loadConfig.mjs +1 -1
- package/dist/esm/runtime/api.mjs +1 -1
- package/dist/esm/server/api.mjs +1 -1
- package/dist/esm-node/cli/api.mjs +1 -1
- package/dist/esm-node/cli/context.mjs +1 -1
- package/dist/esm-node/cli/run/config/loadConfig.mjs +1 -1
- package/dist/esm-node/runtime/api.mjs +1 -1
- package/dist/esm-node/server/api.mjs +1 -1
- package/package.json +6 -6
package/dist/cjs/cli/api.js
CHANGED
|
@@ -36,7 +36,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
36
36
|
const { hooks, extendsHooks, plugins } = context;
|
|
37
37
|
function getAppContext() {
|
|
38
38
|
if (context) {
|
|
39
|
-
const { hooks, extendsHooks, config, normalizedConfig, pluginAPI, ...appContext } = context;
|
|
39
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, normalizedConfig: _normalizedConfig, pluginAPI: _pluginAPI, ...appContext } = context;
|
|
40
40
|
appContext._internalContext = context;
|
|
41
41
|
return appContext;
|
|
42
42
|
}
|
package/dist/cjs/cli/context.js
CHANGED
|
@@ -44,7 +44,7 @@ const external_path_namespaceObject = require("path");
|
|
|
44
44
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
45
45
|
const external_hooks_js_namespaceObject = require("./hooks.js");
|
|
46
46
|
function initAppContext(params) {
|
|
47
|
-
const { appDirectory, srcDir = 'src'
|
|
47
|
+
const { appDirectory, srcDir = 'src' } = params;
|
|
48
48
|
return {
|
|
49
49
|
metaName: params.metaName,
|
|
50
50
|
packageName: params.packageName,
|
|
@@ -60,7 +60,7 @@ const clearFilesOverTime = async (targetDir, overtime)=>{
|
|
|
60
60
|
if (files.length > 0) {
|
|
61
61
|
for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) utils_namespaceObject.fs.unlinkSync(file.path);
|
|
62
62
|
}
|
|
63
|
-
} catch
|
|
63
|
+
} catch {}
|
|
64
64
|
};
|
|
65
65
|
async function loadConfigContent(configFile) {
|
|
66
66
|
const jitiFrom = __filename;
|
package/dist/cjs/runtime/api.js
CHANGED
|
@@ -35,7 +35,7 @@ function initPluginAPI({ context, plugins }) {
|
|
|
35
35
|
const { hooks, extendsHooks } = context;
|
|
36
36
|
function getRuntimeContext() {
|
|
37
37
|
if (context) {
|
|
38
|
-
const { hooks, extendsHooks, config, pluginAPI, ...runtimeContext } = context;
|
|
38
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...runtimeContext } = context;
|
|
39
39
|
runtimeContext._internalContext = context;
|
|
40
40
|
return runtimeContext;
|
|
41
41
|
}
|
package/dist/cjs/server/api.js
CHANGED
|
@@ -38,7 +38,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
38
38
|
const { hooks, extendsHooks, plugins } = context;
|
|
39
39
|
function getServerContext() {
|
|
40
40
|
if (context) {
|
|
41
|
-
const { hooks, extendsHooks, config, pluginAPI, ...serverContext } = context;
|
|
41
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...serverContext } = context;
|
|
42
42
|
serverContext._internalContext = context;
|
|
43
43
|
return serverContext;
|
|
44
44
|
}
|
package/dist/esm/cli/api.mjs
CHANGED
|
@@ -4,7 +4,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
4
4
|
const { hooks, extendsHooks, plugins } = context;
|
|
5
5
|
function getAppContext() {
|
|
6
6
|
if (context) {
|
|
7
|
-
const { hooks, extendsHooks, config, normalizedConfig, pluginAPI, ...appContext } = context;
|
|
7
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, normalizedConfig: _normalizedConfig, pluginAPI: _pluginAPI, ...appContext } = context;
|
|
8
8
|
appContext._internalContext = context;
|
|
9
9
|
return appContext;
|
|
10
10
|
}
|
package/dist/esm/cli/context.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { initHooks } from "./hooks.mjs";
|
|
3
3
|
function initAppContext(params) {
|
|
4
|
-
const { appDirectory, srcDir = 'src'
|
|
4
|
+
const { appDirectory, srcDir = 'src' } = params;
|
|
5
5
|
return {
|
|
6
6
|
metaName: params.metaName,
|
|
7
7
|
packageName: params.packageName,
|
|
@@ -15,7 +15,7 @@ const clearFilesOverTime = async (targetDir, overtime)=>{
|
|
|
15
15
|
if (files.length > 0) {
|
|
16
16
|
for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) fs.unlinkSync(file.path);
|
|
17
17
|
}
|
|
18
|
-
} catch
|
|
18
|
+
} catch {}
|
|
19
19
|
};
|
|
20
20
|
async function loadConfigContent(configFile) {
|
|
21
21
|
const jitiFrom = import.meta.url;
|
package/dist/esm/runtime/api.mjs
CHANGED
|
@@ -3,7 +3,7 @@ function initPluginAPI({ context, plugins }) {
|
|
|
3
3
|
const { hooks, extendsHooks } = context;
|
|
4
4
|
function getRuntimeContext() {
|
|
5
5
|
if (context) {
|
|
6
|
-
const { hooks, extendsHooks, config, pluginAPI, ...runtimeContext } = context;
|
|
6
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...runtimeContext } = context;
|
|
7
7
|
runtimeContext._internalContext = context;
|
|
8
8
|
return runtimeContext;
|
|
9
9
|
}
|
package/dist/esm/server/api.mjs
CHANGED
|
@@ -5,7 +5,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
5
5
|
const { hooks, extendsHooks, plugins } = context;
|
|
6
6
|
function getServerContext() {
|
|
7
7
|
if (context) {
|
|
8
|
-
const { hooks, extendsHooks, config, pluginAPI, ...serverContext } = context;
|
|
8
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...serverContext } = context;
|
|
9
9
|
serverContext._internalContext = context;
|
|
10
10
|
return serverContext;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
5
5
|
const { hooks, extendsHooks, plugins } = context;
|
|
6
6
|
function getAppContext() {
|
|
7
7
|
if (context) {
|
|
8
|
-
const { hooks, extendsHooks, config, normalizedConfig, pluginAPI, ...appContext } = context;
|
|
8
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, normalizedConfig: _normalizedConfig, pluginAPI: _pluginAPI, ...appContext } = context;
|
|
9
9
|
appContext._internalContext = context;
|
|
10
10
|
return appContext;
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@ import "node:module";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { initHooks } from "./hooks.mjs";
|
|
4
4
|
function initAppContext(params) {
|
|
5
|
-
const { appDirectory, srcDir = 'src'
|
|
5
|
+
const { appDirectory, srcDir = 'src' } = params;
|
|
6
6
|
return {
|
|
7
7
|
metaName: params.metaName,
|
|
8
8
|
packageName: params.packageName,
|
|
@@ -18,7 +18,7 @@ const clearFilesOverTime = async (targetDir, overtime)=>{
|
|
|
18
18
|
if (files.length > 0) {
|
|
19
19
|
for (const file of files)if (currentTime - file.stats.birthtimeMs >= 1000 * overtime) fs.unlinkSync(file.path);
|
|
20
20
|
}
|
|
21
|
-
} catch
|
|
21
|
+
} catch {}
|
|
22
22
|
};
|
|
23
23
|
async function loadConfigContent(configFile) {
|
|
24
24
|
const jitiFrom = import.meta.url;
|
|
@@ -4,7 +4,7 @@ function initPluginAPI({ context, plugins }) {
|
|
|
4
4
|
const { hooks, extendsHooks } = context;
|
|
5
5
|
function getRuntimeContext() {
|
|
6
6
|
if (context) {
|
|
7
|
-
const { hooks, extendsHooks, config, pluginAPI, ...runtimeContext } = context;
|
|
7
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...runtimeContext } = context;
|
|
8
8
|
runtimeContext._internalContext = context;
|
|
9
9
|
return runtimeContext;
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
6
6
|
const { hooks, extendsHooks, plugins } = context;
|
|
7
7
|
function getServerContext() {
|
|
8
8
|
if (context) {
|
|
9
|
-
const { hooks, extendsHooks, config, pluginAPI, ...serverContext } = context;
|
|
9
|
+
const { hooks: _hooks, extendsHooks: _extendsHooks, config: _config, pluginAPI: _pluginAPI, ...serverContext } = context;
|
|
10
10
|
serverContext._internalContext = context;
|
|
11
11
|
return serverContext;
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.12.0",
|
|
19
19
|
"types": "./dist/types/index.d.ts",
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
21
21
|
"exports": {
|
|
@@ -85,16 +85,16 @@
|
|
|
85
85
|
"@rsbuild/core": "2.3.2",
|
|
86
86
|
"@swc/helpers": "^0.5.17",
|
|
87
87
|
"jiti": "^2.7.0",
|
|
88
|
-
"@modern-js/runtime-utils": "3.
|
|
89
|
-
"@modern-js/
|
|
90
|
-
"@modern-js/
|
|
88
|
+
"@modern-js/runtime-utils": "3.12.0",
|
|
89
|
+
"@modern-js/utils": "3.12.0",
|
|
90
|
+
"@modern-js/types": "3.12.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@types/node": "^20",
|
|
94
94
|
"@types/react": "^19.3.0",
|
|
95
95
|
"typescript": "^5",
|
|
96
|
-
"@modern-js/
|
|
97
|
-
"@modern-js/
|
|
96
|
+
"@modern-js/rslib": "3.12.0",
|
|
97
|
+
"@modern-js/builder": "3.12.0"
|
|
98
98
|
},
|
|
99
99
|
"sideEffects": false,
|
|
100
100
|
"publishConfig": {
|