import { isHttpUrl, joinUrlParts } from "../../../util/url.js";

//#region lib/modules/datasource/terraform-module/utils.ts
function createSDBackendURL(registryURL, sdType, sdResult, subPath) {
	const fullPath = joinUrlParts(sdResult[sdType] ?? "", subPath);
	if (isHttpUrl(fullPath)) return fullPath;
	return joinUrlParts(registryURL, fullPath);
}

//#endregion
export { createSDBackendURL };
//# sourceMappingURL=utils.js.map