@xuda.io/runtime-bundle 1.0.287 → 1.0.289

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.
@@ -3907,20 +3907,20 @@ func.datasource.callback = async function (SESSION_ID, dsSessionP, na, rowIdP, j
3907
3907
  }
3908
3908
  }
3909
3909
 
3910
- if (_ds?.progDataSource?.datasetOutputField) {
3911
- let datasource_changes = {};
3910
+ // if (_ds?.progDataSource?.datasetOutputField) {
3911
+ // let datasource_changes = {};
3912
3912
 
3913
- let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
3914
- if (!datasource_changes[_ds.dsSession]) {
3915
- datasource_changes[_ds.dsSession] = {};
3916
- }
3917
- if (!datasource_changes[_ds.dsSession][_ds.currentRecordId]) {
3918
- datasource_changes[_ds.dsSession][_ds.currentRecordId] = {};
3913
+ // let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
3914
+ // if (!datasource_changes[_ds.dsSession]) {
3915
+ // datasource_changes[_ds.dsSession] = {};
3916
+ // }
3917
+ // if (!datasource_changes[_ds.dsSession][_ds.currentRecordId]) {
3918
+ // datasource_changes[_ds.dsSession][_ds.currentRecordId] = {};
3919
3919
 
3920
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][_ds?.progDataSource?.datasetOutputField] = _ds?.data_feed?.rows || [];
3921
- await func.datasource.update(SESSION_ID, datasource_changes);
3922
- }
3923
- }
3920
+ // datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][_ds?.progDataSource?.datasetOutputField] = _ds?.data_feed?.rows || [];
3921
+ // await func.datasource.update(SESSION_ID, datasource_changes);
3922
+ // }
3923
+ // }
3924
3924
  } catch (err) {
3925
3925
  // console.error(err);
3926
3926
  }
@@ -5246,7 +5246,7 @@ func.utils.ws_worker.functions = {
5246
5246
  );
5247
5247
 
5248
5248
  if (show_log) console.log('DATASOURCE EXECUTION DONE ' + ret.dsSessionP + ' ' + _session.DS_GLB[ret.dsSessionP]?.tree_obj?.menuName || '' + ' SESSION_ID: ' + SESSION_ID, APP_OBJ[_session.app_id].app_name);
5249
- var obj = func.utils.clean_returned_datasource(SESSION_ID, ret.dsSessionP);
5249
+ var obj = func.utils.clean_returned_datasource(SESSION_ID, ret?.dsSessionP || {});
5250
5250
  obj.dataSourceSessionGlobal = _session.dataSourceSessionGlobal;
5251
5251
 
5252
5252
  worker_post_message({
@@ -5426,7 +5426,7 @@ func.utils.ws_worker.functions = {
5426
5426
  const couch = await __.rpi.get_app_couch(req.body.app_id);
5427
5427
  const session_doc = await couch.get(req.body.app_token);
5428
5428
  ret.session_stat = session_doc.stat;
5429
- } catch (error) { }
5429
+ } catch (error) {}
5430
5430
  }
5431
5431
  } catch (error) {
5432
5432
  debugger;
@@ -6689,9 +6689,8 @@ func.utils.set_SYS_GLOBAL_OBJ_WIDGET_INFO = async function (SESSION_ID, docP) {
6689
6689
  };
6690
6690
 
6691
6691
  func.utils.get_last_datasource_no = function (SESSION_ID) {
6692
-
6693
- if (typeof IS_PROCESS_SERVER !== "undefined") {
6694
- return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1)
6692
+ if (typeof IS_PROCESS_SERVER !== 'undefined') {
6693
+ return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1);
6695
6694
  } else {
6696
6695
  const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
6697
6696
  return filtered?.at?.(-1)?.dsSession;
@@ -3907,20 +3907,20 @@ func.datasource.callback = async function (SESSION_ID, dsSessionP, na, rowIdP, j
3907
3907
  }
3908
3908
  }
3909
3909
 
3910
- if (_ds?.progDataSource?.datasetOutputField) {
3911
- let datasource_changes = {};
3910
+ // if (_ds?.progDataSource?.datasetOutputField) {
3911
+ // let datasource_changes = {};
3912
3912
 
3913
- let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
3914
- if (!datasource_changes[_ds.dsSession]) {
3915
- datasource_changes[_ds.dsSession] = {};
3916
- }
3917
- if (!datasource_changes[_ds.dsSession][_ds.currentRecordId]) {
3918
- datasource_changes[_ds.dsSession][_ds.currentRecordId] = {};
3913
+ // let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
3914
+ // if (!datasource_changes[_ds.dsSession]) {
3915
+ // datasource_changes[_ds.dsSession] = {};
3916
+ // }
3917
+ // if (!datasource_changes[_ds.dsSession][_ds.currentRecordId]) {
3918
+ // datasource_changes[_ds.dsSession][_ds.currentRecordId] = {};
3919
3919
 
3920
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][_ds?.progDataSource?.datasetOutputField] = _ds?.data_feed?.rows || [];
3921
- await func.datasource.update(SESSION_ID, datasource_changes);
3922
- }
3923
- }
3920
+ // datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][_ds?.progDataSource?.datasetOutputField] = _ds?.data_feed?.rows || [];
3921
+ // await func.datasource.update(SESSION_ID, datasource_changes);
3922
+ // }
3923
+ // }
3924
3924
  } catch (err) {
3925
3925
  // console.error(err);
3926
3926
  }
@@ -5246,7 +5246,7 @@ func.utils.ws_worker.functions = {
5246
5246
  );
5247
5247
 
5248
5248
  if (show_log) console.log('DATASOURCE EXECUTION DONE ' + ret.dsSessionP + ' ' + _session.DS_GLB[ret.dsSessionP]?.tree_obj?.menuName || '' + ' SESSION_ID: ' + SESSION_ID, APP_OBJ[_session.app_id].app_name);
5249
- var obj = func.utils.clean_returned_datasource(SESSION_ID, ret.dsSessionP);
5249
+ var obj = func.utils.clean_returned_datasource(SESSION_ID, ret?.dsSessionP || {});
5250
5250
  obj.dataSourceSessionGlobal = _session.dataSourceSessionGlobal;
5251
5251
 
5252
5252
  worker_post_message({
@@ -5426,7 +5426,7 @@ func.utils.ws_worker.functions = {
5426
5426
  const couch = await __.rpi.get_app_couch(req.body.app_id);
5427
5427
  const session_doc = await couch.get(req.body.app_token);
5428
5428
  ret.session_stat = session_doc.stat;
5429
- } catch (error) { }
5429
+ } catch (error) {}
5430
5430
  }
5431
5431
  } catch (error) {
5432
5432
  debugger;
@@ -6689,9 +6689,8 @@ func.utils.set_SYS_GLOBAL_OBJ_WIDGET_INFO = async function (SESSION_ID, docP) {
6689
6689
  };
6690
6690
 
6691
6691
  func.utils.get_last_datasource_no = function (SESSION_ID) {
6692
-
6693
- if (typeof IS_PROCESS_SERVER !== "undefined") {
6694
- return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1)
6692
+ if (typeof IS_PROCESS_SERVER !== 'undefined') {
6693
+ return Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at?.(-1);
6695
6694
  } else {
6696
6695
  const filtered = Object.values(SESSION_OBJ[SESSION_ID].DS_GLB).filter((e) => e.tree_obj.menuType !== 'api');
6697
6696
  return filtered?.at?.(-1)?.dsSession;