@xuda.io/xuda-worker-bundle-min 1.3.425 → 1.3.427

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 +25 -17
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -263,36 +263,44 @@ func.common.db = async function (
263
263
  const error_callback = function (err) {
264
264
  reject(err);
265
265
  };
266
-
267
- data.req_id = new Date().valueOf();
268
-
269
- const read_dbs_pouch = async function (db) {
266
+ function cleanString(json) {
267
+ let str = JSON.stringify(json);
268
+ // Replace all non-alphanumeric characters with an empty string
269
+ return str.replace(/[^a-zA-Z0-9]/g, "");
270
+ }
271
+ const get_request_id = function () {
270
272
  let _data = _.cloneDeep(dataP);
271
273
 
272
- function cleanString(json) {
273
- let str = JSON.stringify(json);
274
- // Replace all non-alphanumeric characters with an empty string
275
- return str.replace(/[^a-zA-Z0-9]/g, "");
276
- }
277
-
278
274
  delete _data.fields;
279
275
  delete _data.viewSourceDesc;
280
- // if (_data.skip === null) {
281
276
  delete _data.skip;
282
277
  delete _data.limit;
283
278
  delete _data.count;
284
- // }
285
- // if (_data.reduce) {
286
279
  delete _data.reduce;
287
- // }
288
- const rep_id = cleanString(_data);
280
+
281
+ return cleanString(_data);
282
+ };
283
+ const validate_existence_of_whole_table_request = function () {};
284
+ data.req_id = Date.now();
285
+
286
+ const read_dbs_pouch = async function (db) {
287
+ // let _data = _.cloneDeep(dataP);
288
+
289
+ // delete _data.fields;
290
+ // delete _data.viewSourceDesc;
291
+ // delete _data.skip;
292
+ // delete _data.limit;
293
+ // delete _data.count;
294
+ // delete _data.reduce;
295
+
296
+ const rep_id = get_request_id();
289
297
 
290
298
  ////// validate existence of whole table request
291
299
  let table_req_id;
292
300
  try {
293
301
  table_req_id = cleanString({
294
- key: _data.table_id,
295
- table_id: _data.table_id,
302
+ key: data.table_id,
303
+ table_id: data.table_id,
296
304
  });
297
305
  const doc = await db.get(table_req_id);
298
306
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.425",
3
+ "version": "1.3.427",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {