@modern-js/runtime 3.0.0-alpha.2 → 3.0.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/core/compat/requestContext.js +1 -0
- package/dist/cjs/core/context/runtime.js +10 -6
- package/dist/esm/core/compat/requestContext.mjs +1 -0
- package/dist/esm/core/context/runtime.mjs +10 -6
- package/dist/esm-node/cache/index.mjs +0 -1
- package/dist/esm-node/cli/alias.mjs +0 -1
- package/dist/esm-node/cli/code.mjs +0 -1
- package/dist/esm-node/cli/constants.mjs +0 -1
- package/dist/esm-node/cli/entry.mjs +0 -1
- package/dist/esm-node/cli/index.mjs +1 -1
- package/dist/esm-node/cli/ssr/index.mjs +1 -1
- package/dist/esm-node/cli/ssr/loadable-bundler-plugin.mjs +0 -1
- package/dist/esm-node/cli/ssr/mode.mjs +0 -1
- package/dist/esm-node/cli/template.mjs +0 -1
- package/dist/esm-node/cli/template.server.mjs +0 -1
- package/dist/esm-node/common.mjs +0 -1
- package/dist/esm-node/core/browser/hydrate.mjs +0 -1
- package/dist/esm-node/core/browser/index.mjs +0 -1
- package/dist/esm-node/core/browser/withCallback.mjs +0 -1
- package/dist/esm-node/core/compat/hooks.mjs +0 -1
- package/dist/esm-node/core/compat/index.mjs +0 -1
- package/dist/esm-node/core/compat/requestContext.mjs +1 -1
- package/dist/esm-node/core/config.mjs +0 -1
- package/dist/esm-node/core/constants.mjs +0 -1
- package/dist/esm-node/core/context/index.mjs +0 -1
- package/dist/esm-node/core/context/monitors/default.mjs +0 -1
- package/dist/esm-node/core/context/monitors/index.mjs +0 -1
- package/dist/esm-node/core/context/monitors/index.server.mjs +0 -1
- package/dist/esm-node/core/context/request/index.mjs +0 -1
- package/dist/esm-node/core/context/request/index.server.mjs +0 -1
- package/dist/esm-node/core/context/response/index.mjs +0 -1
- package/dist/esm-node/core/context/response/index.server.mjs +0 -1
- package/dist/esm-node/core/context/runtime.mjs +10 -7
- package/dist/esm-node/core/context/serverPayload/index.mjs +0 -1
- package/dist/esm-node/core/context/serverPayload/index.server.mjs +0 -1
- package/dist/esm-node/core/index.mjs +0 -1
- package/dist/esm-node/core/plugin/index.mjs +0 -1
- package/dist/esm-node/core/plugin/types.mjs +0 -1
- package/dist/esm-node/core/react/index.mjs +0 -1
- package/dist/esm-node/core/react/wrapper.mjs +0 -1
- package/dist/esm-node/core/server/constants.mjs +0 -1
- package/dist/esm-node/core/server/helmet.mjs +0 -1
- package/dist/esm-node/core/server/index.mjs +0 -1
- package/dist/esm-node/core/server/react/index.mjs +0 -1
- package/dist/esm-node/core/server/react/no-ssr-cache/index.mjs +0 -1
- package/dist/esm-node/core/server/react/nossr/index.mjs +0 -1
- package/dist/esm-node/core/server/requestHandler.mjs +0 -1
- package/dist/esm-node/core/server/server.mjs +0 -1
- package/dist/esm-node/core/server/shared.mjs +0 -1
- package/dist/esm-node/core/server/stream/afterTemplate.mjs +0 -1
- package/dist/esm-node/core/server/stream/beforeTemplate.mjs +0 -1
- package/dist/esm-node/core/server/stream/createReadableStream.mjs +0 -1
- package/dist/esm-node/core/server/stream/createReadableStream.worker.mjs +0 -1
- package/dist/esm-node/core/server/stream/deferredScript.mjs +0 -1
- package/dist/esm-node/core/server/stream/index.mjs +0 -1
- package/dist/esm-node/core/server/stream/shared.mjs +0 -1
- package/dist/esm-node/core/server/stream/template.mjs +0 -1
- package/dist/esm-node/core/server/string/index.mjs +0 -1
- package/dist/esm-node/core/server/string/loadable.mjs +0 -1
- package/dist/esm-node/core/server/string/ssrData.mjs +0 -1
- package/dist/esm-node/core/server/string/types.mjs +0 -1
- package/dist/esm-node/core/server/tracer.mjs +0 -1
- package/dist/esm-node/core/server/utils.mjs +0 -1
- package/dist/esm-node/core/types.mjs +0 -1
- package/dist/esm-node/document/Body.mjs +0 -1
- package/dist/esm-node/document/Comment.mjs +0 -1
- package/dist/esm-node/document/DocumentContext.mjs +0 -1
- package/dist/esm-node/document/DocumentStructureContext.mjs +0 -1
- package/dist/esm-node/document/Head.mjs +0 -1
- package/dist/esm-node/document/Html.mjs +0 -1
- package/dist/esm-node/document/Links.mjs +0 -1
- package/dist/esm-node/document/Root.mjs +0 -1
- package/dist/esm-node/document/Script.mjs +0 -1
- package/dist/esm-node/document/Scripts.mjs +0 -1
- package/dist/esm-node/document/Style.mjs +0 -1
- package/dist/esm-node/document/Title.mjs +0 -1
- package/dist/esm-node/document/cli/index.mjs +1 -1
- package/dist/esm-node/document/constants.mjs +0 -1
- package/dist/esm-node/document/index.mjs +0 -1
- package/dist/esm-node/exports/config-routes.mjs +0 -1
- package/dist/esm-node/exports/head.mjs +0 -1
- package/dist/esm-node/exports/loadable.mjs +0 -1
- package/dist/esm-node/index.mjs +0 -1
- package/dist/esm-node/internal.mjs +0 -1
- package/dist/esm-node/react-server.mjs +0 -1
- package/dist/esm-node/router/cli/code/getClientRoutes/getRoutes.mjs +0 -1
- package/dist/esm-node/router/cli/code/getClientRoutes/index.mjs +0 -1
- package/dist/esm-node/router/cli/code/getClientRoutes/utils.mjs +0 -1
- package/dist/esm-node/router/cli/code/index.mjs +0 -1
- package/dist/esm-node/router/cli/code/inspect.mjs +0 -1
- package/dist/esm-node/router/cli/code/makeLegalIdentifier.mjs +0 -1
- package/dist/esm-node/router/cli/code/nestedRoutes.mjs +0 -1
- package/dist/esm-node/router/cli/code/templates.mjs +1 -1
- package/dist/esm-node/router/cli/code/utils.mjs +0 -1
- package/dist/esm-node/router/cli/config-routes/converter.mjs +0 -1
- package/dist/esm-node/router/cli/config-routes/parseRouteConfig.mjs +0 -1
- package/dist/esm-node/router/cli/constants.mjs +0 -1
- package/dist/esm-node/router/cli/entry.mjs +0 -1
- package/dist/esm-node/router/cli/handler.mjs +0 -1
- package/dist/esm-node/router/cli/index.mjs +0 -1
- package/dist/esm-node/router/index.mjs +0 -1
- package/dist/esm-node/router/internal.mjs +0 -1
- package/dist/esm-node/router/runtime/DefaultNotFound.mjs +0 -1
- package/dist/esm-node/router/runtime/DeferredDataScripts.mjs +0 -1
- package/dist/esm-node/router/runtime/DeferredDataScripts.node.mjs +0 -1
- package/dist/esm-node/router/runtime/PrefetchLink.mjs +0 -1
- package/dist/esm-node/router/runtime/constants.mjs +0 -1
- package/dist/esm-node/router/runtime/hooks.mjs +0 -1
- package/dist/esm-node/router/runtime/index.mjs +0 -1
- package/dist/esm-node/router/runtime/internal.mjs +0 -1
- package/dist/esm-node/router/runtime/plugin.mjs +0 -1
- package/dist/esm-node/router/runtime/plugin.node.mjs +0 -1
- package/dist/esm-node/router/runtime/routerHelper.mjs +0 -1
- package/dist/esm-node/router/runtime/rsc-router.mjs +0 -1
- package/dist/esm-node/router/runtime/rsc.mjs +0 -1
- package/dist/esm-node/router/runtime/server.mjs +0 -1
- package/dist/esm-node/router/runtime/types.mjs +0 -1
- package/dist/esm-node/router/runtime/utils.mjs +0 -1
- package/dist/esm-node/router/runtime/withRouter.mjs +0 -1
- package/dist/esm-node/rsc/client.mjs +0 -1
- package/dist/esm-node/rsc/server.mjs +0 -1
- package/dist/types/core/context/runtime.d.ts +4 -0
- package/package.json +12 -12
|
@@ -35,14 +35,18 @@ const external_react_namespaceObject = require("react");
|
|
|
35
35
|
const InternalRuntimeContext = (0, external_react_namespaceObject.createContext)({});
|
|
36
36
|
const RuntimeContext = (0, external_react_namespaceObject.createContext)({});
|
|
37
37
|
const ReactRuntimeContext = RuntimeContext;
|
|
38
|
-
const getInitialContext = (isBrowser = true, routeManifest)=>
|
|
38
|
+
const getInitialContext = (isBrowser = true, routeManifest)=>{
|
|
39
|
+
const requestContext = {
|
|
40
|
+
request: {},
|
|
41
|
+
response: {}
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
39
44
|
isBrowser,
|
|
40
45
|
routeManifest: routeManifest || "u" > typeof window && window[constants_namespaceObject.ROUTE_MANIFEST],
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
+
requestContext,
|
|
47
|
+
context: requestContext
|
|
48
|
+
};
|
|
49
|
+
};
|
|
46
50
|
const useRuntimeContext = ()=>(0, external_react_namespaceObject.useContext)(RuntimeContext);
|
|
47
51
|
exports.InternalRuntimeContext = __webpack_exports__.InternalRuntimeContext;
|
|
48
52
|
exports.ReactRuntimeContext = __webpack_exports__.ReactRuntimeContext;
|
|
@@ -3,13 +3,17 @@ import { createContext, useContext } from "react";
|
|
|
3
3
|
const InternalRuntimeContext = createContext({});
|
|
4
4
|
const RuntimeContext = createContext({});
|
|
5
5
|
const ReactRuntimeContext = RuntimeContext;
|
|
6
|
-
const getInitialContext = (isBrowser = true, routeManifest)=>
|
|
6
|
+
const getInitialContext = (isBrowser = true, routeManifest)=>{
|
|
7
|
+
const requestContext = {
|
|
8
|
+
request: {},
|
|
9
|
+
response: {}
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
7
12
|
isBrowser,
|
|
8
13
|
routeManifest: routeManifest || "u" > typeof window && window[ROUTE_MANIFEST],
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
+
requestContext,
|
|
15
|
+
context: requestContext
|
|
16
|
+
};
|
|
17
|
+
};
|
|
14
18
|
const useRuntimeContext = ()=>useContext(RuntimeContext);
|
|
15
19
|
export { InternalRuntimeContext, ReactRuntimeContext, RuntimeContext, getInitialContext, useRuntimeContext };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import path from "path";
|
|
4
3
|
import { fs } from "@modern-js/utils";
|
|
5
4
|
import { ENTRY_BOOTSTRAP_FILE_NAME, ENTRY_POINT_FILE_NAME, ENTRY_POINT_REGISTER_FILE_NAME, ENTRY_POINT_RUNTIME_GLOBAL_CONTEXT_FILE_NAME, ENTRY_POINT_RUNTIME_REGISTER_FILE_NAME, ENTRY_SERVER_BOOTSTRAP_FILE_NAME, INDEX_FILE_NAME, SERVER_ENTRY_POINT_FILE_NAME } from "./constants.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __rslib_shim_module__ from "node:module";
|
|
2
|
-
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
2
|
+
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
|
|
3
3
|
import path_0 from "path";
|
|
4
4
|
import { cleanRequireCache, isReact18 as utils_isReact18 } from "@modern-js/utils";
|
|
5
5
|
import { documentPlugin } from "../document/cli/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __rslib_shim_module__ from "node:module";
|
|
2
|
-
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
2
|
+
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { LOADABLE_STATS_FILE, isUseSSRBundle } from "@modern-js/utils";
|
|
5
5
|
import loadable_bundler_plugin from "./loadable-bundler-plugin.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
function resolveSSRMode(params) {
|
|
4
3
|
const { entry, config, appDirectory, nestedRoutesEntry } = params;
|
|
5
4
|
const isSsgEnabled = config.output?.ssg || config.output?.ssgByEntries && (entry ? !!config.output.ssgByEntries[entry] : Object.keys(config.output.ssgByEntries).length > 0);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import path_0 from "path";
|
|
4
3
|
import { JS_EXTENSIONS, findExists, formatImportPath } from "@modern-js/utils";
|
|
5
4
|
import { ENTRY_POINT_RUNTIME_GLOBAL_CONTEXT_FILE_NAME, ENTRY_POINT_RUNTIME_REGISTER_FILE_NAME } from "./constants.mjs";
|
package/dist/esm-node/common.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
const isBrowser = ()=>"u" > typeof window && 'nodejs' !== window.name;
|
|
4
3
|
const JSX_SHELL_STREAM_END_MARK = '<!--<?- SHELL_STREAM_END ?>-->';
|
|
5
4
|
const ESCAPED_SHELL_STREAM_END_MARK = '<!--<?- SHELL_STREAM_END ?>-->';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
const makeRequestContext = (context)=>{
|
|
4
3
|
const baseSSRContext = context.ssrContext;
|
|
5
4
|
if (baseSSRContext) return {
|
|
@@ -16,6 +15,7 @@ const requestContextPlugin = ()=>({
|
|
|
16
15
|
setup (api) {
|
|
17
16
|
api.onBeforeRender((context)=>{
|
|
18
17
|
const requestContext = makeRequestContext(context);
|
|
18
|
+
context.requestContext = requestContext;
|
|
19
19
|
context.context = requestContext;
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { ROUTE_MANIFEST } from "@modern-js/utils/universal/constants";
|
|
4
3
|
import { createContext, useContext } from "react";
|
|
5
4
|
const InternalRuntimeContext = createContext({});
|
|
6
5
|
const RuntimeContext = createContext({});
|
|
7
6
|
const ReactRuntimeContext = RuntimeContext;
|
|
8
|
-
const getInitialContext = (isBrowser = true, routeManifest)=>
|
|
7
|
+
const getInitialContext = (isBrowser = true, routeManifest)=>{
|
|
8
|
+
const requestContext = {
|
|
9
|
+
request: {},
|
|
10
|
+
response: {}
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
9
13
|
isBrowser,
|
|
10
14
|
routeManifest: routeManifest || "u" > typeof window && window[ROUTE_MANIFEST],
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
15
|
+
requestContext,
|
|
16
|
+
context: requestContext
|
|
17
|
+
};
|
|
18
|
+
};
|
|
16
19
|
const useRuntimeContext = ()=>useContext(RuntimeContext);
|
|
17
20
|
export { InternalRuntimeContext, ReactRuntimeContext, RuntimeContext, getInitialContext, useRuntimeContext };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { createRenderStreaming } from "./shared.mjs";
|
|
4
3
|
const createReadableStreamFromElement = 'edge' === process.env.MODERN_SSR_ENV ? import("./createReadableStream.worker.mjs").then((m)=>m.createReadableStreamFromElement) : import("./createReadableStream.mjs").then((m)=>m.createReadableStreamFromElement);
|
|
5
4
|
const renderStreaming = createRenderStreaming(createReadableStreamFromElement);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { isRouteErrorResponse } from "@modern-js/runtime-utils/router";
|
|
4
3
|
function attributesToString(attributes) {
|
|
5
4
|
return Object.entries(attributes).reduce((str, [key, value])=>void 0 === value ? str : `${str} ${key}="${value}"`, '');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { renderToString } from "react-dom/server";
|
|
5
4
|
import { DOCUMENT_SCRIPT_ATTRIBUTES_END, DOCUMENT_SCRIPT_ATTRIBUTES_START, DOCUMENT_SCRIPT_PLACEHOLDER_END, DOCUMENT_SCRIPT_PLACEHOLDER_START } from "./constants.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __rslib_shim_module__ from "node:module";
|
|
2
|
-
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
2
|
+
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
|
|
3
3
|
import module_0, { builtinModules } from "module";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { createDebugger, findExists, fs, logger } from "@modern-js/utils";
|
package/dist/esm-node/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { getRequest } from "./core/context/request/index.mjs";
|
|
4
3
|
import { getMonitors } from "./core/context/monitors/index.mjs";
|
|
5
4
|
import { redirect, setHeaders, setStatus } from "./core/context/response/index.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import path from "path";
|
|
4
3
|
import { filterRoutesForServer, filterRoutesLoader, fs, getEntryOptions, isUseRsc, isUseSSRBundle, logger, markRoutes } from "@modern-js/utils";
|
|
5
4
|
import { cloneDeep } from "@modern-js/utils/lodash";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
|
|
4
3
|
const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
|
|
5
4
|
const forbidList = new Set(`${reservedWords} ${builtins}`.split(' '));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __rslib_shim_module__ from "node:module";
|
|
2
|
-
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
2
|
+
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(/*#__PURE__*/ (()=>import.meta.url)());
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { findExists, formatImportPath, fs, getEntryOptions, isSSGEntry, slash } from "@modern-js/utils";
|
|
5
5
|
import { ROUTE_MODULES } from "@modern-js/utils/universal/constants";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { ROUTER_DATA_JSON_ID } from "../../core/constants.mjs";
|
|
4
3
|
const setupFnStr = "function s(r,e){_ROUTER_DATA.r=_ROUTER_DATA.r||{},_ROUTER_DATA.r[r]=_ROUTER_DATA.r[r]||{};return new Promise((function(A,R){_ROUTER_DATA.r[r][e]={resolve:A,reject:R}}))};";
|
|
5
4
|
const resolveFnStr = "function r(e,r,o,A){A?_ROUTER_DATA.r[e][r].reject(A):_ROUTER_DATA.r[e][r].resolve(o)};";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { merge } from "@modern-js/runtime-utils/merge";
|
|
5
4
|
import { RouterProvider, createBrowserRouter, createHashRouter, createRoutesFromElements, useHref, useLocation, useMatches } from "@modern-js/runtime-utils/router";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
3
|
import { ElementsContext, createFromReadableStream } from "@modern-js/render/client";
|
|
5
4
|
import { StaticRouterProvider, createBrowserRouter, createStaticRouter, redirect } from "@modern-js/runtime-utils/router";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { renderNestedRoute } from "@modern-js/runtime-utils/browser";
|
|
5
4
|
import { Route, UNSAFE_ErrorResponseImpl, isRouteErrorResponse } from "@modern-js/runtime-utils/router";
|
|
@@ -6,6 +6,10 @@ export interface TRuntimeContext {
|
|
|
6
6
|
initialData?: Record<string, unknown>;
|
|
7
7
|
isBrowser: boolean;
|
|
8
8
|
routes?: RouteObject[];
|
|
9
|
+
requestContext: RequestContext;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `requestContext` instead
|
|
12
|
+
*/
|
|
9
13
|
context: RequestContext;
|
|
10
14
|
[key: string]: unknown;
|
|
11
15
|
}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.0.
|
|
18
|
+
"version": "3.0.1",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=20"
|
|
21
21
|
},
|
|
@@ -208,12 +208,12 @@
|
|
|
208
208
|
"isbot": "3.8.0",
|
|
209
209
|
"react-helmet": "^6.1.0",
|
|
210
210
|
"react-is": "^18.3.1",
|
|
211
|
-
"@modern-js/plugin": "3.0.
|
|
212
|
-
"@modern-js/
|
|
213
|
-
"@modern-js/
|
|
214
|
-
"@modern-js/runtime-utils": "3.0.
|
|
215
|
-
"@modern-js/types": "3.0.
|
|
216
|
-
"@modern-js/utils": "3.0.
|
|
211
|
+
"@modern-js/plugin": "3.0.1",
|
|
212
|
+
"@modern-js/render": "3.0.1",
|
|
213
|
+
"@modern-js/plugin-data-loader": "3.0.1",
|
|
214
|
+
"@modern-js/runtime-utils": "3.0.1",
|
|
215
|
+
"@modern-js/types": "3.0.1",
|
|
216
|
+
"@modern-js/utils": "3.0.1"
|
|
217
217
|
},
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"react": ">=17.0.2",
|
|
@@ -221,19 +221,19 @@
|
|
|
221
221
|
},
|
|
222
222
|
"devDependencies": {
|
|
223
223
|
"@remix-run/web-fetch": "^4.1.3",
|
|
224
|
-
"@rsbuild/core": "2.0.0-beta.
|
|
225
|
-
"@rslib/core": "0.19.
|
|
224
|
+
"@rsbuild/core": "2.0.0-beta.2",
|
|
225
|
+
"@rslib/core": "0.19.4",
|
|
226
226
|
"@testing-library/dom": "^10.4.1",
|
|
227
227
|
"@testing-library/react": "^16.3.2",
|
|
228
228
|
"@types/cookie": "0.6.0",
|
|
229
229
|
"@types/invariant": "^2.2.37",
|
|
230
230
|
"@types/loadable__server": "5.12.11",
|
|
231
231
|
"@types/node": "^20",
|
|
232
|
-
"react": "^19.2.
|
|
233
|
-
"react-dom": "^19.2.
|
|
232
|
+
"react": "^19.2.4",
|
|
233
|
+
"react-dom": "^19.2.4",
|
|
234
234
|
"ts-node": "^10.9.2",
|
|
235
235
|
"typescript": "^5",
|
|
236
|
-
"@modern-js/app-tools": "3.0.
|
|
236
|
+
"@modern-js/app-tools": "3.0.1",
|
|
237
237
|
"@modern-js/rslib": "2.68.10",
|
|
238
238
|
"@scripts/rstest-config": "2.66.0"
|
|
239
239
|
},
|