zet-lib 1.0.26 → 1.0.27

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.
@@ -1097,6 +1097,7 @@ Scanning relation id to name
1097
1097
  const scanning = async (MYMODEL) => {
1098
1098
  //let MYMODEL = require(`./../models/${table}`);
1099
1099
  //console.log(JSON.stringify(MYMODEL))
1100
+ const MYMODELS = zRoute.MYMODELS();
1100
1101
  let table = MYMODEL.table;
1101
1102
  const widgets = MYMODEL.widgets;
1102
1103
  const not_scanning = ['created_by', 'updated_by'];
@@ -1112,7 +1113,7 @@ const scanning = async (MYMODEL) => {
1112
1113
  if (arr.length) {
1113
1114
  let str = Util.replaceAll(arr[0], '"', '');
1114
1115
  let mysplits = str.indexOf(',') > -1 ? str.split(',') : [str];
1115
- let MYMODEL_TABLE = require(`./../models/${widgets[key].table}`);
1116
+ let MYMODEL_TABLE = MYMODELS[widgets[key].table];
1116
1117
  let widgetsRelations = MYMODEL_TABLE.widgets;
1117
1118
  let relationsKeys = [];
1118
1119
  let relationsKeysObject = {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"