@modern-js/plugin-v2 0.0.0-nightly-20250514160342 → 0.0.0-nightly-20250515160310
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/server/api.js
CHANGED
|
@@ -65,7 +65,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
65
65
|
const pluginAPI = {
|
|
66
66
|
isPluginExists: pluginManager.isPluginExists,
|
|
67
67
|
getServerContext,
|
|
68
|
-
getConfig,
|
|
68
|
+
getServerConfig: getConfig,
|
|
69
69
|
getHooks,
|
|
70
70
|
updateServerContext,
|
|
71
71
|
modifyConfig: hooks.modifyConfig.tap,
|
package/dist/esm/server/api.js
CHANGED
|
@@ -49,7 +49,7 @@ function initPluginAPI(param) {
|
|
|
49
49
|
var pluginAPI = _object_spread({
|
|
50
50
|
isPluginExists: pluginManager.isPluginExists,
|
|
51
51
|
getServerContext,
|
|
52
|
-
getConfig,
|
|
52
|
+
getServerConfig: getConfig,
|
|
53
53
|
getHooks,
|
|
54
54
|
updateServerContext,
|
|
55
55
|
modifyConfig: hooks.modifyConfig.tap,
|
|
@@ -41,7 +41,7 @@ function initPluginAPI({ context, pluginManager }) {
|
|
|
41
41
|
const pluginAPI = {
|
|
42
42
|
isPluginExists: pluginManager.isPluginExists,
|
|
43
43
|
getServerContext,
|
|
44
|
-
getConfig,
|
|
44
|
+
getServerConfig: getConfig,
|
|
45
45
|
getHooks,
|
|
46
46
|
updateServerContext,
|
|
47
47
|
modifyConfig: hooks.modifyConfig.tap,
|
|
@@ -8,6 +8,6 @@ interface ContextParams<Extends extends ServerPluginExtends> {
|
|
|
8
8
|
export declare function initServerContext<Extends extends ServerPluginExtends>(params: {
|
|
9
9
|
options: ServerCreateOptions;
|
|
10
10
|
plugins: ServerPlugin<Extends>[];
|
|
11
|
-
}): ServerContext<Extends
|
|
11
|
+
}): ServerContext<Extends> & Extends['extendContext'];
|
|
12
12
|
export declare function createServerContext<Extends extends ServerPluginExtends>({ serverContext, config, }: ContextParams<Extends>): InternalServerContext<Extends>;
|
|
13
13
|
export {};
|
|
@@ -4,8 +4,8 @@ import type { ServerContext } from './context';
|
|
|
4
4
|
import type { Hooks, ModifyConfigFn, OnPrepareFn, OnResetFn } from './hooks';
|
|
5
5
|
import type { ServerPluginExtends } from './plugin';
|
|
6
6
|
export type ServerPluginAPI<Extends extends ServerPluginExtends> = Readonly<{
|
|
7
|
-
getServerContext: () => Readonly<ServerContext<Extends
|
|
8
|
-
updateServerContext: (updateContext: DeepPartial<ServerContext<Extends
|
|
7
|
+
getServerContext: () => Readonly<ServerContext<Extends> & Extends['extendContext']>;
|
|
8
|
+
updateServerContext: (updateContext: DeepPartial<ServerContext<Extends> & Extends['extendContext']>) => void;
|
|
9
9
|
getHooks: () => Readonly<Hooks<Extends['config']> & Extends['extendHooks']>;
|
|
10
10
|
getServerConfig: () => Readonly<Extends['config']>;
|
|
11
11
|
modifyConfig: PluginHookTap<ModifyConfigFn<Extends['config']>>;
|
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-20250515160310",
|
|
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.17",
|
|
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-20250515160310",
|
|
85
|
+
"@modern-js/utils": "0.0.0-nightly-20250515160310"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@rsbuild/core": "1.3.20",
|
|
@@ -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/build": "0.0.0-nightly-
|
|
97
|
-
"@scripts/jest-config": "0.0.0-nightly-
|
|
94
|
+
"@modern-js/types": "0.0.0-nightly-20250515160310",
|
|
95
|
+
"@modern-js/uni-builder": "0.0.0-nightly-20250515160310",
|
|
96
|
+
"@scripts/build": "0.0.0-nightly-20250515160310",
|
|
97
|
+
"@scripts/jest-config": "0.0.0-nightly-20250515160310"
|
|
98
98
|
},
|
|
99
99
|
"sideEffects": false,
|
|
100
100
|
"publishConfig": {
|