import { generateUser } from "@fluidframework/server-services-client" ; import { InsecureTokenProvider } from "@fluidframework/test-client-utils" ; import { AzureClient , LOCAL_MODE_TENANT_ID , } from ".." ; import { createAzureTokenProvider } from "./AzureTokenFactory" ; export function createAzureClient ( ) { const useAzure = process . env . FLUID_CLIENT === "azure" ; const tenantId = useAzure ? process . env . azure__fluid__relay__service__tenantId as string : "frs-client-tenant" ; const connectionProps = useAzure ? { tenantId , tokenProvider : createAzureTokenProvider ( ) , orderer : "https://alfred.westus2.fluidrelay.azure.com" , storage : "https://historian.westus2.fluidrelay.azure.com" } : { tenantId : LOCAL_MODE_TENANT_ID , tokenProvider : new InsecureTokenProvider ( "fooBar" , generateUser ( ) ) , orderer : "http://localhost:7070" , storage : "http://localhost:7070" } ; return new AzureClient ( { connection : connectionProps } ) ; }