@xuda.io/xuda-worker-bundle-min 1.3.75 → 1.3.77
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 +22 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -617,6 +617,18 @@ var UI_FRAMEWORK_INSTALLED = null;
|
|
|
617
617
|
var UI_FRAMEWORK_PLUGIN = {};
|
|
618
618
|
|
|
619
619
|
func.api = {};
|
|
620
|
+
func.api = {
|
|
621
|
+
init: async function () {
|
|
622
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
623
|
+
const api_utils = await func.common.get_module(
|
|
624
|
+
SESSION_ID,
|
|
625
|
+
"xuda-api-library.mjs"
|
|
626
|
+
);
|
|
627
|
+
console.log(api_utils);
|
|
628
|
+
},
|
|
629
|
+
};
|
|
630
|
+
func.api.init();
|
|
631
|
+
|
|
620
632
|
func.api.set_field_value = async function (field_id, value) {
|
|
621
633
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
622
634
|
const api_utils = await func.common.get_module(
|
|
@@ -770,17 +782,15 @@ func.common.get_module = async function (SESSION_ID, module) {
|
|
|
770
782
|
return ret;
|
|
771
783
|
}
|
|
772
784
|
if (_session.worker_type === "Debug") {
|
|
773
|
-
// if (typeof IS_PROCESS_SERVER !== "undefined") {
|
|
774
|
-
// ret = await import(`${_conf.xuda_home}runtime/js/modules/` + module);
|
|
775
|
-
// } else
|
|
776
785
|
if (
|
|
777
786
|
typeof IS_DOCKER !== "undefined" ||
|
|
778
787
|
typeof IS_PROCESS_SERVER !== "undefined"
|
|
779
788
|
) {
|
|
780
|
-
// ret = await import(`${_conf.xuda_home}modules/` + module);
|
|
781
789
|
ret = await import(
|
|
782
790
|
func.utils.get_resource_filename(
|
|
783
|
-
SESSION_OBJ[SESSION_ID]
|
|
791
|
+
SESSION_OBJ[SESSION_ID].engine_mode === "live_preview"
|
|
792
|
+
? ""
|
|
793
|
+
: SESSION_OBJ[SESSION_ID]?.opt?.app_build_id,
|
|
784
794
|
`${_conf.xuda_home}modules/` + module
|
|
785
795
|
)
|
|
786
796
|
);
|
|
@@ -790,7 +800,9 @@ func.common.get_module = async function (SESSION_ID, module) {
|
|
|
790
800
|
SESSION_ID,
|
|
791
801
|
"dist",
|
|
792
802
|
func.utils.get_resource_filename(
|
|
793
|
-
SESSION_OBJ[SESSION_ID]
|
|
803
|
+
SESSION_OBJ[SESSION_ID].engine_mode === "live_preview"
|
|
804
|
+
? ""
|
|
805
|
+
: SESSION_OBJ[SESSION_ID]?.opt?.app_build_id,
|
|
794
806
|
"runtime/js/modules/" + module
|
|
795
807
|
)
|
|
796
808
|
)
|
|
@@ -817,7 +829,9 @@ func.common.get_module = async function (SESSION_ID, module) {
|
|
|
817
829
|
SESSION_ID,
|
|
818
830
|
"dist",
|
|
819
831
|
func.utils.get_resource_filename(
|
|
820
|
-
SESSION_OBJ[SESSION_ID]
|
|
832
|
+
SESSION_OBJ[SESSION_ID].engine_mode === "live_preview"
|
|
833
|
+
? ""
|
|
834
|
+
: SESSION_OBJ[SESSION_ID]?.opt?.app_build_id,
|
|
821
835
|
"runtime/js/modules/" + rep()
|
|
822
836
|
)
|
|
823
837
|
)
|
|
@@ -6512,7 +6526,7 @@ func.utils.find_key_in_ViewUITreeObj = function (arr, key, val) {
|
|
|
6512
6526
|
|
|
6513
6527
|
func.utils.get_plugin_setup = function (SESSION_ID, plugin_name) {
|
|
6514
6528
|
const report_error = function (descP, warn) {
|
|
6515
|
-
func.utils.debug.log(SESSION_ID,
|
|
6529
|
+
func.utils.debug.log(SESSION_ID, plugin_name, {
|
|
6516
6530
|
module: "plugin",
|
|
6517
6531
|
action: "Init",
|
|
6518
6532
|
source: "get_plugin_setup",
|