@react-native/dev-middleware 0.75.0-rc.2 → 0.76.0-nightly-20240627-TEMP

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.
@@ -4,43 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true,
5
5
  });
6
6
  exports.default = void 0;
7
- /**
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- *
13
- *
14
- * @format
15
- * @oncall react_native
16
- */
17
-
18
7
  const { spawn } = require("child_process");
19
8
  const ChromeLauncher = require("chrome-launcher");
20
9
  const { Launcher: EdgeLauncher } = require("chromium-edge-launcher");
21
10
  const open = require("open");
22
-
23
- /**
24
- * Default `BrowserLauncher` implementation which opens URLs on the host
25
- * machine.
26
- */
27
11
  const DefaultBrowserLauncher = {
28
- /**
29
- * Attempt to open the debugger frontend in a Google Chrome or Microsoft Edge
30
- * app window.
31
- */
32
12
  launchDebuggerAppWindow: async (url) => {
33
13
  let chromePath;
34
14
  try {
35
- // Locate Chrome installation path, will throw if not found
36
15
  chromePath = ChromeLauncher.getChromePath();
37
16
  } catch (e) {
38
- // Fall back to Microsoft Edge
39
17
  chromePath = EdgeLauncher.getFirstInstallation();
40
18
  }
41
19
  if (chromePath == null) {
42
- // Fall back to default browser - the frontend will warn if the browser
43
- // is not supported.
44
20
  await open(url);
45
21
  return;
46
22
  }
@@ -4,20 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true,
5
5
  });
6
6
  exports.default = getDevToolsFrontendUrl;
7
- /**
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- *
13
- *
14
- * @format
15
- * @oncall react_native
16
- */
17
-
18
- /**
19
- * Get the DevTools frontend URL to debug a given React Native CDP target.
20
- */
21
7
  function getDevToolsFrontendUrl(
22
8
  experiments,
23
9
  webSocketDebuggerUrl,
@@ -57,11 +43,8 @@ function getWsParam({ webSocketDebuggerUrl, devServerUrl }) {
57
43
  const serverHost = new URL(devServerUrl).host;
58
44
  let value;
59
45
  if (wsUrl.host === serverHost) {
60
- // Use a path-absolute (host-relative) URL
61
- // Depends on https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/4
62
46
  value = wsUrl.pathname + wsUrl.search + wsUrl.hash;
63
47
  } else {
64
- // Standard URL format accepted by the DevTools frontend
65
48
  value = wsUrl.host + wsUrl.pathname + wsUrl.search + wsUrl.hash;
66
49
  }
67
50
  const key = wsUrl.protocol.slice(0, -1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/dev-middleware",
3
- "version": "0.75.0-rc.2",
3
+ "version": "0.76.0-nightly-20240627-TEMP",
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.75.0-rc.2",
26
+ "@react-native/debugger-frontend": "0.76.0-nightly-20240627-TEMP",
27
27
  "chrome-launcher": "^0.15.2",
28
28
  "chromium-edge-launcher": "^0.2.0",
29
29
  "connect": "^3.6.5",
@@ -33,7 +33,7 @@
33
33
  "open": "^7.0.3",
34
34
  "selfsigned": "^2.4.1",
35
35
  "serve-static": "^1.13.1",
36
- "ws": "^6.2.2"
36
+ "ws": "^6.2.3"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=18"