biz-a-cli 2.3.6 → 2.3.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/package.json +4 -3
- package/scheduler/datalib.js +22 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biz-a-cli",
|
|
3
3
|
"nameDev": "biz-a-cli-dev",
|
|
4
|
-
"version": "2.3.
|
|
5
|
-
"versionDev": "0.0.
|
|
4
|
+
"version": "2.3.7",
|
|
5
|
+
"versionDev": "0.0.25",
|
|
6
6
|
"description": "",
|
|
7
7
|
"main": "bin/index.js",
|
|
8
8
|
"type": "module",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch a",
|
|
15
15
|
"test1": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
16
|
-
"dev": "node --watch server.js"
|
|
16
|
+
"dev": "node --watch server.js",
|
|
17
|
+
"hub": "node bin/hub.js"
|
|
17
18
|
},
|
|
18
19
|
"author": "Imamatek",
|
|
19
20
|
"license": "ISC",
|
package/scheduler/datalib.js
CHANGED
|
@@ -63,6 +63,28 @@ function getUrlAndParam(config, method, obj, path) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
function getTableObj(model, tableName) {
|
|
67
|
+
let obj = {};
|
|
68
|
+
obj[tableName] = model;
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function sendModel(model, apiConfig, tableName) {
|
|
73
|
+
const { url, params } = getUrlAndParam(
|
|
74
|
+
apiConfig,
|
|
75
|
+
'put',
|
|
76
|
+
getTableObj(model, tableName),
|
|
77
|
+
'orm'
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const options = {
|
|
81
|
+
headers: { 'content-type': 'text/plain' },
|
|
82
|
+
params: { subdomain: apiConfig.subdomain }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return Axios.post(url, params, options)
|
|
86
|
+
}
|
|
87
|
+
|
|
66
88
|
// export function getSelectedCompConfig(companyName) {
|
|
67
89
|
// const url = `${BIZA_SERVER_LINK}/config/%22getSelectedCompConfig%22`;
|
|
68
90
|
// const param = { companyName };
|