roboto-js 1.8.7 → 1.8.8
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 +14 -10
- package/dist/esm/index.js +14 -10
- package/dist/rbt_object.js +3 -1
- package/package.json +1 -1
- package/src/index.js +13 -10
package/.last-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2025-11-
|
|
1
|
+
2025-11-12T07:28:57.602Z
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -102,19 +102,23 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
102
102
|
this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
|
|
103
103
|
|
|
104
104
|
// Check if a request object is provided
|
|
105
|
-
if (proxyReq
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
if (proxyReq) {
|
|
106
|
+
var _proxyReq$headers, _proxyReq$headers2, _proxyReq$headers3;
|
|
107
|
+
// First priority: properties set by middleware (supports cookie-based auth)
|
|
108
|
+
// Second priority: custom headers (backward compatibility)
|
|
109
|
+
var req_authtoken = proxyReq.authToken || ((_proxyReq$headers = proxyReq.headers) === null || _proxyReq$headers === void 0 ? void 0 : _proxyReq$headers.authtoken);
|
|
110
|
+
var req_accesskey = proxyReq.accessKey || ((_proxyReq$headers2 = proxyReq.headers) === null || _proxyReq$headers2 === void 0 ? void 0 : _proxyReq$headers2.accesskey);
|
|
111
|
+
var req_apikey = proxyReq.apiKey || ((_proxyReq$headers3 = proxyReq.headers) === null || _proxyReq$headers3 === void 0 ? void 0 : _proxyReq$headers3.apikey);
|
|
112
|
+
|
|
109
113
|
// Optionally add more headers as needed
|
|
110
|
-
if (
|
|
111
|
-
this.config.authtoken =
|
|
114
|
+
if (req_authtoken) {
|
|
115
|
+
this.config.authtoken = req_authtoken; // Set the authtoken in the config
|
|
112
116
|
}
|
|
113
|
-
if (
|
|
114
|
-
this.config.apikey =
|
|
117
|
+
if (req_apikey) {
|
|
118
|
+
this.config.apikey = req_apikey; // Set the apikey in the config
|
|
115
119
|
}
|
|
116
|
-
if (
|
|
117
|
-
this.config.accesskey =
|
|
120
|
+
if (req_accesskey) {
|
|
121
|
+
this.config.accesskey = req_accesskey; // Set the accesskey in the config
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
this.api = new _rbt_api["default"](this.config);
|
package/dist/esm/index.js
CHANGED
|
@@ -75,19 +75,23 @@ var Roboto = /*#__PURE__*/function () {
|
|
|
75
75
|
this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
|
|
76
76
|
|
|
77
77
|
// Check if a request object is provided
|
|
78
|
-
if (proxyReq
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
if (proxyReq) {
|
|
79
|
+
var _proxyReq$headers, _proxyReq$headers2, _proxyReq$headers3;
|
|
80
|
+
// First priority: properties set by middleware (supports cookie-based auth)
|
|
81
|
+
// Second priority: custom headers (backward compatibility)
|
|
82
|
+
var req_authtoken = proxyReq.authToken || ((_proxyReq$headers = proxyReq.headers) === null || _proxyReq$headers === void 0 ? void 0 : _proxyReq$headers.authtoken);
|
|
83
|
+
var req_accesskey = proxyReq.accessKey || ((_proxyReq$headers2 = proxyReq.headers) === null || _proxyReq$headers2 === void 0 ? void 0 : _proxyReq$headers2.accesskey);
|
|
84
|
+
var req_apikey = proxyReq.apiKey || ((_proxyReq$headers3 = proxyReq.headers) === null || _proxyReq$headers3 === void 0 ? void 0 : _proxyReq$headers3.apikey);
|
|
85
|
+
|
|
82
86
|
// Optionally add more headers as needed
|
|
83
|
-
if (
|
|
84
|
-
this.config.authtoken =
|
|
87
|
+
if (req_authtoken) {
|
|
88
|
+
this.config.authtoken = req_authtoken; // Set the authtoken in the config
|
|
85
89
|
}
|
|
86
|
-
if (
|
|
87
|
-
this.config.apikey =
|
|
90
|
+
if (req_apikey) {
|
|
91
|
+
this.config.apikey = req_apikey; // Set the apikey in the config
|
|
88
92
|
}
|
|
89
|
-
if (
|
|
90
|
-
this.config.accesskey =
|
|
93
|
+
if (req_accesskey) {
|
|
94
|
+
this.config.accesskey = req_accesskey; // Set the accesskey in the config
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
this.api = new RbtApi(this.config);
|
package/dist/rbt_object.js
CHANGED
|
@@ -66,7 +66,9 @@ var RbtObject = /*#__PURE__*/function () {
|
|
|
66
66
|
return _createClass(RbtObject, [{
|
|
67
67
|
key: "get",
|
|
68
68
|
value: function get(path) {
|
|
69
|
-
|
|
69
|
+
var value = _.get(this._data, path);
|
|
70
|
+
// Return a deep clone to prevent reference issues when modifying returned objects
|
|
71
|
+
return _.cloneDeep(value);
|
|
70
72
|
}
|
|
71
73
|
}, {
|
|
72
74
|
key: "getData",
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -70,19 +70,22 @@ export default class Roboto{
|
|
|
70
70
|
this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
|
|
71
71
|
|
|
72
72
|
// Check if a request object is provided
|
|
73
|
-
if (proxyReq
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
73
|
+
if (proxyReq) {
|
|
74
|
+
// First priority: properties set by middleware (supports cookie-based auth)
|
|
75
|
+
// Second priority: custom headers (backward compatibility)
|
|
76
|
+
const req_authtoken = proxyReq.authToken || proxyReq.headers?.authtoken;
|
|
77
|
+
const req_accesskey = proxyReq.accessKey || proxyReq.headers?.accesskey;
|
|
78
|
+
const req_apikey = proxyReq.apiKey || proxyReq.headers?.apikey;
|
|
79
|
+
|
|
77
80
|
// Optionally add more headers as needed
|
|
78
|
-
if (
|
|
79
|
-
this.config.authtoken =
|
|
81
|
+
if (req_authtoken) {
|
|
82
|
+
this.config.authtoken = req_authtoken; // Set the authtoken in the config
|
|
80
83
|
}
|
|
81
|
-
if (
|
|
82
|
-
this.config.apikey =
|
|
84
|
+
if (req_apikey) {
|
|
85
|
+
this.config.apikey = req_apikey; // Set the apikey in the config
|
|
83
86
|
}
|
|
84
|
-
if (
|
|
85
|
-
this.config.accesskey =
|
|
87
|
+
if (req_accesskey) {
|
|
88
|
+
this.config.accesskey = req_accesskey; // Set the accesskey in the config
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
}
|