@replohq/sandbox-runtime 1.7.6 → 1.7.7
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/ClientErrorBoundary.d.ts +3 -1
- package/ClientErrorBoundary.js +10 -2
- package/buildMetadata.js +3 -3
- package/package.json +4 -4
- package/sandbox-runtime.js +1 -1
package/ClientErrorBoundary.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ import * as React from "react";
|
|
|
7
7
|
* vs. an actionable error screen); the embedder reloads the iframe once the error
|
|
8
8
|
* clears.
|
|
9
9
|
*/
|
|
10
|
-
export declare function ClientErrorBoundary({ children }: React.PropsWithChildren
|
|
10
|
+
export declare function ClientErrorBoundary({ children, resetKey, }: React.PropsWithChildren<{
|
|
11
|
+
resetKey: React.ReactNode;
|
|
12
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
package/ClientErrorBoundary.js
CHANGED
|
@@ -11,6 +11,11 @@ class ErrorBoundary extends React.Component {
|
|
|
11
11
|
componentDidCatch(error, info) {
|
|
12
12
|
this.props.onError?.(error, info);
|
|
13
13
|
}
|
|
14
|
+
componentDidUpdate(previousProps, previousState) {
|
|
15
|
+
if (this.state.didCatch && previousState.didCatch && !Object.is(previousProps.resetKey, this.props.resetKey)) {
|
|
16
|
+
this.setState({ didCatch: false });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
render() {
|
|
15
20
|
if (this.state.didCatch) {
|
|
16
21
|
return /* @__PURE__ */ jsx(
|
|
@@ -28,7 +33,10 @@ class ErrorBoundary extends React.Component {
|
|
|
28
33
|
return this.props.children;
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
|
-
function ClientErrorBoundary({
|
|
36
|
+
function ClientErrorBoundary({
|
|
37
|
+
children,
|
|
38
|
+
resetKey
|
|
39
|
+
}) {
|
|
32
40
|
const handleError = React.useCallback(
|
|
33
41
|
(error, errorInfo) => {
|
|
34
42
|
const errorObj = error instanceof Error ? error : new Error(String(error));
|
|
@@ -49,7 +57,7 @@ function ClientErrorBoundary({ children }) {
|
|
|
49
57
|
},
|
|
50
58
|
[]
|
|
51
59
|
);
|
|
52
|
-
return /* @__PURE__ */ jsx(ErrorBoundary, { onError: handleError, children });
|
|
60
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, { onError: handleError, resetKey, children });
|
|
53
61
|
}
|
|
54
62
|
export {
|
|
55
63
|
ClientErrorBoundary
|
package/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-09-
|
|
5
|
+
"commit": "480d34ab39b9a190492b6d1280cc9a8d9a89e2ab",
|
|
6
|
+
"builtAt": "2026-09-18T21:38:59.533Z"
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.7",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-09-
|
|
8
|
+
"commit": "480d34ab39b9a190492b6d1280cc9a8d9a89e2ab",
|
|
9
|
+
"builtAt": "2026-09-18T21:38:59.533Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|
package/sandbox-runtime.js
CHANGED
|
@@ -19,7 +19,7 @@ function SandboxRuntime({ children }) {
|
|
|
19
19
|
return isDevServer ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
20
|
/* @__PURE__ */ jsx(DocumentReadyBeacon, {}),
|
|
21
21
|
/* @__PURE__ */ jsx(NextErrorReporter, {}),
|
|
22
|
-
/* @__PURE__ */ jsxs(ClientErrorBoundary, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxs(ClientErrorBoundary, { resetKey: children, children: [
|
|
23
23
|
/* @__PURE__ */ jsx(LinkInterceptor, {}),
|
|
24
24
|
/* @__PURE__ */ jsx(NavigationReceiver, {}),
|
|
25
25
|
/* @__PURE__ */ jsx(PostHogRelay, {}),
|