@blocklet/js-sdk 1.16.42-beta-20250416-010627-a89e72e0 → 1.16.43-beta-20250419-231352-c78ac93d
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +11 -7
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -69,9 +69,10 @@ declare class AuthService {
|
|
|
69
69
|
* @param {{ visitorId: string, status: string }} { visitorId, status }
|
|
70
70
|
* @return {Promise<void>}
|
|
71
71
|
*/
|
|
72
|
-
logout({ visitorId, status }: {
|
|
72
|
+
logout({ visitorId, status, includeFederated, }: {
|
|
73
73
|
visitorId?: string;
|
|
74
74
|
status?: string;
|
|
75
|
+
includeFederated?: boolean;
|
|
75
76
|
}): Promise<void>;
|
|
76
77
|
/**
|
|
77
78
|
* 删除当前登录用户
|
package/dist/index.d.ts
CHANGED
|
@@ -69,9 +69,10 @@ declare class AuthService {
|
|
|
69
69
|
* @param {{ visitorId: string, status: string }} { visitorId, status }
|
|
70
70
|
* @return {Promise<void>}
|
|
71
71
|
*/
|
|
72
|
-
logout({ visitorId, status }: {
|
|
72
|
+
logout({ visitorId, status, includeFederated, }: {
|
|
73
73
|
visitorId?: string;
|
|
74
74
|
status?: string;
|
|
75
|
+
includeFederated?: boolean;
|
|
75
76
|
}): Promise<void>;
|
|
76
77
|
/**
|
|
77
78
|
* 删除当前登录用户
|
package/dist/index.mjs
CHANGED
|
@@ -83,8 +83,12 @@ class AuthService {
|
|
|
83
83
|
* @param {{ visitorId: string, status: string }} { visitorId, status }
|
|
84
84
|
* @return {Promise<void>}
|
|
85
85
|
*/
|
|
86
|
-
async logout({
|
|
87
|
-
|
|
86
|
+
async logout({
|
|
87
|
+
visitorId,
|
|
88
|
+
status,
|
|
89
|
+
includeFederated
|
|
90
|
+
}) {
|
|
91
|
+
const { data } = await this.api.post("/api/user/logout", { visitorId, status, includeFederated });
|
|
88
92
|
return data;
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
@@ -379,7 +383,7 @@ class FederatedService {
|
|
|
379
383
|
}
|
|
380
384
|
}
|
|
381
385
|
|
|
382
|
-
const version = "1.16.
|
|
386
|
+
const version = "1.16.42";
|
|
383
387
|
|
|
384
388
|
const sleep = (time = 0) => {
|
|
385
389
|
return new Promise((resolve) => {
|
|
@@ -429,10 +433,6 @@ const createAxios$1 = (options, requestParams) => {
|
|
|
429
433
|
"x-blocklet-js-sdk-version": version
|
|
430
434
|
};
|
|
431
435
|
const componentService = new ComponentService();
|
|
432
|
-
const visitorId = getVisitorId();
|
|
433
|
-
if (![void 0, null].includes(visitorId)) {
|
|
434
|
-
headers["x-blocklet-visitor-id"] = visitorId;
|
|
435
|
-
}
|
|
436
436
|
const instance = axios.create({
|
|
437
437
|
...options,
|
|
438
438
|
headers
|
|
@@ -466,6 +466,10 @@ const createAxios$1 = (options, requestParams) => {
|
|
|
466
466
|
config.baseURL = config.baseURL || componentService.getComponentMountPoint(componentDid);
|
|
467
467
|
config.timeout = config.timeout || 20 * 1e3;
|
|
468
468
|
config.headers["x-csrf-token"] = getCSRFToken();
|
|
469
|
+
const visitorId = getVisitorId();
|
|
470
|
+
if (![void 0, null].includes(visitorId)) {
|
|
471
|
+
config.headers["x-blocklet-visitor-id"] = visitorId;
|
|
472
|
+
}
|
|
469
473
|
return config;
|
|
470
474
|
},
|
|
471
475
|
(error) => Promise.reject(error)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/js-sdk",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.43-beta-20250419-231352-c78ac93d",
|
|
4
4
|
"main": "dist/index.mjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"watch": "nodemon -w src -e ts -x 'npm run build'"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@abtnode/constant": "1.16.
|
|
42
|
-
"@arcblock/did": "1.20.
|
|
43
|
-
"@blocklet/meta": "1.16.
|
|
44
|
-
"@ocap/wallet": "1.20.
|
|
41
|
+
"@abtnode/constant": "1.16.43-beta-20250419-231352-c78ac93d",
|
|
42
|
+
"@arcblock/did": "1.20.1",
|
|
43
|
+
"@blocklet/meta": "1.16.43-beta-20250419-231352-c78ac93d",
|
|
44
|
+
"@ocap/wallet": "1.20.1",
|
|
45
45
|
"axios": "^1.7.9",
|
|
46
46
|
"is-url": "^1.2.4",
|
|
47
47
|
"js-cookie": "^3.0.5",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"unbuild": "^2.0.0",
|
|
66
66
|
"vitest": "^2.0.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "207acad34e8ccf318cd7539c1ac717cee7951b53"
|
|
69
69
|
}
|