@abtnode/core 1.16.13-beta-a83ad86d → 1.16.13-beta-0656f92f
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/processes/updater.js +21 -1
- package/lib/util/maintain.js +2 -2
- package/package.json +18 -18
package/lib/processes/updater.js
CHANGED
|
@@ -85,8 +85,28 @@ const installBlockletServer = async (version) => {
|
|
|
85
85
|
};
|
|
86
86
|
const command = commands[installer];
|
|
87
87
|
console.info('Installing blocklet server', { version, installer, command });
|
|
88
|
-
const result = await runAsync(command
|
|
88
|
+
const result = await runAsync(command, {
|
|
89
|
+
env: {
|
|
90
|
+
...process.env,
|
|
91
|
+
NODE_OPTIONS: '--max_old_space_size=512',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
89
94
|
console.info('Installing blocklet server done', { version });
|
|
95
|
+
|
|
96
|
+
// Fix sqlite caused ENOMEM
|
|
97
|
+
if (PACKAGE_NAME && installer === 'npm') {
|
|
98
|
+
const output = (result.stderr || result.stdout || '').trim();
|
|
99
|
+
if (output.includes('ENOMEM')) {
|
|
100
|
+
console.info('Sqlite caused ENOMEM error');
|
|
101
|
+
const { stdout } = shell.exec('npm root -g', { silent: true });
|
|
102
|
+
const depDir = path.join(stdout.trim(), PACKAGE_NAME, 'node_modules', 'sqlite3');
|
|
103
|
+
if (fs.existsSync(depDir)) {
|
|
104
|
+
await runAsync('npm install --production', { cwd: depDir });
|
|
105
|
+
console.info('Sqlite caused ENOMEM fixed');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
90
110
|
return result;
|
|
91
111
|
};
|
|
92
112
|
|
package/lib/util/maintain.js
CHANGED
|
@@ -67,12 +67,12 @@ const resumeMaintain = async (session) => {
|
|
|
67
67
|
await lock.acquire();
|
|
68
68
|
|
|
69
69
|
const sessionId = session.id;
|
|
70
|
-
const { action, from, to
|
|
70
|
+
const { action, from, to } = session;
|
|
71
71
|
|
|
72
72
|
const goNextState = async (stage, previousSucceed) => {
|
|
73
73
|
session = await states.session.update(sessionId, {
|
|
74
74
|
stage,
|
|
75
|
-
history: [...history, { stage: session.stage, succeed: previousSucceed }],
|
|
75
|
+
history: [...(session.history || []), { stage: session.stage, succeed: previousSucceed }],
|
|
76
76
|
});
|
|
77
77
|
// Emit events so client will keep up
|
|
78
78
|
states.node.emit(EVENTS.NODE_MAINTAIN_PROGRESS, session);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.13-beta-
|
|
6
|
+
"version": "1.16.13-beta-0656f92f",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/auth": "1.16.13-beta-
|
|
23
|
-
"@abtnode/certificate-manager": "1.16.13-beta-
|
|
24
|
-
"@abtnode/constant": "1.16.13-beta-
|
|
25
|
-
"@abtnode/cron": "1.16.13-beta-
|
|
26
|
-
"@abtnode/logger": "1.16.13-beta-
|
|
27
|
-
"@abtnode/models": "1.16.13-beta-
|
|
28
|
-
"@abtnode/queue": "1.16.13-beta-
|
|
29
|
-
"@abtnode/rbac": "1.16.13-beta-
|
|
30
|
-
"@abtnode/router-provider": "1.16.13-beta-
|
|
31
|
-
"@abtnode/static-server": "1.16.13-beta-
|
|
32
|
-
"@abtnode/timemachine": "1.16.13-beta-
|
|
33
|
-
"@abtnode/util": "1.16.13-beta-
|
|
22
|
+
"@abtnode/auth": "1.16.13-beta-0656f92f",
|
|
23
|
+
"@abtnode/certificate-manager": "1.16.13-beta-0656f92f",
|
|
24
|
+
"@abtnode/constant": "1.16.13-beta-0656f92f",
|
|
25
|
+
"@abtnode/cron": "1.16.13-beta-0656f92f",
|
|
26
|
+
"@abtnode/logger": "1.16.13-beta-0656f92f",
|
|
27
|
+
"@abtnode/models": "1.16.13-beta-0656f92f",
|
|
28
|
+
"@abtnode/queue": "1.16.13-beta-0656f92f",
|
|
29
|
+
"@abtnode/rbac": "1.16.13-beta-0656f92f",
|
|
30
|
+
"@abtnode/router-provider": "1.16.13-beta-0656f92f",
|
|
31
|
+
"@abtnode/static-server": "1.16.13-beta-0656f92f",
|
|
32
|
+
"@abtnode/timemachine": "1.16.13-beta-0656f92f",
|
|
33
|
+
"@abtnode/util": "1.16.13-beta-0656f92f",
|
|
34
34
|
"@arcblock/did": "1.18.84",
|
|
35
35
|
"@arcblock/did-auth": "1.18.84",
|
|
36
36
|
"@arcblock/did-ext": "^1.18.84",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
42
|
"@arcblock/validator": "^1.18.84",
|
|
43
43
|
"@arcblock/vc": "1.18.84",
|
|
44
|
-
"@blocklet/constant": "1.16.13-beta-
|
|
45
|
-
"@blocklet/meta": "1.16.13-beta-
|
|
46
|
-
"@blocklet/resolver": "1.16.13-beta-
|
|
47
|
-
"@blocklet/sdk": "1.16.13-beta-
|
|
44
|
+
"@blocklet/constant": "1.16.13-beta-0656f92f",
|
|
45
|
+
"@blocklet/meta": "1.16.13-beta-0656f92f",
|
|
46
|
+
"@blocklet/resolver": "1.16.13-beta-0656f92f",
|
|
47
|
+
"@blocklet/sdk": "1.16.13-beta-0656f92f",
|
|
48
48
|
"@did-space/client": "^0.2.117",
|
|
49
49
|
"@fidm/x509": "^1.2.1",
|
|
50
50
|
"@ocap/mcrypto": "1.18.84",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"express": "^4.18.2",
|
|
98
98
|
"jest": "^27.5.1"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "07996e8ec6fd2141ee3e93dd699ed7fd434bc0ad"
|
|
101
101
|
}
|