feat: allow host source workspace bootstrap
This commit is contained in:
@@ -356,8 +356,10 @@ export interface HwlabRuntimeSourceWorkspaceSpec {
|
||||
readonly requiredFiles: readonly string[];
|
||||
readonly hostDependencies?: HwlabRuntimeSourceWorkspaceHostDependenciesSpec;
|
||||
readonly install: {
|
||||
readonly executor: "k3s-job" | "host";
|
||||
readonly dependencyCommand: string;
|
||||
readonly browserCommand: string;
|
||||
readonly stateDir?: string;
|
||||
readonly timeoutSeconds: number;
|
||||
};
|
||||
}
|
||||
@@ -881,8 +883,10 @@ function sourceWorkspaceConfig(value: unknown, path: string): HwlabRuntimeSource
|
||||
.map((item, index) => relativeWorkspacePathField(item, `${path}.requiredFiles[${index}]`)),
|
||||
hostDependencies: sourceWorkspaceHostDependenciesConfig(raw.hostDependencies, `${path}.hostDependencies`),
|
||||
install: {
|
||||
executor: enumStringField(install, "executor", `${path}.install`, ["k3s-job", "host"]),
|
||||
dependencyCommand: stringField(install, "dependencyCommand", `${path}.install`),
|
||||
browserCommand: stringField(install, "browserCommand", `${path}.install`),
|
||||
...(install.stateDir === undefined ? {} : { stateDir: absoluteHostPathField(stringField(install, "stateDir", `${path}.install`), `${path}.install.stateDir`) }),
|
||||
timeoutSeconds: numberField(install, "timeoutSeconds", `${path}.install`),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user