@abtnode/core 1.16.23 → 1.16.24-beta-6975c2c0
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 +2 -1
- package/lib/blocklet/manager/disk.js +11 -7
- package/lib/blocklet/manager/helper/install-component-from-dev.js +1 -1
- package/lib/blocklet/project/create-pack-release.js +1 -0
- package/lib/blocklet/project/util.js +20 -5
- package/lib/util/router.js +3 -1
- package/package.json +21 -21
package/lib/api/team.js
CHANGED
|
@@ -1380,7 +1380,7 @@ class TeamAPI extends EventEmitter {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
1382
|
// user-session management
|
|
1383
|
-
async getUserSession({ teamDid, userDid, visitorId }) {
|
|
1383
|
+
async getUserSession({ teamDid, userDid, visitorId, appPid }) {
|
|
1384
1384
|
const state = await this.getUserSessionState(teamDid);
|
|
1385
1385
|
const userState = await this.getUserState(teamDid);
|
|
1386
1386
|
|
|
@@ -1389,6 +1389,7 @@ class TeamAPI extends EventEmitter {
|
|
|
1389
1389
|
};
|
|
1390
1390
|
if (userDid) where.userDid = userDid;
|
|
1391
1391
|
if (visitorId) where.visitorId = visitorId;
|
|
1392
|
+
if (appPid) where.appPid = appPid;
|
|
1392
1393
|
|
|
1393
1394
|
const userSessions = await state.model.findAll({
|
|
1394
1395
|
where,
|
|
@@ -3175,13 +3175,17 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
3175
3175
|
await this.configNavigations({ did, navigations: packConfig.navigations });
|
|
3176
3176
|
|
|
3177
3177
|
for (const { did: componentDid, configs } of packConfig.components || []) {
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3178
|
+
if (blocklet.children.some((x) => x.meta.did === componentDid)) {
|
|
3179
|
+
await this.config({
|
|
3180
|
+
did: [blocklet.meta.did, componentDid],
|
|
3181
|
+
configs,
|
|
3182
|
+
skipHook: true,
|
|
3183
|
+
skipDidDocument: true,
|
|
3184
|
+
skipEmitEvents: true,
|
|
3185
|
+
});
|
|
3186
|
+
} else {
|
|
3187
|
+
logger.error('component not found', { did: componentDid });
|
|
3188
|
+
}
|
|
3185
3189
|
}
|
|
3186
3190
|
}
|
|
3187
3191
|
|
|
@@ -43,7 +43,7 @@ const installComponentFromDev = async ({ folder, meta, rootDid, mountPoint, mana
|
|
|
43
43
|
|
|
44
44
|
const component = {
|
|
45
45
|
meta: ensureMeta(meta),
|
|
46
|
-
mountPoint: mountPoint || `/${defaultPath}
|
|
46
|
+
mountPoint: (mountPoint || `/${defaultPath}`).toLowerCase(),
|
|
47
47
|
source: BlockletSource.local,
|
|
48
48
|
deployedFrom: folder,
|
|
49
49
|
status: BlockletStatus.installed,
|
|
@@ -175,6 +175,7 @@ const createPackRelease = async ({
|
|
|
175
175
|
exportDir: releaseBundleDir,
|
|
176
176
|
blockletDid,
|
|
177
177
|
isPack: true,
|
|
178
|
+
selectedComponentDids: blockletComponents.map((x) => x.did),
|
|
178
179
|
});
|
|
179
180
|
const resourceList = await getResourceList(releaseBundleDir, { isPublic: false });
|
|
180
181
|
|
|
@@ -25,7 +25,15 @@ const getLogoFile = (blocklet, project) => {
|
|
|
25
25
|
return { logoFile, logoFileName };
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const exportBlockletResources = async ({
|
|
28
|
+
const exportBlockletResources = async ({
|
|
29
|
+
app,
|
|
30
|
+
projectId,
|
|
31
|
+
releaseId,
|
|
32
|
+
exportDir,
|
|
33
|
+
blockletDid,
|
|
34
|
+
isPack,
|
|
35
|
+
selectedComponentDids,
|
|
36
|
+
}) => {
|
|
29
37
|
// create resource
|
|
30
38
|
const projectDir = path.join(app.env.dataDir, PROJECT.DIR, `${projectId}`);
|
|
31
39
|
const releaseDir = path.join(projectDir, PROJECT.RELEASE_DIR, `${releaseId}`);
|
|
@@ -50,10 +58,17 @@ const exportBlockletResources = async ({ app, projectId, releaseId, exportDir, b
|
|
|
50
58
|
.filter(Boolean),
|
|
51
59
|
};
|
|
52
60
|
const navigations = app.settings.navigations || [];
|
|
53
|
-
const componentsConfigs = app.children
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
const componentsConfigs = app.children
|
|
62
|
+
.filter((x) => {
|
|
63
|
+
if (selectedComponentDids.length) {
|
|
64
|
+
return selectedComponentDids.includes(x.meta.did);
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
})
|
|
68
|
+
.map((x) => ({
|
|
69
|
+
did: x.meta.did,
|
|
70
|
+
configs: x.configs.filter((y) => !y.secure),
|
|
71
|
+
}));
|
|
57
72
|
await fs.outputJSON(path.join(packResourceDir, 'config.json'), {
|
|
58
73
|
site,
|
|
59
74
|
navigations,
|
package/lib/util/router.js
CHANGED
|
@@ -58,12 +58,14 @@ const revokeAndDeleteNFTDomainRecord = async ({ name, blocklet, nodeInfo }) => {
|
|
|
58
58
|
const { wallet } = getBlockletInfo(blocklet, nodeInfo.sk);
|
|
59
59
|
|
|
60
60
|
const payload = {
|
|
61
|
-
delegatee:
|
|
61
|
+
delegatee: blocklet.appPid,
|
|
62
62
|
domain: name,
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const nftDomainServiceUrl = await getDidDomainServiceURL(nodeInfo.nftDomainUrl);
|
|
66
66
|
|
|
67
|
+
logger.info('will revoke and delete nft domain record', { name, appPid: blocklet.appPid, payload });
|
|
68
|
+
|
|
67
69
|
try {
|
|
68
70
|
const { data } = await axios({
|
|
69
71
|
method: 'DELETE',
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.24-beta-6975c2c0",
|
|
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.
|
|
23
|
-
"@abtnode/auth": "1.16.
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.
|
|
25
|
-
"@abtnode/constant": "1.16.
|
|
26
|
-
"@abtnode/cron": "1.16.
|
|
27
|
-
"@abtnode/logger": "1.16.
|
|
28
|
-
"@abtnode/models": "1.16.
|
|
29
|
-
"@abtnode/queue": "1.16.
|
|
30
|
-
"@abtnode/rbac": "1.16.
|
|
31
|
-
"@abtnode/router-provider": "1.16.
|
|
32
|
-
"@abtnode/static-server": "1.16.
|
|
33
|
-
"@abtnode/timemachine": "1.16.
|
|
34
|
-
"@abtnode/util": "1.16.
|
|
22
|
+
"@abtnode/analytics": "1.16.24-beta-6975c2c0",
|
|
23
|
+
"@abtnode/auth": "1.16.24-beta-6975c2c0",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.24-beta-6975c2c0",
|
|
25
|
+
"@abtnode/constant": "1.16.24-beta-6975c2c0",
|
|
26
|
+
"@abtnode/cron": "1.16.24-beta-6975c2c0",
|
|
27
|
+
"@abtnode/logger": "1.16.24-beta-6975c2c0",
|
|
28
|
+
"@abtnode/models": "1.16.24-beta-6975c2c0",
|
|
29
|
+
"@abtnode/queue": "1.16.24-beta-6975c2c0",
|
|
30
|
+
"@abtnode/rbac": "1.16.24-beta-6975c2c0",
|
|
31
|
+
"@abtnode/router-provider": "1.16.24-beta-6975c2c0",
|
|
32
|
+
"@abtnode/static-server": "1.16.24-beta-6975c2c0",
|
|
33
|
+
"@abtnode/timemachine": "1.16.24-beta-6975c2c0",
|
|
34
|
+
"@abtnode/util": "1.16.24-beta-6975c2c0",
|
|
35
35
|
"@arcblock/did": "1.18.110",
|
|
36
36
|
"@arcblock/did-auth": "1.18.110",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.110",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.110",
|
|
44
44
|
"@arcblock/vc": "1.18.110",
|
|
45
|
-
"@blocklet/constant": "1.16.
|
|
46
|
-
"@blocklet/env": "1.16.
|
|
47
|
-
"@blocklet/meta": "1.16.
|
|
48
|
-
"@blocklet/resolver": "1.16.
|
|
49
|
-
"@blocklet/sdk": "1.16.
|
|
50
|
-
"@did-space/client": "^0.3.
|
|
45
|
+
"@blocklet/constant": "1.16.24-beta-6975c2c0",
|
|
46
|
+
"@blocklet/env": "1.16.24-beta-6975c2c0",
|
|
47
|
+
"@blocklet/meta": "1.16.24-beta-6975c2c0",
|
|
48
|
+
"@blocklet/resolver": "1.16.24-beta-6975c2c0",
|
|
49
|
+
"@blocklet/sdk": "1.16.24-beta-6975c2c0",
|
|
50
|
+
"@did-space/client": "^0.3.63",
|
|
51
51
|
"@fidm/x509": "^1.2.1",
|
|
52
52
|
"@ocap/mcrypto": "1.18.110",
|
|
53
53
|
"@ocap/util": "1.18.110",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"jest": "^29.7.0",
|
|
103
103
|
"unzipper": "^0.10.11"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "0622d3897a7fb7a01d74e024fa2027e335bbe539"
|
|
106
106
|
}
|