Files
klz-cables.com/.pnpm-store/v10/files/d4/cce02fd6c02cc735aea6735590894a5735ab62c3e19fba9804d359226d20221cb700f471d27ec5dca57e2f1a34b0f08e46834f452544903ccf203d4c1b4c2c
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

55 lines
1.5 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const helpers = require('../helpers.js');
/**
* Checks if the baggage header has Sentry values.
*/
function baggageHeaderHasSentryValues(baggageHeader) {
return baggageHeader.split(',').some(value => value.trim().startsWith('sentry-'));
}
/**
* Gets the full URL from a given URL string.
*/
function getFullURL(url) {
try {
// By adding a base URL to new URL(), this will also work for relative urls
// If `url` is a full URL, the base URL is ignored anyhow
const parsed = new URL(url, helpers.WINDOW.location.origin);
return parsed.href;
} catch {
return undefined;
}
}
/**
* Checks if the entry is a PerformanceResourceTiming.
*/
function isPerformanceResourceTiming(entry) {
return (
entry.entryType === 'resource' &&
'initiatorType' in entry &&
typeof (entry ).nextHopProtocol === 'string' &&
(entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')
);
}
/**
* Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.
*/
function createHeadersSafely(headers) {
try {
return new Headers(headers);
} catch {
// noop
return undefined;
}
}
exports.baggageHeaderHasSentryValues = baggageHeaderHasSentryValues;
exports.createHeadersSafely = createHeadersSafely;
exports.getFullURL = getFullURL;
exports.isPerformanceResourceTiming = isPerformanceResourceTiming;
//# sourceMappingURL=utils.js.map