@react-native/dev-middleware
Advanced tools
Comparing version 0.74.0-nightly-20231107-bc68794c6 to 0.74.0-nightly-20231108-05d92bf2a
@@ -47,2 +47,3 @@ /** | ||
_deviceEventReporter: null | undefined | DeviceEventReporter; | ||
_pagesPollingIntervalId: ReturnType<typeof setInterval>; | ||
constructor( | ||
@@ -67,3 +68,2 @@ id: string, | ||
_sendMessageToDevice(message: MessageToDevice): void; | ||
_setPagesPolling(): void; | ||
_newReactNativePage(page: Page): void; | ||
@@ -70,0 +70,0 @@ _processMessageFromDevice( |
@@ -145,2 +145,10 @@ "use strict"; | ||
}); | ||
// Sends 'getPages' request to device every PAGES_POLLING_INTERVAL milliseconds. | ||
this._pagesPollingIntervalId = setInterval( | ||
() => | ||
this._sendMessageToDevice({ | ||
event: "getPages", | ||
}), | ||
PAGES_POLLING_INTERVAL | ||
); | ||
this._deviceSocket.on("close", () => { | ||
@@ -153,4 +161,4 @@ this._deviceEventReporter?.logDisconnection("device"); | ||
} | ||
clearInterval(this._pagesPollingIntervalId); | ||
}); | ||
this._setPagesPolling(); | ||
} | ||
@@ -376,13 +384,2 @@ getName() { | ||
// Sends 'getPages' request to device every PAGES_POLLING_INTERVAL milliseconds. | ||
_setPagesPolling() { | ||
setInterval( | ||
() => | ||
this._sendMessageToDevice({ | ||
event: "getPages", | ||
}), | ||
PAGES_POLLING_INTERVAL | ||
); | ||
} | ||
// We received new React Native Page ID. | ||
@@ -692,2 +689,5 @@ _newReactNativePage(page) { | ||
const response = await (0, _nodeFetch.default)(url); | ||
if (!response.ok) { | ||
throw new Error("HTTP " + response.status + " " + response.statusText); | ||
} | ||
const text = await response.text(); | ||
@@ -694,0 +694,0 @@ // Restrict the length to well below the 500MB limit for nodejs (leaving |
@@ -93,1 +93,8 @@ /** | ||
| GetScriptSourceRequest; | ||
export type JSONSerializable = | ||
| boolean | ||
| number | ||
| string | ||
| null | ||
| ReadonlyArray<JSONSerializable> | ||
| { readonly [$$Key$$: string]: JSONSerializable }; |
{ | ||
"name": "@react-native/dev-middleware", | ||
"version": "0.74.0-nightly-20231107-bc68794c6", | ||
"version": "0.74.0-nightly-20231108-05d92bf2a", | ||
"description": "Dev server middleware for React Native", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"@isaacs/ttlcache": "^1.4.1", | ||
"@react-native/debugger-frontend": "0.74.0-nightly-20231107-bc68794c6", | ||
"@react-native/debugger-frontend": "0.74.0-nightly-20231108-05d92bf2a", | ||
"chrome-launcher": "^0.15.2", | ||
@@ -34,2 +34,3 @@ "chromium-edge-launcher": "^1.0.0", | ||
"open": "^7.0.3", | ||
"selfsigned": "^2.4.1", | ||
"serve-static": "^1.13.1", | ||
@@ -40,3 +41,8 @@ "temp-dir": "^2.0.0" | ||
"node": ">=18" | ||
}, | ||
"devDependencies": { | ||
"data-uri-to-buffer": "^6.0.1", | ||
"undici": "^5.27.2", | ||
"wait-for-expect": "^3.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91731
2070
11
3
+ Addedselfsigned@^2.4.1
+ Added@react-native/debugger-frontend@0.74.0-nightly-20231108-05d92bf2a(transitive)
+ Added@types/node-forge@1.3.11(transitive)
+ Addednode-forge@1.3.1(transitive)
+ Addedselfsigned@2.4.1(transitive)
- Removed@react-native/debugger-frontend@0.74.0-nightly-20231107-bc68794c6(transitive)
Updated@react-native/debugger-frontend@0.74.0-nightly-20231108-05d92bf2a