File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -287,17 +287,15 @@ const localDenoHandler = async ({
287287
288288 // Strip null/undefined values so that the worker SDK client can fall back to
289289 // reading from environment variables (including any upstreamClientEnvs).
290- const opts : ClientOptions = Object . fromEntries (
291- Object . entries ( {
292- baseURL : client . baseURL ,
293- privateKey : client . privateKey ,
294- password : client . password ,
295- webhookSecret : client . webhookSecret ,
296- defaultHeaders : {
297- 'X-Stainless-MCP' : 'true' ,
298- } ,
299- } ) . filter ( ( [ _ , v ] ) => v != null ) ,
300- ) as ClientOptions ;
290+ const opts = {
291+ ...( client . baseURL != null ? { baseURL : client . baseURL } : undefined ) ,
292+ ...( client . privateKey != null ? { privateKey : client . privateKey } : undefined ) ,
293+ ...( client . password != null ? { password : client . password } : undefined ) ,
294+ ...( client . webhookSecret != null ? { webhookSecret : client . webhookSecret } : undefined ) ,
295+ defaultHeaders : {
296+ 'X-Stainless-MCP' : 'true' ,
297+ } ,
298+ } satisfies Partial < ClientOptions > as ClientOptions ;
301299
302300 const req = worker . request (
303301 'http://localhost' ,
You can’t perform that action at this time.
0 commit comments