roboto-js 1.4.48 → 1.4.50

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.
@@ -61,7 +61,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
61
61
  }
62
62
  this.localDb = null;
63
63
  this.iac_session = null;
64
- this.appServiceHost = null;
64
+ this.appServiceHost = baseUrl;
65
65
  this.requestCache = {};
66
66
 
67
67
  // Use the storageAdaptor to get the authToken, if available
@@ -507,41 +507,39 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
507
507
  return _context11.abrupt("return", false);
508
508
  case 3:
509
509
  if (!this.requestCache[authtoken]) {
510
- _context11.next = 6;
510
+ _context11.next = 5;
511
511
  break;
512
512
  }
513
- // If there's already a pending promise to refresh this token, return it
514
- console.log('RBTTOK Using cached promise for token refresh');
515
513
  return _context11.abrupt("return", this.requestCache[authtoken]);
516
- case 6:
517
- _context11.prev = 6;
518
- console.log('RBTTOK Req', authtoken);
514
+ case 5:
515
+ _context11.prev = 5;
516
+ //console.log('RBTTOK Req', authtoken);
519
517
  // Create a new promise for the token refresh and store it in the cache
520
518
  promise = this.axios.post('/user_service/refreshAuthToken', [authtoken]);
521
519
  this.requestCache[authtoken] = promise;
522
520
 
523
521
  // Await the promise to get the response
524
- _context11.next = 12;
522
+ _context11.next = 10;
525
523
  return promise;
526
- case 12:
524
+ case 10:
527
525
  response = _context11.sent;
528
- console.log('RBTTOK Response ', response);
526
+ //console.log('RBTTOK Response ',response);
529
527
  // Once the promise resolves, delete it from the cache to allow future refreshes
530
528
  delete this.requestCache[authtoken];
531
529
 
532
530
  // Return the response data
533
531
  return _context11.abrupt("return", response.data);
534
- case 18:
535
- _context11.prev = 18;
536
- _context11.t0 = _context11["catch"](6);
532
+ case 15:
533
+ _context11.prev = 15;
534
+ _context11.t0 = _context11["catch"](5);
537
535
  // On error, remove the cached promise to allow retries
538
536
  delete this.requestCache[authtoken];
539
537
  this._handleError(_context11.t0);
540
- case 22:
538
+ case 19:
541
539
  case "end":
542
540
  return _context11.stop();
543
541
  }
544
- }, _callee11, this, [[6, 18]]);
542
+ }, _callee11, this, [[5, 15]]);
545
543
  }));
546
544
  function refreshAuthToken(_x7) {
547
545
  return _refreshAuthToken.apply(this, arguments);
@@ -1038,7 +1036,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
1038
1036
  }
1039
1037
  if (status === 'DONE' && onDone) {
1040
1038
  // Provide the current progress to the callback function
1041
- console.log('Finish (request) ', response);
1039
+ //console.log('Finish (request) ',response);
1042
1040
  onDone(response);
1043
1041
  }
1044
1042
  return _context18.abrupt("return", {
@@ -1149,7 +1147,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
1149
1147
  // If the task is still in progress, start polling for updates
1150
1148
  if (response.status === 'DONE' && onDone) {
1151
1149
  // Provide the current progress to the callback function
1152
- console.log('Finish (progress) ', response);
1150
+ //console.log('Finish (progress) ',response);
1153
1151
  onDone(response);
1154
1152
  }
1155
1153
  if (response.status === 'ERROR' && onError) {
@@ -193,7 +193,7 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
193
193
  key: "setProgress",
194
194
  value: function setProgress(newProgress) {
195
195
  this.progress = newProgress;
196
- console.log("Progress: ".concat(this.progress * 100, "%"));
196
+ //console.log(`Progress: ${this.progress * 100}%`);
197
197
  this.emit('progress', this.progress); // Emit a progress event
198
198
  }
199
199
  }, {
@@ -457,20 +457,19 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
457
457
  "frameIndex": frameIndex,
458
458
  "frameData": "rpcBase64:".concat(base64Data),
459
459
  "timeout": 86400000
460
- }];
461
- console.log(payload);
462
- _context10.next = 5;
460
+ }]; //console.log(payload);
461
+ _context10.next = 4;
463
462
  return this._axios.post('/file_service/ffs_runFlow', payload);
