@sjcrh/proteinpaint-server 2.184.0 → 2.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,6 +162,16 @@ if (serverconfig.debugmode && !serverconfig.binpath.includes('sjcrh/')) {
162
162
  serverconfig.routeSetters = routeSetters
163
163
  }
164
164
 
165
+ if (typeof serverconfig.dsCredentials == 'string') {
166
+ const dsCredentialsFile = serverconfig.dsCredentials
167
+ try {
168
+ const json = fs.readFileSync(dsCredentialsFile, { encoding: 'utf8' })
169
+ serverconfig.dsCredentials = JSON.parse(json)
170
+ } catch (e) {
171
+ throw `invalid json file, serverconfig.dsCredentials='${dsCredentialsFile}': ${e}`
172
+ }
173
+ }
174
+
165
175
  if (serverconfig.debugmode) {
166
176
  // should be able to run this in local dev and test environments that use containers
167
177
  const hg38test = serverconfig.genomes.find(g => g.name == 'hg38-test')
@@ -322,7 +332,12 @@ function mayUpdateTestDatasets(datasets, serverconfig) {
322
332
  id: 'XYZ',
323
333
  label: 'XYZ cohort'
324
334
  }
325
- ]
335
+ ],
336
+ demoToken: {
337
+ secret: '...', // pragma: allowlist secret
338
+ roles: ['user'],
339
+ referers: ['/demo-login.html']
340
+ }
326
341
  }
327
342
  }
328
343
  }