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 CHANGED
@@ -1,3 +1,10 @@
1
+ # ReleaseV1.8.7
2
+ #### Release Date: 2025-2-5
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * Adjust the logic of obtaining objects
7
+
1
8
  # ReleaseV1.8.6
2
9
  #### Release Date: 2025-2-5
3
10
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
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 = await postNormal(global.setupSvc + "/api/trigger/newobjtrigger")
8
- res = res.data.targetObjList.map((item) => {
9
- return {
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.schemetable_name
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
@@ -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.objId);
11
+ const objectFolderPath = path.join(baseScriptPath, body.schemetableName.toLowerCase());
12
12
  const filePath = path.join(objectFolderPath, body.scriptName);
13
13
 
14
14
  try {