@react-native/community-cli-plugin 0.77.1 → 0.77.2

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.
@@ -26,11 +26,18 @@ const communityMiddlewareFallback = {
26
26
  indexPageMiddleware: noopNextHandle,
27
27
  };
28
28
  try {
29
- const community = require("@react-native-community/cli-server-api");
30
- communityMiddlewareFallback.indexPageMiddleware =
31
- community.indexPageMiddleware;
29
+ const communityCliPath = require.resolve("@react-native-community/cli");
30
+ const communityCliServerApiPath = require.resolve(
31
+ "@react-native-community/cli-server-api",
32
+ {
33
+ paths: [communityCliPath],
34
+ }
35
+ );
36
+ const communityCliServerApi = require(communityCliServerApiPath);
32
37
  communityMiddlewareFallback.createDevServerMiddleware =
33
- community.createDevServerMiddleware;
38
+ communityCliServerApi.createDevServerMiddleware;
39
+ communityMiddlewareFallback.indexPageMiddleware =
40
+ communityCliServerApi.indexPageMiddleware;
34
41
  } catch {
35
42
  debug(`⚠️ Unable to find @react-native-community/cli-server-api
36
43
  Starting the server without the community middleware.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/community-cli-plugin",
3
- "version": "0.77.1",
3
+ "version": "0.77.2",
4
4
  "description": "Core CLI commands for React Native",
5
5
  "keywords": [
6
6
  "react-native",
@@ -22,25 +22,25 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@react-native/dev-middleware": "0.77.1",
26
- "@react-native/metro-babel-transformer": "0.77.1",
25
+ "@react-native/dev-middleware": "0.77.2",
26
+ "@react-native/metro-babel-transformer": "0.77.2",
27
27
  "chalk": "^4.0.0",
28
28
  "debug": "^2.2.0",
29
29
  "invariant": "^2.2.4",
30
- "metro": "^0.81.0",
31
- "metro-config": "^0.81.0",
32
- "metro-core": "^0.81.0",
30
+ "metro": "^0.81.3",
31
+ "metro-config": "^0.81.3",
32
+ "metro-core": "^0.81.3",
33
33
  "readline": "^1.3.0",
34
34
  "semver": "^7.1.3"
35
35
  },
36
36
  "devDependencies": {
37
- "metro-resolver": "^0.81.0"
37
+ "metro-resolver": "^0.81.3"
38
38
  },
39
39
  "peerDependencies": {
40
- "@react-native-community/cli-server-api": "*"
40
+ "@react-native-community/cli": "*"
41
41
  },
42
42
  "peerDependenciesMeta": {
43
- "@react-native-community/cli-server-api": {
43
+ "@react-native-community/cli": {
44
44
  "optional": true
45
45
  }
46
46
  },