UNPKG

@sentry/wizard

Version:

Sentry wizard helping you to configure your project

23 lines 763 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getIssueStreamUrl = void 0; const url_1 = require("url"); /** * Returns the url to the Sentry project stream. * * Example: https://org-slug.sentry.io/issues/?project=1234567 */ function getIssueStreamUrl({ url, orgSlug, projectId, }) { const urlObject = new url_1.URL(url); if (urlObject.host === 'sentry.io') { urlObject.host = `${orgSlug}.${urlObject.host}`; urlObject.pathname = '/issues/'; } else { urlObject.pathname = `/organizations/${orgSlug}/issues/`; } urlObject.searchParams.set('project', projectId); return urlObject.toString(); } exports.getIssueStreamUrl = getIssueStreamUrl; //# sourceMappingURL=url.js.map