mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Remove WOS dependency from wshrpc (#329)
The frontend wshserver.ts had a weird circuitous dependency on wos.ts, which was unnecessary. This moves the misplaced functions into wshrpc.ts and updates the generation logic.
This commit is contained in:
+2
-2
@@ -436,7 +436,7 @@ func GenerateWshServerMethod_ResponseStream(methodDecl *wshrpc.WshRpcMethodDecl,
|
||||
} else {
|
||||
sb.WriteString(fmt.Sprintf(" %s(opts?: RpcOpts): %s {\n", methodDecl.MethodName, genRespType))
|
||||
}
|
||||
sb.WriteString(fmt.Sprintf(" return WOS.wshServerRpcHelper_responsestream(%q, %s, opts);\n", methodDecl.Command, dataName))
|
||||
sb.WriteString(fmt.Sprintf(" return wshServerRpcHelper_responsestream(%q, %s, opts);\n", methodDecl.Command, dataName))
|
||||
sb.WriteString(" }\n")
|
||||
return sb.String()
|
||||
}
|
||||
@@ -459,7 +459,7 @@ func GenerateWshServerMethod_Call(methodDecl *wshrpc.WshRpcMethodDecl, tsTypesMa
|
||||
} else {
|
||||
sb.WriteString(fmt.Sprintf(" %s(opts?: RpcOpts): %s {\n", methodDecl.MethodName, rtnType))
|
||||
}
|
||||
methodBody := fmt.Sprintf(" return WOS.wshServerRpcHelper_call(%q, %s, opts);\n", methodDecl.Command, dataName)
|
||||
methodBody := fmt.Sprintf(" return wshServerRpcHelper_call(%q, %s, opts);\n", methodDecl.Command, dataName)
|
||||
sb.WriteString(methodBody)
|
||||
sb.WriteString(" }\n")
|
||||
return sb.String()
|
||||
|
||||
Reference in New Issue
Block a user