@react-native/dev-middleware 0.74.75 → 0.74.76
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.
|
@@ -187,14 +187,7 @@ class Device {
|
|
|
187
187
|
}
|
|
188
188
|
getPagesList() {
|
|
189
189
|
if (this.#lastConnectedLegacyReactNativePage) {
|
|
190
|
-
|
|
191
|
-
id: REACT_NATIVE_RELOADABLE_PAGE_ID,
|
|
192
|
-
title: "React Native Experimental (Improved Chrome Reloads)",
|
|
193
|
-
vm: "don't use",
|
|
194
|
-
app: this.#app,
|
|
195
|
-
capabilities: {},
|
|
196
|
-
};
|
|
197
|
-
return [...this.#pages.values(), reactNativeReloadablePage];
|
|
190
|
+
return [...this.#pages.values(), this.#createSyntheticPage()];
|
|
198
191
|
} else {
|
|
199
192
|
return [...this.#pages.values()];
|
|
200
193
|
}
|
|
@@ -227,7 +220,10 @@ class Device {
|
|
|
227
220
|
|
|
228
221
|
// TODO(moti): Handle null case explicitly, e.g. refuse to connect to
|
|
229
222
|
// unknown pages.
|
|
230
|
-
const page =
|
|
223
|
+
const page =
|
|
224
|
+
pageId === REACT_NATIVE_RELOADABLE_PAGE_ID
|
|
225
|
+
? this.#createSyntheticPage()
|
|
226
|
+
: this.#pages.get(pageId);
|
|
231
227
|
this.#debuggerConnection = debuggerInfo;
|
|
232
228
|
debug(`Got new debugger connection for page ${pageId} of ${this.#name}`);
|
|
233
229
|
if (page && this.#debuggerConnection && this.#createCustomMessageHandler) {
|
|
@@ -372,6 +368,19 @@ class Device {
|
|
|
372
368
|
return page.capabilities[flag] === true;
|
|
373
369
|
}
|
|
374
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Returns the synthetic "React Native Experimental (Improved Chrome Reloads)" page.
|
|
373
|
+
*/
|
|
374
|
+
#createSyntheticPage() {
|
|
375
|
+
return {
|
|
376
|
+
id: REACT_NATIVE_RELOADABLE_PAGE_ID,
|
|
377
|
+
title: "React Native Experimental (Improved Chrome Reloads)",
|
|
378
|
+
vm: "don't use",
|
|
379
|
+
app: this.#app,
|
|
380
|
+
capabilities: {},
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
375
384
|
// Handles messages received from device:
|
|
376
385
|
// 1. For getPages responses updates local #pages list.
|
|
377
386
|
// 2. All other messages are forwarded to debugger as wrappedEvent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/dev-middleware",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.76",
|
|
4
4
|
"description": "Dev server middleware for React Native",
|
|
5
5
|
"keywords": ["react-native", "tools"],
|
|
6
6
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/dev-middleware#readme",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"files": ["dist"],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@isaacs/ttlcache": "^1.4.1",
|
|
18
|
-
"@react-native/debugger-frontend": "0.74.
|
|
18
|
+
"@react-native/debugger-frontend": "0.74.76",
|
|
19
19
|
"@rnx-kit/chromium-edge-launcher": "^1.0.0",
|
|
20
20
|
"chrome-launcher": "^0.15.2",
|
|
21
21
|
"connect": "^3.6.5",
|