roboto-js 1.9.3 → 1.9.4

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/.last-build CHANGED
@@ -1 +1 @@
1
- 2025-11-14T13:39:56.113Z
1
+ 2025-12-02T08:26:07.999Z
@@ -481,6 +481,7 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
481
481
  replace,
482
482
  _options$save,
483
483
  save,
484
+ currentIac,
484
485
  iac,
485
486
  grantType,
486
487
  existingUsers,
@@ -505,8 +506,9 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
505
506
  }
506
507
  throw new Error('groupIds must be an array');
507
508
  case 6:
508
- // Get current IAC settings
509
- iac = this.get('iac') || {}; // Determine which grant type to update (read or write)
509
+ // Get current IAC settings and create a deep clone to ensure change detection
510
+ currentIac = this.get('iac') || {};
511
+ iac = _lodash["default"].cloneDeep(currentIac); // Determine which grant type to update (read or write)
510
512
  grantType = write ? 'writeGrants' : 'readGrants'; // Initialize grants if they don't exist
511
513
  if (!iac[grantType]) {
512
514
  iac[grantType] = {};
@@ -543,16 +545,16 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
543
545
 
544
546
  // Save if requested
545
547
  if (!save) {
546
- _context4.next = 16;
548
+ _context4.next = 17;
547
549
  break;
548
550
  }
549
- _context4.next = 15;
551
+ _context4.next = 16;
550
552
  return this.save();
551
- case 15:
552
- return _context4.abrupt("return", _context4.sent);
553
553
  case 16:
554
- return _context4.abrupt("return", this);
554
+ return _context4.abrupt("return", _context4.sent);
555
555
  case 17:
556
+ return _context4.abrupt("return", this);
557
+ case 18:
556
558
  case "end":
557
559
  return _context4.stop();
558
560
  }
@@ -750,6 +752,7 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
750
752
  write,
751
753
  _options$save3,
752
754
  save,
755
+ currentIac,
753
756
  iac,
754
757
  grantType,
755
758
  _args7 = arguments;
@@ -770,8 +773,9 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
770
773
  }
771
774
  throw new Error('groupIds must be an array');
772
775
  case 6:
773
- // Get current IAC settings
774
- iac = this.get('iac') || {}; // Determine which grant type to update (read or write)
776
+ // Get current IAC settings and create a deep clone to ensure change detection
777
+ currentIac = this.get('iac') || {};
778
+ iac = _lodash["default"].cloneDeep(currentIac); // Determine which grant type to update (read or write)
775
779
  grantType = write ? 'writeGrants' : 'readGrants'; // Initialize grants if they don't exist
776
780
  if (!iac[grantType]) {
777
781
  iac[grantType] = {};
@@ -796,16 +800,16 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
796
800
 
797
801
  // Save if requested
798
802
  if (!save) {
799
- _context7.next = 16;
803
+ _context7.next = 17;
800
804
  break;
801
805
  }
802
- _context7.next = 15;
806
+ _context7.next = 16;
803
807
  return this.save();
804
- case 15:
805
- return _context7.abrupt("return", _context7.sent);
806
808
  case 16:
807
- return _context7.abrupt("return", this);
809
+ return _context7.abrupt("return", _context7.sent);
808
810
  case 17:
811
+ return _context7.abrupt("return", this);
812
+ case 18:
809
813
  case "end":
810
814
  return _context7.stop();
811
815
  }
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = void 0;
7
7
  // Auto-generated version file
8
8
  // DO NOT EDIT - This file is automatically updated from package.cjson
