@abtnode/util 1.16.30-beta-cd65989e → 1.16.30-beta-e7a90fb2

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.
Files changed (2) hide show
  1. package/lib/security.js +6 -2
  2. package/package.json +10 -10
package/lib/security.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { BLOCKLET_MODES } = require('@blocklet/constant');
2
+ const fs = require('fs');
2
3
  const crypto = require('crypto');
3
4
  const AES = require('@ocap/mcrypto/lib/crypter/aes-legacy').default;
4
5
  const semver = require('semver');
@@ -101,6 +102,7 @@ const getSecurityNodeOptions = (blocklet, enableFileSystemIsolation = true) => {
101
102
 
102
103
  const pm2Path = getPm2Path();
103
104
  const meiliSearchPath = findExecutable('meilisearch');
105
+ const meiliSearchPathAlt = fs.existsSync('/data/bin/meilisearch') ? '/data/bin/meilisearch' : '';
104
106
  const blockletCliPath = findExecutable('blocklet');
105
107
 
106
108
  options.push(
@@ -133,9 +135,11 @@ const getSecurityNodeOptions = (blocklet, enableFileSystemIsolation = true) => {
133
135
  blocklet.environmentObj.BLOCKLET_CACHE_DIR,
134
136
  blocklet.environmentObj.BLOCKLET_APP_DATA_DIR, // allow all components to read blocklet data
135
137
  dirname(dirname(blocklet.environmentObj.BLOCKLET_APP_DIR)), // allow all components to read source code
138
+ // @note: 如果不这么做,会找不到 @arcblock/pm2.io,也无法使用 static server
136
139
  pm2Path && dirname(dirname(dirname(dirname(pm2Path)))),
137
- meiliSearchPath && dirname(dirname(meiliSearchPath)),
138
- blockletCliPath && dirname(blockletCliPath),
140
+ blockletCliPath,
141
+ meiliSearchPath,
142
+ meiliSearchPathAlt,
139
143
  dirname(dirname(process.execPath)),
140
144
  process.cwd(),
141
145
  tmpdir(),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.30-beta-cd65989e",
6
+ "version": "1.16.30-beta-e7a90fb2",
7
7
  "description": "ArcBlock's JavaScript utility",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,15 +18,15 @@
18
18
  "author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
- "@abtnode/constant": "1.16.30-beta-cd65989e",
22
- "@abtnode/logger": "1.16.30-beta-cd65989e",
21
+ "@abtnode/constant": "1.16.30-beta-e7a90fb2",
22
+ "@abtnode/logger": "1.16.30-beta-e7a90fb2",
23
23
  "@arcblock/pm2": "^5.4.0",
24
- "@blocklet/constant": "1.16.30-beta-cd65989e",
25
- "@blocklet/meta": "1.16.30-beta-cd65989e",
26
- "@ocap/client": "1.18.131",
27
- "@ocap/mcrypto": "1.18.131",
28
- "@ocap/util": "1.18.131",
29
- "@ocap/wallet": "1.18.131",
24
+ "@blocklet/constant": "1.16.30-beta-e7a90fb2",
25
+ "@blocklet/meta": "1.16.30-beta-e7a90fb2",
26
+ "@ocap/client": "1.18.132",
27
+ "@ocap/mcrypto": "1.18.132",
28
+ "@ocap/util": "1.18.132",
29
+ "@ocap/wallet": "1.18.132",
30
30
  "archiver": "^7.0.1",
31
31
  "axios": "^1.7.2",
32
32
  "axios-mock-adapter": "^1.21.2",
@@ -82,5 +82,5 @@
82
82
  "fs-extra": "^11.2.0",
83
83
  "jest": "^29.7.0"
84
84
  },
85
- "gitHead": "8646768b8ac83cdb8c213ab17fe8030f3d5dc6fc"
85
+ "gitHead": "c97ba97d694f553afc9f5336c9f3ddfae73cf955"
86
86
  }