@@ -195,7 +195,10 @@ export class ProjectsClient {
195195 this . bearerToken = bearerToken ;
196196
197197 // Add Cloudflare Access headers if available in environment
198- if ( env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID && env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET ) {
198+ if (
199+ env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID &&
200+ env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET
201+ ) {
199202 this . cloudflareServiceToken = {
200203 clientId : env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID ,
201204 clientSecret : env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET ,
@@ -204,13 +207,10 @@ export class ProjectsClient {
204207 "ProjectsClient: Cloudflare Access headers configured (client ID present)"
205208 ) ;
206209 } else {
207- console . log (
208- "ProjectsClient: Cloudflare Access headers not configured" ,
209- {
210- hasClientId : ! ! env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID ,
211- hasClientSecret : ! ! env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET ,
212- }
213- ) ;
210+ console . log ( "ProjectsClient: Cloudflare Access headers not configured" , {
211+ hasClientId : ! ! env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_ID ,
212+ hasClientSecret : ! ! env . CLOUDFLARE_SERVICE_TOKEN_CLIENT_SECRET ,
213+ } ) ;
214214 }
215215 }
216216
@@ -243,7 +243,8 @@ export class ProjectsClient {
243243 // Add Cloudflare Access headers if configured
244244 if ( this . cloudflareServiceToken ) {
245245 headers [ "CF-Access-Client-Id" ] = this . cloudflareServiceToken . clientId ;
246- headers [ "CF-Access-Client-Secret" ] = this . cloudflareServiceToken . clientSecret ;
246+ headers [ "CF-Access-Client-Secret" ] =
247+ this . cloudflareServiceToken . clientSecret ;
247248 }
248249
249250 const response = await fetch ( url , {
@@ -492,4 +493,3 @@ export class ProjectsClient {
492493 ) ;
493494 }
494495}
495-
0 commit comments