Remove legacy steamcmd and SCUM runtime coupling

This commit is contained in:
npc0-hue
2026-09-04 12:37:39 +08:00
parent 26c07e232d
commit a695aafd0f
16 changed files with 113 additions and 91 deletions
+10 -1
View File
@@ -106,7 +106,7 @@ func ValidateRunAutonomousLifecyclePlan(plan RunAutonomousLifecyclePlan) error {
return ValidationError("autonomous install plan is invalid")
}
for _, step := range installPlan.Steps {
if !ValidLogicalFileKey(step.TargetKey) || !validAutonomousToken(step.Type, 80) || step.PackageManager != "" && !validAutonomousToken(step.PackageManager, 80) || step.PackageName != "" && !validAutonomousToken(step.PackageName, 160) || step.Version != "" && !validAutonomousToken(step.Version, 120) {
if !validAutonomousInstallStepType(step.Type) || !ValidLogicalFileKey(step.TargetKey) || step.PackageManager != "" && !validAutonomousToken(step.PackageManager, 80) || step.PackageName != "" && !validAutonomousToken(step.PackageName, 160) || step.Version != "" && !validAutonomousToken(step.Version, 120) {
return ValidationError("autonomous install step is invalid")
}
}
@@ -139,6 +139,15 @@ func ValidateRunAutonomousLifecyclePlan(plan RunAutonomousLifecyclePlan) error {
return nil
}
func validAutonomousInstallStepType(value string) bool {
switch value {
case "package", "verified-download", "manual":
return true
default:
return false
}
}
func validateAutonomousDataTarget(target RunAutonomousDataTarget) error {
if !ValidLogicalFileKey(target.Key) || !ValidLogicalFileKey(target.TransportKey) || !ValidLogicalFileKey(target.SourceRootKey) || !ValidLogicalFileKey(target.SourcePath) || !ValidLogicalFileKey(target.WorkspaceKey) {
return ValidationError("autonomous data target is invalid")