@@ -25,7 +25,6 @@ export function findDefaultSdkInitFile(type: 'server' | 'client'): string | unde
2525 return filePaths . find ( filename => fs . existsSync ( filename ) ) ;
2626}
2727
28-
2928export const SENTRY_WRAPPED_ENTRY = '?sentry-query-wrapped-entry' ;
3029export const SENTRY_WRAPPED_FUNCTIONS = '?sentry-query-wrapped-functions=' ;
3130export const SENTRY_REEXPORTED_FUNCTIONS = '?sentry-query-reexported-functions=' ;
@@ -64,19 +63,19 @@ export function extractFunctionReexportQueryParameters(query: string): { wrap: s
6463 const wrap =
6564 wrapMatch && wrapMatch [ 1 ]
6665 ? wrapMatch [ 1 ]
67- . split ( ',' )
68- . filter ( param => param !== '' )
69- // Sanitize, as code could be injected with another rollup plugin
70- . map ( ( str : string ) => str . replace ( / [ . * + ? ^ $ { } ( ) | [ \] \\ ] / g, '\\$&' ) )
66+ . split ( ',' )
67+ . filter ( param => param !== '' )
68+ // Sanitize, as code could be injected with another rollup plugin
69+ . map ( ( str : string ) => str . replace ( / [ . * + ? ^ $ { } ( ) | [ \] \\ ] / g, '\\$&' ) )
7170 : [ ] ;
7271
7372 const reexport =
7473 reexportMatch && reexportMatch [ 1 ]
7574 ? reexportMatch [ 1 ]
76- . split ( ',' )
77- . filter ( param => param !== '' && param !== 'default' )
78- // Sanitize, as code could be injected with another rollup plugin
79- . map ( ( str : string ) => str . replace ( / [ . * + ? ^ $ { } ( ) | [ \] \\ ] / g, '\\$&' ) )
75+ . split ( ',' )
76+ . filter ( param => param !== '' && param !== 'default' )
77+ // Sanitize, as code could be injected with another rollup plugin
78+ . map ( ( str : string ) => str . replace ( / [ . * + ? ^ $ { } ( ) | [ \] \\ ] / g, '\\$&' ) )
8079 : [ ] ;
8180
8281 return { wrap, reexport } ;
@@ -139,10 +138,10 @@ export function constructFunctionReExport(pathWithQuery: string, entryId: string
139138 ( functionsCode , currFunctionName ) =>
140139 functionsCode . concat (
141140 `async function ${ currFunctionName } _sentryWrapped(...args) {\n` +
142- ` const res = await import(${ JSON . stringify ( entryId ) } );\n` +
143- ` return res.${ currFunctionName } .call(this, ...args);\n` +
144- '}\n' +
145- `export { ${ currFunctionName } _sentryWrapped as ${ currFunctionName } };\n` ,
141+ ` const res = await import(${ JSON . stringify ( entryId ) } );\n` +
142+ ` return res.${ currFunctionName } .call(this, ...args);\n` +
143+ '}\n' +
144+ `export { ${ currFunctionName } _sentryWrapped as ${ currFunctionName } };\n` ,
146145 ) ,
147146 '' ,
148147 )
0 commit comments