@cloudgaming/rpc
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -9,2 +9,4 @@ /// <reference types="node" /> | ||
AuthFlowSuccess = "afs", | ||
/** client->server, query datacenter list */ | ||
GetDatacenterList = "dcl", | ||
/** client->server, try to start game */ | ||
@@ -52,2 +54,4 @@ TryStartGame = "tsg", | ||
StartProcess = "exe", | ||
/** server->agent, kill process */ | ||
KillProcess = "killall", | ||
/** server->agent, read file */ | ||
@@ -68,3 +72,5 @@ ReadFile = "rf", | ||
/** server->agent, portable installer */ | ||
PortableInstall = "pi" | ||
PortableInstall = "pi", | ||
/** server->agent */ | ||
Relay = "relay" | ||
} | ||
@@ -82,2 +88,8 @@ declare type RpcMethod<T extends keyof typeof FunctionName> = (arg: FunctionPayload[typeof FunctionName[T]]) => Promise<FunctionResult[typeof FunctionName[T]]>; | ||
[FunctionName.AuthFlowSuccess]: {}; | ||
[FunctionName.GetDatacenterList]: { | ||
/** game name */ | ||
gameName: string; | ||
/** spec */ | ||
spec: string; | ||
}; | ||
[FunctionName.TryStartGame]: { | ||
@@ -92,2 +104,11 @@ /** game name */ | ||
migrate?: boolean; | ||
/** speed test result */ | ||
speedTest?: Array<{ | ||
id: number; | ||
latency: number; | ||
loss: number; | ||
bandwidth?: number; | ||
connectionCost: number; | ||
speedTestCost: number; | ||
}>; | ||
}; | ||
@@ -160,2 +181,3 @@ [FunctionName.StopGame]: { | ||
ignoreFail?: boolean; | ||
skipIfSupports?: FunctionName; | ||
}>; | ||
@@ -166,2 +188,3 @@ }; | ||
ignoreFail?: boolean; | ||
skipIfSupports?: FunctionName; | ||
}>; | ||
@@ -210,4 +233,8 @@ processWatcher?: { | ||
cwd: string | null; | ||
env?: Record<string, string>; | ||
waitForExit: boolean; | ||
}; | ||
[FunctionName.KillProcess]: { | ||
names: string[]; | ||
}; | ||
[FunctionName.ReadFile]: { | ||
@@ -260,2 +287,7 @@ filename: string; | ||
}; | ||
[FunctionName.Relay]: { | ||
from: string; | ||
to: string; | ||
data: string; | ||
}; | ||
}; | ||
@@ -268,2 +300,11 @@ export declare type FunctionResult = { | ||
[FunctionName.AuthFlowSuccess]: void; | ||
[FunctionName.GetDatacenterList]: { | ||
dcs: Array<{ | ||
id: number; | ||
name: string; | ||
url: string; | ||
user: string; | ||
password: string; | ||
}>; | ||
}; | ||
[FunctionName.TryStartGame]: { | ||
@@ -311,2 +352,3 @@ serverId?: number; | ||
}; | ||
[FunctionName.KillProcess]: void; | ||
[FunctionName.ReadFile]: { | ||
@@ -344,2 +386,3 @@ content: Buffer; | ||
[FunctionName.PortableInstall]: boolean; | ||
[FunctionName.Relay]: void; | ||
}; | ||
@@ -346,0 +389,0 @@ export interface IFunctionRequest<T extends FunctionName = FunctionName> { |
@@ -12,2 +12,4 @@ "use strict"; | ||
FunctionName["AuthFlowSuccess"] = "afs"; | ||
/** client->server, query datacenter list */ | ||
FunctionName["GetDatacenterList"] = "dcl"; | ||
/** client->server, try to start game */ | ||
@@ -55,2 +57,4 @@ FunctionName["TryStartGame"] = "tsg"; | ||
FunctionName["StartProcess"] = "exe"; | ||
/** server->agent, kill process */ | ||
FunctionName["KillProcess"] = "killall"; | ||
/** server->agent, read file */ | ||
@@ -72,3 +76,5 @@ FunctionName["ReadFile"] = "rf"; | ||
FunctionName["PortableInstall"] = "pi"; | ||
/** server->agent */ | ||
FunctionName["Relay"] = "relay"; | ||
})(FunctionName = exports.FunctionName || (exports.FunctionName = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@cloudgaming/rpc", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51966
847