fix: route web-probe browsers path through YAML

This commit is contained in:
Codex
2026-06-29 10:05:16 +00:00
parent 257c09462f
commit dfb3cfe22f
5 changed files with 13 additions and 2 deletions
+3
View File
@@ -136,6 +136,7 @@ export type HwlabRuntimeWebProbeOriginSpec = HwlabRuntimeWebProbeServiceOriginSp
export interface HwlabRuntimeWebProbeSpec {
readonly browserProxyMode?: "auto" | "direct";
readonly playwrightBrowsersPath?: string;
readonly defaultOrigin?: HwlabRuntimeWebProbeOriginSpec;
readonly authLogin?: HwlabRuntimeWebProbeAuthLoginSpec;
readonly alertThresholds?: HwlabRuntimeWebProbeAlertThresholdsSpec;
@@ -1014,8 +1015,10 @@ function webProbeConfig(value: unknown, path: string): HwlabRuntimeWebProbeSpec
}
browserProxyMode = rawBrowserProxyMode;
}
const playwrightBrowsersPath = optionalStringField(raw, "playwrightBrowsersPath", path);
return {
...(browserProxyMode === undefined ? {} : { browserProxyMode }),
...(playwrightBrowsersPath === undefined ? {} : { playwrightBrowsersPath }),
...(raw.defaultOrigin === undefined ? {} : { defaultOrigin: webProbeOriginConfig(raw.defaultOrigin, `${path}.defaultOrigin`) }),
...(raw.authLogin === undefined ? {} : { authLogin: webProbeAuthLoginConfig(raw.authLogin, `${path}.authLogin`) }),
...(raw.alertThresholds === undefined ? {} : { alertThresholds: webProbeAlertThresholdsConfig(raw.alertThresholds, `${path}.alertThresholds`) }),