@rnx-kit/cli 0.18.5 → 0.18.7
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.
- package/lib/run.d.ts +2 -0
- package/lib/run.js +4 -0
- package/lib/start.js +21 -13
- package/package.json +2 -7
package/lib/run.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Config } from "@react-native-community/cli-types";
|
|
2
|
+
import { RNX_FAST_PATH } from "./bin/constants";
|
|
2
3
|
import type { InputParams } from "./build/types";
|
|
3
4
|
export declare function rnxRun(_argv: string[], config: Config, buildParams: InputParams): Promise<void>;
|
|
4
5
|
export declare const rnxRunCommand: {
|
|
6
|
+
[RNX_FAST_PATH]: boolean;
|
|
5
7
|
name: string;
|
|
6
8
|
description: string;
|
|
7
9
|
func: typeof rnxRun;
|
package/lib/run.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rnxRunCommand = void 0;
|
|
4
4
|
exports.rnxRun = rnxRun;
|
|
5
|
+
const constants_1 = require("./bin/constants");
|
|
5
6
|
const build_1 = require("./build");
|
|
6
7
|
const android_1 = require("./run/android");
|
|
7
8
|
const ios_1 = require("./run/ios");
|
|
@@ -18,6 +19,9 @@ function rnxRun(_argv, config, buildParams) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
exports.rnxRunCommand = {
|
|
22
|
+
// The run command may invoke the build command which currently requires
|
|
23
|
+
// loading the full config.
|
|
24
|
+
[constants_1.RNX_FAST_PATH]: false,
|
|
21
25
|
name: "rnx-run",
|
|
22
26
|
description: "Build and run your native app for testing in emulator/simulator or on device",
|
|
23
27
|
func: rnxRun,
|
package/lib/start.js
CHANGED
|
@@ -148,24 +148,32 @@ async function rnxStart(_argv, ctx, args) {
|
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
};
|
|
151
|
+
const unstable_extraMiddleware = [];
|
|
152
|
+
if (coreDevMiddleware) {
|
|
153
|
+
unstable_extraMiddleware.push(devServer.middleware);
|
|
154
|
+
if (indexPageMiddleware) {
|
|
155
|
+
unstable_extraMiddleware.push(indexPageMiddleware);
|
|
156
|
+
}
|
|
157
|
+
unstable_extraMiddleware.push(coreDevMiddleware.middleware);
|
|
158
|
+
if (coreDevMiddleware.websocketEndpoints) {
|
|
159
|
+
if (websocketEndpoints) {
|
|
160
|
+
const endpoints = Object.entries(coreDevMiddleware.websocketEndpoints);
|
|
161
|
+
for (const [key, value] of endpoints) {
|
|
162
|
+
websocketEndpoints[key] = value;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
websocketEndpoints = coreDevMiddleware.websocketEndpoints;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
151
170
|
const serverInstance = await (0, metro_service_1.startServer)(metroConfig, {
|
|
152
171
|
host: args.host,
|
|
153
172
|
secure: args.https,
|
|
154
173
|
secureCert: args.cert,
|
|
155
174
|
secureKey: args.key,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
unstable_extraMiddleware: [
|
|
159
|
-
devServer.middleware,
|
|
160
|
-
indexPageMiddleware,
|
|
161
|
-
coreDevMiddleware.middleware,
|
|
162
|
-
],
|
|
163
|
-
websocketEndpoints: {
|
|
164
|
-
...websocketEndpoints,
|
|
165
|
-
...coreDevMiddleware.websocketEndpoints,
|
|
166
|
-
},
|
|
167
|
-
}
|
|
168
|
-
: { websocketEndpoints }),
|
|
175
|
+
unstable_extraMiddleware,
|
|
176
|
+
websocketEndpoints,
|
|
169
177
|
});
|
|
170
178
|
if (hasAttachToServerFunction(devServer)) {
|
|
171
179
|
const { messageSocket, eventsSocket } = devServer.attachToServer(serverInstance);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnx-kit/cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "Command-line interface for working with kit packages in your repo",
|
|
5
5
|
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/cli#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,21 +80,16 @@
|
|
|
80
80
|
"@rnx-kit/tools-filesystem": "*",
|
|
81
81
|
"@rnx-kit/tsconfig": "*",
|
|
82
82
|
"@types/connect": "^3.4.36",
|
|
83
|
-
"@types/jest": "^29.2.1",
|
|
84
83
|
"@types/node": "^20.0.0",
|
|
85
84
|
"@types/qrcode": "^1.4.2",
|
|
86
|
-
"eslint": "^9.0.0",
|
|
87
|
-
"jest": "^29.2.1",
|
|
88
85
|
"markdown-table": "^3.0.0",
|
|
89
86
|
"metro": "^0.81.0",
|
|
90
87
|
"metro-babel-transformer": "^0.81.0",
|
|
91
88
|
"metro-config": "^0.81.0",
|
|
92
|
-
"prettier": "^3.0.0",
|
|
93
89
|
"react": "18.3.1",
|
|
94
90
|
"react-native": "^0.76.0",
|
|
95
91
|
"tsx": "^4.15.0",
|
|
96
|
-
"type-fest": "^4.0.0"
|
|
97
|
-
"typescript": "^5.0.0"
|
|
92
|
+
"type-fest": "^4.0.0"
|
|
98
93
|
},
|
|
99
94
|
"engines": {
|
|
100
95
|
"node": ">=16.17"
|