4d01e13a84
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
32 lines
879 B
JavaScript
32 lines
879 B
JavaScript
'use strict'
|
|
const { registerOrUpdateScope, registerOrUpdateRole } = require('@/modules/shared')
|
|
const { moduleLogger } = require('@/logging/logging')
|
|
|
|
exports.init = async (app) => {
|
|
moduleLogger.info('💥 Init core module')
|
|
// Initialize the static route
|
|
require('./rest/static')(app)
|
|
|
|
// Initialises the two main bulk upload/download endpoints
|
|
require('./rest/upload')(app)
|
|
require('./rest/download')(app)
|
|
|
|
// Initialises the two diff-based upload/download endpoints
|
|
require('./rest/diffUpload')(app)
|
|
require('./rest/diffDownload')(app)
|
|
|
|
// Register core-based scoeps
|
|
const scopes = require('./scopes.js')
|
|
for (const scope of scopes) {
|
|
await registerOrUpdateScope(scope)
|
|
}
|
|
|
|
// Register core-based roles
|
|
const roles = require('./roles.js')
|
|
for (const role of roles) {
|
|
await registerOrUpdateRole(role)
|
|
}
|
|
}
|
|
|
|
exports.finalize = () => {}
|