464
- case 5:
463
+ case 4:
465
464
  response = _context10.sent;
466
465
  if (!(!response || response.status != 200)) {
467
- _context10.next = 8;
466
+ _context10.next = 7;
468
467
  break;
469
468
  }
470
469
  throw new Error('Error uploading frame to server');
471
- case 8:
470
+ case 7:
472
471
  return _context10.abrupt("return", response);
473
- case 9:
472
+ case 8:
474
473
  case "end":
475
474
  return _context10.stop();
476
475
  }
@@ -544,20 +543,19 @@ var RbtFile = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
544
543
  "fileObject": fileRecord,
545
544
  // using fileRecord from newFile.toRecord()
546
545
  "getStatusUpdate": true
547
- }];
548
- console.log(payload);
549
- _context13.next = 4;
546
+ }]; //console.log(payload);
547
+ _context13.next = 3;
550
548
  return this._axios.post('/file_service/ffs_runFlow', payload);
551
- case 4:
549
+ case 3:
552
550
  response = _context13.sent;
553
551
  if (!(!response || response.status != 200)) {
554
- _context13.next = 7;
552
+ _context13.next = 6;
555
553
  break;
556
554
  }
557
555
  throw new Error('Error getting upload status');
558
- case 7:
556
+ case 6:
559
557
  return _context13.abrupt("return", response);
560
- case 8:
558
+ case 7:
561
559
  case "end":
562
560
  return _context13.stop();
563
561
  }
@@ -33,7 +33,7 @@ export default class RbtApi {
33
33
  }
34
34
  this.localDb = null;
35
35
  this.iac_session = null;
36
- this.appServiceHost = null;
36
+ this.appServiceHost = baseUrl;
37
37
  this.requestCache = {};
38
38
 
39
39
  // Use the storageAdaptor to get the authToken, if available
@@ -229,18 +229,19 @@ export default class RbtApi {
229
229
  }
230
230
  if (this.requestCache[authtoken]) {
231
231
  // If there's already a pending promise to refresh this token, return it
232
- console.log('RBTTOK Using cached promise for token refresh');
232
+ //console.log('RBTTOK Using cached promise for token refresh');
233
233
  return this.requestCache[authtoken];
234
234
  }
