function requiredEnv ( name ) { const value = process . env [ name ] ; if ( ! value ) { throw new ReferenceError ( `${ name } environment variable is not defined` ) ; } return value ; } export interface Env { address : string ; namespace : string ; clientCertPath : string ; clientKeyPath : string ; serverNameOverride ? : string ; serverRootCACertificatePath ? : string ; taskQueue : string ; } export function getEnv ( ) { return { address : requiredEnv ( 'TEMPORAL_ADDRESS' ) , namespace : requiredEnv ( 'TEMPORAL_NAMESPACE' ) , clientCertPath : requiredEnv ( 'TEMPORAL_CLIENT_CERT_PATH' ) , clientKeyPath : requiredEnv ( 'TEMPORAL_CLIENT_KEY_PATH' ) , serverNameOverride : process . env . TEMPORAL_SERVER_NAME_OVERRIDE , serverRootCACertificatePath : process . env . TEMPORAL_SERVER_ROOT_CA_CERT_PATH , taskQueue : process . env . TEMPORAL_TASK_QUEUE || 'hello-world-mtls' , } ; }