remove old backstage injection and remove all legacy code

This commit is contained in:
KingKDot
2026-08-20 10:57:56 -05:00
parent ea22c83c37
commit 4ed32f6b65
43 changed files with 142 additions and 5795 deletions
@@ -3,7 +3,7 @@
package wire
const (
WireSchemaVersion = 1
WireSchemaVersion = 2
WireProtocolVersion = 1
)
@@ -456,10 +456,10 @@ var CommandVersionSupport = map[CommandType]CommandVersionRange{
CommandBackstageSetQuality: {Min: 1, Max: 1},
CommandBackstageSetResolution: {Min: 1, Max: 1},
CommandBackstageStart: {Min: 1, Max: 1},
CommandBackstageStartBrowserInjected: {Min: 1, Max: 2},
CommandBackstageStartChromeInjected: {Min: 1, Max: 2},
CommandBackstageStartBrowserInjected: {Min: 2, Max: 3},
CommandBackstageStartChromeInjected: {Min: 2, Max: 3},
CommandBackstageStartProcess: {Min: 1, Max: 1},
CommandBackstageStartProcessInjected: {Min: 1, Max: 2},
CommandBackstageStartProcessInjected: {Min: 2, Max: 3},
CommandBackstageStop: {Min: 1, Max: 1},
CommandBackstageWindowList: {Min: 1, Max: 1},
CommandClientLogsRequest: {Min: 1, Max: 1},
@@ -17,20 +17,23 @@ func TestGeneratedWireContract(t *testing.T) {
if !ok {
t.Fatalf("missing version range for %s", command)
}
wantMax := 1
wantMin, wantMax := 1, 1
switch command {
case CommandBackstageStartBrowserInjected, CommandBackstageStartChromeInjected, CommandBackstageStartProcessInjected:
wantMax = 2
wantMin, wantMax = 2, 3
}
if versionRange.Min != 1 || versionRange.Max != wantMax {
if versionRange.Min != wantMin || versionRange.Max != wantMax {
t.Fatalf("unexpected version range for %s: %+v", command, versionRange)
}
if !IsSupportedCommandVersion(string(command), 1) {
t.Fatalf("%s must support v1", command)
if IsSupportedCommandVersion(string(command), 1) != (wantMin == 1) {
t.Fatalf("unexpected v1 support for %s", command)
}
if IsSupportedCommandVersion(string(command), 2) != (wantMax == 2) {
if IsSupportedCommandVersion(string(command), 2) != (wantMin <= 2 && wantMax >= 2) {
t.Fatalf("unexpected v2 support for %s", command)
}
if IsSupportedCommandVersion(string(command), 3) != (wantMin <= 3 && wantMax >= 3) {
t.Fatalf("unexpected v3 support for %s", command)
}
}
if !IsCommandType("desktop_start") {
t.Fatal("desktop_start must be a known command")