File size: 700 Bytes
61d39e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);
};