biz9-logic 2.0.4 → 2.0.7

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/biz9_config CHANGED
@@ -1,4 +1,8 @@
1
- VERSION='2.0.4'
2
- TITLE='BiZ9-Logic'
3
- REPO='git@github.com:biz9framework/biz9-logic.git'
4
- BRANCH='main'
1
+ VERSION='2.0.7'
2
+ TITLE='BiZ9-Logic';
3
+ REPO='git@github.com:biz9framework/biz9-logic.git';
4
+ BRANCH='main';
5
+ APP_TITLE_ID='test_app_title_id';
6
+ CLOUD_URL="http://localhost";
7
+ CLOUD_PORT_ID="1901";
8
+
package/index.js CHANGED
@@ -5,17 +5,8 @@ License GNU General Public License v3.0
5
5
  Description: BiZ9 Framework: Logic-JS
6
6
  */
7
7
  const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main,get_title_url_main } = require('./main');
8
-
9
- const global = {
10
- APP_VERSION:'1.0.0',
11
- PROJECT_ID:'19',
12
- APP_TITLE:'DG-CMS',
13
- APP_TITLE_ID:'dg-cms-feb-18b',
14
- CLOUD_PORT_ID:"1902",
15
- DT_BLANK:'blank_biz',
16
- DT_PAGE:'page_biz',
17
- CLOUD_URL:'http://localhost',
18
- };
8
+ const { get_biz9_config }= require('biz9-scriptz');
9
+ const biz9_config_file = get_biz9_config();
19
10
  class Item {
20
11
  static get_new = (data_type,id) => {
21
12
  return get_new_item_main(data_type,id);
@@ -23,41 +14,38 @@ class Item {
23
14
  static get_biz = (biz9_config,item,options)=>{
24
15
  return get_biz_item_main(biz9_config,item,options);
25
16
  }
26
- static get_title_url = (title) => {
27
- return get_title_url_main(title);
28
- };
29
17
  }
30
18
  class Cloud {
31
19
  static get_url = (action_url)=>{
32
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
20
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
33
21
  }
34
22
  static get_url_action_connect = () => {
35
- let action_url= "main/test/connect/"
36
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
23
+ let action_url= "main/test/connect/";
24
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
37
25
  };
38
26
  static get_url_action_update_item = (data_type,id) => {
39
27
  let action_url= "main/crud/update/"+data_type + "/" + id;
40
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
28
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
41
29
  };
42
30
  static get_url_action_get_item = (data_type,id) => {
43
31
  let action_url= "main/crud/get/"+data_type + "/" + id;
44
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
32
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
45
33
  };
46
34
  static get_url_action_delete_item = (data_type,id) => {
47
35
  let action_url= "main/crud/delete/"+data_type + "/" + id;
48
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
36
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
49
37
  };
50
38
  static get_url_action_get_list = (data_type) => {
51
39
  let action_url= "main/crud/get_list/"+data_type;
52
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
40
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
53
41
  };
54
42
  static get_url_action_delete_list = (data_type) => {
55
43
  let action_url= "main/crud/delete_list/"+data_type;
56
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
44
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
57
45
  };
58
46
  static get_url_action_update_list = (data_type) => {
59
47
  let action_url= "main/crud/update_list/"+data_type;
60
- return get_cloud_url_main(global.APP_TITLE_ID,global.CLOUD_URL,global.CLOUD_PORT_ID,action_url);
48
+ return get_cloud_url_main(biz9_config_file.APP_TITLE_ID,biz9_config_file.CLOUD_URL,biz9_config_file.CLOUD_PORT_ID,action_url);
61
49
  };
62
50
  static get_filter_obj = (data_type,filter,sort_by,page_current,page_size)=>{
63
51
  return get_cloud_filter_obj_main(data_type,filter,sort_by,page_current,page_size);
@@ -67,7 +55,7 @@ const get_data_config = (biz9_config,query) => {
67
55
  return get_data_config_main(biz9_config,query);
68
56
  };
69
57
  module.exports = {
70
- global,
58
+ biz9_config_file,
71
59
  Cloud,
72
60
  Item,
73
61
  get_data_config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "2.0.4",
3
+ "version": "2.0.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "dependencies": {
11
11
  "async-series": "^0.0.1",
12
- "biz9-scriptz": "^5.2.34",
12
+ "biz9-scriptz": "^5.2.19",
13
13
  "biz9-utility": "^2.0.14",
14
14
  "i": "^0.3.7",
15
15
  "jest": "^29.7.0",
package/test.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const series = require('async-series');
2
2
  const {Log,Test} = require('biz9-utility');
3
3
  const { Item, Cloud }= require('./');
4
+ const { get_biz9_config }= require('biz9-scriptz');
4
5
 
5
6
  /* --- TEST CONFIG START --- */
6
7
  //const ID='0';
@@ -28,10 +29,18 @@ const biz9_config ={
28
29
  describe("connect", () => {
29
30
  it("_connect", () => {
30
31
  series([
32
+ function(call) {
33
+ console.log('GET-BIZ9-CONFIG-FILE-START');
34
+ let biz9_config = get_biz9_config();
35
+ console.log(biz9_config);
36
+ console.log('GET-BIZ9-CONFIG-FILE-SUCCESS');
37
+ call()
38
+ },
31
39
  function(call) {
32
40
  console.log('CONNECT-START');
33
41
  let cloud_url = Cloud.get_url_action_connect();
34
42
  Log.w('connect_url',cloud_url);
43
+ console.log('CONNECT-SUCCESS');
35
44
  call()
36
45
  },
37
46
  function(call) {