cloudcc-cli 1.8.6 → 1.8.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/README.md +7 -0
- package/package.json +1 -1
- package/src/object/get.js +20 -5
- package/src/script/create.js +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/object/get.js
CHANGED
|
@@ -4,13 +4,28 @@ const { postNormal } = require("../../utils/http")
|
|
|
4
4
|
|
|
5
5
|
async function get(path) {
|
|
6
6
|
if (await getBusToken(path)) {
|
|
7
|
-
let res =
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
let res = [];
|
|
8
|
+
//get standar object
|
|
9
|
+
let standardObjList = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
|
|
10
|
+
standardObjList.data.forEach((item) => {
|
|
11
|
+
res.push({
|
|
10
12
|
id: item.id,
|
|
13
|
+
label: item.objname,
|
|
11
14
|
objname: item.label,
|
|
12
|
-
objprefix: item.
|
|
13
|
-
|
|
15
|
+
objprefix: item.objprefix,
|
|
16
|
+
schemetableName: item.label
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
//get custom object
|
|
20
|
+
let customObjList = await postNormal(global.setupSvc + "/api/customObject/list")
|
|
21
|
+
customObjList.data.objList.map((item) => {
|
|
22
|
+
res.push({
|
|
23
|
+
id: item.id,
|
|
24
|
+
label: item.objLabel,
|
|
25
|
+
objname: item.schemetable_name,
|
|
26
|
+
objprefix: item.prefix,
|
|
27
|
+
schemetableName: item.schemetableName
|
|
28
|
+
})
|
|
14
29
|
})
|
|
15
30
|
console.log(JSON.stringify(res))
|
|
16
31
|
return res
|
package/src/script/create.js
CHANGED
|
@@ -8,7 +8,7 @@ async function create(argvs) {
|
|
|
8
8
|
if (!res) {
|
|
9
9
|
let body = JSON.parse(decodeURI(argvs[2]))
|
|
10
10
|
const baseScriptPath = path.join(process.cwd(), "script");
|
|
11
|
-
const objectFolderPath = path.join(baseScriptPath, body.
|
|
11
|
+
const objectFolderPath = path.join(baseScriptPath, body.schemetableName.toLowerCase());
|
|
12
12
|
const filePath = path.join(objectFolderPath, body.scriptName);
|
|
13
13
|
|
|
14
14
|
try {
|