@abtnode/core 1.16.8-next-e7fab584 → 1.16.8-next-bcc85536

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.
@@ -51,17 +51,25 @@ const getInstaller = () => {
51
51
  const getBinaryDir = () => {
52
52
  const installer = getInstaller();
53
53
  if (installer === 'pnpm') {
54
- const { stdout: binaryDir } = shell.exec('pnpm bin -g', { silent: true });
55
- return binaryDir.trim();
54
+ const { stdout: binaryDir, code } = shell.exec('pnpm bin -g', { silent: true });
55
+ if (code === 0) {
56
+ return binaryDir.trim();
57
+ }
56
58
  }
57
59
 
58
60
  if (installer === 'yarn') {
59
- const { stdout: binaryDir } = shell.exec(`yarn global bin ${BINARY_NAME}`, { silent: true });
60
- return binaryDir.trim();
61
+ const { stdout: binaryDir, code } = shell.exec(`yarn global bin ${BINARY_NAME}`, { silent: true });
62
+ if (code === 0) {
63
+ return binaryDir.trim();
64
+ }
65
+ }
66
+
67
+ const { stdout: binaryDir, code } = shell.exec('npm root -g', { silent: true });
68
+ if (code === 0) {
69
+ return path.join(binaryDir.trim(), '../../bin');
61
70
  }
62
71
 
63
- const { stdout: binaryDir } = shell.exec(`npm bin -g ${BINARY_NAME}`, { silent: true });
64
- return binaryDir.trim();
72
+ return '';
65
73
  };
66
74
 
67
75
  const installBlockletServer = async (version) => {
@@ -125,7 +133,7 @@ const restartBlockletServer = async (dataDir) => {
125
133
  return dataDir;
126
134
  };
127
135
 
128
- // Start the server
136
+ // Start the updater
129
137
  const sock = axon.socket('rep');
130
138
  const port = Number(process.env.ABT_NODE_UPDATER_PORT);
131
139
  sock.bind(port, '127.0.0.1');
package/lib/util/rpc.js CHANGED
@@ -42,6 +42,7 @@ const startRpcServer = async () => {
42
42
  env: {
43
43
  PATH: process.env.PATH,
44
44
  PM2_HOME: process.env.PM2_HOME,
45
+ NODE_ENV: 'production',
45
46
  ABT_NODE_UPDATER_PORT: process.env.ABT_NODE_UPDATER_PORT,
46
47
  ABT_NODE_PACKAGE_NAME: process.env.ABT_NODE_PACKAGE_NAME,
47
48
  ABT_NODE_BINARY_NAME: process.env.ABT_NODE_BINARY_NAME,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.8-next-e7fab584",
6
+ "version": "1.16.8-next-bcc85536",
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": "MIT",
21
21
  "dependencies": {
22
- "@abtnode/auth": "1.16.8-next-e7fab584",
23
- "@abtnode/certificate-manager": "1.16.8-next-e7fab584",
24
- "@abtnode/constant": "1.16.8-next-e7fab584",
25
- "@abtnode/cron": "1.16.8-next-e7fab584",
26
- "@abtnode/logger": "1.16.8-next-e7fab584",
27
- "@abtnode/models": "1.16.8-next-e7fab584",
28
- "@abtnode/queue": "1.16.8-next-e7fab584",
29
- "@abtnode/rbac": "1.16.8-next-e7fab584",
30
- "@abtnode/router-provider": "1.16.8-next-e7fab584",
31
- "@abtnode/static-server": "1.16.8-next-e7fab584",
32
- "@abtnode/timemachine": "1.16.8-next-e7fab584",
33
- "@abtnode/util": "1.16.8-next-e7fab584",
22
+ "@abtnode/auth": "1.16.8-next-bcc85536",
23
+ "@abtnode/certificate-manager": "1.16.8-next-bcc85536",
24
+ "@abtnode/constant": "1.16.8-next-bcc85536",
25
+ "@abtnode/cron": "1.16.8-next-bcc85536",
26
+ "@abtnode/logger": "1.16.8-next-bcc85536",
27
+ "@abtnode/models": "1.16.8-next-bcc85536",
28
+ "@abtnode/queue": "1.16.8-next-bcc85536",
29
+ "@abtnode/rbac": "1.16.8-next-bcc85536",
30
+ "@abtnode/router-provider": "1.16.8-next-bcc85536",
31
+ "@abtnode/static-server": "1.16.8-next-bcc85536",
32
+ "@abtnode/timemachine": "1.16.8-next-bcc85536",
33
+ "@abtnode/util": "1.16.8-next-bcc85536",
34
34
  "@arcblock/did": "1.18.80",
35
35
  "@arcblock/did-auth": "1.18.80",
36
36
  "@arcblock/did-ext": "^1.18.80",
@@ -41,9 +41,9 @@
41
41
  "@arcblock/pm2-events": "^0.0.5",
42
42
  "@arcblock/validator": "^1.18.80",
43
43
  "@arcblock/vc": "1.18.80",
44
- "@blocklet/constant": "1.16.8-next-e7fab584",
45
- "@blocklet/meta": "1.16.8-next-e7fab584",
46
- "@blocklet/sdk": "1.16.8-next-e7fab584",
44
+ "@blocklet/constant": "1.16.8-next-bcc85536",
45
+ "@blocklet/meta": "1.16.8-next-bcc85536",
46
+ "@blocklet/sdk": "1.16.8-next-bcc85536",
47
47
  "@did-space/client": "^0.2.91",
48
48
  "@fidm/x509": "^1.2.1",
49
49
  "@ocap/mcrypto": "1.18.80",
@@ -96,5 +96,5 @@
96
96
  "express": "^4.18.2",
97
97
  "jest": "^27.5.1"
98
98
  },
99
- "gitHead": "65d5a71c762d73765befe957e3361a2570dc9882"
99
+ "gitHead": "27f3858f8138d08c68420a78f3cd4c9437e10170"
100
100
  }