@xuda.io/xuda-worker-bundle 1.3.2524 → 1.3.2526

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/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -8202,7 +8202,7 @@ func.expression.get_property = async function (valP) {
8202
8202
  }
8203
8203
 
8204
8204
  try {
8205
- let vm = new VM.VM({
8205
+ let vm = new NodeVM({
8206
8206
  sandbox: {
8207
8207
  func: func,
8208
8208
  SESSION_ID: SESSION_ID,
@@ -8460,8 +8460,8 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
8460
8460
  process.on('uncaughtException', handleError);
8461
8461
  try {
8462
8462
  const dir = path.join(_conf.studio_drive_path, SESSION_OBJ[SESSION_ID].app_id, 'node_modules');
8463
- const script = new VM.VMScript(`try { ${val} } catch (e) { func.api.error(SESSION_ID, "nodejs error", e); console.error(e); func.events.delete_job(SESSION_ID, "${job_id}"); }`, { filename: dir, dirname: dir });
8464
- const vm = new VM.NodeVM({
8463
+ const script = new VMScript(`try { ${val} } catch (e) { func.api.error(SESSION_ID, "nodejs error", e); console.error(e); func.events.delete_job(SESSION_ID, "${job_id}"); }`, { filename: dir, dirname: dir });
8464
+ const vm = new NodeVM({
8465
8465
  require: { external: true },
8466
8466
  sandbox,
8467
8467
  timeout: 60000,
@@ -8473,7 +8473,7 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
8473
8473
  }
8474
8474
 
8475
8475
  try {
8476
- const vm = new VM.VM({
8476
+ const vm = new NodeVM({
8477
8477
  sandbox,
8478
8478
  timeout: 1000,
8479
8479
  allowAsync: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle",
3
- "version": "1.3.2524",
3
+ "version": "1.3.2526",
4
4
  "description": "xuda framework",
5
5
  "main": "index.js",
6
6
  "scripts": {