235
235
  try {
236
- console.log('RBTTOK Req', authtoken);
236
+ //console.log('RBTTOK Req', authtoken);
237
237
  // Create a new promise for the token refresh and store it in the cache
238
238
  const promise = this.axios.post('/user_service/refreshAuthToken', [authtoken]);
239
239
  this.requestCache[authtoken] = promise;
240
240
 
241
241
  // Await the promise to get the response
242
242
  const response = await promise;
243
- console.log('RBTTOK Response ', response);
243
+
244
+ //console.log('RBTTOK Response ',response);
244
245
  // Once the promise resolves, delete it from the cache to allow future refreshes
245
246
  delete this.requestCache[authtoken];
246
247
 
@@ -601,7 +602,7 @@ export default class RbtApi {
601
602
  }
602
603
  if (status === 'DONE' && onDone) {
603
604
  // Provide the current progress to the callback function
604
- console.log('Finish (request) ', response);
605
+ //console.log('Finish (request) ',response);
605
606
  onDone(response);
606
607
  }
607
608
  return {
@@ -666,7 +667,7 @@ export default class RbtApi {
666
667
  // If the task is still in progress, start polling for updates
667
668
  if (response.status === 'DONE' && onDone) {
668
669
  // Provide the current progress to the callback function
669
- console.log('Finish (progress) ', response);
670
+ //console.log('Finish (progress) ',response);
670
671
  onDone(response);
671
672
  }
672
673
  if (response.status === 'ERROR' && onError) {
@@ -77,7 +77,7 @@ export default class RbtFile extends EventEmitter {
77
77
  }
78
78
  setProgress(newProgress) {
79
79
  this.progress = newProgress;
80
- console.log(`Progress: ${this.progress * 100}%`);
80
+ //console.log(`Progress: ${this.progress * 100}%`);
81
81
  this.emit('progress', this.progress); // Emit a progress event
82
82
  }
83
83
  async readAndStoreFile(file) {
@@ -189,7 +189,9 @@ export default class RbtFile extends EventEmitter {
189
189
  "frameData": `rpcBase64:${base64Data}`,
190
190
  "timeout": 86400000
191
191
  }];
192
- console.log(payload);
192
+
193
+ //console.log(payload);
194
+
193
195
  const response = await this._axios.post('/file_service/ffs_runFlow', payload);
194
196
  if (!response || response.status != 200) {
195
197
  throw new Error('Error uploading frame to server');
@@ -221,7 +223,9 @@ export default class RbtFile extends EventEmitter {
221
223
  // using fileRecord from newFile.toRecord()
222
224
  "getStatusUpdate": true
223
225
  }];
224
- console.log(payload);
226
+
227
+ //console.log(payload);
228
+
225
229
  const response = await this._axios.post('/file_service/ffs_runFlow', payload);
226
230
  if (!response || response.status != 200) {
227
231
  throw new Error('Error getting upload status');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roboto-js",
3
- "version": "1.4.48",
3
+ "version": "1.4.50",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.cjs",
package/src/rbt_api.js CHANGED
@@ -32,7 +32,7 @@ export default class RbtApi {
32
32
  }
33
33
  this.localDb = null;
34
34
  this.iac_session = null;
35
- this.appServiceHost = null;
35
+ this.appServiceHost = baseUrl;
36
36
  this.requestCache = {};
37
37
 
38
38
  // Use the storageAdaptor to get the authToken, if available
@@ -296,12 +296,12 @@ export default class RbtApi {
296
296
 
297
297
  if (this.requestCache[authtoken]) {
298
298
  // If there's already a pending promise to refresh this token, return it
299
- console.log('RBTTOK Using cached promise for token refresh');
299
+ //console.log('RBTTOK Using cached promise for token refresh');
300
300
  return this.requestCache[authtoken];
301
301
  }
302
302
 
303
303
  try {
304
- console.log('RBTTOK Req', authtoken);
304
+ //console.log('RBTTOK Req', authtoken);
305
305
  // Create a new promise for the token refresh and store it in the cache
306
306
  const promise = this.axios.post('/user_service/refreshAuthToken', [authtoken]);
307
307
  this.requestCache[authtoken] = promise;
@@ -309,7 +309,7 @@ export default class RbtApi {
309
309
  // Await the promise to get the response
310
310
  const response = await promise;
311
311
 
312
- console.log('RBTTOK Response ',response);
312
+ //console.log('RBTTOK Response ',response);
313
313
  // Once the promise resolves, delete it from the cache to allow future refreshes
314
314
  delete this.requestCache[authtoken];
315
315
 
@@ -655,7 +655,7 @@ export default class RbtApi {
655
655
  }
656
656
  if (status === 'DONE' && onDone){
657
657
  // Provide the current progress to the callback function
658
- console.log('Finish (request) ',response);
658
+ //console.log('Finish (request) ',response);
659
659
  onDone(response);
660
660
  }
661
661
 
@@ -710,7 +710,7 @@ export default class RbtApi {
710
710
  // If the task is still in progress, start polling for updates
711
711
  if (response.status === 'DONE' && onDone){
712
712
  // Provide the current progress to the callback function
713
- console.log('Finish (progress) ',response);
713
+ //console.log('Finish (progress) ',response);
714
714
  onDone(response);
715
715
  }
716
716
  if (response.status === 'ERROR' && onError){
package/src/rbt_file.js CHANGED
@@ -95,7 +95,7 @@ export default class RbtFile extends EventEmitter{
95
95
 
96
96
  setProgress(newProgress) {
97
97
  this.progress = newProgress;
98
- console.log(`Progress: ${this.progress * 100}%`);
98
+ //console.log(`Progress: ${this.progress * 100}%`);
99
99
  this.emit('progress', this.progress); // Emit a progress event
100
100
 
101
101
  }
@@ -224,7 +224,7 @@ export default class RbtFile extends EventEmitter{
224
224
  }
225
225
  ];
226
226
 
227
- console.log(payload);
227
+ //console.log(payload);
228
228
 
229
229
  const response = await this._axios.post('/file_service/ffs_runFlow', payload);
230
230
 
@@ -270,7 +270,7 @@ export default class RbtFile extends EventEmitter{
270
270
  }
271
271
  ];
272
272
 
273
- console.log(payload);
273
+ //console.log(payload);
274
274
 
275
275
  const response = await this._axios.post('/file_service/ffs_runFlow', payload);
276
276