Skip to content

Commit 03c7164

Browse files
merge with master
1 parent 958076c commit 03c7164

File tree

1 file changed

+14
-47
lines changed

1 file changed

+14
-47
lines changed

lib/clientStub.js

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"use strict";
2-
<<<<<<< HEAD
32
var __awaiter =
43
(this && this.__awaiter) ||
54
function (thisArg, _arguments, P, generator) {
@@ -10,38 +9,6 @@ var __awaiter =
109
} catch (e) {
1110
reject(e);
1211
}
13-
=======
14-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16-
return new (P || (P = Promise))(function (resolve, reject) {
17-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20-
step((generator = generator.apply(thisArg, _arguments || [])).next());
21-
});
22-
};
23-
var __generator = (this && this.__generator) || function (thisArg, body) {
24-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26-
function verb(n) { return function (v) { return step([n, v]); }; }
27-
function step(op) {
28-
if (f) throw new TypeError("Generator is already executing.");
29-
while (_) try {
30-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31-
if (y = 0, t) op = [op[0] & 2, t.value];
32-
switch (op[0]) {
33-
case 0: case 1: t = op; break;
34-
case 4: _.label++; return { value: op[1], done: false };
35-
case 5: _.label++; y = op[1]; op = [0]; continue;
36-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
37-
default:
38-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42-
if (t[2]) _.ops.pop();
43-
_.trys.pop(); continue;
44-
>>>>>>> master
4512
}
4613
function rejected(value) {
4714
try {
@@ -58,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
5825
}).then(fulfilled, rejected);
5926
}
6027
step(
61-
(generator = generator.apply(thisArg, _arguments || [])).next()
28+
(generator = generator.apply(thisArg, _arguments || [])).next(),
6229
);
6330
});
6431
};
@@ -191,7 +158,7 @@ var DgraphClientStub = (function () {
191158
mutate: util_1.promisify3(this.stub.mutate, this.stub),
192159
commitOrAbort: util_1.promisify3(
193160
this.stub.commitOrAbort,
194-
this.stub
161+
this.stub,
195162
),
196163
checkVersion: util_1.promisify3(this.stub.checkVersion, this.stub),
197164
waitForReady: util_1.promisify1(this.stub.waitForReady, this.stub),
@@ -202,7 +169,7 @@ var DgraphClientStub = (function () {
202169
password,
203170
refreshJwt,
204171
metadata,
205-
options
172+
options,
206173
) {
207174
return __awaiter(this, void 0, void 0, function () {
208175
var req, resp, jwtResponse;
@@ -223,13 +190,13 @@ var DgraphClientStub = (function () {
223190
this.promisified.login(
224191
req,
225192
this.ensureMetadata(metadata),
226-
ensureCallOptions(options)
193+
ensureCallOptions(options),
227194
),
228195
];
229196
case 1:
230197
resp = _a.sent();
231198
jwtResponse = messages.Jwt.deserializeBinary(
232-
resp.getJson_asU8()
199+
resp.getJson_asU8(),
233200
);
234201
this.accessJwt = jwtResponse.getAccessJwt();
235202
this.refreshJwt = jwtResponse.getRefreshJwt();
@@ -242,7 +209,7 @@ var DgraphClientStub = (function () {
242209
return this.promisified.alter(
243210
op,
244211
this.ensureMetadata(metadata),
245-
ensureCallOptions(options)
212+
ensureCallOptions(options),
246213
);
247214
};
248215
DgraphClientStub.prototype.retryLogin = function (metadata, options) {
@@ -261,13 +228,13 @@ var DgraphClientStub = (function () {
261228
this.promisified.login(
262229
req,
263230
this.ensureMetadata(metadata),
264-
ensureCallOptions(options)
231+
ensureCallOptions(options),
265232
),
266233
];
267234
case 1:
268235
resp = _a.sent();
269236
jwtResponse = messages.Jwt.deserializeBinary(
270-
resp.getJson_asU8()
237+
resp.getJson_asU8(),
271238
);
272239
this.accessJwt = jwtResponse.getAccessJwt();
273240
this.refreshJwt = jwtResponse.getRefreshJwt();
@@ -280,36 +247,36 @@ var DgraphClientStub = (function () {
280247
return this.promisified.query(
281248
req,
282249
this.ensureMetadata(metadata),
283-
ensureCallOptions(options)
250+
ensureCallOptions(options),
284251
);
285252
};
286253
DgraphClientStub.prototype.mutate = function (mu, metadata, options) {
287254
return this.promisified.mutate(
288255
mu,
289256
this.ensureMetadata(metadata),
290-
ensureCallOptions(options)
257+
ensureCallOptions(options),
291258
);
292259
};
293260
DgraphClientStub.prototype.commitOrAbort = function (
294261
ctx,
295262
metadata,
296-
options
263+
options,
297264
) {
298265
return this.promisified.commitOrAbort(
299266
ctx,
300267
this.ensureMetadata(metadata),
301-
ensureCallOptions(options)
268+
ensureCallOptions(options),
302269
);
303270
};
304271
DgraphClientStub.prototype.checkVersion = function (
305272
check,
306273
metadata,
307-
options
274+
options,
308275
) {
309276
return this.promisified.checkVersion(
310277
check,
311278
this.ensureMetadata(metadata),
312-
ensureCallOptions(options)
279+
ensureCallOptions(options),
313280
);
314281
};
315282
DgraphClientStub.prototype.waitForReady = function (deadline) {

0 commit comments

Comments
 (0)