@abtnode/core 1.16.21-beta-93c6e42b → 1.16.21-beta-2e75c75c

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/api/team.js CHANGED
@@ -1399,7 +1399,7 @@ class TeamAPI extends EventEmitter {
1399
1399
 
1400
1400
  const userSessions = await state.model.findAll({
1401
1401
  where,
1402
- attributes: ['id', 'appPid', 'userDid', 'visitorId', 'passportId', 'updatedAt'],
1402
+ attributes: ['id', 'appPid', 'userDid', 'visitorId', 'passportId', 'updatedAt', 'extra'],
1403
1403
  include: {
1404
1404
  model: userState.model,
1405
1405
  as: 'user',
@@ -1442,10 +1442,11 @@ class TeamAPI extends EventEmitter {
1442
1442
  * @param {string} params.lastLoginIp - 记录的 userSession 中当前用户的最后登录 ip
1443
1443
  * @param {string} params.passportId - 记录的 userSession 中当前用户登录所使用的 passportId
1444
1444
  * @param {string} params.status - 记录的 userSession 的状态
1445
+ * @param {Object} params.extra - 记录的 userSession 额外的数据
1445
1446
  * @returns
1446
1447
  */
1447
1448
 
1448
- async upsertUserSession({ teamDid, appPid, userDid, visitorId, ua, lastLoginIp, passportId, status }) {
1449
+ async upsertUserSession({ teamDid, appPid, userDid, visitorId, ua, lastLoginIp, passportId, status, extra }) {
1449
1450
  if (!userDid) {
1450
1451
  throw new Error('userDid are required');
1451
1452
  }
@@ -1459,13 +1460,14 @@ class TeamAPI extends EventEmitter {
1459
1460
  lastLoginIp,
1460
1461
  appPid,
1461
1462
  passportId,
1463
+ extra,
1462
1464
  });
1463
- logger.info('insert userSession successfully', { userDid, ua, lastLoginIp, appPid, passportId });
1465
+ logger.info('insert userSession successfully', { userDid, ua, lastLoginIp, appPid, passportId, extra });
1464
1466
  } else {
1465
1467
  const exist = await state.findOne({ userDid, visitorId, appPid });
1466
1468
  if (exist) {
1467
- [, [data]] = await state.update(exist.id, { ua, lastLoginIp, passportId, status });
1468
- logger.info('update userSession successfully', { id: exist.id, ua, lastLoginIp, passportId, status });
1469
+ [, [data]] = await state.update(exist.id, { ua, lastLoginIp, passportId, status, extra });
1470
+ logger.info('update userSession successfully', { id: exist.id, ua, lastLoginIp, passportId, status, extra });
1469
1471
  } else {
1470
1472
  data = await state.insert({
1471
1473
  visitorId,
@@ -1474,8 +1476,17 @@ class TeamAPI extends EventEmitter {
1474
1476
  lastLoginIp,
1475
1477
  appPid,
1476
1478
  passportId,
1479
+ extra,
1480
+ });
1481
+ logger.info('insert userSession successfully', {
1482
+ visitorId,
1483
+ userDid,
1484
+ ua,
1485
+ lastLoginIp,
1486
+ appPid,
1487
+ passportId,
1488
+ extra,
1477
1489
  });
1478
- logger.info('insert userSession successfully', { visitorId, userDid, ua, lastLoginIp, appPid, passportId });
1479
1490
  }
1480
1491
  }
1481
1492
 
@@ -1491,9 +1502,10 @@ class TeamAPI extends EventEmitter {
1491
1502
  * @param {string} params.ua - 同步的 userSession 中当前用户所使用设备的 ua
1492
1503
  * @param {string} params.lastLoginIp - 同步的 userSession 中当前用户的最后登录 ip
1493
1504
  * @param {string} params.passportId - 同步的 userSession 中当前用户登录所使用的 passportId
1505
+ * @param {object} params.extra - 同步的 userSession 中当前用户登录额外的数据
1494
1506
  * @returns
1495
1507
  */
1496
- async syncUserSession({ teamDid, targetAppPid, userDid, visitorId, ua, lastLoginIp, passportId }) {
1508
+ async syncUserSession({ teamDid, targetAppPid, userDid, visitorId, ua, lastLoginIp, passportId, extra }) {
1497
1509
  if (!targetAppPid) return;
1498
1510
 
1499
1511
  const blocklet = await getBlocklet({ did: teamDid, states: this.states, dataDirs: this.dataDirs });
@@ -1526,6 +1538,7 @@ class TeamAPI extends EventEmitter {
1526
1538
  lastLoginIp,
1527
1539
  appPid,
1528
1540
  passportId,
1541
+ extra,
1529
1542
  };
1530
1543
  await callFederated({
1531
1544
  action: 'sync',
@@ -1543,6 +1556,7 @@ class TeamAPI extends EventEmitter {
1543
1556
  appPid,
1544
1557
  passportId,
1545
1558
  targetSite,
1559
+ extra,
1546
1560
  });
1547
1561
  } catch (err) {
1548
1562
  logger.info(
@@ -1555,6 +1569,7 @@ class TeamAPI extends EventEmitter {
1555
1569
  appPid,
1556
1570
  passportId,
1557
1571
  targetSite,
1572
+ extra,
1558
1573
  },
1559
1574
  err
1560
1575
  );
@@ -2712,7 +2712,7 @@ class DiskBlockletManager extends BaseBlockletManager {
2712
2712
  };
2713
2713
 
2714
2714
  const action = `/blocklets/${did}/components?checkUpdate=1`;
2715
- const blockletDashboardAction = `/blocklets/${did}/components?checkUpdate=1`;
2715
+ const blockletDashboardAction = '/.well-known/service/admin/components?checkUpdate=1';
2716
2716
  const users = await this.teamManager.getOwnerAndAdminUsers(did, 1);
2717
2717
  const nodeInfo = await states.node.read();
2718
2718
  const { wallet } = getBlockletInfo(blocklet, nodeInfo.sk);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.21-beta-93c6e42b",
6
+ "version": "1.16.21-beta-2e75c75c",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,39 +19,39 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@abtnode/analytics": "1.16.21-beta-93c6e42b",
23
- "@abtnode/auth": "1.16.21-beta-93c6e42b",
24
- "@abtnode/certificate-manager": "1.16.21-beta-93c6e42b",
25
- "@abtnode/constant": "1.16.21-beta-93c6e42b",
26
- "@abtnode/cron": "1.16.21-beta-93c6e42b",
27
- "@abtnode/logger": "1.16.21-beta-93c6e42b",
28
- "@abtnode/models": "1.16.21-beta-93c6e42b",
29
- "@abtnode/queue": "1.16.21-beta-93c6e42b",
30
- "@abtnode/rbac": "1.16.21-beta-93c6e42b",
31
- "@abtnode/router-provider": "1.16.21-beta-93c6e42b",
32
- "@abtnode/static-server": "1.16.21-beta-93c6e42b",
33
- "@abtnode/timemachine": "1.16.21-beta-93c6e42b",
34
- "@abtnode/util": "1.16.21-beta-93c6e42b",
35
- "@arcblock/did": "1.18.107",
36
- "@arcblock/did-auth": "1.18.107",
37
- "@arcblock/did-ext": "^1.18.107",
22
+ "@abtnode/analytics": "1.16.21-beta-2e75c75c",
23
+ "@abtnode/auth": "1.16.21-beta-2e75c75c",
24
+ "@abtnode/certificate-manager": "1.16.21-beta-2e75c75c",
25
+ "@abtnode/constant": "1.16.21-beta-2e75c75c",
26
+ "@abtnode/cron": "1.16.21-beta-2e75c75c",
27
+ "@abtnode/logger": "1.16.21-beta-2e75c75c",
28
+ "@abtnode/models": "1.16.21-beta-2e75c75c",
29
+ "@abtnode/queue": "1.16.21-beta-2e75c75c",
30
+ "@abtnode/rbac": "1.16.21-beta-2e75c75c",
31
+ "@abtnode/router-provider": "1.16.21-beta-2e75c75c",
32
+ "@abtnode/static-server": "1.16.21-beta-2e75c75c",
33
+ "@abtnode/timemachine": "1.16.21-beta-2e75c75c",
34
+ "@abtnode/util": "1.16.21-beta-2e75c75c",
35
+ "@arcblock/did": "1.18.108",
36
+ "@arcblock/did-auth": "1.18.108",
37
+ "@arcblock/did-ext": "^1.18.108",
38
38
  "@arcblock/did-motif": "^1.1.13",
39
- "@arcblock/did-util": "1.18.107",
40
- "@arcblock/event-hub": "1.18.107",
41
- "@arcblock/jwt": "^1.18.107",
39
+ "@arcblock/did-util": "1.18.108",
40
+ "@arcblock/event-hub": "1.18.108",
41
+ "@arcblock/jwt": "^1.18.108",
42
42
  "@arcblock/pm2-events": "^0.0.5",
43
- "@arcblock/validator": "^1.18.107",
44
- "@arcblock/vc": "1.18.107",
45
- "@blocklet/constant": "1.16.21-beta-93c6e42b",
46
- "@blocklet/env": "1.16.21-beta-93c6e42b",
47
- "@blocklet/meta": "1.16.21-beta-93c6e42b",
48
- "@blocklet/resolver": "1.16.21-beta-93c6e42b",
49
- "@blocklet/sdk": "1.16.21-beta-93c6e42b",
50
- "@did-space/client": "^0.3.45",
43
+ "@arcblock/validator": "^1.18.108",
44
+ "@arcblock/vc": "1.18.108",
45
+ "@blocklet/constant": "1.16.21-beta-2e75c75c",
46
+ "@blocklet/env": "1.16.21-beta-2e75c75c",
47
+ "@blocklet/meta": "1.16.21-beta-2e75c75c",
48
+ "@blocklet/resolver": "1.16.21-beta-2e75c75c",
49
+ "@blocklet/sdk": "1.16.21-beta-2e75c75c",
50
+ "@did-space/client": "^0.3.49",
51
51
  "@fidm/x509": "^1.2.1",
52
- "@ocap/mcrypto": "1.18.107",
53
- "@ocap/util": "1.18.107",
54
- "@ocap/wallet": "1.18.107",
52
+ "@ocap/mcrypto": "1.18.108",
53
+ "@ocap/util": "1.18.108",
54
+ "@ocap/wallet": "1.18.108",
55
55
  "@slack/webhook": "^5.0.4",
56
56
  "archiver": "^5.3.1",
57
57
  "axios": "^0.27.2",
@@ -102,5 +102,5 @@
102
102
  "jest": "^27.5.1",
103
103
  "unzipper": "^0.10.11"
104
104
  },
105
- "gitHead": "80619ce49f5a9224d3d817e5faea4422072b0553"
105
+ "gitHead": "1fca0b58e1ed4f7a9bb268829a7c84290a01c89d"
106
106
  }