Skip to content

Commit

Permalink
fix: Actions like the action don't give the results (#2770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blu-J authored Oct 30, 2024
1 parent 2091abe commit 8832048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
13 changes: 7 additions & 6 deletions container-runtime/src/Adapters/RpcListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ const jsonParse = (x: string) => JSON.parse(x)

const handleRpc = (id: IdType, result: Promise<RpcResult>) =>
result
.then((result) => ({
jsonrpc,
id,
...result,
}))
.then((result) => {
return {
jsonrpc,
id,
...result,
}
})
.then((x) => {
if (
("result" in x && x.result === undefined) ||
Expand Down Expand Up @@ -413,7 +415,6 @@ export class RpcListener {
const ensureResultTypeShape = (
result: void | T.ActionInput | T.ActionResult | null,
): { result: any } => {
if (isResult(result)) return result
return { result }
}
const callbacks = this.callbackHolderFor(procedure)
Expand Down
8 changes: 1 addition & 7 deletions container-runtime/src/Adapters/Systems/SystemForStartOs.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { ExecuteResult, Procedure, System } from "../../Interfaces/System"
import { unNestPath } from "../../Models/JsonPath"
import matches, { any, number, object, string, tuple } from "ts-matches"
import { System } from "../../Interfaces/System"
import { Effects } from "../../Models/Effects"
import { RpcResult, matchRpcResult } from "../RpcListener"
import { duration } from "../../Models/Duration"
import { T, utils } from "@start9labs/start-sdk"
import { Volume } from "../../Models/Volume"
import { CallbackHolder } from "../../Models/CallbackHolder"
import { Optional } from "ts-matches/lib/parsers/interfaces"

export const STARTOS_JS_LOCATION = "/usr/lib/startos/package/index.js"
Expand Down

0 comments on commit 8832048

Please sign in to comment.