@@ -9,24 +9,24 @@ const pj = require('../package.json');
99
1010export const uploadSourcemaps = async ( {
1111 allowNoop,
12- apiKey ,
12+ serviceKey ,
1313 apiUrl,
1414 basePath,
1515 path,
1616 releaseId,
1717} : {
1818 allowNoop ?: boolean ;
19- apiKey : string ;
19+ serviceKey : string ;
2020 apiUrl ?: string ;
2121 basePath ?: string ;
2222 path : string ;
2323 releaseId ?: string ;
2424} ) => {
25- if ( ! apiKey || apiKey === '' ) {
26- if ( process . env . HYPERDX_API_ACCESS_KEY ) {
27- apiKey = process . env . HYPERDX_API_ACCESS_KEY ;
25+ if ( ! serviceKey || serviceKey === '' ) {
26+ if ( process . env . HYPERDX_SERVICE_KEY ) {
27+ serviceKey = process . env . HYPERDX_SERVICE_KEY ;
2828 } else {
29- throw new Error ( 'api key cannot be empty' ) ;
29+ throw new Error ( 'service key cannot be empty' ) ;
3030 }
3131 }
3232
@@ -36,7 +36,7 @@ export const uploadSourcemaps = async ({
3636 method : 'get' ,
3737 headers : {
3838 'Content-Type' : 'application/json' ,
39- Authorization : `Bearer ${ apiKey } ` ,
39+ Authorization : `Bearer ${ serviceKey } ` ,
4040 } ,
4141 } )
4242 . then ( ( response ) => response . json ( ) )
@@ -49,7 +49,7 @@ export const uploadSourcemaps = async ({
4949
5050 const teamId = res ?. user ?. team ;
5151 if ( ! teamId ) {
52- throw new Error ( 'invalid api key' ) ;
52+ throw new Error ( 'invalid service key' ) ;
5353 }
5454
5555 console . info ( `Starting to upload source maps from ${ path } ` ) ;
@@ -76,7 +76,7 @@ export const uploadSourcemaps = async ({
7676 method : 'post' ,
7777 headers : {
7878 'Content-Type' : 'application/json' ,
79- Authorization : `Bearer ${ apiKey } ` ,
79+ Authorization : `Bearer ${ serviceKey } ` ,
8080 } ,
8181 body : JSON . stringify ( {
8282 pkgVersion : pj . version ,
0 commit comments