@vc-shell/framework 1.0.130 → 1.0.131
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.0.131](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.130...v1.0.131) (2023-12-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **shell:** interceptor method name fix ([293ba14](https://github.com/VirtoCommerce/vc-shell/commit/293ba14952c779141b6be417653e317afd2e98e9))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [1.0.130](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.129...v1.0.130) (2023-12-27)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -113,10 +113,11 @@ function useUserFn(): IUseUser {
|
|
|
113
113
|
async function signOut(): Promise<void> {
|
|
114
114
|
console.debug(`[@vc-shell/framework#useUser:signOut] - Entry point`);
|
|
115
115
|
|
|
116
|
+
user.value = undefined;
|
|
117
|
+
|
|
116
118
|
if (externalSignInStorage.value?.providerType) {
|
|
117
119
|
await externalSignOut(externalSignInStorage.value.providerType);
|
|
118
120
|
} else {
|
|
119
|
-
user.value = undefined;
|
|
120
121
|
securityClient.logout();
|
|
121
122
|
}
|
|
122
123
|
}
|
|
@@ -236,7 +237,6 @@ function useUserFn(): IUseUser {
|
|
|
236
237
|
loading: computed(() => loading.value),
|
|
237
238
|
isAdministrator: computed(() => user.value?.isAdministrator),
|
|
238
239
|
isAuthenticated,
|
|
239
|
-
// getAccessToken,
|
|
240
240
|
loadUser,
|
|
241
241
|
signIn,
|
|
242
242
|
signOut,
|
|
@@ -4,7 +4,7 @@ import { useUser } from "../composables/useUser";
|
|
|
4
4
|
import { notification } from "../../shared";
|
|
5
5
|
|
|
6
6
|
export function registerInterceptors(router: Router) {
|
|
7
|
-
const { fetch } = window;
|
|
7
|
+
const { fetch: originalFetch } = window;
|
|
8
8
|
const { signOut, isAuthenticated } = useUser();
|
|
9
9
|
|
|
10
10
|
window.fetch = async (...args) => {
|
|
@@ -29,7 +29,7 @@ export function registerInterceptors(router: Router) {
|
|
|
29
29
|
});
|
|
30
30
|
} else if (args[0] === "/api/platform/security/currentuser") {
|
|
31
31
|
notification.warning(
|
|
32
|
-
"You are currently in DEMO mode until the first page refresh. \n All API calls are disabled. Please
|
|
32
|
+
"You are currently in DEMO mode until the first page refresh. \n All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.",
|
|
33
33
|
{
|
|
34
34
|
timeout: 10000,
|
|
35
35
|
},
|
|
@@ -46,7 +46,7 @@ export function registerInterceptors(router: Router) {
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
} else {
|
|
49
|
-
const response = await
|
|
49
|
+
const response = await originalFetch(...args);
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* If the response is unauthorized, logout the user
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Router } from "vue-router";
|
|
2
|
-
export declare function registerInterceptors(router: Router): ((input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof
|
|
2
|
+
export declare function registerInterceptors(router: Router): ((input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof fetch;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,oGAqElD"}
|
package/dist/framework.js
CHANGED
|
@@ -45366,7 +45366,7 @@ function Qj() {
|
|
|
45366
45366
|
}
|
|
45367
45367
|
}
|
|
45368
45368
|
async function c() {
|
|
45369
|
-
console.debug("[@vc-shell/framework#useUser:signOut] - Entry point"), i.value?.providerType ? await v(i.value.providerType) :
|
|
45369
|
+
console.debug("[@vc-shell/framework#useUser:signOut] - Entry point"), ci.value = void 0, i.value?.providerType ? await v(i.value.providerType) : e.logout();
|
|
45370
45370
|
}
|
|
45371
45371
|
async function l() {
|
|
45372
45372
|
console.debug("[@vc-shell/framework#useUser:loadUser] - Entry point");
|
|
@@ -45447,7 +45447,6 @@ function Qj() {
|
|
|
45447
45447
|
loading: me(() => n.value),
|
|
45448
45448
|
isAdministrator: me(() => ci.value?.isAdministrator),
|
|
45449
45449
|
isAuthenticated: o,
|
|
45450
|
-
// getAccessToken,
|
|
45451
45450
|
loadUser: l,
|
|
45452
45451
|
signIn: m,
|
|
45453
45452
|
signOut: c,
|
|
@@ -55781,7 +55780,7 @@ function fq(n) {
|
|
|
55781
55780
|
text: async () => JSON.stringify({ succeeded: !0 })
|
|
55782
55781
|
}) : i[0] === "/api/platform/security/currentuser" ? (hr.warning(
|
|
55783
55782
|
`You are currently in DEMO mode until the first page refresh.
|
|
55784
|
-
All API calls are disabled. Please
|
|
55783
|
+
All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.`,
|
|
55785
55784
|
{
|
|
55786
55785
|
timeout: 1e4
|
|
55787
55786
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.131",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"whatwg-fetch": "^3.6.19"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
57
|
-
"@vc-shell/config-generator": "^1.0.
|
|
58
|
-
"@vc-shell/ts-config": "^1.0.
|
|
56
|
+
"@vc-shell/api-client-generator": "^1.0.131",
|
|
57
|
+
"@vc-shell/config-generator": "^1.0.131",
|
|
58
|
+
"@vc-shell/ts-config": "^1.0.131",
|
|
59
59
|
"@vitejs/plugin-vue": "^4.5.1",
|
|
60
60
|
"sass": "^1.69.5",
|
|
61
61
|
"typescript": "5.3.3",
|