@jxsuite/protocol 3.0.0 → 4.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 +5 -5
- package/package.json +1 -1
- package/src/types.ts +6 -0
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@ The **Studio Backend Protocol**: the wire types and canonical route table that e
|
|
|
7
7
|
|
|
8
8
|
## Who implements this
|
|
9
9
|
|
|
10
|
-
| Backend
|
|
11
|
-
|
|
|
12
|
-
| `@jxsuite/server` (dev server)
|
|
13
|
-
| Desktop (
|
|
14
|
-
| Cloud platforms
|
|
10
|
+
| Backend | Transport |
|
|
11
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `@jxsuite/server` (dev server) | The literal `/__studio/*` HTTP routes (the reference implementation) |
|
|
13
|
+
| Desktop (Electron / Chromium) | Typed RPC / WebSocket JSON-RPC dispatching into the same handlers |
|
|
14
|
+
| Cloud platforms | HTTP behind a session gateway (e.g. `/api/v1/p/:owner/:repo/:branch/studio/*`), same sub-paths and shapes |
|
|
15
15
|
|
|
16
16
|
A backend is free to change the transport and path prefix; the **sub-path, method, and body shapes are the contract**. `STUDIO_PROTOCOL_VERSION` bumps when any shape changes incompatibly.
|
|
17
17
|
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -223,6 +223,12 @@ export interface GitStatusResult {
|
|
|
223
223
|
export interface GitBranchesResult {
|
|
224
224
|
current: string;
|
|
225
225
|
branches: string[];
|
|
226
|
+
/**
|
|
227
|
+
* The repository's default branch (the one a pull request merges into), when the host knows it. A
|
|
228
|
+
* host whose branches are sessions reports it so a review is never committed to the live branch;
|
|
229
|
+
* a local repository may omit it.
|
|
230
|
+
*/
|
|
231
|
+
defaultBranch?: string;
|
|
226
232
|
}
|
|
227
233
|
|
|
228
234
|
export interface GitLogEntry {
|