Put umzug in server/libs and remove unneeded dependencies from it

This commit is contained in:
mikiher 2024-09-08 21:33:32 +03:00
parent 8a28029809
commit 6fb1202c1c
15 changed files with 808 additions and 526 deletions

View 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