@react-native/community-cli-plugin 0.78.0 → 0.78.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.
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true,
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.createDevServerMiddleware = void 0;
|
|
7
7
|
const debug = require("debug")("ReactNative:CommunityCliPlugin");
|
|
8
|
-
const noopNextHandle = (req, res, next) => {
|
|
9
|
-
next();
|
|
10
|
-
};
|
|
11
8
|
const unusedStubWSServer = {};
|
|
12
9
|
const unusedMiddlewareStub = {};
|
|
13
10
|
const communityMiddlewareFallback = {
|
|
@@ -23,19 +20,21 @@ const communityMiddlewareFallback = {
|
|
|
23
20
|
reportEvent: (event) => {},
|
|
24
21
|
},
|
|
25
22
|
}),
|
|
26
|
-
indexPageMiddleware: noopNextHandle,
|
|
27
23
|
};
|
|
28
24
|
try {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
community
|
|
25
|
+
const communityCliPath = require.resolve("@react-native-community/cli");
|
|
26
|
+
const communityCliServerApiPath = require.resolve(
|
|
27
|
+
"@react-native-community/cli-server-api",
|
|
28
|
+
{
|
|
29
|
+
paths: [communityCliPath],
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
const communityCliServerApi = require(communityCliServerApiPath);
|
|
32
33
|
communityMiddlewareFallback.createDevServerMiddleware =
|
|
33
|
-
|
|
34
|
+
communityCliServerApi.createDevServerMiddleware;
|
|
34
35
|
} catch {
|
|
35
36
|
debug(`⚠️ Unable to find @react-native-community/cli-server-api
|
|
36
37
|
Starting the server without the community middleware.`);
|
|
37
38
|
}
|
|
38
39
|
const createDevServerMiddleware = (exports.createDevServerMiddleware =
|
|
39
40
|
communityMiddlewareFallback.createDevServerMiddleware);
|
|
40
|
-
const indexPageMiddleware = (exports.indexPageMiddleware =
|
|
41
|
-
communityMiddlewareFallback.indexPageMiddleware);
|
|
@@ -149,11 +149,7 @@ async function runServer(_argv, cliConfig, args) {
|
|
|
149
149
|
secure: args.https,
|
|
150
150
|
secureCert: args.cert,
|
|
151
151
|
secureKey: args.key,
|
|
152
|
-
unstable_extraMiddleware: [
|
|
153
|
-
communityMiddleware,
|
|
154
|
-
_middleware.indexPageMiddleware,
|
|
155
|
-
middleware,
|
|
156
|
-
],
|
|
152
|
+
unstable_extraMiddleware: [communityMiddleware, middleware],
|
|
157
153
|
websocketEndpoints: {
|
|
158
154
|
...communityWebsocketEndpoints,
|
|
159
155
|
...websocketEndpoints,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/community-cli-plugin",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.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.78.
|
|
26
|
-
"@react-native/metro-babel-transformer": "0.78.
|
|
25
|
+
"@react-native/dev-middleware": "0.78.2",
|
|
26
|
+
"@react-native/metro-babel-transformer": "0.78.2",
|
|
27
27
|
"chalk": "^4.0.0",
|
|
28
28
|
"debug": "^2.2.0",
|
|
29
29
|
"invariant": "^2.2.4",
|
|
30
|
-
"metro": "^0.81.
|
|
31
|
-
"metro-config": "^0.81.
|
|
32
|
-
"metro-core": "^0.81.
|
|
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.
|
|
37
|
+
"metro-resolver": "^0.81.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@react-native-community/cli
|
|
40
|
+
"@react-native-community/cli": "*"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
|
-
"@react-native-community/cli
|
|
43
|
+
"@react-native-community/cli": {
|
|
44
44
|
"optional": true
|
|
45
45
|
}
|
|
46
46
|
},
|