azure-pipelines-tui 0.5.0 → 0.5.1
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 +20 -68
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,54 +16,40 @@ A terminal UI for live-following Azure DevOps pipeline runs, with streaming logs
|
|
|
16
16
|
|
|
17
17
|
- Node.js 18+
|
|
18
18
|
- Azure CLI (`az`) signed in to the correct tenant
|
|
19
|
-
- `npm install`
|
|
20
19
|
|
|
21
20
|
## Usage
|
|
22
21
|
|
|
23
|
-
### TUI — `index.ts`
|
|
24
|
-
|
|
25
22
|
```bash
|
|
26
|
-
#
|
|
27
|
-
npx
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
npx
|
|
31
|
-
|
|
32
|
-
# org/project shorthand
|
|
33
|
-
npx tsx index.ts ORG/PROJECT 1234
|
|
34
|
-
|
|
35
|
-
# Separate arguments
|
|
36
|
-
npx tsx index.ts ORG PROJECT 1234
|
|
37
|
-
|
|
38
|
-
# Keep timestamps in log output
|
|
39
|
-
npx tsx index.ts ORG/PROJECT 1234 --keep-timestamps
|
|
23
|
+
npx azure-pipelines-tui ORG/PROJECT # Pipelines overview (default)
|
|
24
|
+
npx azure-pipelines-tui ORG/PROJECT --envs # Environments overview
|
|
25
|
+
npx azure-pipelines-tui ORG/PROJECT --stages <id> # Stages dashboard
|
|
26
|
+
npx azure-pipelines-tui ORG/PROJECT --runs <id> # Pipeline runs list
|
|
27
|
+
npx azure-pipelines-tui ORG/PROJECT <buildId> # Single pipeline run
|
|
28
|
+
npx azure-pipelines-tui <build-url> # Single pipeline run (full URL)
|
|
40
29
|
```
|
|
41
30
|
|
|
42
|
-
|
|
31
|
+
### Key bindings
|
|
43
32
|
|
|
44
33
|
| Key | Action |
|
|
45
34
|
|-----|--------|
|
|
46
35
|
| `↑` `↓` | Navigate tree / scroll logs |
|
|
47
36
|
| `Enter` `→` | Expand / select step |
|
|
48
|
-
| `←` `Esc` | Collapse / back
|
|
49
|
-
| `Tab` | Switch focus between
|
|
37
|
+
| `←` `Esc` | Collapse / back |
|
|
38
|
+
| `Tab` | Switch focus between panels |
|
|
50
39
|
| `f` `End` | Follow mode — tail the log |
|
|
51
|
-
| `r` | Retry/restart
|
|
40
|
+
| `r` | Retry/restart selected stage |
|
|
52
41
|
| `q` `Ctrl+C` | Quit |
|
|
53
42
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Dumps all raw SignalR frames to stdout. Useful for exploring the protocol.
|
|
43
|
+
## How to run locally
|
|
57
44
|
|
|
58
45
|
```bash
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
npx tsx debugSignalR.ts ORG/PROJECT 1234
|
|
46
|
+
npm install
|
|
47
|
+
npm run start -- ORG/PROJECT
|
|
48
|
+
npm run start -- ORG/PROJECT --envs
|
|
49
|
+
npm run start -- ORG/PROJECT --stages <id>
|
|
50
|
+
npm run start -- ORG/PROJECT --runs <id>
|
|
51
|
+
npm run start -- ORG/PROJECT <buildId>
|
|
52
|
+
npm run start -- <build-url>
|
|
67
53
|
```
|
|
68
54
|
|
|
69
55
|
## How it works
|
|
@@ -73,42 +59,8 @@ The TUI combines two data sources:
|
|
|
73
59
|
1. **REST polling** (every 500 ms) — fetches build status, timeline records, and log lines via the Azure DevOps REST API.
|
|
74
60
|
2. **SignalR** (ASP.NET SignalR 1.x over WebSocket) — receives live events as log lines are written.
|
|
75
61
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
The connection requires three GUIDs, each from a different source:
|
|
79
|
-
|
|
80
|
-
| Name | Source | Used in |
|
|
81
|
-
|------|--------|---------|
|
|
82
|
-
| `instanceId` | `GET /_apis/connectionData` | negotiate and start URLs |
|
|
83
|
-
| `projectId` | `GET /_apis/projects/{name}` | WebSocket connect path |
|
|
84
|
-
| `contextToken` | negotiate response `.Url` field | connect query parameter |
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
negotiate → wss://...connect → /start → WatchBuild(projectId, buildId)
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
The WebSocket requires the bearer token in two places — as an `Authorization` header and as the `Sec-WebSocket-Protocol` subprotocol value, otherwise the server responds with a 302 redirect.
|
|
91
|
-
|
|
92
|
-
### Hub events
|
|
93
|
-
|
|
94
|
-
| Method | Action |
|
|
95
|
-
|--------|--------|
|
|
96
|
-
| `logConsoleLines` | Streams log lines directly into the log panel |
|
|
97
|
-
| `timelineRecordsUpdated` | Triggers a REST poll to refresh the tree |
|
|
98
|
-
| `buildUpdated` / `buildUpdated2` | Triggers a REST poll to refresh the header |
|
|
99
|
-
|
|
100
|
-
## Files
|
|
101
|
-
|
|
102
|
-
| File | Purpose |
|
|
103
|
-
|------|---------|
|
|
104
|
-
| `index.ts` | Blessed TUI: tree + log panel |
|
|
105
|
-
| `signalr.ts` | SignalR client (negotiate → connect → start → invoke) |
|
|
106
|
-
| `debugSignalR.ts` | Standalone debug script |
|
|
107
|
-
| `signalr-messages.jsonl` | Runtime dump of all SignalR frames (written by `signalr.ts`) |
|
|
108
|
-
| `signalr-negotiate.json` | Runtime dump of the negotiate response |
|
|
62
|
+
See [docs/signalr-design.md](docs/signalr-design.md) for the full SignalR protocol details.
|
|
109
63
|
|
|
110
64
|
## Note
|
|
111
|
-
We reverse engineered this undocumented streaming API by downloading the following javascript bundles and feeding them to Claude:
|
|
112
65
|
|
|
113
|
-
|
|
114
|
-
* https://cdn.vsassets.io/ext/ms.vss-features/signalr/ms.vss-features.signalr.es6.yu31LS.min.js
|
|
66
|
+
The SignalR streaming API is undocumented. We reverse-engineered it by downloading and analysing the Azure DevOps web app bundles with Claude.
|