@abtnode/core 1.16.29-beta-0070353c → 1.16.29-beta-e04c6f40
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
|
@@ -661,7 +661,7 @@ class TeamAPI extends EventEmitter {
|
|
|
661
661
|
* }
|
|
662
662
|
* @returns
|
|
663
663
|
*/
|
|
664
|
-
async createMemberInvitation({ teamDid, role, expireTime, remark }, context) {
|
|
664
|
+
async createMemberInvitation({ teamDid, role, expireTime, remark, sourceAppPid }, context) {
|
|
665
665
|
await this.teamManager.checkEnablePassportIssuance(teamDid);
|
|
666
666
|
|
|
667
667
|
if (expireTime && expireTime <= 0) {
|
|
@@ -696,6 +696,7 @@ class TeamAPI extends EventEmitter {
|
|
|
696
696
|
expireDate,
|
|
697
697
|
inviter: user,
|
|
698
698
|
teamDid,
|
|
699
|
+
sourceAppPid,
|
|
699
700
|
});
|
|
700
701
|
|
|
701
702
|
logger.info('Create invite member', { role, user, inviteId });
|
|
@@ -707,6 +708,7 @@ class TeamAPI extends EventEmitter {
|
|
|
707
708
|
expireDate: new Date(expireDate).toString(),
|
|
708
709
|
inviter: user,
|
|
709
710
|
teamDid,
|
|
711
|
+
sourceAppPid,
|
|
710
712
|
};
|
|
711
713
|
}
|
|
712
714
|
|
|
@@ -731,6 +733,7 @@ class TeamAPI extends EventEmitter {
|
|
|
731
733
|
teamDid: invitation.teamDid,
|
|
732
734
|
status: invitation.status,
|
|
733
735
|
receiver: invitation.receiver,
|
|
736
|
+
sourceAppPid: invitation.sourceAppPid || null,
|
|
734
737
|
};
|
|
735
738
|
}
|
|
736
739
|
|
|
@@ -749,6 +752,7 @@ class TeamAPI extends EventEmitter {
|
|
|
749
752
|
teamDid: d.teamDid,
|
|
750
753
|
status: d.status,
|
|
751
754
|
receiver: d.receiver,
|
|
755
|
+
sourceAppPid: d.sourceAppPid || null,
|
|
752
756
|
}));
|
|
753
757
|
}
|
|
754
758
|
|
|
@@ -204,6 +204,7 @@ const {
|
|
|
204
204
|
connectToStore,
|
|
205
205
|
publishToStore,
|
|
206
206
|
connectByStudio,
|
|
207
|
+
disconnectFromStore,
|
|
207
208
|
} = require('../project');
|
|
208
209
|
|
|
209
210
|
const { formatEnvironments, getBlockletMeta, validateOwner, isCLI } = util;
|
|
@@ -1983,6 +1984,10 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
1983
1984
|
return;
|
|
1984
1985
|
}
|
|
1985
1986
|
|
|
1987
|
+
if (getBlockletEngine(component.meta)?.interpreter === 'blocklet') {
|
|
1988
|
+
return;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1986
1991
|
try {
|
|
1987
1992
|
const status = await getProcessState(component.env.processId);
|
|
1988
1993
|
const oldStatus = component.status;
|
|
@@ -2399,6 +2404,10 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
2399
2404
|
return connectToStore({ ...params, manager: this });
|
|
2400
2405
|
}
|
|
2401
2406
|
|
|
2407
|
+
disconnectFromStore(params) {
|
|
2408
|
+
return disconnectFromStore({ ...params, manager: this });
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2402
2411
|
connectByStudio(params, context) {
|
|
2403
2412
|
return connectByStudio({ ...params, context, manager: this });
|
|
2404
2413
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const disconnectFromStore = async ({ did, storeId, projectId, manager }) => {
|
|
2
|
+
if (!did) {
|
|
3
|
+
throw new Error('Invalid did');
|
|
4
|
+
}
|
|
5
|
+
const { projectState } = await manager._getProjectState(did);
|
|
6
|
+
const project = await projectState.findOne({ id: projectId });
|
|
7
|
+
project.connectedStores = (project.connectedStores || []).filter((x) => x.storeId !== storeId);
|
|
8
|
+
await projectState.updateProject(projectId, project);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
module.exports = disconnectFromStore;
|
|
@@ -28,6 +28,7 @@ const createPackRelease = require('./create-pack-release');
|
|
|
28
28
|
const connectToStore = require('./connect-to-store');
|
|
29
29
|
const publishToStore = require('./publish-to-store');
|
|
30
30
|
const connectByStudio = require('./connect-by-studio');
|
|
31
|
+
const disconnectFromStore = require('./disconnect-from-store');
|
|
31
32
|
|
|
32
33
|
const COMPONENT_CONFIG_MAP_DIR = '.component_config';
|
|
33
34
|
|
|
@@ -528,6 +529,7 @@ module.exports = {
|
|
|
528
529
|
updateSelectedResources: ensureProjectCreateBy(updateSelectedResources),
|
|
529
530
|
deleteProject,
|
|
530
531
|
connectToStore,
|
|
532
|
+
disconnectFromStore,
|
|
531
533
|
connectByStudio,
|
|
532
534
|
publishToStore,
|
|
533
535
|
};
|
package/lib/index.js
CHANGED
|
@@ -346,6 +346,7 @@ function ABTNode(options) {
|
|
|
346
346
|
updateProject: blockletManager.updateProject.bind(blockletManager),
|
|
347
347
|
createRelease: blockletManager.createRelease.bind(blockletManager),
|
|
348
348
|
connectToStore: blockletManager.connectToStore.bind(blockletManager),
|
|
349
|
+
disconnectFromStore: blockletManager.disconnectFromStore.bind(blockletManager),
|
|
349
350
|
connectByStudio: blockletManager.connectByStudio.bind(blockletManager),
|
|
350
351
|
publishToStore: blockletManager.publishToStore.bind(blockletManager),
|
|
351
352
|
getReleases: blockletManager.getReleases.bind(blockletManager),
|
package/lib/states/audit-log.js
CHANGED
|
@@ -273,7 +273,7 @@ ${JSON.stringify(syncData, null, 2)}
|
|
|
273
273
|
case 'deletePassportIssuance':
|
|
274
274
|
return `removed passport issuance ${args.sessionId}`;
|
|
275
275
|
case 'createMemberInvitation':
|
|
276
|
-
return `created member invitation(${result.inviteId}: ${args.remark}) with **${args.role}** passport`; // prettier-ignore
|
|
276
|
+
return `created member invitation(${result.inviteId}: ${args.remark}) with **${args.role}** passport(within app: ${args.sourceAppPid})`; // prettier-ignore
|
|
277
277
|
case 'deleteInvitation':
|
|
278
278
|
return `removed unused member invitation(${args.inviteId})`;
|
|
279
279
|
case 'createRole':
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.29-beta-
|
|
6
|
+
"version": "1.16.29-beta-e04c6f40",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
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.29-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.29-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.29-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.29-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.29-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.29-beta-
|
|
28
|
-
"@abtnode/models": "1.16.29-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.29-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.29-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.29-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.29-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.29-beta-
|
|
34
|
-
"@abtnode/util": "1.16.29-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.29-beta-e04c6f40",
|
|
23
|
+
"@abtnode/auth": "1.16.29-beta-e04c6f40",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.29-beta-e04c6f40",
|
|
25
|
+
"@abtnode/constant": "1.16.29-beta-e04c6f40",
|
|
26
|
+
"@abtnode/cron": "1.16.29-beta-e04c6f40",
|
|
27
|
+
"@abtnode/logger": "1.16.29-beta-e04c6f40",
|
|
28
|
+
"@abtnode/models": "1.16.29-beta-e04c6f40",
|
|
29
|
+
"@abtnode/queue": "1.16.29-beta-e04c6f40",
|
|
30
|
+
"@abtnode/rbac": "1.16.29-beta-e04c6f40",
|
|
31
|
+
"@abtnode/router-provider": "1.16.29-beta-e04c6f40",
|
|
32
|
+
"@abtnode/static-server": "1.16.29-beta-e04c6f40",
|
|
33
|
+
"@abtnode/timemachine": "1.16.29-beta-e04c6f40",
|
|
34
|
+
"@abtnode/util": "1.16.29-beta-e04c6f40",
|
|
35
35
|
"@arcblock/did": "1.18.123",
|
|
36
36
|
"@arcblock/did-auth": "1.18.123",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.123",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.123",
|
|
44
44
|
"@arcblock/vc": "1.18.123",
|
|
45
|
-
"@blocklet/constant": "1.16.29-beta-
|
|
46
|
-
"@blocklet/env": "1.16.29-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.29-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.29-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.29-beta-
|
|
50
|
-
"@blocklet/store": "1.16.29-beta-
|
|
45
|
+
"@blocklet/constant": "1.16.29-beta-e04c6f40",
|
|
46
|
+
"@blocklet/env": "1.16.29-beta-e04c6f40",
|
|
47
|
+
"@blocklet/meta": "1.16.29-beta-e04c6f40",
|
|
48
|
+
"@blocklet/resolver": "1.16.29-beta-e04c6f40",
|
|
49
|
+
"@blocklet/sdk": "1.16.29-beta-e04c6f40",
|
|
50
|
+
"@blocklet/store": "1.16.29-beta-e04c6f40",
|
|
51
51
|
"@did-space/client": "^0.5.1",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
53
|
"@ocap/mcrypto": "1.18.123",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"unzipper": "^0.10.11"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "f3e8f2ce931215b95ada33e87aee997d8ae52a69"
|
|
107
107
|
}
|