Skip to content

Commit

Permalink
Adding generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
prashant-shahi committed Sep 18, 2019
1 parent 6171b2d commit 693c004
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
34 changes: 18 additions & 16 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,40 @@ var DgraphClient = (function () {
}
DgraphClient.prototype.alter = function (op, metadata, options) {
return __awaiter(this, void 0, void 0, function () {
var c, payload, operation, e_1, pl;
var c, payload, operation, _a, _b, e_1, _c, _d;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
this.debug("Alter request:\n" + util_1.stringifyMessage(op));
c = this.anyClient();
operation = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
return [2, c.alter(op, metadata, options)];
}); }); };
_a.label = 1;
_e.label = 1;
case 1:
_a.trys.push([1, 3, , 7]);
_e.trys.push([1, 3, , 8]);
_b = (_a = types).createPayload;
return [4, operation()];
case 2:
payload = _a.sent();
return [3, 7];
payload = _b.apply(_a, [_e.sent()]);
return [3, 8];
case 3:
e_1 = _a.sent();
e_1 = _e.sent();
if (!(isJwtExpired(e_1) === true)) return [3, 6];
return [4, c.retryLogin(metadata, options)];
case 4:
_a.sent();
_e.sent();
_d = (_c = types).createPayload;
return [4, operation()];
case 5:
payload = _a.sent();
_a.label = 6;
case 6: return [3, 7];
case 7:
pl = types.createPayload(payload);
this.debug("Alter response:\n" + util_1.stringifyMessage(pl));
return [2, pl];
payload = _d.apply(_c, [_e.sent()]);
return [3, 7];
case 6: throw e_1;
case 7: return [3, 8];
case 8:
this.debug("Alter response:\n" + util_1.stringifyMessage(payload));
return [2, payload];
}
});
});
Expand Down
11 changes: 6 additions & 5 deletions lib/txn.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ var Txn = (function () {
}); }); };
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 7]);
_a.trys.push([1, 3, , 8]);
return [4, operation()];
case 2:
_a.sent();
return [3, 7];
return [3, 8];
case 3:
e_4 = _a.sent();
if (!(client_1.isJwtExpired(e_4) === true)) return [3, 6];
Expand All @@ -252,9 +252,10 @@ var Txn = (function () {
return [4, operation()];
case 5:
_a.sent();
_a.label = 6;
case 6: return [3, 7];
case 7: return [2];
return [3, 7];
case 6: throw util_1.isAbortedError(e_4) ? errors_1.ERR_ABORTED : e_4;
case 7: return [3, 8];
case 8: return [2];
}
});
});
Expand Down

0 comments on commit 693c004

Please sign in to comment.