9
- // Version: 1.9.3
10
- var version = exports.version = '1.9.3';
9
+ // Version: 1.9.4
10
+ var version = exports.version = '1.9.4';
@@ -474,6 +474,7 @@ var RbtObject = /*#__PURE__*/function () {
474
474
  replace,
475
475
  _options$save,
476
476
  save,
477
+ currentIac,
477
478
  iac,
478
479
  grantType,
479
480
  existingUsers,
@@ -498,8 +499,9 @@ var RbtObject = /*#__PURE__*/function () {
498
499
  }
499
500
  throw new Error('groupIds must be an array');
500
501
  case 6:
501
- // Get current IAC settings
502
- iac = this.get('iac') || {}; // Determine which grant type to update (read or write)
502
+ // Get current IAC settings and create a deep clone to ensure change detection
503
+ currentIac = this.get('iac') || {};
504
+ iac = _.cloneDeep(currentIac); // Determine which grant type to update (read or write)
503
505
  grantType = write ? 'writeGrants' : 'readGrants'; // Initialize grants if they don't exist
504
506
  if (!iac[grantType]) {
505
507
  iac[grantType] = {};
@@ -536,16 +538,16 @@ var RbtObject = /*#__PURE__*/function () {
536
538
 
537
539
  // Save if requested
538
540
  if (!save) {
539
- _context4.next = 16;
541
+ _context4.next = 17;
540
542
  break;
541
543
  }
542
- _context4.next = 15;
544
+ _context4.next = 16;
543
545
  return this.save();
544
- case 15:
545
- return _context4.abrupt("return", _context4.sent);
546
546
  case 16:
547
- return _context4.abrupt("return", this);
547
+ return _context4.abrupt("return", _context4.sent);
548
548
  case 17:
549
+ return _context4.abrupt("return", this);
550
+ case 18:
549
551
  case "end":
550
552
  return _context4.stop();
551
553
  }
@@ -743,6 +745,7 @@ var RbtObject = /*#__PURE__*/function () {
743
745
  write,
744
746
  _options$save3,
745
747
  save,
748
+ currentIac,
746
749
  iac,
747
750
  grantType,
748
751
  _args7 = arguments;
@@ -763,8 +766,9 @@ var RbtObject = /*#__PURE__*/function () {
763
766
  }
764
767
  throw new Error('groupIds must be an array');
765
768
  case 6:
766
- // Get current IAC settings
767
- iac = this.get('iac') || {}; // Determine which grant type to update (read or write)
769
+ // Get current IAC settings and create a deep clone to ensure change detection
770
+ currentIac = this.get('iac') || {};
771
+ iac = _.cloneDeep(currentIac); // Determine which grant type to update (read or write)
768
772
  grantType = write ? 'writeGrants' : 'readGrants'; // Initialize grants if they don't exist
769
773
  if (!iac[grantType]) {
770
774
  iac[grantType] = {};
@@ -789,16 +793,16 @@ var RbtObject = /*#__PURE__*/function () {
789
793
 
790
794
  // Save if requested
791
795
  if (!save) {
792
- _context7.next = 16;
796
+ _context7.next = 17;
793
797
  break;
794
798
  }
795
- _context7.next = 15;
799
+ _context7.next = 16;
796
800
  return this.save();
797
- case 15:
798
- return _context7.abrupt("return", _context7.sent);
799
801
  case 16:
800
- return _context7.abrupt("return", this);
802
+ return _context7.abrupt("return", _context7.sent);
801
803
  case 17:
804
+ return _context7.abrupt("return", this);
805
+ case 18:
802
806
  case "end":
803
807
  return _context7.stop();
804
808
  }
@@ -1,4 +1,4 @@
1
1
  // Auto-generated version file
2
2
  // DO NOT EDIT - This file is automatically updated from package.json
3
- // Version: 1.9.3
4
- export var version = '1.9.3';
3
+ // Version: 1.9.4
4
+ export var version = '1.9.4';
package/dist/index.js CHANGED
@@ -13,11 +13,7 @@ import RbtObject from './rbt_object.js';
13
13
  import RbtFile from './rbt_file.js';
14
14
  import RbtMetricsApi from './rbt_metrics_api.js';
15
15
  import CookieStorageAdaptor from './cookie_storage_adaptor.js';
16
- import { createRequire } from 'module';
17
-
18
- // Import package.json to get version automatically
19
- var require = createRequire(import.meta.url);
20
- var packageJson = require('../package.json');
16
+ import { version } from './version.js';
21
17
  export { RbtApi, RbtObject, RbtFile, CookieStorageAdaptor
22
18
  //User,
23
19
  //Site
@@ -104,7 +100,8 @@ var Roboto = /*#__PURE__*/function () {
104
100
  // Use passed accessKey
105
101
  baseUrl: "https://".concat(host),
106
102
  // Use passed host
107
- localStorageAdaptor: storageAdaptor
103
+ localStorageAdaptor: storageAdaptor,
104
+ withCredentials: useCookies && isBrowser // Enabled by default in browser (disable with useCookies: false)
108
105
  };
109
106
 
110
107
  // Add apikey and authtoken if provided directly
@@ -174,7 +171,7 @@ var Roboto = /*#__PURE__*/function () {
174
171
  return _createClass(Roboto, [{
175
172
  key: "getVersion",
176
173
  value: function getVersion() {
177
- return packageJson.version;
174
+ return version;
178
175
  }
179
176
  }, {
180
177
  key: "setSiteEnv",
package/dist/rbt_api.js CHANGED
@@ -38,13 +38,16 @@ var RbtApi = /*#__PURE__*/function () {
38
38
  _ref$apikey = _ref.apikey,
39
39
  apikey = _ref$apikey === void 0 ? null : _ref$apikey,
40
40
  _ref$localStorageAdap = _ref.localStorageAdaptor,
41
- localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap;
41
+ localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap,
42
+ _ref$withCredentials = _ref.withCredentials,
43
+ withCredentials = _ref$withCredentials === void 0 ? true : _ref$withCredentials;
42
44
  _classCallCheck(this, RbtApi);
43
45
  console.log('[RbtApi] constructor received:', {
44
46
  baseUrl: baseUrl,
45
47
  accesskey: accesskey,
46
48
  authtoken: authtoken,
47
- apikey: apikey
49
+ apikey: apikey,
50
+ withCredentials: withCredentials
48
51
  });
49
52
  this.websocketClient = null;
50
53
 
@@ -61,7 +64,7 @@ var RbtApi = /*#__PURE__*/function () {
61
64
  headers: {
62
65
  'accesskey': accesskey
63
66
  },
64
- withCredentials: true // Enable sending cookies in cross-origin requests
67
+ withCredentials: withCredentials // Send cookies by default (can be disabled with useCookies: false)
65
68
  });
66
69
  this.axios.__rbtApiInstance = this;
67
70
  if (localStorageAdaptor) {
@@ -0,0 +1,4 @@
1
+ // Auto-generated version file
2
+ // DO NOT EDIT - This file is automatically updated from package.json
3
+ // Version: 1.9.3
4
+ export var version = '1.9.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roboto-js",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.cjs",
package/src/rbt_object.js CHANGED
@@ -374,8 +374,9 @@ export default class RbtObject{
374
374
  throw new Error('groupIds must be an array');
375
375
  }
376
376
 
377
- // Get current IAC settings
378
- const iac = this.get('iac') || {};
377
+ // Get current IAC settings and create a deep clone to ensure change detection
378
+ const currentIac = this.get('iac') || {};
379
+ const iac = _.cloneDeep(currentIac);
379
380
 
380
381
  // Determine which grant type to update (read or write)
381
382
  const grantType = write ? 'writeGrants' : 'readGrants';
@@ -565,8 +566,9 @@ export default class RbtObject{
565
566
  throw new Error('groupIds must be an array');
566
567
  }
567
568
 
568
- // Get current IAC settings
569
- const iac = this.get('iac') || {};
569
+ // Get current IAC settings and create a deep clone to ensure change detection
570
+ const currentIac = this.get('iac') || {};
571
+ const iac = _.cloneDeep(currentIac);
570
572
 
571
573
  // Determine which grant type to update (read or write)
572
574
  const grantType = write ? 'writeGrants' : 'readGrants';
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Auto-generated version file
2
2
  // DO NOT EDIT - This file is automatically updated from package.json
3
- // Version: 1.9.3
4
- export const version = '1.9.3';
3
+ // Version: 1.9.4
4
+ export const version = '1.9.4';