droboticflow/scripts/lib/source-data-source.mjs
eust-w b4b9807ea7
Some checks are pending
CI / verify (push) Waiting to run
CI / docker-build (push) Waiting to run
🧪 Standardize Playwright source inference
2026-06-16 20:06:00 +08:00

15 lines
415 B
JavaScript

export function inferSourceDataSource(sourcePath, override = "") {
const explicit = String(override || "").trim().toUpperCase();
if (explicit === "FILESYSTEM") {
return "LOCAL";
}
if (explicit) {
return explicit;
}
const normalizedPath = String(sourcePath || "").trim().toLowerCase();
if (!normalizedPath) {
return "";
}
return normalizedPath.startsWith("bos://") ? "BOS" : "LOCAL";
}