@etsoo/appscript 1.6.34 → 1.6.36
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/lib/cjs/app/CoreApp.js +7 -1
- package/lib/mjs/app/CoreApp.js +7 -1
- package/package.json +6 -6
- package/src/app/CoreApp.ts +6 -1
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -744,7 +744,12 @@ class CoreApp {
|
|
|
744
744
|
this.api.authorize(schema, token);
|
|
745
745
|
// Overwrite the current value
|
|
746
746
|
if (refreshToken !== "") {
|
|
747
|
-
|
|
747
|
+
if (refreshToken == null) {
|
|
748
|
+
this.clearCacheToken();
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
this.saveCacheToken(refreshToken);
|
|
752
|
+
}
|
|
748
753
|
}
|
|
749
754
|
// Reset tryLogin state
|
|
750
755
|
this._isTryingLogin = false;
|
|
@@ -878,6 +883,7 @@ class CoreApp {
|
|
|
878
883
|
* Clear cached token
|
|
879
884
|
*/
|
|
880
885
|
clearCacheToken() {
|
|
886
|
+
this.saveCacheToken(undefined);
|
|
881
887
|
this.storage.setPersistedData(this.fields.headerToken, undefined);
|
|
882
888
|
}
|
|
883
889
|
/**
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -741,7 +741,12 @@ export class CoreApp {
|
|
|
741
741
|
this.api.authorize(schema, token);
|
|
742
742
|
// Overwrite the current value
|
|
743
743
|
if (refreshToken !== "") {
|
|
744
|
-
|
|
744
|
+
if (refreshToken == null) {
|
|
745
|
+
this.clearCacheToken();
|
|
746
|
+
}
|
|
747
|
+
else {
|
|
748
|
+
this.saveCacheToken(refreshToken);
|
|
749
|
+
}
|
|
745
750
|
}
|
|
746
751
|
// Reset tryLogin state
|
|
747
752
|
this._isTryingLogin = false;
|
|
@@ -875,6 +880,7 @@ export class CoreApp {
|
|
|
875
880
|
* Clear cached token
|
|
876
881
|
*/
|
|
877
882
|
clearCacheToken() {
|
|
883
|
+
this.saveCacheToken(undefined);
|
|
878
884
|
this.storage.setPersistedData(this.fields.headerToken, undefined);
|
|
879
885
|
}
|
|
880
886
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.36",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/ETSOO/AppScript#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@etsoo/notificationbase": "^1.1.
|
|
39
|
-
"@etsoo/restclient": "^1.1.
|
|
40
|
-
"@etsoo/shared": "^1.2.
|
|
38
|
+
"@etsoo/notificationbase": "^1.1.62",
|
|
39
|
+
"@etsoo/restclient": "^1.1.29",
|
|
40
|
+
"@etsoo/shared": "^1.2.74",
|
|
41
41
|
"crypto-js": "^4.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@babel/preset-env": "^7.27.2",
|
|
48
48
|
"@babel/runtime-corejs3": "^7.27.1",
|
|
49
49
|
"@types/crypto-js": "^4.2.2",
|
|
50
|
-
"@vitejs/plugin-react": "^4.
|
|
50
|
+
"@vitejs/plugin-react": "^4.5.0",
|
|
51
51
|
"jsdom": "^26.1.0",
|
|
52
52
|
"typescript": "^5.8.3",
|
|
53
|
-
"vitest": "^3.1.
|
|
53
|
+
"vitest": "^3.1.4"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -1127,7 +1127,11 @@ export abstract class CoreApp<
|
|
|
1127
1127
|
|
|
1128
1128
|
// Overwrite the current value
|
|
1129
1129
|
if (refreshToken !== "") {
|
|
1130
|
-
|
|
1130
|
+
if (refreshToken == null) {
|
|
1131
|
+
this.clearCacheToken();
|
|
1132
|
+
} else {
|
|
1133
|
+
this.saveCacheToken(refreshToken);
|
|
1134
|
+
}
|
|
1131
1135
|
}
|
|
1132
1136
|
|
|
1133
1137
|
// Reset tryLogin state
|
|
@@ -1293,6 +1297,7 @@ export abstract class CoreApp<
|
|
|
1293
1297
|
* Clear cached token
|
|
1294
1298
|
*/
|
|
1295
1299
|
clearCacheToken() {
|
|
1300
|
+
this.saveCacheToken(undefined);
|
|
1296
1301
|
this.storage.setPersistedData(this.fields.headerToken, undefined);
|
|
1297
1302
|
}
|
|
1298
1303
|
|