@@ -19,7 +19,7 @@ type GetSiteInfoOpts = {
1919  testOpts ?: TestOptions 
2020  siteFeatureFlagPrefix : string 
2121  token : string 
22-   netlifyApiHost : string 
22+   extensionApiBaseUrl : string 
2323} 
2424/** 
2525 * Retrieve Netlify Site information, if available. 
@@ -41,7 +41,7 @@ export const getSiteInfo = async function ({
4141  siteFeatureFlagPrefix, 
4242  token, 
4343  featureFlags =  { } , 
44-   netlifyApiHost , 
44+   extensionApiBaseUrl , 
4545} : GetSiteInfoOpts )  { 
4646  const  {  env : testEnv  =  false  }  =  testOpts 
4747
@@ -53,7 +53,7 @@ export const getSiteInfo = async function ({
5353
5454    const  integrations  = 
5555      mode  ===  'buildbot'  &&  ! offline 
56-         ? await  getIntegrations ( {  siteId,  testOpts,  offline,  accountId,  token,  featureFlags,  netlifyApiHost  } ) 
56+         ? await  getIntegrations ( {  siteId,  testOpts,  offline,  accountId,  token,  featureFlags,  extensionApiBaseUrl  } ) 
5757        : [ ] 
5858
5959    return  {  siteInfo,  accounts : [ ] ,  addons : [ ] ,  integrations } 
@@ -63,7 +63,7 @@ export const getSiteInfo = async function ({
6363    getSite ( api ,  siteId ,  siteFeatureFlagPrefix ) , 
6464    getAccounts ( api ) , 
6565    getAddons ( api ,  siteId ) , 
66-     getIntegrations ( {  siteId,  testOpts,  offline,  accountId,  token,  featureFlags,  netlifyApiHost  } ) , 
66+     getIntegrations ( {  siteId,  testOpts,  offline,  accountId,  token,  featureFlags,  extensionApiBaseUrl  } ) , 
6767  ] 
6868
6969  const  [ siteInfo ,  accounts ,  addons ,  integrations ]  =  await  Promise . all ( promises ) 
@@ -119,7 +119,7 @@ type GetIntegrationsOpts = {
119119  offline : boolean 
120120  token ?: string 
121121  featureFlags ?: Record < string ,  boolean > 
122-   netlifyApiHost : string 
122+   extensionApiBaseUrl : string 
123123} 
124124
125125const  getIntegrations  =  async  function  ( { 
@@ -129,15 +129,13 @@ const getIntegrations = async function ({
129129  offline, 
130130  token, 
131131  featureFlags, 
132-   netlifyApiHost , 
132+   extensionApiBaseUrl , 
133133} : GetIntegrationsOpts ) : Promise < IntegrationResponse [ ] >  { 
134134  if  ( ! siteId  ||  offline )  { 
135135    return  [ ] 
136136  } 
137137  const  sendBuildBotTokenToJigsaw  =  featureFlags ?. send_build_bot_token_to_jigsaw 
138138  const  {  host }  =  testOpts 
139-   const  extensionApiBaseUrl  = 
140-     netlifyApiHost  ===  'api.netlify.com'  ? 'https://api.netlifysdk.com'  : `https://api-staging.netlifysdk.com ` 
141139  const  baseUrl  =  new  URL ( host  ? `http://${ host }   : extensionApiBaseUrl ) 
142140
143141  // if accountId isn't present, use safe v1 endpoint 
0 commit comments