mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* misc sdk changes * delete the store ☠️ * port comments * fix build * fix removing * fix tests * beta.20 --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
42 lines
825 B
TypeScript
42 lines
825 B
TypeScript
import {
|
|
object,
|
|
literal,
|
|
string,
|
|
boolean,
|
|
array,
|
|
dictionary,
|
|
literals,
|
|
number,
|
|
Parser,
|
|
some,
|
|
} from "ts-matches"
|
|
import { matchDuration } from "./Duration"
|
|
|
|
const VolumeId = string
|
|
const Path = string
|
|
|
|
export type VolumeId = string
|
|
export type Path = string
|
|
export const matchDockerProcedure = object({
|
|
type: literal("docker"),
|
|
image: string,
|
|
system: boolean.optional(),
|
|
entrypoint: string,
|
|
args: array(string).defaultTo([]),
|
|
mounts: dictionary([VolumeId, Path]).optional(),
|
|
"io-format": literals(
|
|
"json",
|
|
"json-pretty",
|
|
"yaml",
|
|
"cbor",
|
|
"toml",
|
|
"toml-pretty",
|
|
)
|
|
.nullable()
|
|
.optional(),
|
|
"sigterm-timeout": some(number, matchDuration).onMismatch(30),
|
|
inject: boolean.defaultTo(false),
|
|
})
|
|
|
|
export type DockerProcedure = typeof matchDockerProcedure._TYPE
|