roboto-js 1.4.20 → 1.4.22
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/rbt_api.cjs +15 -8
- package/dist/cjs/rbt_object.cjs +2 -2
- package/dist/esm/rbt_api.js +4 -0
- package/dist/esm/rbt_object.js +1 -1
- package/package.json +1 -1
- package/src/rbt_api.js +5 -0
- package/src/rbt_object.js +1 -1
- package/package.next.json +0 -32
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -483,22 +483,29 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
483
483
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
484
484
|
while (1) switch (_context11.prev = _context11.next) {
|
|
485
485
|
case 0:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
486
|
+
if (this.appServiceHost) {
|
|
487
|
+
_context11.next = 3;
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
console.warn('appServiceHost not initialized');
|
|
491
|
+
return _context11.abrupt("return", false);
|
|
489
492
|
case 3:
|
|
493
|
+
_context11.prev = 3;
|
|
494
|
+
_context11.next = 6;
|
|
495
|
+
return this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|
|
496
|
+
case 6:
|
|
490
497
|
response = _context11.sent;
|
|
491
498
|
debugger;
|
|
492
499
|
return _context11.abrupt("return", response.data);
|
|
493
|
-
case 8:
|
|
494
|
-
_context11.prev = 8;
|
|
495
|
-
_context11.t0 = _context11["catch"](0);
|
|
496
|
-
this._handleError(_context11.t0);
|
|
497
500
|
case 11:
|
|
501
|
+
_context11.prev = 11;
|
|
502
|
+
_context11.t0 = _context11["catch"](3);
|
|
503
|
+
this._handleError(_context11.t0);
|
|
504
|
+
case 14:
|
|
498
505
|
case "end":
|
|
499
506
|
return _context11.stop();
|
|
500
507
|
}
|
|
501
|
-
}, _callee11, this, [[
|
|
508
|
+
}, _callee11, this, [[3, 11]]);
|
|
502
509
|
}));
|
|
503
510
|
function refreshAuthToken(_x7) {
|
|
504
511
|
return _refreshAuthToken.apply(this, arguments);
|
package/dist/cjs/rbt_object.cjs
CHANGED
|
@@ -137,7 +137,7 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
|
|
|
137
137
|
key: "save",
|
|
138
138
|
value: function () {
|
|
139
139
|
var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
140
|
-
var _response$data, _response$data2, record, response;
|
|
140
|
+
var _response$data, _response$data2, record, response, _e$response;
|
|
141
141
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
142
142
|
while (1) switch (_context.prev = _context.next) {
|
|
143
143
|
case 0:
|
|
@@ -178,7 +178,7 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
|
|
|
178
178
|
case 20:
|
|
179
179
|
_context.prev = 20;
|
|
180
180
|
_context.t0 = _context["catch"](2);
|
|
181
|
-
console.log('RbtObject.save.error:', _context.t0);
|
|
181
|
+
console.log('RbtObject.save.error:', _context.t0 === null || _context.t0 === void 0 || (_e$response = _context.t0.response) === null || _e$response === void 0 ? void 0 : _e$response.data);
|
|
182
182
|
this._error = _context.t0;
|
|
183
183
|
//console.log(e.response.data);
|
|
184
184
|
throw _context.t0;
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -215,6 +215,10 @@ export default class RbtApi {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
async refreshAuthToken(authtoken) {
|
|
218
|
+
if (!this.appServiceHost) {
|
|
219
|
+
console.warn('appServiceHost not initialized');
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
218
222
|
try {
|
|
219
223
|
const response = await this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|
|
220
224
|
debugger;
|
package/dist/esm/rbt_object.js
CHANGED
|
@@ -121,7 +121,7 @@ export default class RbtObject {
|
|
|
121
121
|
this.rpcMeta.isNew = false;
|
|
122
122
|
return this;
|
|
123
123
|
} catch (e) {
|
|
124
|
-
console.log('RbtObject.save.error:', e);
|
|
124
|
+
console.log('RbtObject.save.error:', e?.response?.data);
|
|
125
125
|
this._error = e;
|
|
126
126
|
//console.log(e.response.data);
|
|
127
127
|
throw e;
|
package/package.json
CHANGED
package/src/rbt_api.js
CHANGED
|
@@ -275,6 +275,11 @@ export default class RbtApi {
|
|
|
275
275
|
|
|
276
276
|
async refreshAuthToken(authtoken){
|
|
277
277
|
|
|
278
|
+
if(!this.appServiceHost){
|
|
279
|
+
console.warn('appServiceHost not initialized');
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
|
|
278
283
|
try {
|
|
279
284
|
|
|
280
285
|
const response = await this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|
package/src/rbt_object.js
CHANGED
package/package.next.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "roboto-js",
|
|
3
|
-
"version": "1.0.14",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "",
|
|
6
|
-
"main": "dist/cjs/index.cjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
"import": "./dist/esm/index.js",
|
|
9
|
-
"require": "./dist/cjs/index.cjs"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "npm run build:cjs && npm run build:esm",
|
|
13
|
-
"build:cjs": "babel src --out-dir dist/cjs --presets=@babel/preset-env --extensions \".js,.jsx\" --out-file-extension .cjs && npm run postbuild:cjs",
|
|
14
|
-
"build:esm": "babel src --out-dir dist/esm --presets=@babel/preset-env --no-babelrc --config-file ./babel.esm.config.json",
|
|
15
|
-
"postbuild:cjs": "node postbuild-cjs.js",
|
|
16
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
|
-
"prepublishOnly": "npm run build"
|
|
18
|
-
},
|
|
19
|
-
"author": "",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"axios": "^1.5.1",
|
|
23
|
-
"crypto-js": "^4.1.1",
|
|
24
|
-
"idb": "^8.0.0",
|
|
25
|
-
"lodash": "^4.17.21"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@babel/cli": "^7.23.0",
|
|
29
|
-
"@babel/core": "^7.23.2",
|
|
30
|
-
"@babel/preset-env": "^7.23.2"
|
|
31
|
-
}
|
|
32
|
-
}
|