@lanternajs/cli 0.0.1 → 0.0.3
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/README.md +46 -0
- package/dist/live-dashboard.js +1 -1
- package/dist/ws-server.d.ts +1 -1
- package/dist/ws-server.js +1 -1
- package/package.json +12 -8
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @lanternajs/cli
|
|
2
|
+
|
|
3
|
+
CLI entry point for [Lanterna](https://github.com/rogerfuentes/lanterna) — Lighthouse for mobile apps. One command to capture, analyze, and report React Native performance metrics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @lanternajs/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Measure a running app
|
|
15
|
+
lanterna measure com.example.app
|
|
16
|
+
|
|
17
|
+
# Measure with options
|
|
18
|
+
lanterna measure com.example.app --duration 15 --platform ios --output report.json
|
|
19
|
+
|
|
20
|
+
# Run a Maestro E2E flow with performance collection
|
|
21
|
+
lanterna test --maestro login-flow.yaml
|
|
22
|
+
|
|
23
|
+
# Compare against a baseline
|
|
24
|
+
lanterna measure com.example.app --baseline previous-report.json
|
|
25
|
+
|
|
26
|
+
# Start live monitoring dashboard
|
|
27
|
+
lanterna monitor
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| `measure <package>` | Collect performance metrics for a running app |
|
|
35
|
+
| `test --maestro <flow>` | Run a Maestro E2E flow and collect metrics |
|
|
36
|
+
| `monitor` | Start live monitoring dashboard (WebSocket server) |
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- **Android**: `adb` on PATH, device/emulator connected
|
|
41
|
+
- **iOS**: macOS with Xcode, simulator running or device connected
|
|
42
|
+
- **Maestro** (optional): For E2E test flows
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
|
package/dist/live-dashboard.js
CHANGED
|
@@ -13,7 +13,7 @@ export function renderDashboard(apps, serverPort, isRunning) {
|
|
|
13
13
|
if (apps.length === 0) {
|
|
14
14
|
lines.push("│ Waiting for apps to connect... │");
|
|
15
15
|
lines.push("│ │");
|
|
16
|
-
lines.push("│ Add
|
|
16
|
+
lines.push("│ Add @lanternajs/react-native to your app │");
|
|
17
17
|
lines.push("│ and it will auto-connect. │");
|
|
18
18
|
}
|
|
19
19
|
else {
|
package/dist/ws-server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* WebSocket server for receiving real-time metrics from
|
|
2
|
+
* WebSocket server for receiving real-time metrics from @lanternajs/react-native apps.
|
|
3
3
|
*/
|
|
4
4
|
/** Message types from the protocol (duplicated here to avoid dependency on react-native package). */
|
|
5
5
|
export type ServerMessageType = "handshake" | "handshake_ack" | "metrics" | "control" | "disconnect" | "error";
|
package/dist/ws-server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* WebSocket server for receiving real-time metrics from
|
|
2
|
+
* WebSocket server for receiving real-time metrics from @lanternajs/react-native apps.
|
|
3
3
|
*/
|
|
4
4
|
/** Default port for the Lanterna WebSocket server. */
|
|
5
5
|
export const WS_DEFAULT_PORT = 8347;
|
package/package.json
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lanternajs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"lanterna": "dist/index.js"
|
|
9
9
|
},
|
|
10
|
-
"files": [
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
11
13
|
"license": "Apache-2.0",
|
|
12
14
|
"description": "CLI entry point for Lanterna — Lighthouse for mobile apps",
|
|
13
15
|
"repository": {
|
|
14
16
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/rogerfuentes/lanterna.git",
|
|
16
18
|
"directory": "packages/cli"
|
|
17
19
|
},
|
|
18
|
-
"publishConfig": {
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
19
23
|
"dependencies": {
|
|
20
|
-
"@lanternajs/core": "
|
|
21
|
-
"@lanternajs/android": "
|
|
22
|
-
"@lanternajs/ios": "
|
|
23
|
-
"@lanternajs/report": "
|
|
24
|
+
"@lanternajs/core": "^0.0.3",
|
|
25
|
+
"@lanternajs/android": "^0.0.3",
|
|
26
|
+
"@lanternajs/ios": "^0.0.3",
|
|
27
|
+
"@lanternajs/report": "^0.0.3"
|
|
24
28
|
},
|
|
25
29
|
"scripts": {
|
|
26
30
|
"build": "tsc --project tsconfig.build.json",
|