@react-native/dev-middleware 0.78.0-rc.3 → 0.78.0-rc.5
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/createDevMiddleware.js +11 -0
- package/dist/inspector-proxy/Device.js +9 -0
- package/dist/inspector-proxy/DeviceEventReporter.d.ts +1 -0
- package/dist/inspector-proxy/DeviceEventReporter.js +5 -0
- package/dist/inspector-proxy/DeviceEventReporter.js.flow +1 -0
- package/dist/types/EventReporter.d.ts +2 -1
- package/dist/types/EventReporter.js.flow +3 -0
- package/package.json +2 -2
|
@@ -89,6 +89,17 @@ function createWrappedEventReporter(reporter, logger) {
|
|
|
89
89
|
`Profiling build target "${event.appId}" registered for debugging`
|
|
90
90
|
);
|
|
91
91
|
break;
|
|
92
|
+
case "fusebox_console_notice":
|
|
93
|
+
logger?.info(
|
|
94
|
+
"\n" +
|
|
95
|
+
"\u001B[7m" +
|
|
96
|
+
" \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be " +
|
|
97
|
+
"viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in " +
|
|
98
|
+
"the terminal to open (requires Google Chrome or Microsoft Edge)." +
|
|
99
|
+
"\u001B[27m" +
|
|
100
|
+
"\n"
|
|
101
|
+
);
|
|
102
|
+
break;
|
|
92
103
|
}
|
|
93
104
|
reporter?.logEvent(event);
|
|
94
105
|
},
|
|
@@ -40,6 +40,7 @@ function _interopRequireDefault(e) {
|
|
|
40
40
|
const debug = require("debug")("Metro:InspectorProxy");
|
|
41
41
|
const PAGES_POLLING_INTERVAL = 1000;
|
|
42
42
|
const FILE_PREFIX = "file://";
|
|
43
|
+
let fuseboxConsoleNoticeLogged = false;
|
|
43
44
|
const REACT_NATIVE_RELOADABLE_PAGE_ID = "-1";
|
|
44
45
|
class Device {
|
|
45
46
|
#id;
|
|
@@ -377,6 +378,7 @@ class Device {
|
|
|
377
378
|
}
|
|
378
379
|
for (const page of this.#pages.values()) {
|
|
379
380
|
if (this.#pageHasCapability(page, "nativePageReloads")) {
|
|
381
|
+
this.#logFuseboxConsoleNotice();
|
|
380
382
|
continue;
|
|
381
383
|
}
|
|
382
384
|
if (page.title.includes("React")) {
|
|
@@ -809,5 +811,12 @@ class Device {
|
|
|
809
811
|
dangerouslyGetSocket() {
|
|
810
812
|
return this.#deviceSocket;
|
|
811
813
|
}
|
|
814
|
+
#logFuseboxConsoleNotice() {
|
|
815
|
+
if (fuseboxConsoleNoticeLogged) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
this.#deviceEventReporter?.logFuseboxConsoleNotice();
|
|
819
|
+
fuseboxConsoleNoticeLogged = true;
|
|
820
|
+
}
|
|
812
821
|
}
|
|
813
822
|
exports.default = Device;
|
|
@@ -159,6 +159,11 @@ class DeviceEventReporter {
|
|
|
159
159
|
pageId: null,
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
logFuseboxConsoleNotice() {
|
|
163
|
+
this.#eventReporter.logEvent({
|
|
164
|
+
type: "fusebox_console_notice",
|
|
165
|
+
});
|
|
166
|
+
}
|
|
162
167
|
#logExpiredCommand(pendingCommand) {
|
|
163
168
|
this.#eventReporter.logEvent({
|
|
164
169
|
type: "debugger_command",
|
|
@@ -79,8 +79,9 @@ export type ReportableEvent =
|
|
|
79
79
|
* | ^^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
|
|
80
80
|
**/
|
|
81
81
|
any
|
|
82
|
+
| { type: "fusebox_console_notice" }
|
|
82
83
|
| /**
|
|
83
|
-
* >
|
|
84
|
+
* > 95 | ...DebuggerSessionIDs,
|
|
84
85
|
* | ^^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
|
|
85
86
|
**/
|
|
86
87
|
any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/dev-middleware",
|
|
3
|
-
"version": "0.78.0-rc.
|
|
3
|
+
"version": "0.78.0-rc.5",
|
|
4
4
|
"description": "Dev server middleware for React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@isaacs/ttlcache": "^1.4.1",
|
|
26
|
-
"@react-native/debugger-frontend": "0.78.0-rc.
|
|
26
|
+
"@react-native/debugger-frontend": "0.78.0-rc.5",
|
|
27
27
|
"chrome-launcher": "^0.15.2",
|
|
28
28
|
"chromium-edge-launcher": "^0.2.0",
|
|
29
29
|
"connect": "^3.6.5",
|