build multi-arch s9pks (#2601)

* build multi-arch s9pks

* remove images incrementally

* wip

* prevent rebuild

* fix sdk makefile

* fix hanging on uninstall

* fix build

* fix build

* fix build

* fix build (for real this time)

* fix git hash computation
This commit is contained in:
Aiden McClelland
2024-04-22 11:40:10 -06:00
committed by GitHub
parent 9eff920989
commit 003d110948
176 changed files with 1176 additions and 1799 deletions

View File

@@ -101,7 +101,7 @@ const evalType = object({
}),
})
const jsonParse = (x: Buffer) => JSON.parse(x.toString())
const jsonParse = (x: string) => JSON.parse(x)
function reduceMethod(
methodArgs: object,
effects: HostSystem,
@@ -160,21 +160,21 @@ export class RpcListener {
details: error?.message ?? String(error),
debug: error?.stack,
},
code: 0,
code: 1,
},
})
const writeDataToSocket = (x: SocketResponse) =>
new Promise((resolve) => s.write(JSON.stringify(x), resolve))
new Promise((resolve) => s.write(JSON.stringify(x) + "\n", resolve))
s.on("data", (a) =>
Promise.resolve(a)
.then((b) => b.toString())
.then(logData("dataIn"))
.then(jsonParse)
.then(captureId)
.then((x) => this.dealWithInput(x))
.catch(mapError)
.then(logData("response"))
.then(writeDataToSocket)
.finally(() => void s.end()),
.then(writeDataToSocket),
)
})
}
@@ -244,7 +244,7 @@ export class RpcListener {
})),
)
.when(exitType, async ({ id }) => {
if (this._system) this._system.exit(this.effects)
if (this._system) await this._system.exit(this.effects)
delete this._system
delete this._effects

View File

@@ -30,7 +30,7 @@ import {
import { HostSystemStartOs } from "../../HostSystemStartOs"
import { JsonPath, unNestPath } from "../../../Models/JsonPath"
import { RpcResult, matchRpcResult } from "../../RpcListener"
import { InputSpec } from "@start9labs/start-sdk/cjs/sdk/lib/config/configTypes"
import { CT } from "@start9labs/start-sdk"
type Optional<A> = A | undefined | null
function todo(): never {
@@ -326,7 +326,7 @@ export class SystemForEmbassy implements System {
name: action.name,
description: action.description,
warning: action.warning || null,
input: action["input-spec"] as InputSpec,
input: action["input-spec"] as CT.InputSpec,
disabled: false,
allowedStatuses,
group: null,