@xuda.io/xuda-worker-bundle-min 1.3.644 → 1.3.646

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.
Files changed (2) hide show
  1. package/index.js +28 -22
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -225,9 +225,10 @@ func.common.db = async function (
225
225
  debug: glb.DEBUG_MODE,
226
226
  session_id: SESSION_ID,
227
227
  gtp_token: _session.gtp_token,
228
- token: _session.opt.token,
228
+ app_token: _session.app_token,
229
+ res_token: _session.res_token,
229
230
  engine_mode: _session.engine_mode,
230
- req_id: "",
231
+ req_id: "rt_req_" + crypto.randomUUID(),
231
232
  app_replicate: APP_OBJ[app_id].app_replicate,
232
233
  };
233
234
 
@@ -268,7 +269,7 @@ func.common.db = async function (
268
269
  // Replace all non-alphanumeric characters with an empty string
269
270
  return str.replace(/[^a-zA-Z0-9]/g, "");
270
271
  }
271
- const get_request_id = function () {
272
+ const get_rep_id = function () {
272
273
  let _data = _.cloneDeep(dataP);
273
274
 
274
275
  delete _data.fields;
@@ -277,6 +278,7 @@ func.common.db = async function (
277
278
  delete _data.limit;
278
279
  delete _data.count;
279
280
  delete _data.reduce;
281
+ delete _data.prog_id;
280
282
 
281
283
  return cleanString(_data);
282
284
  };
@@ -310,10 +312,10 @@ func.common.db = async function (
310
312
  return { code: -1, data: table_req_id };
311
313
  }
312
314
  };
313
- data.req_id = Date.now();
315
+ // data.req_id = "rt_req_" + crypto.randomUUID();
314
316
 
315
317
  const read_dbs_pouch = async function (db) {
316
- const rep_id = get_request_id();
318
+ const rep_id = get_rep_id();
317
319
 
318
320
  const { code: table_req_code, data: table_req_id } =
319
321
  await validate_existence_of_whole_table_request(db);
@@ -352,6 +354,7 @@ func.common.db = async function (
352
354
  ts: Date.now(),
353
355
  docType: "rep_request",
354
356
  table_id: dataP.table_id,
357
+ prog_id: dataP.prog_id,
355
358
  entire_table: table_req_id === rep_id,
356
359
  source: "runtime",
357
360
  e: data,
@@ -6221,15 +6224,17 @@ func.utils.debug_report = async function (
6221
6224
  // }
6222
6225
  }, 1000);
6223
6226
 
6224
- func.utils.alerts.invoke(
6225
- SESSION_ID,
6226
- "system_msg",
6227
- "SYS_MSG_1240",
6228
- "debug",
6229
- null,
6230
- msgP,
6231
- sourceP //arguments.callee.caller.toString()- deprecated es6
6232
- );
6227
+ // // temp inactive cause to loop
6228
+
6229
+ // func.utils.alerts.invoke(
6230
+ // SESSION_ID,
6231
+ // "system_msg",
6232
+ // "SYS_MSG_1240",
6233
+ // "debug",
6234
+ // null,
6235
+ // msgP,
6236
+ // sourceP //arguments.callee.caller.toString()- deprecated es6
6237
+ // );
6233
6238
  console.error("XUDA", "ERROR", sourceP, msgP, details);
6234
6239
 
6235
6240
  if (
@@ -6270,14 +6275,15 @@ func.utils.debug_report = async function (
6270
6275
  );
6271
6276
  }
6272
6277
 
6273
- if (!glb.IS_WORKER) {
6274
- await func.common.db(SESSION_ID, "write_log", {
6275
- client_id: _session?.SYS_GLOBAL_OBJ_CLIENT_INFO?.fingerprint,
6276
- source: sourceP,
6277
- log_type: "error",
6278
- msg: msgP,
6279
- });
6280
- }
6278
+ // // temp inactive cause to loop
6279
+ // if (!glb.IS_WORKER) {
6280
+ // await func.common.db(SESSION_ID, "write_log", {
6281
+ // client_id: _session?.SYS_GLOBAL_OBJ_CLIENT_INFO?.fingerprint,
6282
+ // source: sourceP,
6283
+ // log_type: "error",
6284
+ // msg: msgP,
6285
+ // });
6286
+ // }
6281
6287
  }
6282
6288
  if (typeP === "W") console.warn("XUDA", "WARNING", msgP, details);
6283
6289
  if (typeP === "I") console.log("XUDA", "INFO", msgP, details);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.644",
3
+ "version": "1.3.646",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {