@modern-js/plugin-data-loader 2.38.0 → 2.39.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.
|
@@ -152,7 +152,7 @@ const handleRequest = async ({ context, serverRoutes, routes: routesConfig }) =>
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
} catch (error) {
|
|
155
|
-
const message =
|
|
155
|
+
const message = (0, import_remix_router.isRouteErrorResponse)(error) ? error.data : String(error);
|
|
156
156
|
if (error instanceof Error) {
|
|
157
157
|
logger === null || logger === void 0 ? void 0 : logger.error(error);
|
|
158
158
|
} else {
|
|
@@ -3,7 +3,7 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
|
|
|
3
3
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
5
5
|
import { installGlobals, writeReadableStreamToWritable, Response as NodeResponse } from "@remix-run/node";
|
|
6
|
-
import { createStaticHandler,
|
|
6
|
+
import { createStaticHandler, UNSAFE_DEFERRED_SYMBOL as DEFERRED_SYMBOL, isRouteErrorResponse } from "@modern-js/runtime-utils/remix-router";
|
|
7
7
|
import { transformNestedRoutes } from "@modern-js/runtime-utils/browser";
|
|
8
8
|
import { isPlainObject } from "@modern-js/utils/lodash";
|
|
9
9
|
import { matchEntry, createRequestContext, reporterCtx } from "@modern-js/runtime-utils/node";
|
|
@@ -234,7 +234,7 @@ var handleRequest = function() {
|
|
|
234
234
|
];
|
|
235
235
|
case 3:
|
|
236
236
|
error = _state.sent();
|
|
237
|
-
message =
|
|
237
|
+
message = isRouteErrorResponse(error) ? error.data : String(error);
|
|
238
238
|
if (_instanceof(error, Error)) {
|
|
239
239
|
logger === null || logger === void 0 ? void 0 : logger.error(error);
|
|
240
240
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { installGlobals, writeReadableStreamToWritable, Response as NodeResponse } from "@remix-run/node";
|
|
2
|
-
import { createStaticHandler,
|
|
2
|
+
import { createStaticHandler, UNSAFE_DEFERRED_SYMBOL as DEFERRED_SYMBOL, isRouteErrorResponse } from "@modern-js/runtime-utils/remix-router";
|
|
3
3
|
import { transformNestedRoutes } from "@modern-js/runtime-utils/browser";
|
|
4
4
|
import { isPlainObject } from "@modern-js/utils/lodash";
|
|
5
5
|
import { matchEntry, createRequestContext, reporterCtx } from "@modern-js/runtime-utils/node";
|
|
@@ -127,7 +127,7 @@ const handleRequest = async ({ context, serverRoutes, routes: routesConfig }) =>
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
} catch (error) {
|
|
130
|
-
const message = error
|
|
130
|
+
const message = isRouteErrorResponse(error) ? error.data : String(error);
|
|
131
131
|
if (error instanceof Error) {
|
|
132
132
|
logger === null || logger === void 0 ? void 0 : logger.error(error);
|
|
133
133
|
} else {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.39.1",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@remix-run/node": "^1.12.0",
|
|
59
59
|
"path-to-regexp": "^6.2.0",
|
|
60
60
|
"@swc/helpers": "0.5.1",
|
|
61
|
-
"@modern-js/utils": "2.
|
|
62
|
-
"@modern-js/runtime-utils": "2.
|
|
61
|
+
"@modern-js/utils": "2.39.1",
|
|
62
|
+
"@modern-js/runtime-utils": "2.39.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/babel__core": "^7.20.0",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"webpack": "^5.88.1",
|
|
76
76
|
"react": "^18",
|
|
77
77
|
"react-dom": "^18",
|
|
78
|
-
"@modern-js/core": "2.
|
|
79
|
-
"@modern-js/
|
|
80
|
-
"@modern-js/
|
|
81
|
-
"@scripts/build": "2.
|
|
82
|
-
"@scripts/jest-config": "2.
|
|
78
|
+
"@modern-js/server-core": "2.39.1",
|
|
79
|
+
"@modern-js/types": "2.39.1",
|
|
80
|
+
"@modern-js/core": "2.39.1",
|
|
81
|
+
"@scripts/build": "2.39.1",
|
|
82
|
+
"@scripts/jest-config": "2.39.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": ">=17.0.0"
|