@blocklet/cli 1.16.45-beta-20250609-111118-0d252ebe → 1.16.45-beta-20250610-112229-2eb0face
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/commands/server/stop.js +24 -1
- package/lib/node.js +1 -1
- package/package.json +16 -16
|
@@ -5,6 +5,7 @@ const { clearRouterByConfigKeyword, clearDockerContainer, checkDockerInstalled }
|
|
|
5
5
|
const tryWithTimeout = require('@abtnode/util/lib/try-with-timeout');
|
|
6
6
|
const sleep = require('@abtnode/util/lib/sleep');
|
|
7
7
|
const pm2 = require('@abtnode/util/lib/async-pm2');
|
|
8
|
+
const pAll = require('p-all');
|
|
8
9
|
|
|
9
10
|
const {
|
|
10
11
|
PROCESS_NAME_DAEMON,
|
|
@@ -47,8 +48,24 @@ const forceStopServer = async () => {
|
|
|
47
48
|
printSuccess(`${capitalize(clearedProvider)} router is stopped successfully`);
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
// Kill all blocklet processes
|
|
52
|
+
try {
|
|
53
|
+
const list = await pm2.listAsync();
|
|
54
|
+
const blockletProcesses = list.filter(
|
|
55
|
+
(process) => !!process.pm2_env['abt-node-daemon'] || !!process.pm2_env.blocklet
|
|
56
|
+
);
|
|
57
|
+
await pAll(
|
|
58
|
+
blockletProcesses.map((process) => () => pm2.deleteAsync(process.name)),
|
|
59
|
+
{ concurrency: 6 }
|
|
60
|
+
);
|
|
61
|
+
printSuccess('All blocklet processes stopped successfully');
|
|
62
|
+
} catch (error) {
|
|
63
|
+
printError(`Failed to stop blocklet processes: ${error.message}`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Kill PM2 daemon last
|
|
50
67
|
await pm2.killDaemonAsync();
|
|
51
|
-
|
|
68
|
+
|
|
52
69
|
const isDockerInstalled = await checkDockerInstalled();
|
|
53
70
|
if (isDockerInstalled) {
|
|
54
71
|
await clearDockerContainer();
|
|
@@ -164,6 +181,12 @@ exports.run = async ({ force = false }) => {
|
|
|
164
181
|
}
|
|
165
182
|
}
|
|
166
183
|
|
|
184
|
+
const isDockerInstalled = await checkDockerInstalled();
|
|
185
|
+
if (isDockerInstalled) {
|
|
186
|
+
await clearDockerContainer();
|
|
187
|
+
printSuccess('Docker containers managed by blocklet server are stopped');
|
|
188
|
+
}
|
|
189
|
+
|
|
167
190
|
printSuccess('Done!');
|
|
168
191
|
resolve(true);
|
|
169
192
|
process.exit(0);
|
package/lib/node.js
CHANGED
|
@@ -97,7 +97,7 @@ const readNodeConfigWithValidate = async (dir) => {
|
|
|
97
97
|
async function getNode({ dir = process.cwd() } = {}) {
|
|
98
98
|
const { config, configFile, dataDir } = await readNodeConfigWithValidate(dir);
|
|
99
99
|
if (!process.env.ABT_NODE_CACHE_SQLITE_PATH) {
|
|
100
|
-
process.env.ABT_NODE_CACHE_SQLITE_PATH = path.join(dataDir, 'db-cache.db');
|
|
100
|
+
process.env.ABT_NODE_CACHE_SQLITE_PATH = path.join(dataDir, 'core', 'db-cache.db');
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
util.ensurePermission(dataDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/cli",
|
|
3
|
-
"version": "1.16.45-beta-
|
|
3
|
+
"version": "1.16.45-beta-20250610-112229-2eb0face",
|
|
4
4
|
"description": "Command line tools to manage Blocklet Server",
|
|
5
5
|
"homepage": "https://github.com/ArcBlock/blocklet-server#readme",
|
|
6
6
|
"bin": {
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@abtnode/blocklet-services": "1.16.45-beta-
|
|
39
|
-
"@abtnode/client": "1.16.45-beta-
|
|
40
|
-
"@abtnode/constant": "1.16.45-beta-
|
|
41
|
-
"@abtnode/core": "1.16.45-beta-
|
|
42
|
-
"@abtnode/db-cache": "1.16.45-beta-
|
|
43
|
-
"@abtnode/logger": "1.16.45-beta-
|
|
44
|
-
"@abtnode/router-provider": "1.16.45-beta-
|
|
45
|
-
"@abtnode/util": "1.16.45-beta-
|
|
46
|
-
"@abtnode/webapp": "1.16.45-beta-
|
|
38
|
+
"@abtnode/blocklet-services": "1.16.45-beta-20250610-112229-2eb0face",
|
|
39
|
+
"@abtnode/client": "1.16.45-beta-20250610-112229-2eb0face",
|
|
40
|
+
"@abtnode/constant": "1.16.45-beta-20250610-112229-2eb0face",
|
|
41
|
+
"@abtnode/core": "1.16.45-beta-20250610-112229-2eb0face",
|
|
42
|
+
"@abtnode/db-cache": "1.16.45-beta-20250610-112229-2eb0face",
|
|
43
|
+
"@abtnode/logger": "1.16.45-beta-20250610-112229-2eb0face",
|
|
44
|
+
"@abtnode/router-provider": "1.16.45-beta-20250610-112229-2eb0face",
|
|
45
|
+
"@abtnode/util": "1.16.45-beta-20250610-112229-2eb0face",
|
|
46
|
+
"@abtnode/webapp": "1.16.45-beta-20250610-112229-2eb0face",
|
|
47
47
|
"@arcblock/did": "1.20.14",
|
|
48
48
|
"@arcblock/event-hub": "1.20.14",
|
|
49
49
|
"@arcblock/ipfs-only-hash": "^0.0.2",
|
|
50
50
|
"@arcblock/jwt": "1.20.14",
|
|
51
51
|
"@arcblock/ws": "1.20.14",
|
|
52
|
-
"@blocklet/constant": "1.16.45-beta-
|
|
52
|
+
"@blocklet/constant": "1.16.45-beta-20250610-112229-2eb0face",
|
|
53
53
|
"@blocklet/error": "^0.2.5",
|
|
54
54
|
"@blocklet/form-collector": "^0.1.8",
|
|
55
|
-
"@blocklet/images": "1.16.45-beta-
|
|
56
|
-
"@blocklet/meta": "1.16.45-beta-
|
|
57
|
-
"@blocklet/resolver": "1.16.45-beta-
|
|
58
|
-
"@blocklet/store": "1.16.45-beta-
|
|
55
|
+
"@blocklet/images": "1.16.45-beta-20250610-112229-2eb0face",
|
|
56
|
+
"@blocklet/meta": "1.16.45-beta-20250610-112229-2eb0face",
|
|
57
|
+
"@blocklet/resolver": "1.16.45-beta-20250610-112229-2eb0face",
|
|
58
|
+
"@blocklet/store": "1.16.45-beta-20250610-112229-2eb0face",
|
|
59
59
|
"@blocklet/theme-builder": "^0.1.19",
|
|
60
60
|
"@ocap/client": "1.20.14",
|
|
61
61
|
"@ocap/mcrypto": "1.20.14",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"engines": {
|
|
155
155
|
"node": ">=14"
|
|
156
156
|
},
|
|
157
|
-
"gitHead": "
|
|
157
|
+
"gitHead": "d35fb6c907c29f4466fa965c079e1662dc77e582",
|
|
158
158
|
"devDependencies": {
|
|
159
159
|
"@types/fs-extra": "^11.0.4",
|
|
160
160
|
"@types/jest": "^29.5.13"
|