diff --git a/scripts/resource.json b/scripts/resource.json index 290f675..4693132 100644 --- a/scripts/resource.json +++ b/scripts/resource.json @@ -2,9 +2,9 @@ "darwin-x64": [ { "name": "ovm", - "version": "v1.0.4", + "version": "v1.0.5", "download": "https://static.oomol.com/ovm-resources/Bauklotze/{version}/ovm-amd64", - "sha256": "11b21af7020339903e5aa4fcf7fb17a632b61aa1f1dc2c39c9c4489a28d54963", + "sha256": "f21544ad8fe1ba753d9d5317a018bdf6d0ce0c20d372e7a68132c4835ce32846", "out": "bin/ovm" }, { @@ -25,9 +25,9 @@ "darwin-arm64": [ { "name": "ovm", - "version": "v1.0.4", + "version": "v1.0.5", "download": "https://static.oomol.com/ovm-resources/Bauklotze/{version}/ovm-arm64", - "sha256": "598a7edcdd57fa1817aa453a7e3d5697bbd79e4a3de66a9894063f34cb022141", + "sha256": "ea3ee611e5942f03a0dccb41f749f3b01a20301bf26a9233da8d4e4092053ed7", "out": "bin/ovm" }, { diff --git a/src/request.ts b/src/request.ts index b22f03f..8416fff 100644 --- a/src/request.ts +++ b/src/request.ts @@ -117,14 +117,10 @@ abstract class Request { } type RequestDarwinRawInfoResp = { - GvProxy: { - HostSocks: [string]; - }; - SSH: { - IdentityPath: string; - Port: number; - RemoteUsername: string; - } + podmanSocketPath: string; + sshPort: number; + sshUser: string; + hostEndpoint: string; } export class RequestDarwin extends Request { @@ -133,14 +129,7 @@ export class RequestDarwin extends Request { } public async info(): Promise { - const result = JSON.parse(await this.do("info", Method.GET)) as RequestDarwinRawInfoResp; - return { - podmanSocketPath: result.GvProxy.HostSocks[0], - sshPort: result.SSH.Port, - sshUser: result.SSH.RemoteUsername, - sshPrivateKeyPath: result.SSH.IdentityPath, - sshPublicKeyPath: `${result.SSH.IdentityPath}.pub`, - }; + return JSON.parse(await this.do("info", Method.GET)) as RequestDarwinRawInfoResp; } public async state(): Promise { diff --git a/src/type.ts b/src/type.ts index c54aae0..6b051fa 100644 --- a/src/type.ts +++ b/src/type.ts @@ -44,11 +44,10 @@ export type OVMDarwinRunEvent = { } export interface OVMDarwinInfo { - podmanSocketPath: string, - sshPort: number, - sshUser: string, - sshPublicKeyPath: string, - sshPrivateKeyPath: string, + podmanSocketPath: string; + sshPort: number; + sshUser: string; + hostEndpoint: string; } export interface OVMDarwinState {