UNPKG

@posthog/wizard

Version:

The PostHog wizard helps you to configure your project

35 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCloudUrlFromRegion = exports.getUiHostFromHost = exports.getAssetHostFromHost = void 0; const constants_1 = require("../lib/constants"); const getAssetHostFromHost = (host) => { if (host.includes('us.i.posthog.com')) { return 'https://us-assets.i.posthog.com'; } if (host.includes('eu.i.posthog.com')) { return 'https://eu-assets.i.posthog.com'; } return host; }; exports.getAssetHostFromHost = getAssetHostFromHost; const getUiHostFromHost = (host) => { if (host.includes('us.i.posthog.com')) { return 'https://us.posthog.com'; } if (host.includes('eu.i.posthog.com')) { return 'https://eu.posthog.com'; } return host; }; exports.getUiHostFromHost = getUiHostFromHost; const getCloudUrlFromRegion = (region) => { if (constants_1.IS_DEV) { return 'http://localhost:8010'; } if (region === 'us') { return 'https://us.posthog.com'; } return 'https://eu.posthog.com'; }; exports.getCloudUrlFromRegion = getCloudUrlFromRegion; //# sourceMappingURL=urls.js.map