Rocky_Mountain_Vending/.pnpm-store/v10/files/f8/bb33b544a3b0e6df786772fb3429de90017068ab3046ee5320a316f9de46db77c755a82b989318ef37eff0d7f781f8ab643ba0b027e6c7c56892afb44072cc
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

89 lines
2.1 KiB
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const worldwide = require('./worldwide.js');
let parsedStackResults;
let lastKeysCount;
let cachedFilenameDebugIds;
/**
* Returns a map of filenames to debug identifiers.
*/
function getFilenameToDebugIdMap(stackParser) {
const debugIdMap = worldwide.GLOBAL_OBJ._sentryDebugIds;
if (!debugIdMap) {
return {};
}
const debugIdKeys = Object.keys(debugIdMap);
// If the count of registered globals hasn't changed since the last call, we
// can just return the cached result.
if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {
return cachedFilenameDebugIds;
}
lastKeysCount = debugIdKeys.length;
// Build a map of filename -> debug_id.
cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {
if (!parsedStackResults) {
parsedStackResults = {};
}
const result = parsedStackResults[stackKey];
if (result) {
acc[result[0]] = result[1];
} else {
const parsedStack = stackParser(stackKey);
for (let i = parsedStack.length - 1; i >= 0; i--) {
const stackFrame = parsedStack[i];
const filename = stackFrame?.filename;
const debugId = debugIdMap[stackKey];
if (filename && debugId) {
acc[filename] = debugId;
parsedStackResults[stackKey] = [filename, debugId];
break;
}
}
}
return acc;
}, {});
return cachedFilenameDebugIds;
}
/**
* Returns a list of debug images for the given resources.
*/
function getDebugImagesForResources(
stackParser,
resource_paths,
) {
const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
if (!filenameDebugIdMap) {
return [];
}
const images = [];
for (const path of resource_paths) {
if (path && filenameDebugIdMap[path]) {
images.push({
type: 'sourcemap',
code_file: path,
debug_id: filenameDebugIdMap[path] ,
});
}
}
return images;
}
exports.getDebugImagesForResources = getDebugImagesForResources;
exports.getFilenameToDebugIdMap = getFilenameToDebugIdMap;
//# sourceMappingURL=debug-ids.js.map