@enonic/mock-xp
Version:
Mock Enonic XP API JavaScript Library
25 lines (24 loc) • 663 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LibNode = void 0;
var LibNode = (function () {
function LibNode(_a) {
var server = _a.server;
this.server = server;
}
LibNode.prototype.connect = function (_a) {
var repoId = _a.repoId, branch = _a.branch;
if (!repoId) {
throw new Error('No repo with id');
}
if (!branch) {
throw new Error('No branch with branchId');
}
return this.server.connect({
repoId: repoId,
branchId: branch
});
};
return LibNode;
}());
exports.LibNode = LibNode;