@abtnode/core 1.8.26 → 1.8.27
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 +1 -1
- package/lib/blocklet/extras.js +1 -1
- package/lib/blocklet/manager/disk.js +6 -2
- package/lib/event.js +1 -1
- package/lib/index.js +1 -6
- package/lib/migrations/1.0.33-blocklets.js +1 -1
- package/lib/router/helper.js +1 -1
- package/lib/router/index.js +15 -2
- package/lib/router/manager.js +1 -1
- package/lib/states/blocklet.js +1 -1
- package/lib/util/blocklet.js +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/public-to-store.js +1 -1
- package/package.json +25 -24
package/lib/api/team.js
CHANGED
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
WELLKNOWN_SERVICE_PATH_PREFIX,
|
|
13
13
|
} = require('@abtnode/constant');
|
|
14
14
|
const { isValid: isValidDid } = require('@arcblock/did');
|
|
15
|
-
const { BlockletEvents } = require('@blocklet/
|
|
15
|
+
const { BlockletEvents } = require('@blocklet/constant');
|
|
16
16
|
const { sendToUser } = require('@blocklet/sdk/lib/util/send-notification');
|
|
17
17
|
const {
|
|
18
18
|
createPassportVC,
|
package/lib/blocklet/extras.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const uniqBy = require('lodash/uniqBy');
|
|
2
2
|
const cloneDeep = require('lodash/cloneDeep');
|
|
3
3
|
const security = require('@abtnode/util/lib/security');
|
|
4
|
-
const { BLOCKLET_CONFIGURABLE_KEY } = require('@blocklet/
|
|
4
|
+
const { BLOCKLET_CONFIGURABLE_KEY } = require('@blocklet/constant');
|
|
5
5
|
|
|
6
6
|
const mergeConfigs = ({ old: oldConfigs, cur: newConfigs = [], did = '', dek = '' }) => {
|
|
7
7
|
const metaConfigs = (oldConfigs || []).filter((x) => !x.custom);
|
|
@@ -43,7 +43,7 @@ const validateBlockletEntry = require('@blocklet/meta/lib/entry');
|
|
|
43
43
|
const toBlockletDid = require('@blocklet/meta/lib/did');
|
|
44
44
|
const { validateMeta } = require('@blocklet/meta/lib/validate');
|
|
45
45
|
const { update: updateMetaFile } = require('@blocklet/meta/lib/file');
|
|
46
|
-
const { titleSchema, descriptionSchema, mountPointSchema } = require('@blocklet/meta/lib/schema');
|
|
46
|
+
const { titleSchema, descriptionSchema, mountPointSchema, logoSchema } = require('@blocklet/meta/lib/schema');
|
|
47
47
|
const hasReservedKey = require('@blocklet/meta/lib/has-reserved-key');
|
|
48
48
|
|
|
49
49
|
const {
|
|
@@ -65,7 +65,7 @@ const {
|
|
|
65
65
|
BLOCKLET_LATEST_SPEC_VERSION,
|
|
66
66
|
BLOCKLET_META_FILE,
|
|
67
67
|
BLOCKLET_CONFIGURABLE_KEY,
|
|
68
|
-
} = require('@blocklet/
|
|
68
|
+
} = require('@blocklet/constant');
|
|
69
69
|
const util = require('../../util');
|
|
70
70
|
const {
|
|
71
71
|
refresh: refreshAccessibleExternalNodeIp,
|
|
@@ -870,6 +870,10 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
870
870
|
x.value = await descriptionSchema.validateAsync(x.value);
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
+
if (x.key === 'BLOCKLET_APP_LOGO') {
|
|
874
|
+
x.value = await logoSchema.validateAsync(x.value);
|
|
875
|
+
}
|
|
876
|
+
|
|
873
877
|
if (x.key === 'BLOCKLET_WALLET_TYPE') {
|
|
874
878
|
if (['default', 'eth'].includes(x.value) === false) {
|
|
875
879
|
throw new Error('Invalid blocklet wallet type, only "default" and "eth" are supported');
|
package/lib/event.js
CHANGED
|
@@ -3,7 +3,7 @@ const cloneDeep = require('lodash/cloneDeep');
|
|
|
3
3
|
const { EventEmitter } = require('events');
|
|
4
4
|
const { wipeSensitiveData } = require('@blocklet/meta/lib/util');
|
|
5
5
|
const logger = require('@abtnode/logger')('@abtnode/core:event');
|
|
6
|
-
const { BLOCKLET_MODES, BlockletStatus, BlockletSource, BlockletEvents } = require('@blocklet/
|
|
6
|
+
const { BLOCKLET_MODES, BlockletStatus, BlockletSource, BlockletEvents } = require('@blocklet/constant');
|
|
7
7
|
const { EVENTS } = require('@abtnode/constant');
|
|
8
8
|
const handleInstanceInStore = require('./util/public-to-store');
|
|
9
9
|
|
package/lib/index.js
CHANGED
|
@@ -5,12 +5,7 @@ const formatContext = require('@abtnode/util/lib/format-context');
|
|
|
5
5
|
const Cron = require('@abtnode/cron');
|
|
6
6
|
|
|
7
7
|
const logger = require('@abtnode/logger')('@abtnode/core');
|
|
8
|
-
const {
|
|
9
|
-
fromBlockletStatus,
|
|
10
|
-
toBlockletStatus,
|
|
11
|
-
fromBlockletSource,
|
|
12
|
-
toBlockletSource,
|
|
13
|
-
} = require('@blocklet/meta/lib/constants');
|
|
8
|
+
const { fromBlockletStatus, toBlockletStatus, fromBlockletSource, toBlockletSource } = require('@blocklet/constant');
|
|
14
9
|
const { getServiceMetas } = require('@blocklet/meta/lib/service');
|
|
15
10
|
const { listProviders } = require('@abtnode/router-provider');
|
|
16
11
|
const { DEFAULT_CERTIFICATE_EMAIL, EVENTS } = require('@abtnode/constant');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
2
|
/* eslint-disable no-underscore-dangle */
|
|
3
|
-
const { BLOCKLET_DEFAULT_PORT_NAME } = require('@blocklet/
|
|
3
|
+
const { BLOCKLET_DEFAULT_PORT_NAME } = require('@blocklet/constant');
|
|
4
4
|
|
|
5
5
|
module.exports = async ({ states, printInfo }) => {
|
|
6
6
|
printInfo('Try to update node config to 1.0.33...');
|
package/lib/router/helper.js
CHANGED
|
@@ -37,7 +37,7 @@ const {
|
|
|
37
37
|
BLOCKLET_INTERFACE_TYPE_WEB,
|
|
38
38
|
BLOCKLET_INTERFACE_WELLKNOWN,
|
|
39
39
|
BLOCKLET_INTERFACE_TYPE_WELLKNOWN,
|
|
40
|
-
} = require('@blocklet/
|
|
40
|
+
} = require('@blocklet/constant');
|
|
41
41
|
|
|
42
42
|
// eslint-disable-next-line global-require
|
|
43
43
|
const logger = require('@abtnode/logger')(`${require('../../package.json').name}:router:helper`);
|
package/lib/router/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const {
|
|
|
10
10
|
BLOCKLET_SITE_GROUP_SUFFIX,
|
|
11
11
|
GATEWAY_REQ_LIMIT,
|
|
12
12
|
} = require('@abtnode/constant');
|
|
13
|
-
const { BLOCKLET_UI_INTERFACES } = require('@blocklet/
|
|
13
|
+
const { BLOCKLET_UI_INTERFACES } = require('@blocklet/constant');
|
|
14
14
|
const logger = require('@abtnode/logger')('@abtnode/core:router');
|
|
15
15
|
|
|
16
16
|
const expandSites = (sites = []) => {
|
|
@@ -191,7 +191,7 @@ Router.formatSites = (sites = []) => {
|
|
|
191
191
|
if (daemonRule) {
|
|
192
192
|
// Serve meta js: both prefix and suffix do not contain trailing slash
|
|
193
193
|
// NOTICE: 这里隐含了一个约定
|
|
194
|
-
// 如果安装的 blockletA 和 blockletB 都需要
|
|
194
|
+
// 如果安装的 blockletA 和 blockletB 都需要 __blocklet__.js
|
|
195
195
|
// 则不可以将 blockletA mount 在 /a, 将 blockletB mount 在 /a/b (实际上也不会有这种需求)
|
|
196
196
|
site.rules.push({
|
|
197
197
|
from: {
|
|
@@ -206,6 +206,19 @@ Router.formatSites = (sites = []) => {
|
|
|
206
206
|
componentId: rule.to.componentId,
|
|
207
207
|
},
|
|
208
208
|
});
|
|
209
|
+
site.rules.push({
|
|
210
|
+
from: {
|
|
211
|
+
pathPrefix: rule.from.pathPrefix.replace(/\/$/, ''),
|
|
212
|
+
groupPathPrefix: (rule.from.groupPathPrefix || '').replace(/\/$/, ''),
|
|
213
|
+
pathSuffix: '/__blocklet__.js',
|
|
214
|
+
},
|
|
215
|
+
to: {
|
|
216
|
+
type: ROUTING_RULE_TYPES.DAEMON,
|
|
217
|
+
port: daemonRule.to.port,
|
|
218
|
+
did: rule.to.did,
|
|
219
|
+
componentId: rule.to.componentId,
|
|
220
|
+
},
|
|
221
|
+
});
|
|
209
222
|
|
|
210
223
|
site.rules.push({
|
|
211
224
|
from: {
|
package/lib/router/manager.js
CHANGED
package/lib/states/blocklet.js
CHANGED
package/lib/util/blocklet.js
CHANGED
|
@@ -36,7 +36,7 @@ const {
|
|
|
36
36
|
BLOCKLET_CONFIGURABLE_KEY,
|
|
37
37
|
BLOCKLET_DYNAMIC_PATH_PREFIX,
|
|
38
38
|
fromBlockletStatus,
|
|
39
|
-
} = require('@blocklet/
|
|
39
|
+
} = require('@blocklet/constant');
|
|
40
40
|
const verifyMultiSig = require('@blocklet/meta/lib/verify-multi-sig');
|
|
41
41
|
const validateBlockletEntry = require('@blocklet/meta/lib/entry');
|
|
42
42
|
const getBlockletEngine = require('@blocklet/meta/lib/engine');
|
package/lib/util/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const normalizePathPrefix = require('@abtnode/util/lib/normalize-path-prefix');
|
|
|
17
17
|
const axios = require('@abtnode/util/lib/axios');
|
|
18
18
|
const parseBlockletMeta = require('@blocklet/meta/lib/parse');
|
|
19
19
|
const { validateMeta, fixAndValidateService } = require('@blocklet/meta/lib/validate');
|
|
20
|
-
const { BlockletStatus, BLOCKLET_INTERFACE_WELLKNOWN } = require('@blocklet/
|
|
20
|
+
const { BlockletStatus, BLOCKLET_INTERFACE_WELLKNOWN } = require('@blocklet/constant');
|
|
21
21
|
const { replaceSlotToIp } = require('@blocklet/meta/lib/util');
|
|
22
22
|
const {
|
|
23
23
|
StatusCode,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { sign } = require('@arcblock/jwt');
|
|
2
|
-
const { BlockletSource } = require('@blocklet/
|
|
2
|
+
const { BlockletSource } = require('@blocklet/constant');
|
|
3
3
|
const { WHO_CAN_ACCESS } = require('@abtnode/constant');
|
|
4
4
|
const logger = require('@abtnode/logger')('@abtnode/util:public-to-store');
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.
|
|
6
|
+
"version": "1.8.27",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,31 +19,32 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/auth": "1.8.
|
|
23
|
-
"@abtnode/certificate-manager": "1.8.
|
|
24
|
-
"@abtnode/constant": "1.8.
|
|
25
|
-
"@abtnode/cron": "1.8.
|
|
26
|
-
"@abtnode/db": "1.8.
|
|
27
|
-
"@abtnode/logger": "1.8.
|
|
28
|
-
"@abtnode/queue": "1.8.
|
|
29
|
-
"@abtnode/rbac": "1.8.
|
|
30
|
-
"@abtnode/router-provider": "1.8.
|
|
31
|
-
"@abtnode/static-server": "1.8.
|
|
32
|
-
"@abtnode/timemachine": "1.8.
|
|
33
|
-
"@abtnode/util": "1.8.
|
|
34
|
-
"@arcblock/did": "1.17.
|
|
22
|
+
"@abtnode/auth": "1.8.27",
|
|
23
|
+
"@abtnode/certificate-manager": "1.8.27",
|
|
24
|
+
"@abtnode/constant": "1.8.27",
|
|
25
|
+
"@abtnode/cron": "1.8.27",
|
|
26
|
+
"@abtnode/db": "1.8.27",
|
|
27
|
+
"@abtnode/logger": "1.8.27",
|
|
28
|
+
"@abtnode/queue": "1.8.27",
|
|
29
|
+
"@abtnode/rbac": "1.8.27",
|
|
30
|
+
"@abtnode/router-provider": "1.8.27",
|
|
31
|
+
"@abtnode/static-server": "1.8.27",
|
|
32
|
+
"@abtnode/timemachine": "1.8.27",
|
|
33
|
+
"@abtnode/util": "1.8.27",
|
|
34
|
+
"@arcblock/did": "1.17.20",
|
|
35
35
|
"@arcblock/did-motif": "^1.1.10",
|
|
36
|
-
"@arcblock/did-util": "1.17.
|
|
37
|
-
"@arcblock/event-hub": "1.17.
|
|
38
|
-
"@arcblock/jwt": "^1.17.
|
|
36
|
+
"@arcblock/did-util": "1.17.20",
|
|
37
|
+
"@arcblock/event-hub": "1.17.20",
|
|
38
|
+
"@arcblock/jwt": "^1.17.20",
|
|
39
39
|
"@arcblock/pm2-events": "^0.0.5",
|
|
40
|
-
"@arcblock/vc": "1.17.
|
|
41
|
-
"@blocklet/
|
|
42
|
-
"@blocklet/
|
|
40
|
+
"@arcblock/vc": "1.17.20",
|
|
41
|
+
"@blocklet/constant": "1.8.27",
|
|
42
|
+
"@blocklet/meta": "1.8.27",
|
|
43
|
+
"@blocklet/sdk": "1.8.27",
|
|
43
44
|
"@fidm/x509": "^1.2.1",
|
|
44
|
-
"@ocap/mcrypto": "1.17.
|
|
45
|
-
"@ocap/util": "1.17.
|
|
46
|
-
"@ocap/wallet": "1.17.
|
|
45
|
+
"@ocap/mcrypto": "1.17.20",
|
|
46
|
+
"@ocap/util": "1.17.20",
|
|
47
|
+
"@ocap/wallet": "1.17.20",
|
|
47
48
|
"@slack/webhook": "^5.0.4",
|
|
48
49
|
"axios": "^0.27.2",
|
|
49
50
|
"axon": "^2.0.3",
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
"express": "^4.18.1",
|
|
81
82
|
"jest": "^27.5.1"
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "84b2cb3ee703479f17e88c91650ecf3015cbf6af"
|
|
84
85
|
}
|