@xuda.io/runtime-bundle 1.0.487 → 1.0.489
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/xuda-runtime-bundle.js +10 -37
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +10 -37
- package/js/xuda-runtime-slim.min.es.js +10 -37
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +10 -37
- package/js/xuda-worker-bundle.js +10 -37
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -35039,10 +35039,10 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
35039
35039
|
return await variable_not_exist();
|
|
35040
35040
|
}
|
|
35041
35041
|
|
|
35042
|
-
var split = [];
|
|
35042
|
+
// var split = [];
|
|
35043
35043
|
var var_Arr = [];
|
|
35044
|
-
split = func.expression.parse(ret);
|
|
35045
|
-
|
|
35044
|
+
const split = func.expression.parse(ret) || [];
|
|
35045
|
+
console.log(valP, split);
|
|
35046
35046
|
for await (const [arr_key, val] of Object.entries(split)) {
|
|
35047
35047
|
// run each field
|
|
35048
35048
|
const key = Number(arr_key);
|
|
@@ -35435,50 +35435,23 @@ func.expression.parse = function (input) {
|
|
|
35435
35435
|
const segments = [];
|
|
35436
35436
|
let pos = 0;
|
|
35437
35437
|
|
|
35438
|
-
const parts = input.split(/(
|
|
35439
|
-
|
|
35440
|
-
for (let i = 0; i < parts.length; i++) {
|
|
35441
|
-
const part = parts[i];
|
|
35442
|
-
|
|
35443
|
-
if (part === '@' && i + 1 < parts.length) {
|
|
35444
|
-
const nextPart = parts[i + 1];
|
|
35445
|
-
const varEnd = nextPart.search(/[.\[]/); // Split at first . or [
|
|
35446
|
-
let fieldId, remainder;
|
|
35447
|
-
|
|
35448
|
-
if (varEnd > 0) {
|
|
35449
|
-
fieldId = nextPart.slice(0, varEnd);
|
|
35450
|
-
remainder = nextPart.slice(varEnd);
|
|
35451
|
-
} else {
|
|
35452
|
-
fieldId = nextPart;
|
|
35453
|
-
remainder = '';
|
|
35454
|
-
}
|
|
35438
|
+
const parts = input.split(/(@\w+)/).filter(Boolean);
|
|
35455
35439
|
|
|
35456
|
-
|
|
35457
|
-
|
|
35440
|
+
for (const part of parts) {
|
|
35441
|
+
if (part.startsWith('@')) {
|
|
35442
|
+
const fieldId = part.slice(1);
|
|
35458
35443
|
segments.push({
|
|
35459
|
-
value:
|
|
35444
|
+
value: part,
|
|
35460
35445
|
fieldId,
|
|
35461
35446
|
pos,
|
|
35462
35447
|
});
|
|
35463
|
-
|
|
35464
|
-
|
|
35465
|
-
// Add remainder as a separate segment, if any
|
|
35466
|
-
if (remainder) {
|
|
35467
|
-
segments.push({
|
|
35468
|
-
value: remainder,
|
|
35469
|
-
pos,
|
|
35470
|
-
});
|
|
35471
|
-
pos += remainder.length;
|
|
35472
|
-
}
|
|
35473
|
-
|
|
35474
|
-
i++; // Skip the next part since we consumed it
|
|
35475
|
-
} else if (part !== '@') {
|
|
35448
|
+
} else {
|
|
35476
35449
|
segments.push({
|
|
35477
35450
|
value: part,
|
|
35478
35451
|
pos,
|
|
35479
35452
|
});
|
|
35480
|
-
pos += part.length;
|
|
35481
35453
|
}
|
|
35454
|
+
pos += part.length;
|
|
35482
35455
|
}
|
|
35483
35456
|
|
|
35484
35457
|
return segments;
|