@xuda.io/xuda-worker-bundle-min 1.3.245 → 1.3.247
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 +9 -446
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5608,9 +5608,12 @@ func.utils.get_drive_url = function (SESSION_ID, val, wrap) {
|
|
|
5608
5608
|
function replaceFiletoURL(fileString) {
|
|
5609
5609
|
// const NEGATIVE_URL = `https://${_session.opt.domain}/workspace-drive/`; //func.common.get_url(SESSION_ID, "workspace-drive");
|
|
5610
5610
|
const _app = APP_OBJ[_session.APP_ID];
|
|
5611
|
-
let url = `https://${_session.
|
|
5611
|
+
let url = `https://${_session.domain}/workspace-drive/${
|
|
5612
5612
|
_app.is_deployment ? _app.app_datacenter_id : _app.app_id_reference
|
|
5613
|
-
}/`;
|
|
5613
|
+
}/`;
|
|
5614
|
+
// let url = `https://${_session.opt.domain}/workspace-drive/${
|
|
5615
|
+
// _app.is_deployment ? _app.app_datacenter_id : _app.app_id_reference
|
|
5616
|
+
// }/`;
|
|
5614
5617
|
const FILE_REPLACE_URL = `${url}${val}?token=${_session.opt.token}`;
|
|
5615
5618
|
|
|
5616
5619
|
let match = `drv_${
|
|
@@ -8625,11 +8628,9 @@ func.expression.get = async function (
|
|
|
8625
8628
|
}
|
|
8626
8629
|
if (val.fieldId && val.value && typeof val.value === "string") {
|
|
8627
8630
|
if (
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
sourceP === "sort" ||
|
|
8632
|
-
sourceP === "locate"
|
|
8631
|
+
["query", "condition", "range", "sort", "locate"].includes(
|
|
8632
|
+
sourceP
|
|
8633
|
+
)
|
|
8633
8634
|
) {
|
|
8634
8635
|
if (val.value.indexOf("↵") > -1) {
|
|
8635
8636
|
res[key] = val.value.split("↵").join("");
|
|
@@ -8637,11 +8638,7 @@ func.expression.get = async function (
|
|
|
8637
8638
|
res[key] = res[key].replace(/(\r\n|\n|\r)/gm, ""); //.replace(/"/g,'\"');//.replace(/'/g,"");
|
|
8638
8639
|
}
|
|
8639
8640
|
|
|
8640
|
-
if (
|
|
8641
|
-
sourceP === "init" ||
|
|
8642
|
-
sourceP === "update" ||
|
|
8643
|
-
sourceP === "virtual"
|
|
8644
|
-
) {
|
|
8641
|
+
if (["init", "update", "virtual"].includes(sourceP)) {
|
|
8645
8642
|
if (val.value.indexOf("↵") > -1)
|
|
8646
8643
|
res[key] = val.value.split("↵").join("\n");
|
|
8647
8644
|
res[key] = res[key].replace(/(\r\n|\n|\r)/gm, "\\n");
|
|
@@ -8764,440 +8761,6 @@ func.expression.get = async function (
|
|
|
8764
8761
|
return new_class.get();
|
|
8765
8762
|
};
|
|
8766
8763
|
|
|
8767
|
-
// func.expression.get = async function (
|
|
8768
|
-
// SESSION_ID,
|
|
8769
|
-
// valP,
|
|
8770
|
-
// dsSessionP,
|
|
8771
|
-
// sourceP,
|
|
8772
|
-
// rowIdP,
|
|
8773
|
-
// sourceActionP,
|
|
8774
|
-
// secondPassP,
|
|
8775
|
-
// calling_fieldIdP,
|
|
8776
|
-
// fieldsP,
|
|
8777
|
-
// debug_infoP,
|
|
8778
|
-
// iterate_info,
|
|
8779
|
-
// js_script_callback,
|
|
8780
|
-
// jobNo
|
|
8781
|
-
// ) {
|
|
8782
|
-
// var ret;
|
|
8783
|
-
// var fields = {};
|
|
8784
|
-
// var error;
|
|
8785
|
-
// var warning;
|
|
8786
|
-
|
|
8787
|
-
// function evalJson(text) {
|
|
8788
|
-
// return eval("(" + text + ")");
|
|
8789
|
-
// }
|
|
8790
|
-
|
|
8791
|
-
// if (valP === null) {
|
|
8792
|
-
// ret = "";
|
|
8793
|
-
// } else {
|
|
8794
|
-
// switch (typeof valP) {
|
|
8795
|
-
// case "string":
|
|
8796
|
-
// ret = valP;
|
|
8797
|
-
// break;
|
|
8798
|
-
|
|
8799
|
-
// case "undefined":
|
|
8800
|
-
// ret = "";
|
|
8801
|
-
// break;
|
|
8802
|
-
|
|
8803
|
-
// case "boolean":
|
|
8804
|
-
// ret = valP ? "Y" : "N";
|
|
8805
|
-
// break;
|
|
8806
|
-
|
|
8807
|
-
// default:
|
|
8808
|
-
// ret = valP.toString();
|
|
8809
|
-
// break;
|
|
8810
|
-
// }
|
|
8811
|
-
// }
|
|
8812
|
-
|
|
8813
|
-
// ret = ret.replace(/\&/g, "&");
|
|
8814
|
-
// const end_results = function () {
|
|
8815
|
-
// const replace_quotes = function (ret) {
|
|
8816
|
-
// for (const [key, val] of Object.entries(fields)) {
|
|
8817
|
-
// if (typeof val === "string")
|
|
8818
|
-
// ret = ret.replace('"' + val + '"', val.replace(/"/gi, ""));
|
|
8819
|
-
// }
|
|
8820
|
-
// return ret;
|
|
8821
|
-
// };
|
|
8822
|
-
// if (sourceP === "update" || sourceP === "javascript") {
|
|
8823
|
-
// if (typeof ret === "string") ret = replace_quotes(ret);
|
|
8824
|
-
// }
|
|
8825
|
-
// const log_error = function () {
|
|
8826
|
-
// if (SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP]) {
|
|
8827
|
-
// func.utils.debug.log(
|
|
8828
|
-
// SESSION_ID,
|
|
8829
|
-
// SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP].nodeId,
|
|
8830
|
-
// {
|
|
8831
|
-
// module: "expression",
|
|
8832
|
-
// action: sourceP,
|
|
8833
|
-
// source: calling_fieldIdP,
|
|
8834
|
-
// prop: ret,
|
|
8835
|
-
// details: ret,
|
|
8836
|
-
// result: ret,
|
|
8837
|
-
// error: error,
|
|
8838
|
-
// warning: warning,
|
|
8839
|
-
// fields: null,
|
|
8840
|
-
// type: "exp",
|
|
8841
|
-
// prog_id: SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP].prog_id,
|
|
8842
|
-
// debug_info: debug_infoP,
|
|
8843
|
-
// }
|
|
8844
|
-
// );
|
|
8845
|
-
// }
|
|
8846
|
-
// };
|
|
8847
|
-
// if (error) log_error();
|
|
8848
|
-
// // if (error || warning) log_error();
|
|
8849
|
-
// return {
|
|
8850
|
-
// result: ret,
|
|
8851
|
-
// fields: fields,
|
|
8852
|
-
// res: res,
|
|
8853
|
-
// explain: result,
|
|
8854
|
-
// error: error,
|
|
8855
|
-
// warning: warning,
|
|
8856
|
-
// req: valP,
|
|
8857
|
-
// var_error_found: var_error_found,
|
|
8858
|
-
// };
|
|
8859
|
-
// };
|
|
8860
|
-
// const variable_not_exist = async function () {
|
|
8861
|
-
// try {
|
|
8862
|
-
// if (sourceP !== "arguments") {
|
|
8863
|
-
// if (ret && ret.substr(0, 6) === "_DATE_") {
|
|
8864
|
-
// ret = ret.substr(6);
|
|
8865
|
-
// } else if (
|
|
8866
|
-
// (ret &&
|
|
8867
|
-
// ret.length === 10 &&
|
|
8868
|
-
// ret.substr(4, 1) === "-" &&
|
|
8869
|
-
// ret.substr(7, 1) === "-") ||
|
|
8870
|
-
// ret === "self" // bypass eval for date 2017-03-22
|
|
8871
|
-
// ) {
|
|
8872
|
-
// ret = ret;
|
|
8873
|
-
// } else {
|
|
8874
|
-
// // ret = secure_eval(ret); //eval(ret);
|
|
8875
|
-
// ret = await func.expression.secure_eval(
|
|
8876
|
-
// SESSION_ID,
|
|
8877
|
-
// sourceP,
|
|
8878
|
-
// ret,
|
|
8879
|
-
// jobNo,
|
|
8880
|
-
// dsSessionP,
|
|
8881
|
-
// js_script_callback
|
|
8882
|
-
// );
|
|
8883
|
-
// }
|
|
8884
|
-
// // console.log("AFTER OK", ret)
|
|
8885
|
-
// return end_results();
|
|
8886
|
-
// } else {
|
|
8887
|
-
// // do eval for arithmetic vals
|
|
8888
|
-
// ret = ret.replace(/_NULL/gi, "");
|
|
8889
|
-
// return end_results();
|
|
8890
|
-
// }
|
|
8891
|
-
// } catch (err) {
|
|
8892
|
-
// // console.error(err);
|
|
8893
|
-
// return end_results();
|
|
8894
|
-
// }
|
|
8895
|
-
// };
|
|
8896
|
-
// if (!func.expression.validate_variables(valP)) {
|
|
8897
|
-
// return await variable_not_exist();
|
|
8898
|
-
// }
|
|
8899
|
-
// var split = [];
|
|
8900
|
-
// var var_Arr = [];
|
|
8901
|
-
// split = func.expression.parse(ret);
|
|
8902
|
-
// for await (const [arr_key, val] of Object.entries(split)) {
|
|
8903
|
-
// // run each field
|
|
8904
|
-
// const key = Number(arr_key);
|
|
8905
|
-
// var_Arr[key] = {};
|
|
8906
|
-
// var_Arr[key].value = val.value;
|
|
8907
|
-
// //--------------
|
|
8908
|
-
// const replace_value_in_string = function (retP, fieldIdP) {
|
|
8909
|
-
// if (
|
|
8910
|
-
// iterate_info?.iterator_key === fieldIdP ||
|
|
8911
|
-
// iterate_info?.iterator_val === fieldIdP
|
|
8912
|
-
// ) {
|
|
8913
|
-
// if (iterate_info.iterator_key === fieldIdP) {
|
|
8914
|
-
// retP.value = iterate_info._key;
|
|
8915
|
-
// }
|
|
8916
|
-
// if (iterate_info.iterator_val === fieldIdP) {
|
|
8917
|
-
// retP.value = iterate_info._val;
|
|
8918
|
-
// }
|
|
8919
|
-
// }
|
|
8920
|
-
|
|
8921
|
-
// const set_value = function (valP) {
|
|
8922
|
-
// if (typeof valP !== "undefined") {
|
|
8923
|
-
// var_Arr[key].value = valP;
|
|
8924
|
-
// if (typeof valP === "string") var_Arr[key].type = "string";
|
|
8925
|
-
// } else {
|
|
8926
|
-
// if (retP.type === "object") {
|
|
8927
|
-
// var_Arr[key].value = "";
|
|
8928
|
-
// var_Arr[key].type = "string";
|
|
8929
|
-
// }
|
|
8930
|
-
// }
|
|
8931
|
-
// };
|
|
8932
|
-
|
|
8933
|
-
// if (sourceP === "exp" && retP.type !== "exp") {
|
|
8934
|
-
// var_Arr[key].type = retP.type;
|
|
8935
|
-
// return;
|
|
8936
|
-
// }
|
|
8937
|
-
// if (typeof retP.value !== "undefined") {
|
|
8938
|
-
// var_Arr[key].type = retP.type;
|
|
8939
|
-
// var_Arr[key].value = retP.value;
|
|
8940
|
-
// if ((val.value.indexOf("[") > -1) | (val.value.indexOf(".") > -1)) {
|
|
8941
|
-
// //get values from array '@var==="sss" && @var_B==="sss" && @obj.property===5 && @objA["value"]===123 | @objB["value"].property===1234'
|
|
8942
|
-
// var data = retP.prop;
|
|
8943
|
-
// if (retP.type === "object") data = retP.value;
|
|
8944
|
-
// var property1, property2;
|
|
8945
|
-
// //check for split situation: @objB[@var].property 1: @objB[ 2:@var].property
|
|
8946
|
-
// if (
|
|
8947
|
-
// val.value.indexOf("[") === -1 &&
|
|
8948
|
-
// val.value.indexOf("]") > -1 &&
|
|
8949
|
-
// val.value.substr(0, 1) === "@"
|
|
8950
|
-
// ) {
|
|
8951
|
-
// //check situation 2
|
|
8952
|
-
// var prevData = var_Arr[key - 1].value;
|
|
8953
|
-
// var_Arr[key].value = prevData[data]; // @objB[@var]
|
|
8954
|
-
// if (val.value.indexOf(".") > -1) {
|
|
8955
|
-
// property2 = func.expression.get_property(val.value).property2; //val.value.substr(val.value.indexOf(".") + 1, val.value.length); // get .
|
|
8956
|
-
// if (prevData[data]) set_value(prevData[data][property2]);
|
|
8957
|
-
// // var_Arr[key].value = prevData[data][property2]; //@objB[@var].property
|
|
8958
|
-
// }
|
|
8959
|
-
// delete var_Arr[key - 1];
|
|
8960
|
-
// } else {
|
|
8961
|
-
// property1 = func.expression.get_property(val.value).property1;
|
|
8962
|
-
// property2 = func.expression.get_property(val.value).property2;
|
|
8963
|
-
// if (property1) {
|
|
8964
|
-
// var_Arr[key].value = data[property1]; // @var["value"] or @var.property
|
|
8965
|
-
// if (property2) {
|
|
8966
|
-
// if (data[property1]) set_value(data[property1][property2]);
|
|
8967
|
-
// }
|
|
8968
|
-
// }
|
|
8969
|
-
// if (property2 && !property1) {
|
|
8970
|
-
// if (
|
|
8971
|
-
// data //data[property2]
|
|
8972
|
-
// ) {
|
|
8973
|
-
// set_value(data[property2]);
|
|
8974
|
-
// }
|
|
8975
|
-
// }
|
|
8976
|
-
// }
|
|
8977
|
-
// fields[fieldIdP] = var_Arr[key].value; // added 051017 to allow @SYS_GLOBAL_OBJ_WIDGET_INFO.doc_id
|
|
8978
|
-
// var_Arr[key].fieldId = fieldIdP;
|
|
8979
|
-
// } else {
|
|
8980
|
-
// fields[fieldIdP] = var_Arr[key].value; // update flat no warpers
|
|
8981
|
-
// var_Arr[key].fieldId = fieldIdP;
|
|
8982
|
-
// }
|
|
8983
|
-
// }
|
|
8984
|
-
// };
|
|
8985
|
-
// //>>>>>>>>>>>>>>>>>>
|
|
8986
|
-
// //>>>> start here >>
|
|
8987
|
-
// //>>>>>>>>>>>>>>>>>>
|
|
8988
|
-
// if (val.fieldId) {
|
|
8989
|
-
// // @_THIS
|
|
8990
|
-
// if (
|
|
8991
|
-
// val.fieldId &&
|
|
8992
|
-
// val.fieldId.substr(0, 5) === "_THIS" &&
|
|
8993
|
-
// calling_fieldIdP &&
|
|
8994
|
-
// (val.fieldId.length === 5 ||
|
|
8995
|
-
// (val.fieldId.length > 5 && val.fieldId.substr(5, 1) === "."))
|
|
8996
|
-
// ) {
|
|
8997
|
-
// if (val.fieldId.length === 5) val.fieldId = calling_fieldIdP;
|
|
8998
|
-
// else
|
|
8999
|
-
// val.fieldId =
|
|
9000
|
-
// calling_fieldIdP + val.fieldId(5, val.fieldId.length - 1);
|
|
9001
|
-
// }
|
|
9002
|
-
// if (!sourceP === "exp") {
|
|
9003
|
-
// var_Arr[key].value = '""';
|
|
9004
|
-
// } // put default
|
|
9005
|
-
// fields[val.fieldId] = var_Arr[key].value;
|
|
9006
|
-
|
|
9007
|
-
// const ret = await func.datasource.get_value(
|
|
9008
|
-
// SESSION_ID,
|
|
9009
|
-
// val.fieldId,
|
|
9010
|
-
// dsSessionP,
|
|
9011
|
-
|
|
9012
|
-
// rowIdP
|
|
9013
|
-
// ); // find field in dataSources
|
|
9014
|
-
|
|
9015
|
-
// replace_value_in_string(ret.ret, ret.fieldIdP);
|
|
9016
|
-
// }
|
|
9017
|
-
// }
|
|
9018
|
-
// try {
|
|
9019
|
-
// // eval the expression
|
|
9020
|
-
// var res = [];
|
|
9021
|
-
// var exp_exist;
|
|
9022
|
-
// var var_error_found;
|
|
9023
|
-
// // merge arr values
|
|
9024
|
-
// _.forEach(var_Arr, function (val, key) {
|
|
9025
|
-
// if (sourceP === "UI Property EXP") {
|
|
9026
|
-
// let ret = func.utils.get_drive_url(SESSION_ID, val.value, true);
|
|
9027
|
-
// if (ret.changed) {
|
|
9028
|
-
// res[key] = ret.value;
|
|
9029
|
-
// return true;
|
|
9030
|
-
// }
|
|
9031
|
-
// }
|
|
9032
|
-
|
|
9033
|
-
// if (sourceP === "UI Attr EXP") {
|
|
9034
|
-
// let ret = func.utils.get_drive_url(
|
|
9035
|
-
// SESSION_ID,
|
|
9036
|
-
// val.value,
|
|
9037
|
-
// var_Arr.length == 1 ? false : true
|
|
9038
|
-
// );
|
|
9039
|
-
// if (ret.changed) {
|
|
9040
|
-
// res[key] = ret.value;
|
|
9041
|
-
// return true;
|
|
9042
|
-
// }
|
|
9043
|
-
// }
|
|
9044
|
-
|
|
9045
|
-
// if (val.type === "exp") {
|
|
9046
|
-
// exp_exist = true;
|
|
9047
|
-
// }
|
|
9048
|
-
// res[key] = val.value;
|
|
9049
|
-
// if (
|
|
9050
|
-
// sourceP !== "DbQuery" &&
|
|
9051
|
-
// sourceP !== "alert" &&
|
|
9052
|
-
// sourceP !== "exp" &&
|
|
9053
|
-
// sourceP !== "api_rendered_output" &&
|
|
9054
|
-
// (val.type === "string" || val.type === "date" || val.type === "time") &&
|
|
9055
|
-
// var_Arr.length > 1
|
|
9056
|
-
// ) {
|
|
9057
|
-
// res[key] = "`" + val.value + "`"; //res[key] = "'" + val.value + "'"; //
|
|
9058
|
-
// }
|
|
9059
|
-
// if (val.fieldId && val.value && typeof val.value === "string") {
|
|
9060
|
-
// if (
|
|
9061
|
-
// sourceP === "query" ||
|
|
9062
|
-
// sourceP === "condition" ||
|
|
9063
|
-
// sourceP === "range" ||
|
|
9064
|
-
// sourceP === "sort" ||
|
|
9065
|
-
// sourceP === "locate"
|
|
9066
|
-
// ) {
|
|
9067
|
-
// if (val.value.indexOf("↵") > -1) {
|
|
9068
|
-
// res[key] = val.value.split("↵").join("");
|
|
9069
|
-
// }
|
|
9070
|
-
// res[key] = res[key].replace(/(\r\n|\n|\r)/gm, ""); //.replace(/"/g,'\"');//.replace(/'/g,"");
|
|
9071
|
-
// }
|
|
9072
|
-
|
|
9073
|
-
// if (
|
|
9074
|
-
// sourceP === "init" ||
|
|
9075
|
-
// sourceP === "update" ||
|
|
9076
|
-
// sourceP === "virtual"
|
|
9077
|
-
// ) {
|
|
9078
|
-
// if (val.value.indexOf("↵") > -1)
|
|
9079
|
-
// res[key] = val.value.split("↵").join("\n");
|
|
9080
|
-
// res[key] = res[key].replace(/(\r\n|\n|\r)/gm, "\\n");
|
|
9081
|
-
// }
|
|
9082
|
-
|
|
9083
|
-
// if (typeof IS_PROCESS_SERVER !== "undefined") {
|
|
9084
|
-
// res[key] = res[key].replace(/(\r\n|\n|\r)/gm, "<br>");
|
|
9085
|
-
// }
|
|
9086
|
-
|
|
9087
|
-
// fields[val.fieldId] = res[key];
|
|
9088
|
-
// }
|
|
9089
|
-
// // extract object
|
|
9090
|
-
// if (typeof val.value === "object" && var_Arr.length > 1) {
|
|
9091
|
-
// if (
|
|
9092
|
-
// !Array.isArray(val.value) &&
|
|
9093
|
-
// !var_Arr[key + 1].value?.includes(".")
|
|
9094
|
-
// ) {
|
|
9095
|
-
// // prevent cast on single value expression
|
|
9096
|
-
// res[key] = "(" + JSON.stringify(val.value) + ")";
|
|
9097
|
-
// } else {
|
|
9098
|
-
// res[key] = JSON.stringify(val.value);
|
|
9099
|
-
// }
|
|
9100
|
-
// }
|
|
9101
|
-
|
|
9102
|
-
// if (
|
|
9103
|
-
// !exp_exist &&
|
|
9104
|
-
// sourceP !== "exp" &&
|
|
9105
|
-
// val.value &&
|
|
9106
|
-
// typeof val.value === "string" &&
|
|
9107
|
-
// val.value.substr(0, 1) === "@"
|
|
9108
|
-
// ) {
|
|
9109
|
-
// warning = "Error encoding " + val.value;
|
|
9110
|
-
// var_error_found = true;
|
|
9111
|
-
// res[key] = 0;
|
|
9112
|
-
// }
|
|
9113
|
-
// });
|
|
9114
|
-
// var join = function (arrP) {
|
|
9115
|
-
// return arrP.join("");
|
|
9116
|
-
// };
|
|
9117
|
-
// var exp = undefined;
|
|
9118
|
-
// if (exp_exist && sourceP !== "exp") {
|
|
9119
|
-
// exp = await func.expression.get(
|
|
9120
|
-
// SESSION_ID,
|
|
9121
|
-
// join(res),
|
|
9122
|
-
// dsSessionP,
|
|
9123
|
-
// sourceP,
|
|
9124
|
-
// rowIdP,
|
|
9125
|
-
// sourceActionP,
|
|
9126
|
-
// true,
|
|
9127
|
-
// calling_fieldIdP,
|
|
9128
|
-
// fields,
|
|
9129
|
-
// debug_infoP
|
|
9130
|
-
// );
|
|
9131
|
-
// if (exp.res) res = exp.res;
|
|
9132
|
-
// // do second pass when exp exist
|
|
9133
|
-
// else res = [exp.result];
|
|
9134
|
-
// fields = _.assignIn(exp.fields, fieldsP);
|
|
9135
|
-
// }
|
|
9136
|
-
// var result = join(res); //res.join("");
|
|
9137
|
-
|
|
9138
|
-
// if (res.length === 1) {
|
|
9139
|
-
// // bypass join for single value expression
|
|
9140
|
-
// result = res[0];
|
|
9141
|
-
// }
|
|
9142
|
-
|
|
9143
|
-
// if (secondPassP) {
|
|
9144
|
-
// ret = result;
|
|
9145
|
-
// } else if (sourceP !== "exp") {
|
|
9146
|
-
// // no eval for second pass
|
|
9147
|
-
// // return single value
|
|
9148
|
-
// if (
|
|
9149
|
-
// res.length === 1 &&
|
|
9150
|
-
// typeof res[0] === "string" &&
|
|
9151
|
-
// typeof res[0] !== "object"
|
|
9152
|
-
// ) {
|
|
9153
|
-
// // avoid eval when query leading zeros problem
|
|
9154
|
-
// ret = join(res); // res.join("");
|
|
9155
|
-
// if (ret && ret.substr(0, 1) === "@") {
|
|
9156
|
-
// error = "Error encoding @ var";
|
|
9157
|
-
// var_error_found = true;
|
|
9158
|
-
// }
|
|
9159
|
-
// } else {
|
|
9160
|
-
// if (
|
|
9161
|
-
// sourceP !== "arguments" &&
|
|
9162
|
-
// sourceP !== "alert" &&
|
|
9163
|
-
// sourceP !== "api_rendered_output" &&
|
|
9164
|
-
// sourceP !== "DbQuery"
|
|
9165
|
-
// ) {
|
|
9166
|
-
// // ret = secure_eval(result); // eval(result);
|
|
9167
|
-
// ret = await func.expression.secure_eval(
|
|
9168
|
-
// SESSION_ID,
|
|
9169
|
-
// sourceP,
|
|
9170
|
-
// result,
|
|
9171
|
-
// jobNo,
|
|
9172
|
-
// dsSessionP,
|
|
9173
|
-
// js_script_callback
|
|
9174
|
-
// );
|
|
9175
|
-
// } else {
|
|
9176
|
-
// if (sourceP === "DbQuery") {
|
|
9177
|
-
// ret = JSON.stringify(evalJson(result));
|
|
9178
|
-
// } else {
|
|
9179
|
-
// // try eval
|
|
9180
|
-
// ret = result;
|
|
9181
|
-
// }
|
|
9182
|
-
// }
|
|
9183
|
-
// }
|
|
9184
|
-
// }
|
|
9185
|
-
// // console.log("AAAA")
|
|
9186
|
-
// return end_results();
|
|
9187
|
-
// } catch (err) {
|
|
9188
|
-
// ret = result; // skip eval on error
|
|
9189
|
-
// error = err.message;
|
|
9190
|
-
|
|
9191
|
-
// return end_results();
|
|
9192
|
-
// }
|
|
9193
|
-
// // }
|
|
9194
|
-
// // else {
|
|
9195
|
-
// // return variable_not_exist();
|
|
9196
|
-
// // //===========================
|
|
9197
|
-
// // // variable not exist
|
|
9198
|
-
// // }
|
|
9199
|
-
// // >>>> return results <<<<<<<<<
|
|
9200
|
-
// };
|
|
9201
8764
|
func.expression.parse = function (strP) {
|
|
9202
8765
|
var extract_str = function (strP, posP) {
|
|
9203
8766
|
if (!posP) posP = 0;
|