@xuda.io/runtime-bundle 1.0.481 → 1.0.482
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 +150 -95
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +150 -95
- package/js/xuda-runtime-slim.min.es.js +150 -95
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +150 -95
- package/js/xuda-worker-bundle.js +150 -95
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
package/js/xuda-runtime-slim.js
CHANGED
|
@@ -10816,102 +10816,102 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
10816
10816
|
return new_class.get();
|
|
10817
10817
|
};
|
|
10818
10818
|
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
//
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
//
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
//
|
|
10864
|
-
|
|
10865
|
-
//
|
|
10866
|
-
//
|
|
10867
|
-
|
|
10868
|
-
//
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
//
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
//
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
//
|
|
10890
|
-
//
|
|
10891
|
-
//
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10819
|
+
func.expression.parse_org = function (strP) {
|
|
10820
|
+
var extract_str = function (strP, posP) {
|
|
10821
|
+
if (!posP) posP = 0;
|
|
10822
|
+
var clean_split_str = function (arrP) {
|
|
10823
|
+
var arr = [];
|
|
10824
|
+
if (arrP && arrP.length > 1 && arrP[0] === '' && arrP[1].indexOf('@') > -1) {
|
|
10825
|
+
for (var i = 1; i <= arrP.length; i++) {
|
|
10826
|
+
arr.push(arrP[i]);
|
|
10827
|
+
}
|
|
10828
|
+
return arr;
|
|
10829
|
+
} else return arrP;
|
|
10830
|
+
};
|
|
10831
|
+
var nonLettersPatt = /\W/; // non letters
|
|
10832
|
+
var validSymbolsNoArray = /[^.@\[]/; //valid symbols no array /[^.@\[\]\]]/
|
|
10833
|
+
var validSymbolsWithArray = /[^.@"'\[\]]/; //valid symbols with array
|
|
10834
|
+
var validSymbols = validSymbolsNoArray;
|
|
10835
|
+
var splitTmp = strP.replace(/@/g, '^^@').split('^^');
|
|
10836
|
+
var split = clean_split_str(splitTmp);
|
|
10837
|
+
var obj = [];
|
|
10838
|
+
if (split) {
|
|
10839
|
+
for (let val of split) {
|
|
10840
|
+
// run on @ segments
|
|
10841
|
+
if (val) {
|
|
10842
|
+
var pos = strP.indexOf(val);
|
|
10843
|
+
if (val && val.substr(0, 1) === '@') {
|
|
10844
|
+
var tmpStr = '';
|
|
10845
|
+
var word_start_pos = undefined;
|
|
10846
|
+
var word_end_pos = undefined;
|
|
10847
|
+
// run on @ segment string
|
|
10848
|
+
for (var i = 0; i <= val.length; i++) {
|
|
10849
|
+
var key1 = i;
|
|
10850
|
+
var val1 = val.substr(i, 1);
|
|
10851
|
+
if (
|
|
10852
|
+
val1 === '.' &&
|
|
10853
|
+
!word_start_pos // find first dot
|
|
10854
|
+
)
|
|
10855
|
+
word_start_pos = key1;
|
|
10856
|
+
if (
|
|
10857
|
+
word_start_pos &&
|
|
10858
|
+
key1 > word_start_pos &&
|
|
10859
|
+
nonLettersPatt.test(val1) // find any sign character to mark the end of word
|
|
10860
|
+
)
|
|
10861
|
+
word_end_pos = key1;
|
|
10862
|
+
if (word_start_pos && word_start_pos >= 0 && word_end_pos && word_end_pos >= 0) {
|
|
10863
|
+
// find the word
|
|
10864
|
+
var word = val.substr(word_start_pos + 1, word_end_pos - word_start_pos - 1); // get the word
|
|
10865
|
+
// if (glb.ALL_PROPERTIES_ARR.indexOf(word) === -1) {
|
|
10866
|
+
// compare with internal properties
|
|
10867
|
+
tmpStr = tmpStr.substr(0, word_start_pos) + '^^' + tmpStr.substr(word_start_pos, word_end_pos);
|
|
10868
|
+
// }
|
|
10869
|
+
if (val.substr(word_end_pos, 1) === '.') word_start_pos = word_end_pos;
|
|
10870
|
+
else word_start_pos = null;
|
|
10871
|
+
word_end_pos = null;
|
|
10872
|
+
}
|
|
10873
|
+
if (val1 === '[') validSymbols = validSymbolsWithArray;
|
|
10874
|
+
if (nonLettersPatt.test(val1) && validSymbols.test(val1) && tmpStr.indexOf('^^') === -1) {
|
|
10875
|
+
tmpStr += '^^' + val1;
|
|
10876
|
+
} else tmpStr += val1;
|
|
10877
|
+
}
|
|
10878
|
+
// });
|
|
10879
|
+
if (tmpStr.indexOf('^^') > -1) {
|
|
10880
|
+
var obj1 = extract_str(tmpStr, pos);
|
|
10881
|
+
obj = obj.concat(obj1);
|
|
10882
|
+
} else {
|
|
10883
|
+
// push clean @var
|
|
10884
|
+
var fieldId = undefined;
|
|
10885
|
+
if (val) {
|
|
10886
|
+
fieldId = val.substr(1, val.length);
|
|
10887
|
+
if (val.indexOf('.') > -1) fieldId = val.substr(1, val.indexOf('.') - 1);
|
|
10888
|
+
if (val.indexOf('[') > -1) fieldId = val.substr(1, val.indexOf('[') - 1);
|
|
10889
|
+
//
|
|
10890
|
+
// if (val.indexOf("]") > -1)
|
|
10891
|
+
// fieldId = val.substr(1, val.indexOf("]") - 1);
|
|
10892
|
+
}
|
|
10893
|
+
obj.push({
|
|
10894
|
+
value: val,
|
|
10895
|
+
fieldId: fieldId,
|
|
10896
|
+
pos: pos + posP,
|
|
10897
|
+
});
|
|
10898
|
+
}
|
|
10899
|
+
} else {
|
|
10900
|
+
obj.push({
|
|
10901
|
+
value: val,
|
|
10902
|
+
pos: pos + posP,
|
|
10903
|
+
});
|
|
10904
|
+
}
|
|
10905
|
+
}
|
|
10906
|
+
}
|
|
10907
|
+
return obj;
|
|
10908
|
+
}
|
|
10909
|
+
};
|
|
10910
|
+
var res = extract_str(strP);
|
|
10911
|
+
return res;
|
|
10912
|
+
};
|
|
10913
10913
|
|
|
10914
|
-
func.expression.
|
|
10914
|
+
func.expression.parse_bad = function (strP) {
|
|
10915
10915
|
const nonLettersPatt = /\W/;
|
|
10916
10916
|
const validSymbolsNoArray = /[^.@\[]/;
|
|
10917
10917
|
const validSymbolsWithArray = /[^.@"'\[\]]/;
|
|
@@ -10969,6 +10969,61 @@ func.expression.parse = function (strP) {
|
|
|
10969
10969
|
return extractStr(strP);
|
|
10970
10970
|
};
|
|
10971
10971
|
|
|
10972
|
+
func.expression.parse = function (input) {
|
|
10973
|
+
if (typeof input !== 'string') return [];
|
|
10974
|
+
|
|
10975
|
+
const segments = [];
|
|
10976
|
+
let pos = 0;
|
|
10977
|
+
|
|
10978
|
+
const parts = input.split(/(@)/).filter(Boolean);
|
|
10979
|
+
|
|
10980
|
+
for (let i = 0; i < parts.length; i++) {
|
|
10981
|
+
const part = parts[i];
|
|
10982
|
+
|
|
10983
|
+
if (part === '@' && i + 1 < parts.length) {
|
|
10984
|
+
const nextPart = parts[i + 1];
|
|
10985
|
+
const varEnd = nextPart.search(/[.\[]/); // Split at first . or [
|
|
10986
|
+
let fieldId, remainder;
|
|
10987
|
+
|
|
10988
|
+
if (varEnd > 0) {
|
|
10989
|
+
fieldId = nextPart.slice(0, varEnd);
|
|
10990
|
+
remainder = nextPart.slice(varEnd);
|
|
10991
|
+
} else {
|
|
10992
|
+
fieldId = nextPart;
|
|
10993
|
+
remainder = '';
|
|
10994
|
+
}
|
|
10995
|
+
|
|
10996
|
+
// Add @variable segment
|
|
10997
|
+
const fullVarValue = `@${fieldId}`;
|
|
10998
|
+
segments.push({
|
|
10999
|
+
value: fullVarValue,
|
|
11000
|
+
fieldId,
|
|
11001
|
+
pos,
|
|
11002
|
+
});
|
|
11003
|
+
pos += fullVarValue.length;
|
|
11004
|
+
|
|
11005
|
+
// Add remainder as a separate segment, if any
|
|
11006
|
+
if (remainder) {
|
|
11007
|
+
segments.push({
|
|
11008
|
+
value: remainder,
|
|
11009
|
+
pos,
|
|
11010
|
+
});
|
|
11011
|
+
pos += remainder.length;
|
|
11012
|
+
}
|
|
11013
|
+
|
|
11014
|
+
i++; // Skip the next part since we consumed it
|
|
11015
|
+
} else if (part !== '@') {
|
|
11016
|
+
segments.push({
|
|
11017
|
+
value: part,
|
|
11018
|
+
pos,
|
|
11019
|
+
});
|
|
11020
|
+
pos += part.length;
|
|
11021
|
+
}
|
|
11022
|
+
}
|
|
11023
|
+
|
|
11024
|
+
return segments;
|
|
11025
|
+
};
|
|
11026
|
+
|
|
10972
11027
|
func.expression.get_property = async function (valP) {
|
|
10973
11028
|
async function secure_eval(val) {
|
|
10974
11029
|
if (typeof IS_PROCESS_SERVER === 'undefined') {
|
|
@@ -14613,102 +14613,102 @@ func.expression.get = async function (SESSION_ID, valP, dsSessionP, sourceP, row
|
|
|
14613
14613
|
return new_class.get();
|
|
14614
14614
|
};
|
|
14615
14615
|
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
//
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
//
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
//
|
|
14661
|
-
|
|
14662
|
-
//
|
|
14663
|
-
//
|
|
14664
|
-
|
|
14665
|
-
//
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
//
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
//
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
//
|
|
14687
|
-
//
|
|
14688
|
-
//
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14616
|
+
func.expression.parse_org = function (strP) {
|
|
14617
|
+
var extract_str = function (strP, posP) {
|
|
14618
|
+
if (!posP) posP = 0;
|
|
14619
|
+
var clean_split_str = function (arrP) {
|
|
14620
|
+
var arr = [];
|
|
14621
|
+
if (arrP && arrP.length > 1 && arrP[0] === '' && arrP[1].indexOf('@') > -1) {
|
|
14622
|
+
for (var i = 1; i <= arrP.length; i++) {
|
|
14623
|
+
arr.push(arrP[i]);
|
|
14624
|
+
}
|
|
14625
|
+
return arr;
|
|
14626
|
+
} else return arrP;
|
|
14627
|
+
};
|
|
14628
|
+
var nonLettersPatt = /\W/; // non letters
|
|
14629
|
+
var validSymbolsNoArray = /[^.@\[]/; //valid symbols no array /[^.@\[\]\]]/
|
|
14630
|
+
var validSymbolsWithArray = /[^.@"'\[\]]/; //valid symbols with array
|
|
14631
|
+
var validSymbols = validSymbolsNoArray;
|
|
14632
|
+
var splitTmp = strP.replace(/@/g, '^^@').split('^^');
|
|
14633
|
+
var split = clean_split_str(splitTmp);
|
|
14634
|
+
var obj = [];
|
|
14635
|
+
if (split) {
|
|
14636
|
+
for (let val of split) {
|
|
14637
|
+
// run on @ segments
|
|
14638
|
+
if (val) {
|
|
14639
|
+
var pos = strP.indexOf(val);
|
|
14640
|
+
if (val && val.substr(0, 1) === '@') {
|
|
14641
|
+
var tmpStr = '';
|
|
14642
|
+
var word_start_pos = undefined;
|
|
14643
|
+
var word_end_pos = undefined;
|
|
14644
|
+
// run on @ segment string
|
|
14645
|
+
for (var i = 0; i <= val.length; i++) {
|
|
14646
|
+
var key1 = i;
|
|
14647
|
+
var val1 = val.substr(i, 1);
|
|
14648
|
+
if (
|
|
14649
|
+
val1 === '.' &&
|
|
14650
|
+
!word_start_pos // find first dot
|
|
14651
|
+
)
|
|
14652
|
+
word_start_pos = key1;
|
|
14653
|
+
if (
|
|
14654
|
+
word_start_pos &&
|
|
14655
|
+
key1 > word_start_pos &&
|
|
14656
|
+
nonLettersPatt.test(val1) // find any sign character to mark the end of word
|
|
14657
|
+
)
|
|
14658
|
+
word_end_pos = key1;
|
|
14659
|
+
if (word_start_pos && word_start_pos >= 0 && word_end_pos && word_end_pos >= 0) {
|
|
14660
|
+
// find the word
|
|
14661
|
+
var word = val.substr(word_start_pos + 1, word_end_pos - word_start_pos - 1); // get the word
|
|
14662
|
+
// if (glb.ALL_PROPERTIES_ARR.indexOf(word) === -1) {
|
|
14663
|
+
// compare with internal properties
|
|
14664
|
+
tmpStr = tmpStr.substr(0, word_start_pos) + '^^' + tmpStr.substr(word_start_pos, word_end_pos);
|
|
14665
|
+
// }
|
|
14666
|
+
if (val.substr(word_end_pos, 1) === '.') word_start_pos = word_end_pos;
|
|
14667
|
+
else word_start_pos = null;
|
|
14668
|
+
word_end_pos = null;
|
|
14669
|
+
}
|
|
14670
|
+
if (val1 === '[') validSymbols = validSymbolsWithArray;
|
|
14671
|
+
if (nonLettersPatt.test(val1) && validSymbols.test(val1) && tmpStr.indexOf('^^') === -1) {
|
|
14672
|
+
tmpStr += '^^' + val1;
|
|
14673
|
+
} else tmpStr += val1;
|
|
14674
|
+
}
|
|
14675
|
+
// });
|
|
14676
|
+
if (tmpStr.indexOf('^^') > -1) {
|
|
14677
|
+
var obj1 = extract_str(tmpStr, pos);
|
|
14678
|
+
obj = obj.concat(obj1);
|
|
14679
|
+
} else {
|
|
14680
|
+
// push clean @var
|
|
14681
|
+
var fieldId = undefined;
|
|
14682
|
+
if (val) {
|
|
14683
|
+
fieldId = val.substr(1, val.length);
|
|
14684
|
+
if (val.indexOf('.') > -1) fieldId = val.substr(1, val.indexOf('.') - 1);
|
|
14685
|
+
if (val.indexOf('[') > -1) fieldId = val.substr(1, val.indexOf('[') - 1);
|
|
14686
|
+
//
|
|
14687
|
+
// if (val.indexOf("]") > -1)
|
|
14688
|
+
// fieldId = val.substr(1, val.indexOf("]") - 1);
|
|
14689
|
+
}
|
|
14690
|
+
obj.push({
|
|
14691
|
+
value: val,
|
|
14692
|
+
fieldId: fieldId,
|
|
14693
|
+
pos: pos + posP,
|
|
14694
|
+
});
|
|
14695
|
+
}
|
|
14696
|
+
} else {
|
|
14697
|
+
obj.push({
|
|
14698
|
+
value: val,
|
|
14699
|
+
pos: pos + posP,
|
|
14700
|
+
});
|
|
14701
|
+
}
|
|
14702
|
+
}
|
|
14703
|
+
}
|
|
14704
|
+
return obj;
|
|
14705
|
+
}
|
|
14706
|
+
};
|
|
14707
|
+
var res = extract_str(strP);
|
|
14708
|
+
return res;
|
|
14709
|
+
};
|
|
14710
14710
|
|
|
14711
|
-
func.expression.
|
|
14711
|
+
func.expression.parse_bad = function (strP) {
|
|
14712
14712
|
const nonLettersPatt = /\W/;
|
|
14713
14713
|
const validSymbolsNoArray = /[^.@\[]/;
|
|
14714
14714
|
const validSymbolsWithArray = /[^.@"'\[\]]/;
|
|
@@ -14766,6 +14766,61 @@ func.expression.parse = function (strP) {
|
|
|
14766
14766
|
return extractStr(strP);
|
|
14767
14767
|
};
|
|
14768
14768
|
|
|
14769
|
+
func.expression.parse = function (input) {
|
|
14770
|
+
if (typeof input !== 'string') return [];
|
|
14771
|
+
|
|
14772
|
+
const segments = [];
|
|
14773
|
+
let pos = 0;
|
|
14774
|
+
|
|
14775
|
+
const parts = input.split(/(@)/).filter(Boolean);
|
|
14776
|
+
|
|
14777
|
+
for (let i = 0; i < parts.length; i++) {
|
|
14778
|
+
const part = parts[i];
|
|
14779
|
+
|
|
14780
|
+
if (part === '@' && i + 1 < parts.length) {
|
|
14781
|
+
const nextPart = parts[i + 1];
|
|
14782
|
+
const varEnd = nextPart.search(/[.\[]/); // Split at first . or [
|
|
14783
|
+
let fieldId, remainder;
|
|
14784
|
+
|
|
14785
|
+
if (varEnd > 0) {
|
|
14786
|
+
fieldId = nextPart.slice(0, varEnd);
|
|
14787
|
+
remainder = nextPart.slice(varEnd);
|
|
14788
|
+
} else {
|
|
14789
|
+
fieldId = nextPart;
|
|
14790
|
+
remainder = '';
|
|
14791
|
+
}
|
|
14792
|
+
|
|
14793
|
+
// Add @variable segment
|
|
14794
|
+
const fullVarValue = `@${fieldId}`;
|
|
14795
|
+
segments.push({
|
|
14796
|
+
value: fullVarValue,
|
|
14797
|
+
fieldId,
|
|
14798
|
+
pos,
|
|
14799
|
+
});
|
|
14800
|
+
pos += fullVarValue.length;
|
|
14801
|
+
|
|
14802
|
+
// Add remainder as a separate segment, if any
|
|
14803
|
+
if (remainder) {
|
|
14804
|
+
segments.push({
|
|
14805
|
+
value: remainder,
|
|
14806
|
+
pos,
|
|
14807
|
+
});
|
|
14808
|
+
pos += remainder.length;
|
|
14809
|
+
}
|
|
14810
|
+
|
|
14811
|
+
i++; // Skip the next part since we consumed it
|
|
14812
|
+
} else if (part !== '@') {
|
|
14813
|
+
segments.push({
|
|
14814
|
+
value: part,
|
|
14815
|
+
pos,
|
|
14816
|
+
});
|
|
14817
|
+
pos += part.length;
|
|
14818
|
+
}
|
|
14819
|
+
}
|
|
14820
|
+
|
|
14821
|
+
return segments;
|
|
14822
|
+
};
|
|
14823
|
+
|
|
14769
14824
|
func.expression.get_property = async function (valP) {
|
|
14770
14825
|
async function secure_eval(val) {
|
|
14771
14826
|
if (typeof IS_PROCESS_SERVER === 'undefined') {
|