Env variables using in retool javascript query/ global scripts

Hello, I'm using retool and have connected the AWS secret manager where I'm getting env variables, I want to generate some information based on one env variable which I need to use in javascript query or in global script, suddenly I can't find any resource how can I use it?

As I understand secrets can be used in resource query/rest API headers where it will be replaced on the server side, but is there any option to use it in JS?