@xuda.io/runtime-bundle 1.0.885 → 1.0.886
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/modules/xuda-api-library.min.mjs +1 -1
- package/js/modules/xuda-api-library.mjs +115 -246
- package/js/modules/xuda-db-adapter-module.min.mjs +1 -1
- package/js/modules/xuda-db-adapter-module.mjs +1 -1
- package/js/modules/xuda-project-loader-module.esm.js +1 -23
- package/js/modules/xuda-project-loader-module.esm.min.js +1 -1
- package/js/xuda-runtime-bundle.js +17 -59
- package/js/xuda-runtime-bundle.min.js +3 -3
- package/js/xuda-runtime-mini-bundle.js +1 -1
- package/js/xuda-runtime-mini-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +17 -59
- package/js/xuda-runtime-slim.min.es.js +17 -59
- package/js/xuda-runtime-slim.min.js +3 -3
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +10 -51
- package/js/xuda-worker-bundle.js +10 -51
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +6 -47
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -1724,53 +1724,12 @@ glb.API_OUTPUT_ARR = ['json', 'html', 'xml', 'text', 'css', 'javascript'];
|
|
|
1724
1724
|
|
|
1725
1725
|
const PROTECTED_NAMES_ARR = ['THIS', 'ROWID']; //tbd
|
|
1726
1726
|
|
|
1727
|
-
// func.common.get_custom_icon = async function (
|
|
1728
|
-
// SESSION_ID,
|
|
1729
|
-
// menuIdP,
|
|
1730
|
-
// fromTreeP,
|
|
1731
|
-
// get_image_onlyP
|
|
1732
|
-
// ) {
|
|
1733
|
-
// var ret = "";
|
|
1734
|
-
// var iconItemId;
|
|
1735
|
-
// let tree_ret = await func.utils.TREE_OBJ.get(SESSION_ID, menuIdP);
|
|
1736
|
-
// if (tree_ret) {
|
|
1737
|
-
// if (tree_ret.menuType === "icon") {
|
|
1738
|
-
// iconItemId = menuIdP;
|
|
1739
|
-
// } else {
|
|
1740
|
-
// if (tree_ret.rICN) iconItemId = tree_ret.rICN;
|
|
1741
|
-
// }
|
|
1742
|
-
// if (iconItemId) {
|
|
1743
|
-
// let tree_ret2 = await func.utils.TREE_OBJ.get(SESSION_ID, iconItemId);
|
|
1744
|
-
// if (tree_ret2) {
|
|
1745
|
-
// if (get_image_onlyP) {
|
|
1746
|
-
// return tree_ret2.rPTH;
|
|
1747
|
-
// } else {
|
|
1748
|
-
// const app_obj = APP_OBJ[SESSION_OBJ[SESSION_ID].app_id];
|
|
1749
|
-
// const url = func.common.get_url(
|
|
1750
|
-
// SESSION_ID,
|
|
1751
|
-
// "studio-drive",
|
|
1752
|
-
// `${app_obj.app_replicate ? app_obj.app_replicate : app_obj._id}/${
|
|
1753
|
-
// tree_ret2.rPTH
|
|
1754
|
-
// }`
|
|
1755
|
-
// );
|
|
1756
|
-
// return url;
|
|
1757
|
-
// }
|
|
1758
|
-
// // }
|
|
1759
|
-
// } else {
|
|
1760
|
-
// return ret;
|
|
1761
|
-
// }
|
|
1762
|
-
// } else {
|
|
1763
|
-
// return ret;
|
|
1764
|
-
// }
|
|
1765
|
-
// } else return ret;
|
|
1766
|
-
// };
|
|
1767
|
-
|
|
1768
1727
|
func.common.db = async function (SESSION_ID, serviceP, dataP, opt = {}, dsSession) {
|
|
1769
1728
|
return new Promise(async function (resolve, reject) {
|
|
1770
1729
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
1771
1730
|
const app_id = _session.app_id;
|
|
1772
1731
|
|
|
1773
|
-
if (
|
|
1732
|
+
if (glb.DEBUG_MODE) {
|
|
1774
1733
|
console.log('request', dataP);
|
|
1775
1734
|
}
|
|
1776
1735
|
|
|
@@ -1805,7 +1764,7 @@ func.common.db = async function (SESSION_ID, serviceP, dataP, opt = {}, dsSessio
|
|
|
1805
1764
|
});
|
|
1806
1765
|
}
|
|
1807
1766
|
|
|
1808
|
-
if (
|
|
1767
|
+
if (glb.DEBUG_MODE) {
|
|
1809
1768
|
console.log('response', ret);
|
|
1810
1769
|
}
|
|
1811
1770
|
resolve(ret, true);
|
|
@@ -2387,9 +2346,9 @@ func.common.get_module = async function (SESSION_ID, module, paramsP = {}) {
|
|
|
2387
2346
|
}
|
|
2388
2347
|
if (_session.worker_type === 'Debug') {
|
|
2389
2348
|
if (typeof IS_DOCKER !== 'undefined' || typeof IS_PROCESS_SERVER !== 'undefined') {
|
|
2390
|
-
ret = await get_ret(func.utils.get_resource_filename(
|
|
2349
|
+
ret = await get_ret(func.utils.get_resource_filename(['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session?.opt?.app_build_id, `${_conf.xuda_home}root/dist/runtime/js/modules/` + module));
|
|
2391
2350
|
} else {
|
|
2392
|
-
ret = await get_ret(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(
|
|
2351
|
+
ret = await get_ret(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session?.opt?.app_build_id, 'runtime/js/modules/' + module)));
|
|
2393
2352
|
}
|
|
2394
2353
|
|
|
2395
2354
|
return ret;
|
|
@@ -2400,9 +2359,9 @@ func.common.get_module = async function (SESSION_ID, module, paramsP = {}) {
|
|
|
2400
2359
|
};
|
|
2401
2360
|
|
|
2402
2361
|
if (typeof IS_DOCKER !== 'undefined' || typeof IS_PROCESS_SERVER !== 'undefined') {
|
|
2403
|
-
ret = await get_ret(func.utils.get_resource_filename(
|
|
2362
|
+
ret = await get_ret(func.utils.get_resource_filename(['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session?.opt?.app_build_id, `${_conf.xuda_home}root/dist/runtime/js/modules/` + rep()));
|
|
2404
2363
|
} else {
|
|
2405
|
-
ret = await get_ret(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(
|
|
2364
|
+
ret = await get_ret(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session?.opt?.app_build_id, 'runtime/js/modules/' + rep())));
|
|
2406
2365
|
}
|
|
2407
2366
|
|
|
2408
2367
|
return ret;
|
|
@@ -2983,7 +2942,7 @@ func.datasource.create = async function (
|
|
|
2983
2942
|
|
|
2984
2943
|
var run_at = _prog_obj?.properties?.runAt;
|
|
2985
2944
|
|
|
2986
|
-
if (_session.engine_mode
|
|
2945
|
+
if (!['live_preview', 'cms'].includes(_session.engine_mode)) {
|
|
2987
2946
|
if (_session.opt.app_computing_mode === 'main') {
|
|
2988
2947
|
run_at = 'client';
|
|
2989
2948
|
}
|
|
@@ -3159,7 +3118,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3159
3118
|
|
|
3160
3119
|
if (typeof parameters_obj_inP?.[val.data.parameter] !== 'undefined') {
|
|
3161
3120
|
_ds.in_parameters[val.data.parameter].value = parameters_obj_inP[val.data.parameter];
|
|
3162
|
-
} else if (_session.engine_mode
|
|
3121
|
+
} else if (['live_preview', 'cms'].includes(_session.engine_mode)) {
|
|
3163
3122
|
_ds.in_parameters[val.data.parameter].value = _session?.url_params?.[val.data.parameter];
|
|
3164
3123
|
}
|
|
3165
3124
|
|
|
@@ -3181,7 +3140,7 @@ func.datasource.prepare = async function (SESSION_ID, prog_id, dataSourceNoP, pa
|
|
|
3181
3140
|
_ds.data_system['SYS_GLOBAL_STR_SESSION_ID'] = SESSION_ID;
|
|
3182
3141
|
_ds.data_system['SYS_GLOBAL_STR_LOGIN_USER_ID'] = _session.USR_OBJ._id;
|
|
3183
3142
|
|
|
3184
|
-
if (_session.engine_mode
|
|
3143
|
+
if (!['live_preview', 'cms'].includes(_session.engine_mode) && PROJECT_OBJ[_session.app_id].info) {
|
|
3185
3144
|
_ds.data_system['SYS_GLOBAL_OBJ_APP_INFO'] = {
|
|
3186
3145
|
build: PROJECT_OBJ[_session.app_id].info.build_id,
|
|
3187
3146
|
author: PROJECT_OBJ[_session.app_id].info.author,
|
|
@@ -6246,7 +6205,7 @@ func.utils.ws_worker.functions = {
|
|
|
6246
6205
|
APP_OBJ[data.app_id] = data.APP_OBJ;
|
|
6247
6206
|
PROJECT_OBJ[data.app_id] = data.PROJECT_OBJ;
|
|
6248
6207
|
|
|
6249
|
-
if (data.SESSION_INFO.engine_mode
|
|
6208
|
+
if (['live_preview', 'cms'].includes(data.SESSION_INFO.engine_mode)) {
|
|
6250
6209
|
DOCS_OBJ[data.app_id] = data.DOCS_OBJ;
|
|
6251
6210
|
} else if (typeof IS_DOCKER === 'undefined' && typeof IS_PROCESS_SERVER === 'undefined') {
|
|
6252
6211
|
if (!DOCS_OBJ[data.app_id]) {
|
|
@@ -9418,7 +9377,7 @@ func.UI.screen.refresh_xu_attributes = async function (SESSION_ID, fields_arr, j
|
|
|
9418
9377
|
if (avoid_xu_for_refresh) return;
|
|
9419
9378
|
await func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'execute_xu_for', obj, new_job, _elem_val.$elm, _elem_val.$elm.data().xuData.paramsP.dsSessionP);
|
|
9420
9379
|
|
|
9421
|
-
if (
|
|
9380
|
+
if (glb.DEBUG_MODE) {
|
|
9422
9381
|
console.info('node execute_xu_for', obj, panel_val);
|
|
9423
9382
|
}
|
|
9424
9383
|
|
|
@@ -15713,8 +15672,7 @@ function xuda(...args) {
|
|
|
15713
15672
|
FIREBASE_TOKEN_ID: null,
|
|
15714
15673
|
|
|
15715
15674
|
USR_OBJ: {},
|
|
15716
|
-
|
|
15717
|
-
// engine_mode: null,
|
|
15675
|
+
|
|
15718
15676
|
debug_js: null,
|
|
15719
15677
|
DS_UI_EVENTS_GLB: {},
|
|
15720
15678
|
host: location.host,
|
|
@@ -15741,7 +15699,7 @@ function xuda(...args) {
|
|
|
15741
15699
|
val = window.location.host;
|
|
15742
15700
|
break;
|
|
15743
15701
|
case 'engine_mode':
|
|
15744
|
-
val = 'run'
|
|
15702
|
+
val = 'cms'; //was 'run'
|
|
15745
15703
|
break;
|
|
15746
15704
|
case 'app_id':
|
|
15747
15705
|
val = 'unknown';
|
|
@@ -15905,7 +15863,7 @@ function xuda(...args) {
|
|
|
15905
15863
|
_client_info.time_zone = client.getTimeZone();
|
|
15906
15864
|
_client_info.cpu_architecture = browser_data.cpu.architecture;
|
|
15907
15865
|
|
|
15908
|
-
if (
|
|
15866
|
+
if (['android', 'ios', 'windows', 'macos', 'linux', 'live_preview'].includes(engine_mode) && func.utils.get_device()) {
|
|
15909
15867
|
_client_info.uuid = window.device.uuid;
|
|
15910
15868
|
if (window.device) {
|
|
15911
15869
|
_client_info.device_name = window.device.name;
|
|
@@ -16524,7 +16482,7 @@ func.index.new_webworker = async function (SESSION_ID, prog_obj, obj) {
|
|
|
16524
16482
|
ver = APP_OBJ[_session.app_id].app_version;
|
|
16525
16483
|
}
|
|
16526
16484
|
|
|
16527
|
-
var build_id = _session.engine_mode
|
|
16485
|
+
var build_id = ['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session.opt.app_build_id;
|
|
16528
16486
|
if (typeof XUDA_BUILD_ID !== 'undefined') {
|
|
16529
16487
|
build_id = XUDA_BUILD_ID;
|
|
16530
16488
|
}
|
|
@@ -16630,8 +16588,8 @@ func.index.new_webworker = async function (SESSION_ID, prog_obj, obj) {
|
|
|
16630
16588
|
const content = `importScripts( "${url}" );`;
|
|
16631
16589
|
return URL.createObjectURL(new Blob([content], { type: 'text/javascript' }));
|
|
16632
16590
|
}
|
|
16633
|
-
|
|
16634
|
-
let blob = getWorkerURL(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(
|
|
16591
|
+
const _session = SESSION[SESSION_ID];
|
|
16592
|
+
let blob = getWorkerURL(func.common.get_url(SESSION_ID, 'dist', func.utils.get_resource_filename(['live_preview', 'cms'].includes(_session.engine_mode) ? '' : _session?.opt?.app_build_id, 'runtime/js/xuda_worker.js')));
|
|
16635
16593
|
WEB_WORKER[SESSION_ID][worker_id] = {
|
|
16636
16594
|
worker: new Worker(blob, {
|
|
16637
16595
|
name: worker_name,
|