@abtnode/util 1.16.28-beta-641c9f13 → 1.16.28-beta-10ca1aad

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 +5 -2
  2. package/package.json +7 -7
package/lib/security.js CHANGED
@@ -5,7 +5,7 @@ const semver = require('semver');
5
5
  const uniq = require('lodash/uniq');
6
6
  const { dirname, join, sep } = require('path');
7
7
  const resolve = require('resolve/sync');
8
- const { tmpdir } = require('os');
8
+ const { tmpdir, homedir } = require('os');
9
9
  const which = require('which');
10
10
 
11
11
  const encrypt = (m, s, i) => AES.encrypt(m, crypto.pbkdf2Sync(i, s, 256, 32, 'sha512').toString('hex'));
@@ -87,6 +87,7 @@ const getSecurityNodeOptions = (blocklet, enableFileSystemIsolation = true) => {
87
87
 
88
88
  const pm2Path = getPm2Path();
89
89
  const meiliSearchPath = findExecutable('meilisearch');
90
+ const blockletCliPath = findExecutable('blocklet');
90
91
 
91
92
  options.push(
92
93
  '--experimental-permission',
@@ -109,6 +110,7 @@ const getSecurityNodeOptions = (blocklet, enableFileSystemIsolation = true) => {
109
110
  blocklet.environmentObj.BLOCKLET_MODE === BLOCKLET_MODES.DEVELOPMENT
110
111
  ) {
111
112
  options.push('--allow-worker', '--allow-fs-read=*');
113
+ options.push(`--allow-fs-write=${join(homedir(), '.npm', '_logs')}`);
112
114
  } else {
113
115
  options.push(
114
116
  ...[
@@ -122,7 +124,8 @@ const getSecurityNodeOptions = (blocklet, enableFileSystemIsolation = true) => {
122
124
  join(blocklet.environmentObj.BLOCKLET_APP_DATA_DIR, '.assets'),
123
125
  pm2Path && dirname(dirname(dirname(dirname(pm2Path)))),
124
126
  meiliSearchPath && dirname(dirname(meiliSearchPath)),
125
- dirname(process.execPath),
127
+ blockletCliPath && dirname(blockletCliPath),
128
+ dirname(dirname(process.execPath)),
126
129
  process.cwd(),
127
130
  tmpdir(),
128
131
  ]
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.28-beta-641c9f13",
6
+ "version": "1.16.28-beta-10ca1aad",
7
7
  "description": "ArcBlock's JavaScript utility",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,11 +18,11 @@
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.28-beta-641c9f13",
22
- "@abtnode/logger": "1.16.28-beta-641c9f13",
23
- "@arcblock/pm2": "^5.4.0-beta-2024-06-17-19-14-035",
24
- "@blocklet/constant": "1.16.28-beta-641c9f13",
25
- "@blocklet/meta": "1.16.28-beta-641c9f13",
21
+ "@abtnode/constant": "1.16.28-beta-10ca1aad",
22
+ "@abtnode/logger": "1.16.28-beta-10ca1aad",
23
+ "@arcblock/pm2": "^5.4.0",
24
+ "@blocklet/constant": "1.16.28-beta-10ca1aad",
25
+ "@blocklet/meta": "1.16.28-beta-10ca1aad",
26
26
  "@ocap/client": "1.18.123",
27
27
  "@ocap/mcrypto": "1.18.123",
28
28
  "@ocap/util": "1.18.123",
@@ -79,5 +79,5 @@
79
79
  "fs-extra": "^11.2.0",
80
80
  "jest": "^29.7.0"
81
81
  },
82
- "gitHead": "eb1fa63e4ed26fe5ba230845a318faa29408138b"
82
+ "gitHead": "ed0958b6b5414ae5a3f4066bdf138a157d046b59"
83
83
  }