mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
chore: Fix some issues in the installation of a package and other rpc things
This commit is contained in:
@@ -204,6 +204,14 @@ export class RpcListener {
|
|||||||
id,
|
id,
|
||||||
...result,
|
...result,
|
||||||
}))
|
}))
|
||||||
|
.then((x) => {
|
||||||
|
if (
|
||||||
|
("result" in x && x.result === undefined) ||
|
||||||
|
!("error" in x || "result" in x)
|
||||||
|
)
|
||||||
|
(x as any).result = null
|
||||||
|
return x
|
||||||
|
})
|
||||||
.catch((error) => ({
|
.catch((error) => ({
|
||||||
jsonrpc,
|
jsonrpc,
|
||||||
id,
|
id,
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import { JsonPath, unNestPath } from "../../../Models/JsonPath"
|
|||||||
import { HostSystem } from "../../../Interfaces/HostSystem"
|
import { HostSystem } from "../../../Interfaces/HostSystem"
|
||||||
import { RpcResult, matchRpcResult } from "../../RpcListener"
|
import { RpcResult, matchRpcResult } from "../../RpcListener"
|
||||||
import { ServiceInterface } from "../../../../../sdk/dist/cjs/lib/types"
|
import { ServiceInterface } from "../../../../../sdk/dist/cjs/lib/types"
|
||||||
import { createUtils } from "../../../../../sdk/dist/cjs/lib/util"
|
|
||||||
|
|
||||||
type Optional<A> = A | undefined | null
|
type Optional<A> = A | undefined | null
|
||||||
function todo(): never {
|
function todo(): never {
|
||||||
@@ -880,7 +879,7 @@ async function updateConfig(
|
|||||||
) {
|
) {
|
||||||
if (!dictionary([string, unknown]).test(spec)) return
|
if (!dictionary([string, unknown]).test(spec)) return
|
||||||
if (!dictionary([string, unknown]).test(mutConfigValue)) return
|
if (!dictionary([string, unknown]).test(mutConfigValue)) return
|
||||||
const utils = createUtils(effects)
|
const utils = util.createUtils(effects)
|
||||||
for (const key in spec) {
|
for (const key in spec) {
|
||||||
const specValue = spec[key]
|
const specValue = spec[key]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user