@react-native/dev-middleware 0.89.0-nightly-20260927-d7ff82ebe → 0.89.0-nightly-20260930-085caf035
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.
|
@@ -675,6 +675,9 @@ class Device {
|
|
|
675
675
|
case "Debugger.setBreakpointByUrl":
|
|
676
676
|
return this.#processDebuggerSetBreakpointByUrl(req, debuggerInfo);
|
|
677
677
|
case "Debugger.getScriptSource":
|
|
678
|
+
if (!this.#hasFetchableScriptSource(req.params.scriptId)) {
|
|
679
|
+
return req;
|
|
680
|
+
}
|
|
678
681
|
void this.#processDebuggerGetScriptSource(req, socket, debuggerInfo);
|
|
679
682
|
return null;
|
|
680
683
|
case "Network.loadNetworkResource":
|
|
@@ -736,6 +739,10 @@ class Device {
|
|
|
736
739
|
}
|
|
737
740
|
return processedReq;
|
|
738
741
|
}
|
|
742
|
+
#hasFetchableScriptSource(scriptId) {
|
|
743
|
+
const pathToSource = this.#scriptIdToSourcePathMapping.get(scriptId);
|
|
744
|
+
return pathToSource != null && this.#tryParseHTTPURL(pathToSource) != null;
|
|
745
|
+
}
|
|
739
746
|
async #processDebuggerGetScriptSource(req, socket, debuggerInfo) {
|
|
740
747
|
const sendSuccessResponse = (scriptSource) => {
|
|
741
748
|
const response = {
|
|
@@ -771,14 +778,13 @@ class Device {
|
|
|
771
778
|
const pathToSource = this.#scriptIdToSourcePathMapping.get(
|
|
772
779
|
req.params.scriptId,
|
|
773
780
|
);
|
|
781
|
+
const httpURL =
|
|
782
|
+
pathToSource != null ? this.#tryParseHTTPURL(pathToSource) : null;
|
|
783
|
+
(0, _invariant.default)(
|
|
784
|
+
httpURL != null,
|
|
785
|
+
"processDebuggerGetScriptSource called for non-fetchable script",
|
|
786
|
+
);
|
|
774
787
|
try {
|
|
775
|
-
const httpURL =
|
|
776
|
-
pathToSource == null ? null : this.#tryParseHTTPURL(pathToSource);
|
|
777
|
-
if (!httpURL) {
|
|
778
|
-
throw new Error(
|
|
779
|
-
`Can't parse requested URL ${pathToSource === undefined ? "undefined" : JSON.stringify(pathToSource)}`,
|
|
780
|
-
);
|
|
781
|
-
}
|
|
782
788
|
const text = await this.#fetchText(httpURL);
|
|
783
789
|
sendSuccessResponse(text);
|
|
784
790
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/dev-middleware",
|
|
3
|
-
"version": "0.89.0-nightly-
|
|
3
|
+
"version": "0.89.0-nightly-20260930-085caf035",
|
|
4
4
|
"description": "Dev server middleware for React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@isaacs/ttlcache": "^1.4.1",
|
|
29
|
-
"@react-native/debugger-frontend": "0.89.0-nightly-
|
|
30
|
-
"@react-native/debugger-shell": "0.89.0-nightly-
|
|
29
|
+
"@react-native/debugger-frontend": "0.89.0-nightly-20260930-085caf035",
|
|
30
|
+
"@react-native/debugger-shell": "0.89.0-nightly-20260930-085caf035",
|
|
31
31
|
"connect": "^3.6.5",
|
|
32
32
|
"debug": "^4.4.0",
|
|
33
33
|
"invariant": "^2.2.4",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ws": "^7.5.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@react-native/debugger-shell": "0.89.0-nightly-
|
|
40
|
+
"@react-native/debugger-shell": "0.89.0-nightly-20260930-085caf035",
|
|
41
41
|
"selfsigned": "^5.5.0",
|
|
42
42
|
"undici": "^6.23.0",
|
|
43
43
|
"wait-for-expect": "^3.0.2"
|