@modern-js/runtime 2.60.5-alpha.0 → 2.60.5-alpha.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/router/runtime/hooks.js +3 -3
- package/dist/cjs/router/runtime/plugin.node.js +1 -1
- package/dist/esm/router/runtime/hooks.js +2 -2
- package/dist/esm/router/runtime/plugin.node.js +2 -2
- package/dist/esm-node/router/runtime/hooks.js +2 -2
- package/dist/esm-node/router/runtime/plugin.node.js +2 -2
- package/dist/types/router/runtime/hooks.d.ts +2 -2
- package/package.json +3 -3
|
@@ -18,15 +18,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var hooks_exports = {};
|
|
20
20
|
__export(hooks_exports, {
|
|
21
|
-
|
|
21
|
+
beforeCreateRoutes: () => beforeCreateRoutes,
|
|
22
22
|
modifyRoutes: () => modifyRoutes
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(hooks_exports);
|
|
25
25
|
var import_plugin = require("@modern-js/plugin");
|
|
26
26
|
const modifyRoutes = (0, import_plugin.createWaterfall)();
|
|
27
|
-
const
|
|
27
|
+
const beforeCreateRoutes = (0, import_plugin.createAsyncInterruptWorkflow)();
|
|
28
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29
29
|
0 && (module.exports = {
|
|
30
|
-
|
|
30
|
+
beforeCreateRoutes,
|
|
31
31
|
modifyRoutes
|
|
32
32
|
});
|
|
@@ -62,7 +62,7 @@ const routerPlugin = (userConfig = {}) => {
|
|
|
62
62
|
name: "@modern-js/plugin-router",
|
|
63
63
|
registerHook: {
|
|
64
64
|
modifyRoutes: import_hooks.modifyRoutes,
|
|
65
|
-
|
|
65
|
+
beforeCreateRoutes: import_hooks.beforeCreateRoutes
|
|
66
66
|
},
|
|
67
67
|
setup: (api) => {
|
|
68
68
|
let finalRouteConfig = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAsyncInterruptWorkflow, createWaterfall } from "@modern-js/plugin";
|
|
2
2
|
var modifyRoutes = createWaterfall();
|
|
3
|
-
var
|
|
3
|
+
var beforeCreateRoutes = createAsyncInterruptWorkflow();
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
beforeCreateRoutes,
|
|
6
6
|
modifyRoutes
|
|
7
7
|
};
|
|
@@ -16,7 +16,7 @@ import { JSX_SHELL_STREAM_END_MARK } from "../../common";
|
|
|
16
16
|
import { RuntimeReactContext } from "../../core";
|
|
17
17
|
import { getGlobalLayoutApp, getGlobalRoutes } from "../../core/context";
|
|
18
18
|
import DeferredDataScripts from "./DeferredDataScripts.node";
|
|
19
|
-
import {
|
|
19
|
+
import { beforeCreateRoutes as beforeCreateRoutesHook, modifyRoutes as modifyRoutesHook } from "./hooks";
|
|
20
20
|
import { renderRoutes, urlJoin } from "./utils";
|
|
21
21
|
function createRemixReuqest(request) {
|
|
22
22
|
var method = "GET";
|
|
@@ -34,7 +34,7 @@ var routerPlugin = function() {
|
|
|
34
34
|
name: "@modern-js/plugin-router",
|
|
35
35
|
registerHook: {
|
|
36
36
|
modifyRoutes: modifyRoutesHook,
|
|
37
|
-
|
|
37
|
+
beforeCreateRoutes: beforeCreateRoutesHook
|
|
38
38
|
},
|
|
39
39
|
setup: function(api) {
|
|
40
40
|
var finalRouteConfig = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAsyncInterruptWorkflow, createWaterfall } from "@modern-js/plugin";
|
|
2
2
|
const modifyRoutes = createWaterfall();
|
|
3
|
-
const
|
|
3
|
+
const beforeCreateRoutes = createAsyncInterruptWorkflow();
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
beforeCreateRoutes,
|
|
6
6
|
modifyRoutes
|
|
7
7
|
};
|
|
@@ -11,7 +11,7 @@ import { JSX_SHELL_STREAM_END_MARK } from "../../common";
|
|
|
11
11
|
import { RuntimeReactContext } from "../../core";
|
|
12
12
|
import { getGlobalLayoutApp, getGlobalRoutes } from "../../core/context";
|
|
13
13
|
import DeferredDataScripts from "./DeferredDataScripts.node";
|
|
14
|
-
import {
|
|
14
|
+
import { beforeCreateRoutes as beforeCreateRoutesHook, modifyRoutes as modifyRoutesHook } from "./hooks";
|
|
15
15
|
import { renderRoutes, urlJoin } from "./utils";
|
|
16
16
|
function createRemixReuqest(request) {
|
|
17
17
|
const method = "GET";
|
|
@@ -28,7 +28,7 @@ const routerPlugin = (userConfig = {}) => {
|
|
|
28
28
|
name: "@modern-js/plugin-router",
|
|
29
29
|
registerHook: {
|
|
30
30
|
modifyRoutes: modifyRoutesHook,
|
|
31
|
-
|
|
31
|
+
beforeCreateRoutes: beforeCreateRoutesHook
|
|
32
32
|
},
|
|
33
33
|
setup: (api) => {
|
|
34
34
|
let finalRouteConfig = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RouteObject } from '@modern-js/runtime-utils/router';
|
|
2
2
|
import type { RuntimeContext } from '../../core';
|
|
3
3
|
declare const modifyRoutes: import("@modern-js/plugin").Waterfall<RouteObject[]>;
|
|
4
|
-
declare const
|
|
5
|
-
export { modifyRoutes,
|
|
4
|
+
declare const beforeCreateRoutes: import("@modern-js/plugin").AsyncInterruptWorkflow<RuntimeContext, void>;
|
|
5
|
+
export { modifyRoutes, beforeCreateRoutes };
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.60.5-alpha.
|
|
18
|
+
"version": "2.60.5-alpha.1",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -199,11 +199,11 @@
|
|
|
199
199
|
"react-is": "^18",
|
|
200
200
|
"react-side-effect": "^2.1.1",
|
|
201
201
|
"styled-components": "^5.3.1",
|
|
202
|
+
"@modern-js/plugin-data-loader": "2.60.4",
|
|
202
203
|
"@modern-js/plugin": "2.60.4",
|
|
203
204
|
"@modern-js/runtime-utils": "2.60.4",
|
|
204
205
|
"@modern-js/types": "2.60.4",
|
|
205
|
-
"@modern-js/utils": "2.60.4"
|
|
206
|
-
"@modern-js/plugin-data-loader": "2.60.4"
|
|
206
|
+
"@modern-js/utils": "2.60.4"
|
|
207
207
|
},
|
|
208
208
|
"peerDependencies": {
|
|
209
209
|
"react": ">=17",
|