@blocklet/cli 1.16.51-beta-20250905-051437-fe05adb2 → 1.16.52-beta-20250908-085420-224a58fa
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/README.md +1 -1
- package/lib/commands/server/start.js +24 -1
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -93,6 +93,23 @@ const parseMemoryLimit = () => {
|
|
|
93
93
|
|
|
94
94
|
const calculatedLimit = parseMemoryLimit();
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Copy environment variables from config.env to process.env
|
|
98
|
+
* @param {object} configEnv - Environment variables object from config
|
|
99
|
+
*/
|
|
100
|
+
const copyEnvToProcess = (configEnv) => {
|
|
101
|
+
if (!configEnv || typeof configEnv !== 'object') {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
Object.keys(configEnv).forEach((key) => {
|
|
106
|
+
const value = configEnv[key];
|
|
107
|
+
if (value !== null && value !== undefined) {
|
|
108
|
+
process.env[key] = String(value);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
96
113
|
const updateVersionInConfigFileAndState = async (config, configFile, node) => {
|
|
97
114
|
const info = await node.getNodeInfo();
|
|
98
115
|
await node.states.node.updateNodeInfo({
|
|
@@ -243,6 +260,9 @@ const startService = async (logDir, maxMemoryRestart, environments) => {
|
|
|
243
260
|
}
|
|
244
261
|
|
|
245
262
|
try {
|
|
263
|
+
const instanceCount = getServiceInstanceCount();
|
|
264
|
+
debug('service instance count', instanceCount);
|
|
265
|
+
|
|
246
266
|
await wrapSpinner('Starting blocklet service...', async () => {
|
|
247
267
|
await pm2StartOrReload({
|
|
248
268
|
namespace: 'daemon',
|
|
@@ -258,7 +278,7 @@ const startService = async (logDir, maxMemoryRestart, environments) => {
|
|
|
258
278
|
kill_timeout: 10_000,
|
|
259
279
|
execMode: 'cluster',
|
|
260
280
|
shutdown_with_message: true,
|
|
261
|
-
instances:
|
|
281
|
+
instances: instanceCount,
|
|
262
282
|
time: true,
|
|
263
283
|
pmx: false,
|
|
264
284
|
env: {
|
|
@@ -753,6 +773,8 @@ const start = async ({ updateDb, enforceLock, forceIntranet, workingDir, mode })
|
|
|
753
773
|
process.exit(code);
|
|
754
774
|
};
|
|
755
775
|
|
|
776
|
+
copyEnvToProcess(config.env);
|
|
777
|
+
|
|
756
778
|
[
|
|
757
779
|
'SIGINT',
|
|
758
780
|
'SIGTERM',
|
|
@@ -917,3 +939,4 @@ exports.clearStartLock = clearStartLock;
|
|
|
917
939
|
exports.createStartLock = createStartLock;
|
|
918
940
|
exports.isConfigDifferentFromDB = isConfigDifferentFromDB;
|
|
919
941
|
exports.getDifferentAttributes = getDifferentAttributes;
|
|
942
|
+
exports.copyEnvToProcess = copyEnvToProcess;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/cli",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.52-beta-20250908-085420-224a58fa",
|
|
4
4
|
"description": "Command line tools to manage Blocklet Server",
|
|
5
5
|
"homepage": "https://github.com/ArcBlock/blocklet-server#readme",
|
|
6
6
|
"bin": {
|
|
@@ -35,28 +35,28 @@
|
|
|
35
35
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@abtnode/blocklet-services": "1.16.
|
|
39
|
-
"@abtnode/constant": "1.16.
|
|
40
|
-
"@abtnode/core": "1.16.
|
|
41
|
-
"@abtnode/db-cache": "1.16.
|
|
42
|
-
"@abtnode/logger": "1.16.
|
|
43
|
-
"@abtnode/models": "1.16.
|
|
44
|
-
"@abtnode/router-provider": "1.16.
|
|
45
|
-
"@abtnode/util": "1.16.
|
|
46
|
-
"@abtnode/webapp": "1.16.
|
|
38
|
+
"@abtnode/blocklet-services": "1.16.52-beta-20250908-085420-224a58fa",
|
|
39
|
+
"@abtnode/constant": "1.16.52-beta-20250908-085420-224a58fa",
|
|
40
|
+
"@abtnode/core": "1.16.52-beta-20250908-085420-224a58fa",
|
|
41
|
+
"@abtnode/db-cache": "1.16.52-beta-20250908-085420-224a58fa",
|
|
42
|
+
"@abtnode/logger": "1.16.52-beta-20250908-085420-224a58fa",
|
|
43
|
+
"@abtnode/models": "1.16.52-beta-20250908-085420-224a58fa",
|
|
44
|
+
"@abtnode/router-provider": "1.16.52-beta-20250908-085420-224a58fa",
|
|
45
|
+
"@abtnode/util": "1.16.52-beta-20250908-085420-224a58fa",
|
|
46
|
+
"@abtnode/webapp": "1.16.52-beta-20250908-085420-224a58fa",
|
|
47
47
|
"@arcblock/did": "1.24.0",
|
|
48
48
|
"@arcblock/event-hub": "1.24.0",
|
|
49
49
|
"@arcblock/ipfs-only-hash": "^0.0.2",
|
|
50
50
|
"@arcblock/jwt": "1.24.0",
|
|
51
51
|
"@arcblock/ws": "1.24.0",
|
|
52
|
-
"@blocklet/constant": "1.16.
|
|
52
|
+
"@blocklet/constant": "1.16.52-beta-20250908-085420-224a58fa",
|
|
53
53
|
"@blocklet/error": "^0.2.5",
|
|
54
54
|
"@blocklet/form-collector": "^0.1.8",
|
|
55
|
-
"@blocklet/images": "1.16.
|
|
56
|
-
"@blocklet/meta": "1.16.
|
|
57
|
-
"@blocklet/resolver": "1.16.
|
|
58
|
-
"@blocklet/server-js": "1.16.
|
|
59
|
-
"@blocklet/store": "1.16.
|
|
55
|
+
"@blocklet/images": "1.16.52-beta-20250908-085420-224a58fa",
|
|
56
|
+
"@blocklet/meta": "1.16.52-beta-20250908-085420-224a58fa",
|
|
57
|
+
"@blocklet/resolver": "1.16.52-beta-20250908-085420-224a58fa",
|
|
58
|
+
"@blocklet/server-js": "1.16.52-beta-20250908-085420-224a58fa",
|
|
59
|
+
"@blocklet/store": "1.16.52-beta-20250908-085420-224a58fa",
|
|
60
60
|
"@blocklet/theme-builder": "^0.4.6",
|
|
61
61
|
"@ocap/client": "1.24.0",
|
|
62
62
|
"@ocap/mcrypto": "1.24.0",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"engines": {
|
|
155
155
|
"node": ">=14"
|
|
156
156
|
},
|
|
157
|
-
"gitHead": "
|
|
157
|
+
"gitHead": "400eda55fc1058c961fd622907237a649b5c4f86",
|
|
158
158
|
"devDependencies": {
|
|
159
159
|
"@types/fs-extra": "^11.0.4",
|
|
160
160
|
"@types/jest": "^29.5.13"
|