@sentry-internal/tracing
Advanced tools
Comparing version
@@ -351,26 +351,30 @@ var { | ||
*/ | ||
paramIndices.forEach(([startOffset, endOffset], index) => { | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
paramIndices.forEach((item, index) => { | ||
/** check if offsets is define because in some cases regex d flag returns undefined */ | ||
if (item) { | ||
const [startOffset, endOffset] = item; | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
} | ||
}); | ||
@@ -377,0 +381,0 @@ |
@@ -346,26 +346,30 @@ import { _optionalChain } from '@sentry/utils/esm/buildPolyfills'; | ||
*/ | ||
paramIndices.forEach(([startOffset, endOffset], index) => { | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
paramIndices.forEach((item, index) => { | ||
/** check if offsets is define because in some cases regex d flag returns undefined */ | ||
if (item) { | ||
const [startOffset, endOffset] = item; | ||
/** | ||
* isolate part before param | ||
*/ | ||
const substr1 = resultPath.substring(0, startOffset - indexShift); | ||
/** | ||
* define paramName as replacement in format :pathParam | ||
*/ | ||
const replacement = `:${orderedKeys[index].name}`; | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* isolate part after param | ||
*/ | ||
const substr2 = resultPath.substring(endOffset - indexShift); | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* recreate original path but with param replacement | ||
*/ | ||
resultPath = substr1 + replacement + substr2; | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
/** | ||
* calculate new index shift after resultPath was modified | ||
*/ | ||
indexShift = indexShift + (endOffset - startOffset - replacement.length); | ||
} | ||
}); | ||
@@ -372,0 +376,0 @@ |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.75.1", | ||
"version": "7.76.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.75.1", | ||
"@sentry/types": "7.75.1", | ||
"@sentry/utils": "7.75.1" | ||
"@sentry/core": "7.76.0", | ||
"@sentry/types": "7.76.0", | ||
"@sentry/utils": "7.76.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -19,3 +19,3 @@ import { Hub, Integration, PolymorphicRequest } from '@sentry/types'; | ||
keys?: { | ||
name: string; | ||
name: string | number; | ||
offset: number; | ||
@@ -22,0 +22,0 @@ optional: boolean; |
@@ -19,3 +19,3 @@ import type { Hub, Integration, PolymorphicRequest } from '@sentry/types'; | ||
keys?: { | ||
name: string; | ||
name: string | number; | ||
offset: number; | ||
@@ -22,0 +22,0 @@ optional: boolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1038314
0.15%8726
0.09%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated
Updated