@xuda.io/xuda-worker-bundle-min 1.3.88 → 1.3.90
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 +41 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -828,7 +828,7 @@ func.api.invoke_event = async function (event_id) {
|
|
|
828
828
|
|
|
829
829
|
return await api_utils.invoke_event(event_id);
|
|
830
830
|
};
|
|
831
|
-
func.api.call_api_program = async function (prog_id, params) {
|
|
831
|
+
func.api.call_api_program = async function (prog_id, params, opts) {
|
|
832
832
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
833
833
|
const api_utils = await func.common.get_module(
|
|
834
834
|
SESSION_ID,
|
|
@@ -844,7 +844,7 @@ func.api.call_api_program = async function (prog_id, params) {
|
|
|
844
844
|
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).length - 1,
|
|
845
845
|
});
|
|
846
846
|
|
|
847
|
-
return await api_utils.call_api_program(prog_id, params);
|
|
847
|
+
return await api_utils.call_api_program(prog_id, params, null, opts);
|
|
848
848
|
};
|
|
849
849
|
glb.DEBUG_INFO_OBJ = {};
|
|
850
850
|
// var CONNECTION_ATTEMPTS = 0;
|
|
@@ -7810,9 +7810,6 @@ func.events.execute = async function (
|
|
|
7810
7810
|
},
|
|
7811
7811
|
get_data: async function () {
|
|
7812
7812
|
const params_obj = await get_params_obj();
|
|
7813
|
-
// let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, refIdP?.prog);
|
|
7814
|
-
// const _viewId = tree_ret?.id;
|
|
7815
|
-
// args.parameters_obj_inP = refIdP?.parameters;
|
|
7816
7813
|
|
|
7817
7814
|
if (!args.prog_id) {
|
|
7818
7815
|
func.utils.debug_report(
|
|
@@ -8046,6 +8043,45 @@ func.events.execute = async function (
|
|
|
8046
8043
|
comment: async function () {
|
|
8047
8044
|
if (jobNoP) func.events.delete_job(SESSION_ID, jobNoP);
|
|
8048
8045
|
},
|
|
8046
|
+
call_api: async function () {
|
|
8047
|
+
// console.log(args);
|
|
8048
|
+
// debugger;
|
|
8049
|
+
const params_obj = await get_params_obj();
|
|
8050
|
+
|
|
8051
|
+
if (!args.prog_id) {
|
|
8052
|
+
func.utils.debug_report(
|
|
8053
|
+
SESSION_ID,
|
|
8054
|
+
"func.events.execute",
|
|
8055
|
+
elementP + ">" + triggerP + ">" + functionP + ">" + "program missing",
|
|
8056
|
+
"E"
|
|
8057
|
+
);
|
|
8058
|
+
}
|
|
8059
|
+
let output_field =
|
|
8060
|
+
args?.calling_trigger_prop?.data?.name?.properties?.outputField;
|
|
8061
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
8062
|
+
if (!output_field) {
|
|
8063
|
+
func.utils.debug_report(
|
|
8064
|
+
SESSION_ID,
|
|
8065
|
+
"func.events.execute",
|
|
8066
|
+
elementP +
|
|
8067
|
+
">" +
|
|
8068
|
+
triggerP +
|
|
8069
|
+
">" +
|
|
8070
|
+
functionP +
|
|
8071
|
+
">" +
|
|
8072
|
+
"Output field missing",
|
|
8073
|
+
"E"
|
|
8074
|
+
);
|
|
8075
|
+
|
|
8076
|
+
return;
|
|
8077
|
+
}
|
|
8078
|
+
let parameters = args?.calling_trigger_prop?.data?.name?.parameters;
|
|
8079
|
+
const ret = await func.api.call_api_program(args.prog_id, parameters, {
|
|
8080
|
+
dsSession: dsSessionP,
|
|
8081
|
+
});
|
|
8082
|
+
await func.api.set_field_value(output_field, ret);
|
|
8083
|
+
func.events.delete_job(SESSION_ID, jobNoP);
|
|
8084
|
+
},
|
|
8049
8085
|
};
|
|
8050
8086
|
// if (functionP.includes("alert")) {
|
|
8051
8087
|
// return await fx.alert();
|