@xuda.io/xuda-worker-bundle-min 1.3.78 → 1.3.79
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 +29 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -774,17 +774,17 @@ func.common.get_module = async function (SESSION_ID, module) {
|
|
|
774
774
|
};
|
|
775
775
|
|
|
776
776
|
func.api = {};
|
|
777
|
-
func.api = {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
};
|
|
787
|
-
func.api.init();
|
|
777
|
+
// func.api = {
|
|
778
|
+
// init: async function () {
|
|
779
|
+
// const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
780
|
+
// const api_utils = await func.common.get_module(
|
|
781
|
+
// SESSION_ID,
|
|
782
|
+
// "xuda-api-library.mjs"
|
|
783
|
+
// );
|
|
784
|
+
// console.log(api_utils);
|
|
785
|
+
// },
|
|
786
|
+
// };
|
|
787
|
+
// func.api.init();
|
|
788
788
|
|
|
789
789
|
func.api.set_field_value = async function (field_id, value) {
|
|
790
790
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
@@ -839,6 +839,24 @@ func.api.invoke_event = async function (event_id) {
|
|
|
839
839
|
});
|
|
840
840
|
|
|
841
841
|
return await api_utils.invoke_event(event_id);
|
|
842
|
+
};
|
|
843
|
+
func.api.call_api_program = async function (prog_id) {
|
|
844
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
845
|
+
const api_utils = await func.common.get_module(
|
|
846
|
+
SESSION_ID,
|
|
847
|
+
"xuda-api-library.mjs"
|
|
848
|
+
);
|
|
849
|
+
|
|
850
|
+
api_utils.init_module({
|
|
851
|
+
func,
|
|
852
|
+
glb,
|
|
853
|
+
SESSION_OBJ,
|
|
854
|
+
SESSION_ID,
|
|
855
|
+
APP_OBJ,
|
|
856
|
+
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).length - 1,
|
|
857
|
+
});
|
|
858
|
+
|
|
859
|
+
return await api_utils.call_api_program(prog_id);
|
|
842
860
|
};
|
|
843
861
|
glb.DEBUG_INFO_OBJ = {};
|
|
844
862
|
// var CONNECTION_ATTEMPTS = 0;
|