@oisasoje/gloo-cli 1.0.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.
- package/README.md +24 -0
- package/bin/gloo.js +36 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @oisasoje/gloo-cli
|
|
2
|
+
|
|
3
|
+
Command Line Interface for Gloo, the premium request tracing and telemetry system.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install globally or locally in your project:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @oisasoje/gloo-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Start the telemetry receiver and dashboard:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
gloo dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This will:
|
|
22
|
+
1. Boot the telemetry receiver on port `7777`.
|
|
23
|
+
2. Serve the static visualizer dashboard.
|
|
24
|
+
3. Automatically open your default web browser to the dashboard.
|
package/bin/gloo.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execa } from "execa";
|
|
4
|
+
import open from "open";
|
|
5
|
+
|
|
6
|
+
const command = process.argv[2];
|
|
7
|
+
|
|
8
|
+
if (command === "dev") {
|
|
9
|
+
startDev();
|
|
10
|
+
} else {
|
|
11
|
+
console.log("Usage: gloo dev");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async function startDev() {
|
|
15
|
+
console.log("🚀 Starting Gloo Telemetry Dashboard on http://localhost:7777...");
|
|
16
|
+
|
|
17
|
+
// Start the receiver (which now hosts the static visualizer)
|
|
18
|
+
const receiver = execa("npx", ["@oisasoje/gloo-receiver"], {
|
|
19
|
+
stdio: "inherit",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Handle clean exit on Ctrl+C to prevent port locking!
|
|
23
|
+
const cleanup = () => {
|
|
24
|
+
console.log("\nStopping Gloo...");
|
|
25
|
+
receiver.kill("SIGTERM");
|
|
26
|
+
process.exit(0);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
process.on("SIGINT", cleanup);
|
|
30
|
+
process.on("SIGTERM", cleanup);
|
|
31
|
+
|
|
32
|
+
// Auto-open browser once the server is ready
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
open("http://localhost:7777");
|
|
35
|
+
}, 1500);
|
|
36
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oisasoje/gloo-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool to launch the Gloo telemetry dashboard and receiver.",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"bin": {
|
|
7
|
+
"gloo": "bin/gloo.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "Victor",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"files": [
|
|
12
|
+
"bin/"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@oisasoje/gloo": "^1.0.0",
|
|
19
|
+
"@oisasoje/gloo-receiver": "^1.1.0",
|
|
20
|
+
"execa": "^9.6.1",
|
|
21
|
+
"open": "^11.0.0"
|
|
22
|
+
}
|
|
23
|
+
}
|