@abtnode/core 1.17.3-beta-20251117-230305-4637416e → 1.17.3-beta-20251118-061144-335cd35d
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/util/blocklet.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable no-await-in-loop */
|
|
3
3
|
|
|
4
4
|
const fs = require('fs-extra');
|
|
5
|
-
const path = require('path');
|
|
5
|
+
const path = require('node:path');
|
|
6
6
|
const shelljs = require('shelljs');
|
|
7
|
-
const os = require('os');
|
|
7
|
+
const os = require('node:os');
|
|
8
8
|
const tar = require('tar');
|
|
9
9
|
const get = require('lodash/get');
|
|
10
10
|
const isNil = require('lodash/isNil');
|
|
@@ -338,7 +338,7 @@ const fillBlockletConfigs = (blocklet, configs) => {
|
|
|
338
338
|
}, {});
|
|
339
339
|
};
|
|
340
340
|
|
|
341
|
-
const ensureBlockletExpanded = async (
|
|
341
|
+
const ensureBlockletExpanded = async (_meta, appDir) => {
|
|
342
342
|
const bundlePath = path.join(appDir, BLOCKLET_BUNDLE_FILE);
|
|
343
343
|
if (fs.existsSync(bundlePath)) {
|
|
344
344
|
try {
|
|
@@ -773,7 +773,6 @@ const startBlockletProcess = async (
|
|
|
773
773
|
|
|
774
774
|
// start process
|
|
775
775
|
const maxMemoryRestart = get(nodeInfo, 'runtimeConfig.blockletMaxMemoryLimit', BLOCKLET_MAX_MEM_LIMIT_IN_MB);
|
|
776
|
-
|
|
777
776
|
const processIdName = isGreen ? `${processId}-green` : processId;
|
|
778
777
|
/**
|
|
779
778
|
* @type {pm2.StartOptions}
|
|
@@ -800,8 +799,8 @@ const startBlockletProcess = async (
|
|
|
800
799
|
BLOCKLET_START_AT: now,
|
|
801
800
|
NODE_OPTIONS: await getSecurityNodeOptions(b, nodeInfo.enableFileSystemIsolation),
|
|
802
801
|
},
|
|
803
|
-
// should
|
|
804
|
-
|
|
802
|
+
// should only inject appSk and appPsk to the blocklet environment when unsafe mode enabled
|
|
803
|
+
['1', 1].includes(env.UNSAFE_MODE) ? [] : ['BLOCKLET_APP_SK', 'BLOCKLET_APP_PSK']
|
|
805
804
|
),
|
|
806
805
|
script,
|
|
807
806
|
args,
|
|
@@ -1158,11 +1157,11 @@ const checkBlockletProcessHealthy = async (
|
|
|
1158
1157
|
blocklet,
|
|
1159
1158
|
{ minConsecutiveTime, timeout, componentDids, setBlockletRunning, isGreen = false, appDid } = {}
|
|
1160
1159
|
) => {
|
|
1161
|
-
if (process.env.NODE_ENV === 'test' && process.env.ABT_NODE_TEST_MIN_CONSECUTIVE_TIME) {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
}
|
|
1160
|
+
// if (process.env.NODE_ENV === 'test' && process.env.ABT_NODE_TEST_MIN_CONSECUTIVE_TIME) {
|
|
1161
|
+
// // need bigger than minConsecutiveTime in test env
|
|
1162
|
+
// // eslint-disable-next-line no-param-reassign
|
|
1163
|
+
// timeout = Math.max(+process.env.ABT_NODE_TEST_MIN_CONSECUTIVE_TIME * 10, minConsecutiveTime + 3000);
|
|
1164
|
+
// }
|
|
1166
1165
|
await forEachBlocklet(
|
|
1167
1166
|
blocklet,
|
|
1168
1167
|
async (b) => {
|
|
@@ -1457,7 +1456,7 @@ const getRuntimeInfo = async (processId) => {
|
|
|
1457
1456
|
return {
|
|
1458
1457
|
...dockerInfo,
|
|
1459
1458
|
pid: proc.pid,
|
|
1460
|
-
uptime: proc.pm2_env ?
|
|
1459
|
+
uptime: proc.pm2_env ? Date.now() - Number(proc.pm2_env.pm_uptime) : 0,
|
|
1461
1460
|
port: proc.pm2_env ? proc.pm2_env.BLOCKLET_PORT : null,
|
|
1462
1461
|
status: proc.pm2_env ? proc.pm2_env.status : null,
|
|
1463
1462
|
runningDocker: !!dockerName,
|
|
@@ -1465,7 +1464,7 @@ const getRuntimeInfo = async (processId) => {
|
|
|
1465
1464
|
}
|
|
1466
1465
|
return {
|
|
1467
1466
|
pid: proc.pid,
|
|
1468
|
-
uptime: proc.pm2_env ?
|
|
1467
|
+
uptime: proc.pm2_env ? Date.now() - Number(proc.pm2_env.pm_uptime) : 0,
|
|
1469
1468
|
memoryUsage: proc.monit.memory,
|
|
1470
1469
|
cpuUsage: proc.monit.cpu,
|
|
1471
1470
|
status: proc.pm2_env ? proc.pm2_env.status : null,
|
|
@@ -2385,7 +2384,7 @@ const shouldSkipComponent = (componentDid, whiteList) => {
|
|
|
2385
2384
|
return !arr.includes(componentDid);
|
|
2386
2385
|
};
|
|
2387
2386
|
|
|
2388
|
-
const ensurePortsShape = (
|
|
2387
|
+
const ensurePortsShape = (_states, portsA, portsB) => {
|
|
2389
2388
|
if (!portsA || Object.keys(portsA).length === 0) {
|
|
2390
2389
|
return;
|
|
2391
2390
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.3-beta-
|
|
6
|
+
"version": "1.17.3-beta-20251118-061144-335cd35d",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@abtnode/analytics": "1.17.3-beta-
|
|
21
|
-
"@abtnode/auth": "1.17.3-beta-
|
|
22
|
-
"@abtnode/certificate-manager": "1.17.3-beta-
|
|
23
|
-
"@abtnode/constant": "1.17.3-beta-
|
|
24
|
-
"@abtnode/cron": "1.17.3-beta-
|
|
25
|
-
"@abtnode/db-cache": "1.17.3-beta-
|
|
26
|
-
"@abtnode/docker-utils": "1.17.3-beta-
|
|
27
|
-
"@abtnode/logger": "1.17.3-beta-
|
|
28
|
-
"@abtnode/models": "1.17.3-beta-
|
|
29
|
-
"@abtnode/queue": "1.17.3-beta-
|
|
30
|
-
"@abtnode/rbac": "1.17.3-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.17.3-beta-
|
|
32
|
-
"@abtnode/static-server": "1.17.3-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.17.3-beta-
|
|
34
|
-
"@abtnode/util": "1.17.3-beta-
|
|
20
|
+
"@abtnode/analytics": "1.17.3-beta-20251118-061144-335cd35d",
|
|
21
|
+
"@abtnode/auth": "1.17.3-beta-20251118-061144-335cd35d",
|
|
22
|
+
"@abtnode/certificate-manager": "1.17.3-beta-20251118-061144-335cd35d",
|
|
23
|
+
"@abtnode/constant": "1.17.3-beta-20251118-061144-335cd35d",
|
|
24
|
+
"@abtnode/cron": "1.17.3-beta-20251118-061144-335cd35d",
|
|
25
|
+
"@abtnode/db-cache": "1.17.3-beta-20251118-061144-335cd35d",
|
|
26
|
+
"@abtnode/docker-utils": "1.17.3-beta-20251118-061144-335cd35d",
|
|
27
|
+
"@abtnode/logger": "1.17.3-beta-20251118-061144-335cd35d",
|
|
28
|
+
"@abtnode/models": "1.17.3-beta-20251118-061144-335cd35d",
|
|
29
|
+
"@abtnode/queue": "1.17.3-beta-20251118-061144-335cd35d",
|
|
30
|
+
"@abtnode/rbac": "1.17.3-beta-20251118-061144-335cd35d",
|
|
31
|
+
"@abtnode/router-provider": "1.17.3-beta-20251118-061144-335cd35d",
|
|
32
|
+
"@abtnode/static-server": "1.17.3-beta-20251118-061144-335cd35d",
|
|
33
|
+
"@abtnode/timemachine": "1.17.3-beta-20251118-061144-335cd35d",
|
|
34
|
+
"@abtnode/util": "1.17.3-beta-20251118-061144-335cd35d",
|
|
35
35
|
"@aigne/aigne-hub": "^0.10.9",
|
|
36
36
|
"@arcblock/did": "^1.27.7",
|
|
37
37
|
"@arcblock/did-connect-js": "^1.27.7",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"@arcblock/pm2-events": "^0.0.5",
|
|
44
44
|
"@arcblock/validator": "^1.27.7",
|
|
45
45
|
"@arcblock/vc": "^1.27.7",
|
|
46
|
-
"@blocklet/constant": "1.17.3-beta-
|
|
46
|
+
"@blocklet/constant": "1.17.3-beta-20251118-061144-335cd35d",
|
|
47
47
|
"@blocklet/did-space-js": "^1.2.4",
|
|
48
|
-
"@blocklet/env": "1.17.3-beta-
|
|
48
|
+
"@blocklet/env": "1.17.3-beta-20251118-061144-335cd35d",
|
|
49
49
|
"@blocklet/error": "^0.3.3",
|
|
50
|
-
"@blocklet/meta": "1.17.3-beta-
|
|
51
|
-
"@blocklet/resolver": "1.17.3-beta-
|
|
52
|
-
"@blocklet/sdk": "1.17.3-beta-
|
|
53
|
-
"@blocklet/server-js": "1.17.3-beta-
|
|
54
|
-
"@blocklet/store": "1.17.3-beta-
|
|
50
|
+
"@blocklet/meta": "1.17.3-beta-20251118-061144-335cd35d",
|
|
51
|
+
"@blocklet/resolver": "1.17.3-beta-20251118-061144-335cd35d",
|
|
52
|
+
"@blocklet/sdk": "1.17.3-beta-20251118-061144-335cd35d",
|
|
53
|
+
"@blocklet/server-js": "1.17.3-beta-20251118-061144-335cd35d",
|
|
54
|
+
"@blocklet/store": "1.17.3-beta-20251118-061144-335cd35d",
|
|
55
55
|
"@blocklet/theme": "^3.2.6",
|
|
56
56
|
"@fidm/x509": "^1.2.1",
|
|
57
57
|
"@ocap/mcrypto": "^1.27.7",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"express": "^4.18.2",
|
|
117
117
|
"unzipper": "^0.10.11"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "8e2245b336c9b4cdfd8e53012ab44a11b68c5665"
|
|
120
120
|
}
|