@@ -18,14 +18,12 @@ import {
1818} from "~/v3/vercel/vercelProjectIntegrationSchema" ;
1919import { EnvironmentVariablesRepository } from "~/v3/environmentVariables/environmentVariablesRepository.server" ;
2020
21- // Utility to normalize target arrays from Vercel API responses
2221function normalizeTarget ( target : unknown ) : string [ ] {
2322 if ( Array . isArray ( target ) ) return target . filter ( Boolean ) as string [ ] ;
2423 if ( typeof target === 'string' ) return [ target ] ;
2524 return [ ] ;
2625}
2726
28- // Utility to safely extract envs array from Vercel API response
2927function extractEnvs ( response : unknown ) : unknown [ ] {
3028 if ( response && typeof response === 'object' && 'envs' in response ) {
3129 const envs = ( response as { envs : unknown } ) . envs ;
@@ -116,8 +114,6 @@ export class VercelIntegrationRepository {
116114 bearerToken : accessToken ,
117115 } ) ;
118116
119- // Use the Vercel SDK to get the integration configuration
120- // The SDK might have a method for this, or we need to make a direct API call
121117 const response = await fetch (
122118 `https://api.vercel.com/v1/integrations/configuration/${ configurationId } ${ teamId ? `?teamId=${ teamId } ` : "" } ` ,
123119 {
@@ -162,7 +158,6 @@ export class VercelIntegrationRepository {
162158 }
163159 }
164160
165- // Excludes standard environments (production, preview, development)
166161 static async getVercelCustomEnvironments (
167162 client : Vercel ,
168163 projectId : string ,
@@ -235,7 +230,7 @@ export class VercelIntegrationRepository {
235230 client : Vercel ,
236231 projectId : string ,
237232 teamId ?: string | null ,
238- target ?: string // Optional: filter by Vercel environment (production, preview, etc.)
233+ target ?: string
239234 ) : Promise <
240235 Array < {
241236 key : string ;
@@ -612,7 +607,7 @@ export class VercelIntegrationRepository {
612607 organizationIntegrationId : params . organizationIntegrationId ,
613608 projectId : params . projectId ,
614609 externalEntityId : params . vercelProjectId ,
615- integrationData : integrationData as any ,
610+ integrationData : integrationData ,
616611 installedBy : params . installedByUserId ,
617612 } ,
618613 } ) ;
0 commit comments