@xuda.io/xuda-worker-bundle-min 1.3.2406 → 1.3.2407
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.
- package/index.js +4 -4
- 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
|
|
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
|
|
8464
|
-
const vm = new
|
|
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
|
|
8476
|
+
const vm = new NodeVM({
|
|
8477
8477
|
sandbox,
|
|
8478
8478
|
timeout: 1000,
|
|
8479
8479
|
allowAsync: false,
|