feat(web-probe): add semantic YAML origins
This commit is contained in:
@@ -12,6 +12,11 @@ export interface WebObserveWrapperInput {
|
||||
readonly jobId: string | null;
|
||||
readonly stateDir: string | null;
|
||||
readonly url: string | null;
|
||||
readonly originName: "internal" | "public" | "custom" | null;
|
||||
readonly originMode: "k8s-service-cluster-ip" | "public" | "custom-url" | null;
|
||||
readonly originConfigPath: string | null;
|
||||
readonly browserProxyMode: "auto" | "direct" | null;
|
||||
readonly browserProxyModeSource: "cli" | "yaml-origin" | "yaml-web-probe" | "default" | null;
|
||||
readonly targetPath: string | null;
|
||||
readonly commandType: string | null;
|
||||
readonly commandTimeoutSeconds: number | null;
|
||||
@@ -32,6 +37,11 @@ export interface WebObserveWrapperOptionsLike {
|
||||
readonly node: string;
|
||||
readonly lane: string;
|
||||
readonly url: string;
|
||||
readonly originName: "internal" | "public" | "custom";
|
||||
readonly originMode: "k8s-service-cluster-ip" | "public" | "custom-url";
|
||||
readonly originConfigPath: string | null;
|
||||
readonly browserProxyMode: "auto" | "direct";
|
||||
readonly browserProxyModeSource: "cli" | "yaml-origin" | "yaml-web-probe" | "default";
|
||||
readonly targetPath: string;
|
||||
readonly stateDir: string | null;
|
||||
readonly commandType: string | null;
|
||||
@@ -109,6 +119,14 @@ export function buildWebObserveWrapperContract(input: WebObserveWrapperInput): R
|
||||
},
|
||||
effectiveParameters: {
|
||||
url: input.url,
|
||||
origin: {
|
||||
name: input.originName,
|
||||
mode: input.originMode,
|
||||
configPath: input.originConfigPath,
|
||||
browserProxyMode: input.browserProxyMode,
|
||||
browserProxyModeSource: input.browserProxyModeSource,
|
||||
valuesRedacted: true,
|
||||
},
|
||||
targetPath: input.targetPath,
|
||||
commandType: input.commandType,
|
||||
commandTimeoutSeconds: input.commandTimeoutSeconds,
|
||||
@@ -175,6 +193,11 @@ export function buildWebObserveWrapperForObserveOptions(
|
||||
jobId: overrides.jobId ?? options.jobId ?? id,
|
||||
stateDir: overrides.stateDir ?? options.stateDir,
|
||||
url: options.url,
|
||||
originName: options.originName,
|
||||
originMode: options.originMode,
|
||||
originConfigPath: options.originConfigPath,
|
||||
browserProxyMode: options.browserProxyMode,
|
||||
browserProxyModeSource: options.browserProxyModeSource,
|
||||
targetPath: options.targetPath,
|
||||
commandType: overrides.commandType ?? options.commandType,
|
||||
commandTimeoutSeconds: options.commandTimeoutSeconds,
|
||||
@@ -212,6 +235,7 @@ function webObserveWrapperCommandShape(input: WebObserveWrapperInput): string {
|
||||
parts.push("--state-dir", input.stateDir);
|
||||
}
|
||||
if (input.action === "start" && input.targetPath !== null) {
|
||||
if (input.originName === "internal" || input.originName === "public") parts.push("--origin", input.originName);
|
||||
parts.push("--target-path", input.targetPath);
|
||||
}
|
||||
if (input.action === "command" && input.commandType !== null) {
|
||||
|
||||
Reference in New Issue
Block a user