roboto-js 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +74 -55
- package/dist/cjs/rbt_api.cjs +7 -0
- package/dist/cjs/rbt_file.cjs +13 -29
- package/dist/esm/index.js +3 -0
- package/dist/esm/rbt_api.js +5 -0
- package/dist/esm/rbt_file.js +2 -2
- package/package.json +1 -1
- package/src/index.js +3 -0
- package/src/rbt_api.js +8 -0
- package/src/rbt_file.js +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -217,19 +217,38 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
217
217
|
return loadCurrentUser;
|
|
218
218
|
}()
|
|
219
219
|
}, {
|
|
220
|
-
key: "
|
|
220
|
+
key: "getCurrentUser",
|
|
221
221
|
value: function () {
|
|
222
|
-
var
|
|
222
|
+
var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
223
223
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
224
224
|
while (1) switch (_context7.prev = _context7.next) {
|
|
225
225
|
case 0:
|
|
226
|
-
return _context7.abrupt("return", this.api.
|
|
226
|
+
return _context7.abrupt("return", this.api.getCurrentUser());
|
|
227
227
|
case 1:
|
|
228
228
|
case "end":
|
|
229
229
|
return _context7.stop();
|
|
230
230
|
}
|
|
231
231
|
}, _callee7, this);
|
|
232
232
|
}));
|
|
233
|
+
function getCurrentUser() {
|
|
234
|
+
return _getCurrentUser.apply(this, arguments);
|
|
235
|
+
}
|
|
236
|
+
return getCurrentUser;
|
|
237
|
+
}()
|
|
238
|
+
}, {
|
|
239
|
+
key: "confirmUserEmail",
|
|
240
|
+
value: function () {
|
|
241
|
+
var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
|
|
242
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
243
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
244
|
+
case 0:
|
|
245
|
+
return _context8.abrupt("return", this.api.confirmUserEmail(params));
|
|
246
|
+
case 1:
|
|
247
|
+
case "end":
|
|
248
|
+
return _context8.stop();
|
|
249
|
+
}
|
|
250
|
+
}, _callee8, this);
|
|
251
|
+
}));
|
|
233
252
|
function confirmUserEmail(_x4) {
|
|
234
253
|
return _confirmUserEmail.apply(this, arguments);
|
|
235
254
|
}
|
|
@@ -240,19 +259,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
259
|
}, {
|
|
241
260
|
key: "createFile",
|
|
242
261
|
value: function () {
|
|
243
|
-
var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
262
|
+
var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
244
263
|
var data,
|
|
245
|
-
|
|
246
|
-
return _regeneratorRuntime().wrap(function
|
|
247
|
-
while (1) switch (
|
|
264
|
+
_args9 = arguments;
|
|
265
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
266
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
248
267
|
case 0:
|
|
249
|
-
data =
|
|
250
|
-
return
|
|
268
|
+
data = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
269
|
+
return _context9.abrupt("return", this.api.createFile(data));
|
|
251
270
|
case 2:
|
|
252
271
|
case "end":
|
|
253
|
-
return
|
|
272
|
+
return _context9.stop();
|
|
254
273
|
}
|
|
255
|
-
},
|
|
274
|
+
}, _callee9, this);
|
|
256
275
|
}));
|
|
257
276
|
function createFile() {
|
|
258
277
|
return _createFile.apply(this, arguments);
|
|
@@ -264,19 +283,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
264
283
|
}, {
|
|
265
284
|
key: "create",
|
|
266
285
|
value: function () {
|
|
267
|
-
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
286
|
+
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
|
|
268
287
|
var data,
|
|
269
|
-
|
|
270
|
-
return _regeneratorRuntime().wrap(function
|
|
271
|
-
while (1) switch (
|
|
288
|
+
_args10 = arguments;
|
|
289
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
290
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
272
291
|
case 0:
|
|
273
|
-
data =
|
|
274
|
-
return
|
|
292
|
+
data = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {};
|
|
293
|
+
return _context10.abrupt("return", this.api.create(params, data));
|
|
275
294
|
case 2:
|
|
276
295
|
case "end":
|
|
277
|
-
return
|
|
296
|
+
return _context10.stop();
|
|
278
297
|
}
|
|
279
|
-
},
|
|
298
|
+
}, _callee10, this);
|
|
280
299
|
}));
|
|
281
300
|
function create(_x5) {
|
|
282
301
|
return _create.apply(this, arguments);
|
|
@@ -286,16 +305,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
286
305
|
}, {
|
|
287
306
|
key: "load",
|
|
288
307
|
value: function () {
|
|
289
|
-
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
290
|
-
return _regeneratorRuntime().wrap(function
|
|
291
|
-
while (1) switch (
|
|
308
|
+
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type, ids, options) {
|
|
309
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
310
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
292
311
|
case 0:
|
|
293
|
-
return
|
|
312
|
+
return _context11.abrupt("return", this.api.load(type, ids, options));
|
|
294
313
|
case 1:
|
|
295
314
|
case "end":
|
|
296
|
-
return
|
|
315
|
+
return _context11.stop();
|
|
297
316
|
}
|
|
298
|
-
},
|
|
317
|
+
}, _callee11, this);
|
|
299
318
|
}));
|
|
300
319
|
function load(_x6, _x7, _x8) {
|
|
301
320
|
return _load.apply(this, arguments);
|
|
@@ -305,16 +324,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
305
324
|
}, {
|
|
306
325
|
key: "query",
|
|
307
326
|
value: function () {
|
|
308
|
-
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
309
|
-
return _regeneratorRuntime().wrap(function
|
|
310
|
-
while (1) switch (
|
|
327
|
+
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(type, params) {
|
|
328
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
329
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
311
330
|
case 0:
|
|
312
|
-
return
|
|
331
|
+
return _context12.abrupt("return", this.api.query(type, params));
|
|
313
332
|
case 1:
|
|
314
333
|
case "end":
|
|
315
|
-
return
|
|
334
|
+
return _context12.stop();
|
|
316
335
|
}
|
|
317
|
-
},
|
|
336
|
+
}, _callee12, this);
|
|
318
337
|
}));
|
|
319
338
|
function query(_x9, _x10) {
|
|
320
339
|
return _query.apply(this, arguments);
|
|
@@ -326,16 +345,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
326
345
|
}, {
|
|
327
346
|
key: "runTask",
|
|
328
347
|
value: function () {
|
|
329
|
-
var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
330
|
-
return _regeneratorRuntime().wrap(function
|
|
331
|
-
while (1) switch (
|
|
348
|
+
var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params, callbacks) {
|
|
349
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
350
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
332
351
|
case 0:
|
|
333
|
-
return
|
|
352
|
+
return _context13.abrupt("return", this.api.runTask(params, callbacks));
|
|
334
353
|
case 1:
|
|
335
354
|
case "end":
|
|
336
|
-
return
|
|
355
|
+
return _context13.stop();
|
|
337
356
|
}
|
|
338
|
-
},
|
|
357
|
+
}, _callee13, this);
|
|
339
358
|
}));
|
|
340
359
|
function runTask(_x11, _x12) {
|
|
341
360
|
return _runTask.apply(this, arguments);
|
|
@@ -345,16 +364,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
345
364
|
}, {
|
|
346
365
|
key: "pollTaskProgress",
|
|
347
366
|
value: function () {
|
|
348
|
-
var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
349
|
-
return _regeneratorRuntime().wrap(function
|
|
350
|
-
while (1) switch (
|
|
367
|
+
var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
|
|
368
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
369
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
351
370
|
case 0:
|
|
352
|
-
return
|
|
371
|
+
return _context14.abrupt("return", this.api.pollTaskProgress(params));
|
|
353
372
|
case 1:
|
|
354
373
|
case "end":
|
|
355
|
-
return
|
|
374
|
+
return _context14.stop();
|
|
356
375
|
}
|
|
357
|
-
},
|
|
376
|
+
}, _callee14, this);
|
|
358
377
|
}));
|
|
359
378
|
function pollTaskProgress(_x13) {
|
|
360
379
|
return _pollTaskProgress.apply(this, arguments);
|
|
@@ -366,16 +385,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
366
385
|
}, {
|
|
367
386
|
key: "get",
|
|
368
387
|
value: function () {
|
|
369
|
-
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
370
|
-
return _regeneratorRuntime().wrap(function
|
|
371
|
-
while (1) switch (
|
|
388
|
+
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(endpoint, params) {
|
|
389
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
390
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
372
391
|
case 0:
|
|
373
|
-
return
|
|
392
|
+
return _context15.abrupt("return", this.api.get(endpoint, params));
|
|
374
393
|
case 1:
|
|
375
394
|
case "end":
|
|
376
|
-
return
|
|
395
|
+
return _context15.stop();
|
|
377
396
|
}
|
|
378
|
-
},
|
|
397
|
+
}, _callee15, this);
|
|
379
398
|
}));
|
|
380
399
|
function get(_x14, _x15) {
|
|
381
400
|
return _get.apply(this, arguments);
|
|
@@ -385,16 +404,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
385
404
|
}, {
|
|
386
405
|
key: "post",
|
|
387
406
|
value: function () {
|
|
388
|
-
var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
389
|
-
return _regeneratorRuntime().wrap(function
|
|
390
|
-
while (1) switch (
|
|
407
|
+
var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(endpoint, data) {
|
|
408
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
409
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
391
410
|
case 0:
|
|
392
|
-
return
|
|
411
|
+
return _context16.abrupt("return", this.api.post(endpoint, data));
|
|
393
412
|
case 1:
|
|
394
413
|
case "end":
|
|
395
|
-
return
|
|
414
|
+
return _context16.stop();
|
|
396
415
|
}
|
|
397
|
-
},
|
|
416
|
+
}, _callee16, this);
|
|
398
417
|
}));
|
|
399
418
|
function post(_x16, _x17) {
|
|
400
419
|
return _post.apply(this, arguments);
|
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -240,6 +240,13 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
240
|
}
|
|
241
241
|
return logout;
|
|
242
242
|
}()
|
|
243
|
+
}, {
|
|
244
|
+
key: "getCurrentUser",
|
|
245
|
+
value: function getCurrentUser() {
|
|
246
|
+
if (this.currentUser) {
|
|
247
|
+
return this.currentUser;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
243
250
|
}, {
|
|
244
251
|
key: "loadCurrentUser",
|
|
245
252
|
value: function () {
|
package/dist/cjs/rbt_file.cjs
CHANGED
|
@@ -45,30 +45,14 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
45
45
|
}
|
|
46
46
|
_createClass(RbtFile, [{
|
|
47
47
|
key: "get",
|
|
48
|
-
value: function (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
get.toString = function () {
|
|
53
|
-
return _get.toString();
|
|
54
|
-
};
|
|
55
|
-
return get;
|
|
56
|
-
}(function (path) {
|
|
57
|
-
return get(this._data, path);
|
|
58
|
-
})
|
|
48
|
+
value: function get(path) {
|
|
49
|
+
return _lodash["default"].get(this._data, path);
|
|
50
|
+
}
|
|
59
51
|
}, {
|
|
60
52
|
key: "set",
|
|
61
|
-
value: function (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
set.toString = function () {
|
|
66
|
-
return _set.toString();
|
|
67
|
-
};
|
|
68
|
-
return set;
|
|
69
|
-
}(function (path, value) {
|
|
70
|
-
set(this._data, path, value);
|
|
71
|
-
})
|
|
53
|
+
value: function set(path, value) {
|
|
54
|
+
_lodash["default"].set(this._data, path, value);
|
|
55
|
+
}
|
|
72
56
|
}, {
|
|
73
57
|
key: "getData",
|
|
74
58
|
value: function getData() {
|
|
@@ -258,7 +242,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
258
242
|
}
|
|
259
243
|
}, _callee4);
|
|
260
244
|
}));
|
|
261
|
-
return function (
|
|
245
|
+
return function (_x2) {
|
|
262
246
|
return _ref.apply(this, arguments);
|
|
263
247
|
};
|
|
264
248
|
}();
|
|
@@ -290,7 +274,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
290
274
|
}
|
|
291
275
|
}, _callee5, this);
|
|
292
276
|
}));
|
|
293
|
-
function readAndStoreFile(
|
|
277
|
+
function readAndStoreFile(_x) {
|
|
294
278
|
return _readAndStoreFile.apply(this, arguments);
|
|
295
279
|
}
|
|
296
280
|
return readAndStoreFile;
|
|
@@ -340,7 +324,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
340
324
|
}
|
|
341
325
|
}, _callee6, this);
|
|
342
326
|
}));
|
|
343
|
-
function _storeChunkInIDB(
|
|
327
|
+
function _storeChunkInIDB(_x3, _x4, _x5) {
|
|
344
328
|
return _storeChunkInIDB2.apply(this, arguments);
|
|
345
329
|
}
|
|
346
330
|
return _storeChunkInIDB;
|
|
@@ -374,7 +358,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
374
358
|
}
|
|
375
359
|
}, _callee7, this);
|
|
376
360
|
}));
|
|
377
|
-
function _readFrameFromIDB(
|
|
361
|
+
function _readFrameFromIDB(_x6) {
|
|
378
362
|
return _readFrameFromIDB2.apply(this, arguments);
|
|
379
363
|
}
|
|
380
364
|
return _readFrameFromIDB;
|
|
@@ -492,7 +476,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
492
476
|
}
|
|
493
477
|
}, _callee9, this);
|
|
494
478
|
}));
|
|
495
|
-
function _uploadFrameToServer(
|
|
479
|
+
function _uploadFrameToServer(_x7, _x8, _x9, _x10) {
|
|
496
480
|
return _uploadFrameToServer2.apply(this, arguments);
|
|
497
481
|
}
|
|
498
482
|
return _uploadFrameToServer;
|
|
@@ -543,7 +527,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
543
527
|
}
|
|
544
528
|
}, _callee11);
|
|
545
529
|
}));
|
|
546
|
-
function _checkUploadStatusUntilDone(
|
|
530
|
+
function _checkUploadStatusUntilDone(_x11) {
|
|
547
531
|
return _checkUploadStatusUntilDone2.apply(this, arguments);
|
|
548
532
|
}
|
|
549
533
|
return _checkUploadStatusUntilDone;
|
|
@@ -579,7 +563,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
|
579
563
|
}
|
|
580
564
|
}, _callee12, this);
|
|
581
565
|
}));
|
|
582
|
-
function _uploadGetStatusUpdate(
|
|
566
|
+
function _uploadGetStatusUpdate(_x12) {
|
|
583
567
|
return _uploadGetStatusUpdate2.apply(this, arguments);
|
|
584
568
|
}
|
|
585
569
|
return _uploadGetStatusUpdate;
|
package/dist/esm/index.js
CHANGED
package/dist/esm/rbt_api.js
CHANGED
package/dist/esm/rbt_file.js
CHANGED
|
@@ -14,10 +14,10 @@ export default class RbtFile extends EventEmitter {
|
|
|
14
14
|
this.fileHeader = {};
|
|
15
15
|
}
|
|
16
16
|
get(path) {
|
|
17
|
-
return get(this._data, path);
|
|
17
|
+
return _.get(this._data, path);
|
|
18
18
|
}
|
|
19
19
|
set(path, value) {
|
|
20
|
-
set(this._data, path, value);
|
|
20
|
+
_.set(this._data, path, value);
|
|
21
21
|
}
|
|
22
22
|
getData() {
|
|
23
23
|
return {
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -97,6 +97,9 @@ export default class Roboto{
|
|
|
97
97
|
async loadCurrentUser(){
|
|
98
98
|
return this.api.loadCurrentUser();
|
|
99
99
|
}
|
|
100
|
+
async getCurrentUser(){
|
|
101
|
+
return this.api.getCurrentUser();
|
|
102
|
+
}
|
|
100
103
|
async confirmUserEmail(params){
|
|
101
104
|
return this.api.confirmUserEmail(params);
|
|
102
105
|
}
|
package/src/rbt_api.js
CHANGED
package/src/rbt_file.js
CHANGED
|
@@ -20,11 +20,11 @@ export default class RbtFile extends EventEmitter{
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
get(path) {
|
|
23
|
-
return get(this._data, path);
|
|
23
|
+
return _.get(this._data, path);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
set(path, value) {
|
|
27
|
-
set(this._data, path, value);
|
|
27
|
+
_.set(this._data, path, value);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
getData() {
|