Spaces:
Sleeping
Sleeping
Download tests/api-tester/puter_js/__entry__.js from AZILS/puter-deploy: direct link, hf CLI and curl.
- Browser
- Download file 700 Bytes
-
https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/tests/api-tester/puter_js/__entry__.js
- Command line
-
hf download hf://spaces/AZILS/puter-deploy/tests/api-tester/puter_js/__entry__.js
-
curl -L -o __entry__.js https://huggingface.co/spaces/AZILS/puter-deploy/resolve/main/tests/api-tester/puter_js/__entry__.js
700 Bytes
| const load_puterjs = require('./load.cjs'); | |
| async function run(conf) { | |
| const puter = await load_puterjs(); | |
| if (conf.token) { | |
| puter.setAuthToken(conf.token); | |
| } else { | |
| throw new Error('No token found in config file. Please add a "token" field to your config.yaml'); | |
| } | |
| return; | |
| }; | |
| module.exports = async registry => { | |
| const puter = await load_puterjs(); | |
| if (registry.t?.conf?.token) { | |
| puter.setAuthToken(registry.t.conf.token); | |
| } else { | |
| throw new Error('No token found in config file. Please add a "token" field to your config.yaml'); | |
| } | |
| registry.t.puter = puter; | |
| console.log('__entry__.js'); | |
| require('./auth/__entry__.js')(registry); | |
| }; |