UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

36 lines (29 loc) 573 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getServerDomain = getServerDomain; exports.getServerUrl = getServerUrl; function getServerDomain(serverInfo) { const { host, domain, k8s } = serverInfo; if (domain && !k8s) { return `${host}.${domain}.zohocorpin.com`; } return host; } function getServerUrl({ domain, k8s, port, protocol = 'http' }) { const prefix = protocol ? `${protocol}:` : ''; if (k8s) { return `${prefix}//${domain}`; } return `${prefix}//${domain}:${port}/`; }