@abtnode/core 1.16.23-beta-c9c4e08e → 1.16.23-beta-ed83c878
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
|
@@ -1396,7 +1396,7 @@ class TeamAPI extends EventEmitter {
|
|
|
1396
1396
|
include: {
|
|
1397
1397
|
model: userState.model,
|
|
1398
1398
|
as: 'user',
|
|
1399
|
-
attributes: ['did', 'sourceProvider', 'fullName', 'email', 'avatar', 'remark', 'sourceAppPid'],
|
|
1399
|
+
attributes: ['did', 'pk', 'sourceProvider', 'fullName', 'email', 'avatar', 'remark', 'sourceAppPid'],
|
|
1400
1400
|
},
|
|
1401
1401
|
});
|
|
1402
1402
|
return userSessions.map((x) => x.toJSON());
|
|
@@ -10,6 +10,7 @@ const { BLOCKLET_META_FILE, PROJECT } = require('@blocklet/constant');
|
|
|
10
10
|
const { update: updateMetaFile } = require('@blocklet/meta/lib/file');
|
|
11
11
|
const { createRelease: createBlockletRelease } = require('@abtnode/util/lib/create-blocklet-release');
|
|
12
12
|
const urlPathFriendly = require('@blocklet/meta/lib/url-path-friendly').default;
|
|
13
|
+
const { hasStartEngine } = require('@blocklet/meta/lib/util');
|
|
13
14
|
|
|
14
15
|
const logger = require('@abtnode/logger')('create-resource-blocklet-pack');
|
|
15
16
|
|
|
@@ -27,6 +28,7 @@ const createPackRelease = async ({
|
|
|
27
28
|
blockletIntroduction,
|
|
28
29
|
blockletLogo,
|
|
29
30
|
blockletScreenshots,
|
|
31
|
+
blockletComponents,
|
|
30
32
|
note,
|
|
31
33
|
manager,
|
|
32
34
|
status,
|
|
@@ -45,6 +47,7 @@ const createPackRelease = async ({
|
|
|
45
47
|
blockletLogo,
|
|
46
48
|
blockletIntroduction,
|
|
47
49
|
blockletScreenshots,
|
|
50
|
+
blockletComponents,
|
|
48
51
|
note,
|
|
49
52
|
};
|
|
50
53
|
|
|
@@ -86,14 +89,6 @@ const createPackRelease = async ({
|
|
|
86
89
|
|
|
87
90
|
const projectDir = path.join(blocklet.env.dataDir, PROJECT.DIR, `${projectId}`);
|
|
88
91
|
|
|
89
|
-
// test
|
|
90
|
-
// const components = blocklet.children.map((x) => ({
|
|
91
|
-
// did: x.meta.did,
|
|
92
|
-
// configs: x.configs.filter((y) => !y.secure),
|
|
93
|
-
// }));
|
|
94
|
-
// console.log(components.map((x) => x.configs));
|
|
95
|
-
// throw new Error('test');
|
|
96
|
-
|
|
97
92
|
if (status !== PROJECT.RELEASE_STATUS.draft) {
|
|
98
93
|
await checkResourceExists(projectDir, action, releaseId);
|
|
99
94
|
}
|
|
@@ -185,12 +180,20 @@ const createPackRelease = async ({
|
|
|
185
180
|
|
|
186
181
|
const components = blocklet.children
|
|
187
182
|
.filter((x) => x.bundleSource?.url || x.bundleSource?.store)
|
|
188
|
-
.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
183
|
+
.filter((x) => blockletComponents.find((y) => y.did === x.meta.did))
|
|
184
|
+
.map((x) => {
|
|
185
|
+
const required = !!blockletComponents.find((y) => y.did === x.meta.did)?.required;
|
|
186
|
+
const hasMountPoint = hasStartEngine(x.meta);
|
|
187
|
+
const res = {
|
|
188
|
+
name: x.meta.name,
|
|
189
|
+
source: x.bundleSource,
|
|
190
|
+
required,
|
|
191
|
+
};
|
|
192
|
+
if (hasMountPoint) {
|
|
193
|
+
res.mountPoint = x.mountPoint;
|
|
194
|
+
}
|
|
195
|
+
return res;
|
|
196
|
+
});
|
|
194
197
|
|
|
195
198
|
// create blocklet.yml
|
|
196
199
|
const meta = {
|
|
@@ -112,6 +112,7 @@ const createRelease = async ({
|
|
|
112
112
|
blockletIntroduction,
|
|
113
113
|
blockletLogo,
|
|
114
114
|
blockletScreenshots,
|
|
115
|
+
blockletComponents,
|
|
115
116
|
note,
|
|
116
117
|
manager,
|
|
117
118
|
status,
|
|
@@ -123,6 +124,11 @@ const createRelease = async ({
|
|
|
123
124
|
throw new Error(`status is invalid: ${status}`);
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
if ((blockletComponents || []).some((x) => typeof x === 'string')) {
|
|
128
|
+
// eslint-disable-next-line no-param-reassign
|
|
129
|
+
blockletComponents = blockletComponents.map(JSON.parse);
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
const params = {
|
|
127
133
|
blockletVersion,
|
|
128
134
|
blockletTitle,
|
|
@@ -155,6 +161,7 @@ const createRelease = async ({
|
|
|
155
161
|
blockletIntroduction,
|
|
156
162
|
blockletLogo,
|
|
157
163
|
blockletScreenshots,
|
|
164
|
+
blockletComponents,
|
|
158
165
|
note,
|
|
159
166
|
manager,
|
|
160
167
|
status,
|
package/lib/states/release.js
CHANGED
|
@@ -18,6 +18,12 @@ const createReleaseSchema = (status) =>
|
|
|
18
18
|
blockletScreenshots,
|
|
19
19
|
blockletIntroduction,
|
|
20
20
|
blockletLogo,
|
|
21
|
+
blockletComponents: Joi.array().items(
|
|
22
|
+
Joi.object({
|
|
23
|
+
did: Joi.string().min(1).required(),
|
|
24
|
+
required: Joi.boolean().allow(null),
|
|
25
|
+
})
|
|
26
|
+
),
|
|
21
27
|
});
|
|
22
28
|
|
|
23
29
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.23-beta-
|
|
6
|
+
"version": "1.16.23-beta-ed83c878",
|
|
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-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.23-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.23-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.23-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.23-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.23-beta-
|
|
28
|
-
"@abtnode/models": "1.16.23-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.23-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.23-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.23-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.23-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.23-beta-
|
|
34
|
-
"@abtnode/util": "1.16.23-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.23-beta-ed83c878",
|
|
23
|
+
"@abtnode/auth": "1.16.23-beta-ed83c878",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.23-beta-ed83c878",
|
|
25
|
+
"@abtnode/constant": "1.16.23-beta-ed83c878",
|
|
26
|
+
"@abtnode/cron": "1.16.23-beta-ed83c878",
|
|
27
|
+
"@abtnode/logger": "1.16.23-beta-ed83c878",
|
|
28
|
+
"@abtnode/models": "1.16.23-beta-ed83c878",
|
|
29
|
+
"@abtnode/queue": "1.16.23-beta-ed83c878",
|
|
30
|
+
"@abtnode/rbac": "1.16.23-beta-ed83c878",
|
|
31
|
+
"@abtnode/router-provider": "1.16.23-beta-ed83c878",
|
|
32
|
+
"@abtnode/static-server": "1.16.23-beta-ed83c878",
|
|
33
|
+
"@abtnode/timemachine": "1.16.23-beta-ed83c878",
|
|
34
|
+
"@abtnode/util": "1.16.23-beta-ed83c878",
|
|
35
35
|
"@arcblock/did": "1.18.110",
|
|
36
36
|
"@arcblock/did-auth": "1.18.110",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.110",
|
|
@@ -42,11 +42,11 @@
|
|
|
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.23-beta-
|
|
46
|
-
"@blocklet/env": "1.16.23-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.23-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.23-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.23-beta-
|
|
45
|
+
"@blocklet/constant": "1.16.23-beta-ed83c878",
|
|
46
|
+
"@blocklet/env": "1.16.23-beta-ed83c878",
|
|
47
|
+
"@blocklet/meta": "1.16.23-beta-ed83c878",
|
|
48
|
+
"@blocklet/resolver": "1.16.23-beta-ed83c878",
|
|
49
|
+
"@blocklet/sdk": "1.16.23-beta-ed83c878",
|
|
50
50
|
"@did-space/client": "^0.3.60",
|
|
51
51
|
"@fidm/x509": "^1.2.1",
|
|
52
52
|
"@ocap/mcrypto": "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": "09abd3c4a7c8c57a5c45f721f37362208dad8823"
|
|
106
106
|
}
|