mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-22 11:49:37 +00:00
Put umzug in server/libs and remove unneeded dependencies from it
This commit is contained in:
parent
8a28029809
commit
6fb1202c1c
15 changed files with 808 additions and 526 deletions
18
server/libs/umzug/storage/contract.js
Normal file
18
server/libs/umzug/storage/contract.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.verifyUmzugStorage = exports.isUmzugStorage = void 0;
|
||||
function isUmzugStorage(arg) {
|
||||
return (arg &&
|
||||
typeof arg.logMigration === 'function' &&
|
||||
typeof arg.unlogMigration === 'function' &&
|
||||
typeof arg.executed === 'function');
|
||||
}
|
||||
exports.isUmzugStorage = isUmzugStorage;
|
||||
const verifyUmzugStorage = (arg) => {
|
||||
if (!isUmzugStorage(arg)) {
|
||||
throw new Error(`Invalid umzug storage`);
|
||||
}
|
||||
return arg;
|
||||
};
|
||||
exports.verifyUmzugStorage = verifyUmzugStorage;
|
||||
//# sourceMappingURL=contract.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue