mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-29 18:18:52 +00:00
58b167b43d
* Use the correct defaults for the delta config variables that have them * Only mount /lib/firmware and /lib/modules if they exist on the host * hardcode-migrations.js: Nicer line separation * APIBinder: switch to using a header for authentication, and keep credentials saved in the API clients * Fix hrtime measurements in milliseconds * Do not uses classes for routers * compose: properly initialize networkMode to the first entry in networks if there is one * Fix some details regarding defaults in validation and service Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
10 lines
450 B
JavaScript
10 lines
450 B
JavaScript
// knex migrations use dynamic requires which break with webpack.
|
|
// This hack makes the migrations directory a constant so that at least we can use webpack contexts for the
|
|
// require.
|
|
module.exports = function (source) {
|
|
return source
|
|
.toString()
|
|
.replace("require(directory + '/' + name);", "require('./migrations/' + name);")
|
|
.replace("require(_path2.default.join(this._absoluteConfigDir(), name));", "require('./migrations/' + name);")
|
|
}
|