Rocky_Mountain_Vending/.pnpm-store/v10/files/41/340344a7367f3efa34375dc3563b80df30d38888ea80a8fd9765ef9a8e8c4c703fabee17f499e6b406159a2575aa0aaad1e2a70b6278dd1580cb2acc5afe19
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

34 lines
969 B
Text

import { parseBaggageHeader, objectToBaggageHeader } from '@sentry/core';
/**
* Merge two baggage headers into one, where the existing one takes precedence.
* The order of the existing baggage will be preserved, and new entries will be added to the end.
*/
function mergeBaggageHeaders(
existing,
baggage,
) {
if (!existing) {
return baggage;
}
const existingBaggageEntries = parseBaggageHeader(existing);
const newBaggageEntries = parseBaggageHeader(baggage);
if (!newBaggageEntries) {
return existing;
}
// Existing entries take precedence, ensuring order remains stable for minimal changes
const mergedBaggageEntries = { ...existingBaggageEntries };
Object.entries(newBaggageEntries).forEach(([key, value]) => {
if (!mergedBaggageEntries[key]) {
mergedBaggageEntries[key] = value;
}
});
return objectToBaggageHeader(mergedBaggageEntries);
}
export { mergeBaggageHeaders };
//# sourceMappingURL=baggage.js.map