@react-native/community-cli-plugin 0.77.0-nightly-20241002-d19a2178b → 0.77.0-nightly-20241004-309cdea33
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.
|
@@ -33,9 +33,9 @@ class OpenDebuggerKeyboardHandler {
|
|
|
33
33
|
} catch (e) {
|
|
34
34
|
this.#log(
|
|
35
35
|
"error",
|
|
36
|
-
"Failed to open debugger for %s
|
|
36
|
+
"Failed to open debugger for %s (%s): %s",
|
|
37
|
+
target.title,
|
|
37
38
|
target.description,
|
|
38
|
-
target.deviceName,
|
|
39
39
|
e.message
|
|
40
40
|
);
|
|
41
41
|
this.#clearTerminalMenu();
|
|
@@ -76,10 +76,8 @@ class OpenDebuggerKeyboardHandler {
|
|
|
76
76
|
`Multiple debug targets available, please select:\n ${targets
|
|
77
77
|
.slice(0, 9)
|
|
78
78
|
.map(
|
|
79
|
-
({
|
|
80
|
-
`${_chalk.default.white.inverse(
|
|
81
|
-
` ${i + 1} `
|
|
82
|
-
)} - "${description}" on "${deviceName}"`
|
|
79
|
+
({ title }, i) =>
|
|
80
|
+
`${_chalk.default.white.inverse(` ${i + 1} `)} - "${title}"`
|
|
83
81
|
)
|
|
84
82
|
.join("\n ")}`
|
|
85
83
|
);
|
|
@@ -8,7 +8,6 @@ var _OpenDebuggerKeyboardHandler = _interopRequireDefault(
|
|
|
8
8
|
require("./OpenDebuggerKeyboardHandler")
|
|
9
9
|
);
|
|
10
10
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
11
|
-
var _child_process = require("child_process");
|
|
12
11
|
var _invariant = _interopRequireDefault(require("invariant"));
|
|
13
12
|
var _readline = _interopRequireDefault(require("readline"));
|
|
14
13
|
var _tty = require("tty");
|
|
@@ -28,18 +27,7 @@ const throttle = (callback, timeout) => {
|
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
29
|
};
|
|
31
|
-
|
|
32
|
-
env: {
|
|
33
|
-
...process.env,
|
|
34
|
-
FORCE_COLOR: _chalk.default.supportsColor ? "true" : "false",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
function attachKeyHandlers({
|
|
38
|
-
cliConfig,
|
|
39
|
-
devServerUrl,
|
|
40
|
-
messageSocket,
|
|
41
|
-
reporter,
|
|
42
|
-
}) {
|
|
30
|
+
function attachKeyHandlers({ devServerUrl, messageSocket, reporter }) {
|
|
43
31
|
if (process.stdin.isTTY !== true) {
|
|
44
32
|
reporter.update({
|
|
45
33
|
type: "unstable_server_log",
|
|
@@ -78,38 +66,6 @@ function attachKeyHandlers({
|
|
|
78
66
|
});
|
|
79
67
|
messageSocket.broadcast("devMenu", null);
|
|
80
68
|
break;
|
|
81
|
-
case "i":
|
|
82
|
-
reporter.update({
|
|
83
|
-
type: "unstable_server_log",
|
|
84
|
-
level: "info",
|
|
85
|
-
data: "Opening app on iOS...",
|
|
86
|
-
});
|
|
87
|
-
(0, _child_process.spawn)(
|
|
88
|
-
"npx",
|
|
89
|
-
[
|
|
90
|
-
"react-native",
|
|
91
|
-
"run-ios",
|
|
92
|
-
...(cliConfig.project.ios?.watchModeCommandParams ?? []),
|
|
93
|
-
],
|
|
94
|
-
spawnOptions
|
|
95
|
-
).stdout?.pipe(process.stdout);
|
|
96
|
-
break;
|
|
97
|
-
case "a":
|
|
98
|
-
reporter.update({
|
|
99
|
-
type: "unstable_server_log",
|
|
100
|
-
level: "info",
|
|
101
|
-
data: "Opening app on Android...",
|
|
102
|
-
});
|
|
103
|
-
(0, _child_process.spawn)(
|
|
104
|
-
"npx",
|
|
105
|
-
[
|
|
106
|
-
"react-native",
|
|
107
|
-
"run-android",
|
|
108
|
-
...(cliConfig.project.android?.watchModeCommandParams ?? []),
|
|
109
|
-
],
|
|
110
|
-
spawnOptions
|
|
111
|
-
).stdout?.pipe(process.stdout);
|
|
112
|
-
break;
|
|
113
69
|
case "j":
|
|
114
70
|
void openDebuggerKeyboardHandler.handleOpenDebugger();
|
|
115
71
|
break;
|
|
@@ -132,8 +88,6 @@ function attachKeyHandlers({
|
|
|
132
88
|
level: "info",
|
|
133
89
|
data: `Key commands available:
|
|
134
90
|
|
|
135
|
-
${_chalk.default.bold.inverse(" i ")} - run on iOS
|
|
136
|
-
${_chalk.default.bold.inverse(" a ")} - run on Android
|
|
137
91
|
${_chalk.default.bold.inverse(" r ")} - reload app(s)
|
|
138
92
|
${_chalk.default.bold.inverse(" d ")} - open Dev Menu
|
|
139
93
|
${_chalk.default.bold.inverse(" j ")} - open DevTools
|
|
@@ -9,11 +9,9 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { Config } from "@react-native-community/cli-types";
|
|
13
12
|
import type TerminalReporter from "metro/src/lib/TerminalReporter";
|
|
14
13
|
|
|
15
14
|
declare export default function attachKeyHandlers({
|
|
16
|
-
cliConfig: Config,
|
|
17
15
|
devServerUrl: string,
|
|
18
16
|
messageSocket: $ReadOnly<{
|
|
19
17
|
broadcast: (type: string, params?: Record<string, mixed> | null) => void,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/community-cli-plugin",
|
|
3
|
-
"version": "0.77.0-nightly-
|
|
3
|
+
"version": "0.77.0-nightly-20241004-309cdea33",
|
|
4
4
|
"description": "Core CLI commands for React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-native/dev-middleware": "0.77.0-nightly-
|
|
26
|
-
"@react-native/metro-babel-transformer": "0.77.0-nightly-
|
|
25
|
+
"@react-native/dev-middleware": "0.77.0-nightly-20241004-309cdea33",
|
|
26
|
+
"@react-native/metro-babel-transformer": "0.77.0-nightly-20241004-309cdea33",
|
|
27
27
|
"chalk": "^4.0.0",
|
|
28
28
|
"debug": "^2.2.0",
|
|
29
29
|
"invariant": "^2.2.4",
|