@react-native/community-cli-plugin 0.74.0-nightly-20231009-ec1de6194 → 0.74.0
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.
|
@@ -25,7 +25,12 @@ function _interopRequireDefault(obj) {
|
|
|
25
25
|
|
|
26
26
|
const CTRL_C = "\u0003";
|
|
27
27
|
const CTRL_D = "\u0004";
|
|
28
|
-
function attachKeyHandlers({
|
|
28
|
+
function attachKeyHandlers({
|
|
29
|
+
cliConfig,
|
|
30
|
+
devServerUrl,
|
|
31
|
+
messageSocket,
|
|
32
|
+
experimentalDebuggerFrontend,
|
|
33
|
+
}) {
|
|
29
34
|
if (process.stdin.isTTY !== true) {
|
|
30
35
|
_cliTools.logger.debug(
|
|
31
36
|
"Interactive mode is not supported in this environment"
|
|
@@ -72,6 +77,9 @@ function attachKeyHandlers({ cliConfig, devServerUrl, messageSocket }) {
|
|
|
72
77
|
).stdout?.pipe(process.stdout);
|
|
73
78
|
break;
|
|
74
79
|
case "j":
|
|
80
|
+
if (!experimentalDebuggerFrontend) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
75
83
|
await (0, _nodeFetch.default)(devServerUrl + "/open-debugger", {
|
|
76
84
|
method: "POST",
|
|
77
85
|
});
|
|
@@ -86,11 +94,17 @@ function attachKeyHandlers({ cliConfig, devServerUrl, messageSocket }) {
|
|
|
86
94
|
});
|
|
87
95
|
keyPressHandler.createInteractionListener();
|
|
88
96
|
keyPressHandler.startInterceptingKeyStrokes();
|
|
89
|
-
_cliTools.logger.log(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
_cliTools.logger.log(
|
|
98
|
+
[
|
|
99
|
+
"",
|
|
100
|
+
`${_chalk.default.bold("i")} - run on iOS`,
|
|
101
|
+
`${_chalk.default.bold("a")} - run on Android`,
|
|
102
|
+
`${_chalk.default.bold("d")} - open Dev Menu`,
|
|
103
|
+
...(experimentalDebuggerFrontend
|
|
104
|
+
? [`${_chalk.default.bold("j")} - open debugger (experimental)`]
|
|
105
|
+
: []),
|
|
106
|
+
`${_chalk.default.bold("r")} - reload app`,
|
|
107
|
+
"",
|
|
108
|
+
].join("\n")
|
|
109
|
+
);
|
|
96
110
|
}
|
|
@@ -99,6 +99,15 @@ const startCommand = {
|
|
|
99
99
|
name: "--no-interactive",
|
|
100
100
|
description: "Disables interactive mode",
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: "--experimental-debugger [bool]",
|
|
104
|
+
description:
|
|
105
|
+
"[Experimental] Enable the new debugger experience and 'j' to " +
|
|
106
|
+
"debug. This enables the new frontend experience only: connection " +
|
|
107
|
+
"reliability and some basic features are unstable in this release.",
|
|
108
|
+
parse: (val) => val !== undefined && val !== "false" && val !== "0",
|
|
109
|
+
default: true,
|
|
110
|
+
},
|
|
102
111
|
],
|
|
103
112
|
};
|
|
104
113
|
var _default = startCommand;
|
|
@@ -95,7 +95,7 @@ async function runServer(_argv, ctx, args) {
|
|
|
95
95
|
logger: _cliTools.logger,
|
|
96
96
|
unstable_experiments: {
|
|
97
97
|
// NOTE: Only affects the /open-debugger endpoint
|
|
98
|
-
|
|
98
|
+
enableNewDebugger: args.experimentalDebugger,
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
101
|
let reportEvent;
|
|
@@ -115,6 +115,7 @@ async function runServer(_argv, ctx, args) {
|
|
|
115
115
|
cliConfig: ctx,
|
|
116
116
|
devServerUrl,
|
|
117
117
|
messageSocket: messageSocketEndpoint,
|
|
118
|
+
experimentalDebuggerFrontend: args.experimentalDebugger,
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/community-cli-plugin",
|
|
3
|
-
"version": "0.74.0
|
|
3
|
+
"version": "0.74.0",
|
|
4
4
|
"description": "Core CLI commands for React Native",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react-native",
|
|
7
|
-
"tools"
|
|
8
|
-
],
|
|
5
|
+
"keywords": ["react-native", "tools"],
|
|
9
6
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/buid-scripts#readme",
|
|
10
7
|
"bugs": "https://github.com/facebook/react-native/issues",
|
|
11
8
|
"repository": {
|
|
@@ -14,18 +11,13 @@
|
|
|
14
11
|
"directory": "packages/community-cli-plugin"
|
|
15
12
|
},
|
|
16
13
|
"license": "MIT",
|
|
17
|
-
"exports": {
|
|
18
|
-
|
|
19
|
-
"./package.json": "./package.json"
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
14
|
+
"exports": { ".": "./dist/index.js", "./package.json": "./package.json" },
|
|
15
|
+
"files": ["dist"],
|
|
24
16
|
"dependencies": {
|
|
25
|
-
"@react-native/dev-middleware": "0.74.0
|
|
17
|
+
"@react-native/dev-middleware": "^0.74.0",
|
|
26
18
|
"@react-native-community/cli-server-api": "12.0.0-alpha.15",
|
|
27
19
|
"@react-native-community/cli-tools": "12.0.0-alpha.15",
|
|
28
|
-
"@react-native/metro-babel-transformer": "0.74.0
|
|
20
|
+
"@react-native/metro-babel-transformer": "^0.74.0",
|
|
29
21
|
"chalk": "^4.0.0",
|
|
30
22
|
"execa": "^5.1.1",
|
|
31
23
|
"metro": "0.79.1",
|
|
@@ -34,10 +26,6 @@
|
|
|
34
26
|
"node-fetch": "^2.2.0",
|
|
35
27
|
"readline": "^1.3.0"
|
|
36
28
|
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=18"
|
|
42
|
-
}
|
|
29
|
+
"devDependencies": { "metro-resolver": "0.79.1" },
|
|
30
|
+
"engines": { "node": ">=18" }
|
|
43
31
|
}
|