@xuda.io/runtime-bundle 1.0.1382 → 1.0.1384
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/js/modules/xuda-studio-checker.min.mjs +1 -1
- package/js/modules/xuda-studio-checker.mjs +15 -13
- package/js/xuda-runtime-bundle.js +44 -30
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +44 -30
- package/js/xuda-runtime-slim.min.es.js +44 -30
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +2 -2
- package/js/xuda-worker-bundle.js +2 -2
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -8469,6 +8469,7 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
|
|
|
8469
8469
|
|
|
8470
8470
|
func.UI.worker = {};
|
|
8471
8471
|
func.UI.worker.ID = null;
|
|
8472
|
+
func.UI.worker.idle = 0;
|
|
8472
8473
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
8473
8474
|
$.fn.isInViewport = function () {
|
|
8474
8475
|
var elementTop = $(this).offset().top;
|
|
@@ -8482,35 +8483,35 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8482
8483
|
|
|
8483
8484
|
let last_job_in_queue = 0;
|
|
8484
8485
|
// let run_stat;
|
|
8485
|
-
const job_iterator2 = async function () {
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8486
|
+
// const job_iterator2 = async function () {
|
|
8487
|
+
// let from_job_num_to_run = last_job_in_queue;
|
|
8488
|
+
// last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8489
|
+
|
|
8490
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8491
|
+
// // idle
|
|
8492
|
+
// this.attempt = 0;
|
|
8493
|
+
// if (UI_WORKER_OBJ.jobs.length) {
|
|
8494
|
+
// // clearInterval(this._interval);
|
|
8495
|
+
// for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8496
|
+
// // if (val.job_num < from_job_num_to_run) continue;
|
|
8497
|
+
// try {
|
|
8498
|
+
// if (val.stat) {
|
|
8499
|
+
// break;
|
|
8500
|
+
// }
|
|
8501
|
+
|
|
8502
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8503
|
+
// // break;
|
|
8504
|
+
// } catch (err) {
|
|
8505
|
+
// console.error(err);
|
|
8506
|
+
// }
|
|
8507
|
+
// }
|
|
8508
|
+
// }
|
|
8509
|
+
// } else {
|
|
8510
|
+
// //busy
|
|
8510
8511
|
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
};
|
|
8512
|
+
// this.attempt++;
|
|
8513
|
+
// }
|
|
8514
|
+
// };
|
|
8514
8515
|
|
|
8515
8516
|
const job_iterator = async function () {
|
|
8516
8517
|
let from_job_num_to_run = last_job_in_queue;
|
|
@@ -8519,7 +8520,9 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8519
8520
|
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8520
8521
|
// idle
|
|
8521
8522
|
this.attempt = 0;
|
|
8523
|
+
|
|
8522
8524
|
if (UI_WORKER_OBJ.jobs.length) {
|
|
8525
|
+
func.UI.worker.idle = 0;
|
|
8523
8526
|
let running_job_children_elements = [];
|
|
8524
8527
|
let active_job_children_elements = [];
|
|
8525
8528
|
for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
@@ -8614,6 +8617,17 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8614
8617
|
console.error(err);
|
|
8615
8618
|
}
|
|
8616
8619
|
}
|
|
8620
|
+
} else {
|
|
8621
|
+
func.UI.worker.idle++;
|
|
8622
|
+
|
|
8623
|
+
if (func.UI.worker.idle > 1000) {
|
|
8624
|
+
// cleaning pending_to_delete
|
|
8625
|
+
$.each($('body').find('*'), (key, val) => {
|
|
8626
|
+
if ($(val)?.data()?.xuData?.pending_to_delete) {
|
|
8627
|
+
$(val).data().xuData.pending_to_delete = false;
|
|
8628
|
+
}
|
|
8629
|
+
});
|
|
8630
|
+
}
|
|
8617
8631
|
}
|
|
8618
8632
|
// } else {
|
|
8619
8633
|
// //busy
|
|
@@ -11332,7 +11346,7 @@ func.expression.get_property = async function (valP) {
|
|
|
11332
11346
|
}
|
|
11333
11347
|
|
|
11334
11348
|
try {
|
|
11335
|
-
let vm = new
|
|
11349
|
+
let vm = new VM({
|
|
11336
11350
|
sandbox: {
|
|
11337
11351
|
func: func,
|
|
11338
11352
|
SESSION_ID: SESSION_ID,
|
|
@@ -11603,7 +11617,7 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
|
|
|
11603
11617
|
}
|
|
11604
11618
|
|
|
11605
11619
|
try {
|
|
11606
|
-
const vm = new
|
|
11620
|
+
const vm = new VM({
|
|
11607
11621
|
sandbox,
|
|
11608
11622
|
timeout: 1000,
|
|
11609
11623
|
allowAsync: false,
|
|
@@ -8470,6 +8470,7 @@ func.UI.utils.get_panels_wrapper_from_dom = async function (SESSION_ID, $xu_embe
|
|
|
8470
8470
|
|
|
8471
8471
|
func.UI.worker = {};
|
|
8472
8472
|
func.UI.worker.ID = null;
|
|
8473
|
+
func.UI.worker.idle = 0;
|
|
8473
8474
|
func.UI.worker.init = async function (SESSION_ID) {
|
|
8474
8475
|
$.fn.isInViewport = function () {
|
|
8475
8476
|
var elementTop = $(this).offset().top;
|
|
@@ -8483,35 +8484,35 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8483
8484
|
|
|
8484
8485
|
let last_job_in_queue = 0;
|
|
8485
8486
|
// let run_stat;
|
|
8486
|
-
const job_iterator2 = async function () {
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8487
|
+
// const job_iterator2 = async function () {
|
|
8488
|
+
// let from_job_num_to_run = last_job_in_queue;
|
|
8489
|
+
// last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
|
|
8490
|
+
|
|
8491
|
+
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8492
|
+
// // idle
|
|
8493
|
+
// this.attempt = 0;
|
|
8494
|
+
// if (UI_WORKER_OBJ.jobs.length) {
|
|
8495
|
+
// // clearInterval(this._interval);
|
|
8496
|
+
// for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
8497
|
+
// // if (val.job_num < from_job_num_to_run) continue;
|
|
8498
|
+
// try {
|
|
8499
|
+
// if (val.stat) {
|
|
8500
|
+
// break;
|
|
8501
|
+
// }
|
|
8502
|
+
|
|
8503
|
+
// await func.UI.worker.execute(val.SESSION_ID, val);
|
|
8504
|
+
// // break;
|
|
8505
|
+
// } catch (err) {
|
|
8506
|
+
// console.error(err);
|
|
8507
|
+
// }
|
|
8508
|
+
// }
|
|
8509
|
+
// }
|
|
8510
|
+
// } else {
|
|
8511
|
+
// //busy
|
|
8511
8512
|
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
};
|
|
8513
|
+
// this.attempt++;
|
|
8514
|
+
// }
|
|
8515
|
+
// };
|
|
8515
8516
|
|
|
8516
8517
|
const job_iterator = async function () {
|
|
8517
8518
|
let from_job_num_to_run = last_job_in_queue;
|
|
@@ -8520,7 +8521,9 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8520
8521
|
// if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
|
|
8521
8522
|
// idle
|
|
8522
8523
|
this.attempt = 0;
|
|
8524
|
+
|
|
8523
8525
|
if (UI_WORKER_OBJ.jobs.length) {
|
|
8526
|
+
func.UI.worker.idle = 0;
|
|
8524
8527
|
let running_job_children_elements = [];
|
|
8525
8528
|
let active_job_children_elements = [];
|
|
8526
8529
|
for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
|
|
@@ -8615,6 +8618,17 @@ func.UI.worker.init = async function (SESSION_ID) {
|
|
|
8615
8618
|
console.error(err);
|
|
8616
8619
|
}
|
|
8617
8620
|
}
|
|
8621
|
+
} else {
|
|
8622
|
+
func.UI.worker.idle++;
|
|
8623
|
+
|
|
8624
|
+
if (func.UI.worker.idle > 1000) {
|
|
8625
|
+
// cleaning pending_to_delete
|
|
8626
|
+
$.each($('body').find('*'), (key, val) => {
|
|
8627
|
+
if ($(val)?.data()?.xuData?.pending_to_delete) {
|
|
8628
|
+
$(val).data().xuData.pending_to_delete = false;
|
|
8629
|
+
}
|
|
8630
|
+
});
|
|
8631
|
+
}
|
|
8618
8632
|
}
|
|
8619
8633
|
// } else {
|
|
8620
8634
|
// //busy
|
|
@@ -18037,7 +18051,7 @@ func.expression.get_property = async function (valP) {
|
|
|
18037
18051
|
}
|
|
18038
18052
|
|
|
18039
18053
|
try {
|
|
18040
|
-
let vm = new
|
|
18054
|
+
let vm = new VM({
|
|
18041
18055
|
sandbox: {
|
|
18042
18056
|
func: func,
|
|
18043
18057
|
SESSION_ID: SESSION_ID,
|
|
@@ -18308,7 +18322,7 @@ func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id,
|
|
|
18308
18322
|
}
|
|
18309
18323
|
|
|
18310
18324
|
try {
|
|
18311
|
-
const vm = new
|
|
18325
|
+
const vm = new VM({
|
|
18312
18326
|
sandbox,
|
|
18313
18327
|
timeout: 1000,
|
|
18314
18328
|
allowAsync: false,
|