(debugIdKeys: string[], debugIdMap: Record<string, string>)
| 58 | } |
| 59 | |
| 60 | const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => { |
| 61 | for (const key of debugIdKeys) { |
| 62 | const debugId = debugIdMap[key]; |
| 63 | const result = parsedStackResults?.[key]; |
| 64 | |
| 65 | if (result && cachedFilenameDebugIds && debugId) { |
| 66 | // Use cached filename but update with current debug ID |
| 67 | cachedFilenameDebugIds[result[0]] = debugId; |
| 68 | // Update cached result with new debug ID |
| 69 | if (parsedStackResults) { |
| 70 | parsedStackResults[key] = [result[0], debugId]; |
| 71 | } |
| 72 | } else if (debugId) { |
| 73 | const parsedStack = stackParser(key); |
| 74 | |
| 75 | for (let i = parsedStack.length - 1; i >= 0; i--) { |
| 76 | const stackFrame = parsedStack[i]; |
| 77 | const filename = stackFrame?.filename; |
| 78 | |
| 79 | if (filename && cachedFilenameDebugIds && parsedStackResults) { |
| 80 | cachedFilenameDebugIds[filename] = debugId; |
| 81 | parsedStackResults[key] = [filename, debugId]; |
| 82 | break; |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | }; |
| 88 | |
| 89 | if (sentryDebugIdMap) { |
| 90 | processDebugIds(sentryDebugIdKeys, sentryDebugIdMap); |
no outgoing calls
no test coverage detected