Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@react-native/dev-middleware

Package Overview
Dependencies
Maintainers
11
Versions
404
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native/dev-middleware - npm Package Compare versions

Comparing version 0.74.0-nightly-20231206-eb661df2a to 0.74.0-nightly-20231207-80812658e

1

dist/createDevMiddleware.js

@@ -88,3 +88,4 @@ "use strict";

enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false,
enableNetworkInspector: config.enableNetworkInspector ?? false,
};
}

@@ -102,2 +102,3 @@ "use strict";

(0, _getDevToolsFrontendUrl.default)(
experiments,
target.webSocketDebuggerUrl,

@@ -113,2 +114,3 @@ serverBaseUrl

Location: (0, _getDevToolsFrontendUrl.default)(
experiments,
target.webSocketDebuggerUrl,

@@ -115,0 +117,0 @@ // Use a relative URL.

@@ -25,3 +25,7 @@ /**

enableOpenDebuggerRedirect: boolean;
/**
* Enables the Network panel when launching the custom debugger frontend.
*/
enableNetworkInspector: boolean;
}>;
export type ExperimentsConfig = Partial<Experiments>;

@@ -12,2 +12,3 @@ /**

import type { Experiments } from "../types/Experiments";
/**

@@ -17,2 +18,3 @@ * Get the DevTools frontend URL to debug a given React Native CDP target.

declare function getDevToolsFrontendUrl(
experiments: Experiments,
webSocketDebuggerUrl: string,

@@ -19,0 +21,0 @@ devServerUrl: string

@@ -21,3 +21,7 @@ "use strict";

*/
function getDevToolsFrontendUrl(webSocketDebuggerUrl, devServerUrl) {
function getDevToolsFrontendUrl(
experiments,
webSocketDebuggerUrl,
devServerUrl
) {
const scheme = new URL(webSocketDebuggerUrl).protocol.slice(0, -1);

@@ -27,3 +31,6 @@ const webSocketUrlWithoutProtocol = encodeURIComponent(

);
return `${`${devServerUrl}/debugger-frontend/rn_inspector.html`}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`;
const devToolsUrl = `${`${devServerUrl}/debugger-frontend/rn_inspector.html`}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`;
return experiments.enableNetworkInspector
? `${devToolsUrl}&unstable_enableNetworkPanel=true`
: devToolsUrl;
}

4

package.json
{
"name": "@react-native/dev-middleware",
"version": "0.74.0-nightly-20231206-eb661df2a",
"version": "0.74.0-nightly-20231207-80812658e",
"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-20231206-eb661df2a",
"@react-native/debugger-frontend": "0.74.0-nightly-20231207-80812658e",
"@rnx-kit/chromium-edge-launcher": "^1.0.0",

@@ -29,0 +29,0 @@ "chrome-launcher": "^0.15.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc