@modern-js/runtime 2.65.3 → 2.65.4
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/core/compat/hooks.js +2 -2
- package/dist/esm/core/compat/hooks.js +2 -2
- package/dist/esm-node/core/compat/hooks.js +2 -2
- package/dist/types/core/plugin/base.d.ts +1 -1
- package/dist/types/core/plugin/index.d.ts +1 -1
- package/dist/types/core/plugin/types.d.ts +2 -1
- package/package.json +12 -12
|
@@ -67,8 +67,8 @@ function getHookRunners(runtimeContext) {
|
|
|
67
67
|
pickContext: (context) => {
|
|
68
68
|
return hooks.pickContext.call(context);
|
|
69
69
|
},
|
|
70
|
-
|
|
71
|
-
return hooks.
|
|
70
|
+
config: () => {
|
|
71
|
+
return hooks.config.call();
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
}
|
|
@@ -76,8 +76,8 @@ function getHookRunners(runtimeContext) {
|
|
|
76
76
|
pickContext: function(context) {
|
|
77
77
|
return hooks.pickContext.call(context);
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
return hooks.
|
|
79
|
+
config: function() {
|
|
80
|
+
return hooks.config.call();
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
}
|
|
@@ -42,8 +42,8 @@ function getHookRunners(runtimeContext) {
|
|
|
42
42
|
pickContext: (context) => {
|
|
43
43
|
return hooks.pickContext.call(context);
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
return hooks.
|
|
45
|
+
config: () => {
|
|
46
|
+
return hooks.config.call();
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -7,7 +7,7 @@ export type RuntimeHooks = {
|
|
|
7
7
|
beforeRender: AsyncInterruptWorkflow<RuntimeContext, void>;
|
|
8
8
|
wrapRoot: Waterfall<React.ComponentType<any>>;
|
|
9
9
|
pickContext: Waterfall<TRuntimeContext>;
|
|
10
|
-
|
|
10
|
+
config: SyncParallelWorkflow<void, Record<string, any>>;
|
|
11
11
|
};
|
|
12
12
|
export type RuntimePluginAPI = {
|
|
13
13
|
useRuntimeConfigContext: () => RuntimeConfig;
|
|
@@ -13,7 +13,7 @@ export declare function registerPlugin(internalPlugins: (RuntimePlugin | Runtime
|
|
|
13
13
|
onBeforeRender: import("@modern-js/plugin-v2/dist/types").PluginHookTap<import("@modern-js/plugin-v2/dist/types/types/runtime/hooks").OnBeforeRenderFn<{} | undefined>>;
|
|
14
14
|
wrapRoot: import("@modern-js/plugin-v2/dist/types").PluginHookTap<import("@modern-js/plugin-v2/dist/types/types/runtime/hooks").WrapRootFn>;
|
|
15
15
|
pickContext: import("@modern-js/plugin-v2/dist/types").PluginHookTap<import("@modern-js/plugin-v2/dist/types/types/runtime/hooks").PickContextFn<import("@modern-js/plugin-v2/runtime").RuntimeContext>>;
|
|
16
|
-
|
|
16
|
+
config: import("@modern-js/plugin-v2/dist/types").PluginHookTap<import("@modern-js/plugin-v2/dist/types/types/runtime/hooks").ConfigFn<{} | undefined>>;
|
|
17
17
|
} & {}> | undefined;
|
|
18
18
|
_internalContext?: any | undefined;
|
|
19
19
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { RuntimePlugin as BaseRuntimePlugin, RuntimePluginExtends } from '@modern-js/plugin-v2';
|
|
2
2
|
import type { Hooks } from '@modern-js/plugin-v2/runtime';
|
|
3
|
+
import type { AppConfig } from '../../common';
|
|
3
4
|
import type { RuntimeContext } from '../context/runtime';
|
|
4
5
|
import type { Plugin } from './base';
|
|
5
6
|
export type RuntimeHooks = Hooks<RuntimeConfig, RuntimeContext>;
|
|
6
7
|
export type RuntimeExtends = Required<RuntimePluginExtends<RuntimeConfig, RuntimeContext, {}, {}>>;
|
|
7
8
|
export type RuntimePluginFuture<Extends extends RuntimePluginExtends = {}> = BaseRuntimePlugin<RuntimeExtends & Extends>;
|
|
8
|
-
export interface RuntimeConfig {
|
|
9
|
+
export interface RuntimeConfig extends AppConfig {
|
|
9
10
|
plugins?: (Plugin | RuntimePluginFuture)[];
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.65.
|
|
18
|
+
"version": "2.65.4",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -226,13 +226,13 @@
|
|
|
226
226
|
"react-is": "^18",
|
|
227
227
|
"react-side-effect": "^2.1.1",
|
|
228
228
|
"styled-components": "^5.3.1",
|
|
229
|
-
"@modern-js/plugin": "2.65.
|
|
230
|
-
"@modern-js/plugin-data-loader": "2.65.
|
|
231
|
-
"@modern-js/plugin-v2": "2.65.
|
|
232
|
-
"@modern-js/render": "2.65.
|
|
233
|
-
"@modern-js/runtime-utils": "2.65.
|
|
234
|
-
"@modern-js/types": "2.65.
|
|
235
|
-
"@modern-js/utils": "2.65.
|
|
229
|
+
"@modern-js/plugin": "2.65.4",
|
|
230
|
+
"@modern-js/plugin-data-loader": "2.65.4",
|
|
231
|
+
"@modern-js/plugin-v2": "2.65.4",
|
|
232
|
+
"@modern-js/render": "2.65.4",
|
|
233
|
+
"@modern-js/runtime-utils": "2.65.4",
|
|
234
|
+
"@modern-js/types": "2.65.4",
|
|
235
|
+
"@modern-js/utils": "2.65.4"
|
|
236
236
|
},
|
|
237
237
|
"peerDependencies": {
|
|
238
238
|
"react": ">=17",
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
},
|
|
241
241
|
"devDependencies": {
|
|
242
242
|
"@remix-run/web-fetch": "^4.1.3",
|
|
243
|
-
"@rsbuild/core": "1.2.
|
|
243
|
+
"@rsbuild/core": "1.2.18",
|
|
244
244
|
"@testing-library/react": "^13.4.0",
|
|
245
245
|
"@types/cookie": "0.6.0",
|
|
246
246
|
"@types/invariant": "^2.2.30",
|
|
@@ -256,9 +256,9 @@
|
|
|
256
256
|
"ts-node": "^10.9.1",
|
|
257
257
|
"typescript": "^5",
|
|
258
258
|
"webpack": "^5.98.0",
|
|
259
|
-
"@modern-js/app-tools": "2.65.
|
|
260
|
-
"@scripts/build": "2.65.
|
|
261
|
-
"@scripts/jest-config": "2.65.
|
|
259
|
+
"@modern-js/app-tools": "2.65.4",
|
|
260
|
+
"@scripts/build": "2.65.4",
|
|
261
|
+
"@scripts/jest-config": "2.65.4"
|
|
262
262
|
},
|
|
263
263
|
"sideEffects": false,
|
|
264
264
|
"publishConfig": {
|