@abtnode/core 1.16.32-beta-5463e017 → 1.16.32-beta-93e1a798
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.
|
@@ -5,22 +5,10 @@ const path = require('path');
|
|
|
5
5
|
const fs = require('fs/promises');
|
|
6
6
|
const os = require('os');
|
|
7
7
|
const { existsSync } = require('fs-extra');
|
|
8
|
-
const which = require('which');
|
|
9
8
|
const { NODE_MODES } = require('@abtnode/constant');
|
|
10
9
|
const parseDockerName = require('./parse-docker-name');
|
|
11
10
|
const { DOCKER_IMAGE_NAME, createDockerImage } = require('./create-docker-image');
|
|
12
11
|
|
|
13
|
-
const meiliSearchPathAlt = '/data/bin/meilisearch';
|
|
14
|
-
|
|
15
|
-
function findExecutable(executable) {
|
|
16
|
-
try {
|
|
17
|
-
const fullPath = which.sync(executable);
|
|
18
|
-
return fullPath;
|
|
19
|
-
} catch (error) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
12
|
async function mkdirpWithPermissions(dir, mode = 0o755) {
|
|
25
13
|
try {
|
|
26
14
|
await fs.mkdir(dir, { recursive: true, mode });
|
|
@@ -106,25 +94,15 @@ async function parseDockerOptionsFromPm2(input, nodeInfo) {
|
|
|
106
94
|
if (!existsSync(path.join(options.env.BLOCKLET_APP_DIR, 'node_modules'))) {
|
|
107
95
|
await mkdirpWithPermissions(path.join(options.env.BLOCKLET_APP_DIR, 'node_modules'));
|
|
108
96
|
}
|
|
109
|
-
if (existsSync(meiliSearchPathAlt)) {
|
|
110
|
-
mount += ` -v ${meiliSearchPathAlt}:${meiliSearchPathAlt}:rw `;
|
|
111
|
-
} else {
|
|
112
|
-
const meiliSearchPath = findExecutable('meilisearch');
|
|
113
|
-
if (meiliSearchPath) {
|
|
114
|
-
mount += ` -v ${meiliSearchPath}:${meiliSearchPathAlt}:rw `;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
97
|
|
|
118
98
|
options.script = `docker rm -f ${name} > /dev/null 2>&1 || true && docker run -u $(id -u):$(id -g) --name ${name} \
|
|
119
99
|
${port} \
|
|
120
100
|
${mount} \
|
|
121
101
|
-v ${path.join(options.env.BLOCKLET_APP_DIR, 'node_modules')} \
|
|
122
102
|
${diskSize} \
|
|
123
|
-
--read-only \
|
|
124
103
|
--cpus="${dockerEnv.BLOCKLET_DOCKER_CPUS}" \
|
|
125
104
|
--memory="${dockerEnv.BLOCKLET_DOCKER_MEMORY}" \
|
|
126
105
|
--env-file ${dockerEnvFile} \
|
|
127
|
-
--read-only --cap-drop=ALL \
|
|
128
106
|
${networkHost} \
|
|
129
107
|
${DOCKER_IMAGE_NAME} \
|
|
130
108
|
sh -c \
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.32-beta-
|
|
6
|
+
"version": "1.16.32-beta-93e1a798",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.32-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.32-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.32-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.32-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.32-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.32-beta-
|
|
28
|
-
"@abtnode/models": "1.16.32-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.32-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.32-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.32-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.32-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.32-beta-
|
|
34
|
-
"@abtnode/util": "1.16.32-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.32-beta-93e1a798",
|
|
23
|
+
"@abtnode/auth": "1.16.32-beta-93e1a798",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.32-beta-93e1a798",
|
|
25
|
+
"@abtnode/constant": "1.16.32-beta-93e1a798",
|
|
26
|
+
"@abtnode/cron": "1.16.32-beta-93e1a798",
|
|
27
|
+
"@abtnode/logger": "1.16.32-beta-93e1a798",
|
|
28
|
+
"@abtnode/models": "1.16.32-beta-93e1a798",
|
|
29
|
+
"@abtnode/queue": "1.16.32-beta-93e1a798",
|
|
30
|
+
"@abtnode/rbac": "1.16.32-beta-93e1a798",
|
|
31
|
+
"@abtnode/router-provider": "1.16.32-beta-93e1a798",
|
|
32
|
+
"@abtnode/static-server": "1.16.32-beta-93e1a798",
|
|
33
|
+
"@abtnode/timemachine": "1.16.32-beta-93e1a798",
|
|
34
|
+
"@abtnode/util": "1.16.32-beta-93e1a798",
|
|
35
35
|
"@arcblock/did": "1.18.135",
|
|
36
36
|
"@arcblock/did-auth": "1.18.135",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.135",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.135",
|
|
44
44
|
"@arcblock/vc": "1.18.135",
|
|
45
|
-
"@blocklet/constant": "1.16.32-beta-
|
|
46
|
-
"@blocklet/env": "1.16.32-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.32-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.32-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.32-beta-
|
|
50
|
-
"@blocklet/store": "1.16.32-beta-
|
|
51
|
-
"@did-space/client": "^0.5.
|
|
45
|
+
"@blocklet/constant": "1.16.32-beta-93e1a798",
|
|
46
|
+
"@blocklet/env": "1.16.32-beta-93e1a798",
|
|
47
|
+
"@blocklet/meta": "1.16.32-beta-93e1a798",
|
|
48
|
+
"@blocklet/resolver": "1.16.32-beta-93e1a798",
|
|
49
|
+
"@blocklet/sdk": "1.16.32-beta-93e1a798",
|
|
50
|
+
"@blocklet/store": "1.16.32-beta-93e1a798",
|
|
51
|
+
"@did-space/client": "^0.5.37",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
53
|
"@ocap/mcrypto": "1.18.135",
|
|
54
54
|
"@ocap/util": "1.18.135",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"jest": "^29.7.0",
|
|
106
106
|
"unzipper": "^0.10.11"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "608fab914e6ee5cb5659c11ab3d0713945ab99a0"
|
|
109
109
|
}
|