roboto-js 1.8.12 → 1.9.0
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 +1 -1
- package/dist/cjs/index.cjs +2 -1
- package/dist/cjs/rbt_api.cjs +4 -2
- package/dist/esm/index.js +2 -1
- package/dist/esm/rbt_api.js +4 -2
- package/dist/index.js +7 -1
- package/package.json +1 -1
- package/src/index.js +2 -1
- package/src/rbt_api.js +3 -3
package/.last-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2025-11-
|
|
1
|
+
2025-11-14T13:39:56.113Z
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -112,7 +112,8 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
112
112
|
// Use passed accessKey
|
|
113
113
|
baseUrl: "https://".concat(host),
|
|
114
114
|
// Use passed host
|
|
115
|
-
localStorageAdaptor: storageAdaptor
|
|
115
|
+
localStorageAdaptor: storageAdaptor,
|
|
116
|
+
withCredentials: useCookies && isBrowser // Only use credentials in browser with cookies enabled
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
// Add apikey and authtoken if provided directly
|
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -44,7 +44,9 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
44
44
|
_ref$apikey = _ref.apikey,
|
|
45
45
|
apikey = _ref$apikey === void 0 ? null : _ref$apikey,
|
|
46
46
|
_ref$localStorageAdap = _ref.localStorageAdaptor,
|
|
47
|
-
localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap
|
|
47
|
+
localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap,
|
|
48
|
+
_ref$withCredentials = _ref.withCredentials,
|
|
49
|
+
withCredentials = _ref$withCredentials === void 0 ? false : _ref$withCredentials;
|
|
48
50
|
_classCallCheck(this, RbtApi);
|
|
49
51
|
this.websocketClient = null;
|
|
50
52
|
|
|
@@ -61,7 +63,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
61
63
|
headers: {
|
|
62
64
|
'accesskey': accesskey
|
|
63
65
|
},
|
|
64
|
-
withCredentials:
|
|
66
|
+
withCredentials: withCredentials // Opt-in: only send cookies when explicitly enabled
|
|
65
67
|
});
|
|
66
68
|
this.axios.__rbtApiInstance = this;
|
|
67
69
|
if (localStorageAdaptor) {
|
package/dist/esm/index.js
CHANGED
|
@@ -86,7 +86,8 @@ var Roboto = /*#__PURE__*/function () {
|
|
|
86
86
|
// Use passed accessKey
|
|
87
87
|
baseUrl: "https://".concat(host),
|
|
88
88
|
// Use passed host
|
|
89
|
-
localStorageAdaptor: storageAdaptor
|
|
89
|
+
localStorageAdaptor: storageAdaptor,
|
|
90
|
+
withCredentials: useCookies && isBrowser // Only use credentials in browser with cookies enabled
|
|
90
91
|
};
|
|
91
92
|
|
|
92
93
|
// Add apikey and authtoken if provided directly
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -37,7 +37,9 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
37
37
|
_ref$apikey = _ref.apikey,
|
|
38
38
|
apikey = _ref$apikey === void 0 ? null : _ref$apikey,
|
|
39
39
|
_ref$localStorageAdap = _ref.localStorageAdaptor,
|
|
40
|
-
localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap
|
|
40
|
+
localStorageAdaptor = _ref$localStorageAdap === void 0 ? null : _ref$localStorageAdap,
|
|
41
|
+
_ref$withCredentials = _ref.withCredentials,
|
|
42
|
+
withCredentials = _ref$withCredentials === void 0 ? false : _ref$withCredentials;
|
|
41
43
|
_classCallCheck(this, RbtApi);
|
|
42
44
|
this.websocketClient = null;
|
|
43
45
|
|
|
@@ -54,7 +56,7 @@ var RbtApi = /*#__PURE__*/function () {
|
|
|
54
56
|
headers: {
|
|
55
57
|
'accesskey': accesskey
|
|
56
58
|
},
|
|
57
|
-
withCredentials:
|
|
59
|
+
withCredentials: withCredentials // Opt-in: only send cookies when explicitly enabled
|
|
58
60
|
});
|
|
59
61
|
this.axios.__rbtApiInstance = this;
|
|
60
62
|
if (localStorageAdaptor) {
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,11 @@ 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
21
|
export { RbtApi, RbtObject, RbtFile, CookieStorageAdaptor
|
|
17
22
|
//User,
|
|
18
23
|
//Site
|
|
@@ -34,6 +39,7 @@ var Roboto = /*#__PURE__*/function () {
|
|
|
34
39
|
cookieDomain = _ref$cookieDomain === void 0 ? 'auto' : _ref$cookieDomain;
|
|
35
40
|
var proxyReq = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
36
41
|
_classCallCheck(this, Roboto);
|
|
42
|
+
console.log("[Roboto] v".concat(this.getVersion(), " initializing..."));
|
|
37
43
|
console.log('[Roboto] constructor', {
|
|
38
44
|
host: host,
|
|
39
45
|
accessKey: accessKey,
|
|
@@ -168,7 +174,7 @@ var Roboto = /*#__PURE__*/function () {
|
|
|
168
174
|
return _createClass(Roboto, [{
|
|
169
175
|
key: "getVersion",
|
|
170
176
|
value: function getVersion() {
|
|
171
|
-
return
|
|
177
|
+
return packageJson.version;
|
|
172
178
|
}
|
|
173
179
|
}, {
|
|
174
180
|
key: "setSiteEnv",
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -81,7 +81,8 @@ export default class Roboto{
|
|
|
81
81
|
this.config = {
|
|
82
82
|
accesskey: accessKey, // Use passed accessKey
|
|
83
83
|
baseUrl: `https://${host}`, // Use passed host
|
|
84
|
-
localStorageAdaptor: storageAdaptor
|
|
84
|
+
localStorageAdaptor: storageAdaptor,
|
|
85
|
+
withCredentials: useCookies && isBrowser // Only use credentials in browser with cookies enabled
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
// Add apikey and authtoken if provided directly
|
package/src/rbt_api.js
CHANGED
|
@@ -8,9 +8,9 @@ import { openDB } from 'idb';
|
|
|
8
8
|
|
|
9
9
|
export default class RbtApi {
|
|
10
10
|
|
|
11
|
-
constructor({ baseUrl, accesskey, authtoken=null, apikey=null, localStorageAdaptor=null }) {
|
|
11
|
+
constructor({ baseUrl, accesskey, authtoken=null, apikey=null, localStorageAdaptor=null, withCredentials=false }) {
|
|
12
12
|
|
|
13
|
-
console.log('[RbtApi] constructor received:', { baseUrl, accesskey, authtoken, apikey });
|
|
13
|
+
console.log('[RbtApi] constructor received:', { baseUrl, accesskey, authtoken, apikey, withCredentials });
|
|
14
14
|
|
|
15
15
|
this.websocketClient = null;
|
|
16
16
|
|
|
@@ -28,7 +28,7 @@ export default class RbtApi {
|
|
|
28
28
|
headers: {
|
|
29
29
|
'accesskey': accesskey
|
|
30
30
|
},
|
|
31
|
-
withCredentials:
|
|
31
|
+
withCredentials: withCredentials // Opt-in: only send cookies when explicitly enabled
|
|
32
32
|
});
|
|
33
33
|
this.axios.__rbtApiInstance = this;
|
|
34
34
|
|